/* ReputeWell
   World: the shop counter. Paper, ink, order slips, a QR standee by the till.
   Signature: the printed review slip with a torn edge (.chit).
   Type: Inter for display and interface, Geist Mono for figures. 4px grid. */

:root {
  --paper: #f3efe7;
  --paper-2: #e9e3d7;
  --card: #fbf9f4;
  --thermal: #fffdf8;
  --ink: #1a1713;
  --ink-hover: #2f2a24;
  --ink-2: #50483e;
  --muted: #7a7164;
  --line: rgba(26, 23, 19, .12);
  --line-2: rgba(26, 23, 19, .2);
  --green: #17704f;
  --green-ink: #0f5239;
  --green-soft: #dfeae2;
  --wall: #143f30;
  --wall-2: #10352a;
  --star: #e39b0b;
  --star-off: #d6cebf;
  --bad: #b4412c;
  --bad-soft: #f3e1db;
  --chart: #cbc2b3;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow-sm: 0 1px 2px rgba(26, 23, 19, .06);
  --shadow: 0 1px 2px rgba(26, 23, 19, .05), 0 12px 32px rgba(26, 23, 19, .08);
  --sans: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--green-ink); text-underline-offset: 3px; }
b, strong { font-weight: 600; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.15; margin: 0; }
h1 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: clamp(34px, 4.2vw, 52px); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 16px; }
h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: clamp(28px, 3vw, 40px); line-height: 1.12; letter-spacing: -.025em; margin-bottom: 16px; }
h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 36px; padding: 8px 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 500; line-height: 20px; white-space: nowrap;
  text-decoration: none; cursor: pointer; background: none; color: var(--ink);
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.btn-primary:hover { background: var(--ink-hover); }
.btn-outline { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { background: var(--paper-2); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn-lg { min-height: 48px; padding: 12px 24px; font-size: 15px; border-radius: 12px; }
.btn-sm { min-height: 32px; padding: 4px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn .ico { width: 16px; height: 16px; }
.arrow::after { content: "→"; transition: transform 150ms var(--ease); }
.arrow:hover::after { transform: translateX(2px); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* site header / footer */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(243, 239, 231, .9); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.logo-mark { width: 24px; height: 24px; border-radius: 7px; background: var(--green); display: grid; place-items: center; flex: none; }
.logo-mark svg { width: 14px; height: 14px; fill: #fff; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; padding: 6px 12px; border-radius: 8px; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--ink); background: var(--paper-2); }
.account { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.account form { margin: 0; }
@media (max-width: 800px) { .main-nav { display: none; } .header-row { gap: 12px; } .account .btn { padding: 4px 12px; font-size: 13px; } }

.site-footer { border-top: 1px solid var(--line); padding: 64px 0 32px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 32px; }
.footer-grid p { margin: 12px 0 0; }
.footer-grid h4 { margin: 0 0 12px; font-size: 13px; font-weight: 500; color: var(--muted); }
.footer-grid a:not(.logo) { display: block; color: var(--ink-2); text-decoration: none; padding: 4px 0; }
.footer-grid a:not(.logo):hover { color: var(--ink); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 24px; font-size: 13px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* sections */
.section { padding: 96px 0; }
.section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 56px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--ink-2); font-size: 17px; max-width: 34rem; }
.section-lead { color: var(--ink-2); font-size: 17px; max-width: 600px; margin: 0 0 40px; }
.center .section-lead, .section-lead.center { margin-left: auto; margin-right: auto; }
.kicker { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0 0 16px; }
@media (max-width: 860px) { .section { padding: 64px 0; } .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; } }

/* ================================================================ hero */
.hero { padding-top: 88px; overflow: hidden; }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; align-items: end; }
.hero h1 { font-size: clamp(40px, 5.4vw, 72px); line-height: 1.02; letter-spacing: -.025em; margin: 0; }
.eyebrow { font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin: 0 0 24px; display: flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.lead { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin: 0; max-width: 32rem; }
.cta-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 28px 0 16px; }
.hero-note { font-size: 13px; color: var(--muted); margin: 0; }
.hero-stage { position: relative; margin-top: 72px; }
.wall { position: relative; background: linear-gradient(180deg, var(--wall), var(--wall-2)); border-radius: 24px 24px 0 0; padding: 56px 56px 0; height: 560px; overflow: hidden; }
.window { background: #fff; border-radius: 12px 12px 0 0; overflow: hidden; box-shadow: 0 24px 64px rgba(0, 0, 0, .35); max-width: 1040px; margin: 0 auto; }
.window-bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; background: #f4f2ee; border-bottom: 1px solid rgba(27, 25, 22, .08); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d9d4cb; }
.window-bar span { margin-left: 12px; font-family: var(--mono); font-size: 11px; color: #8b8479; }
.window img { width: 100%; height: auto; }
.hero-chit { position: absolute; right: 40px; top: -36px; width: 300px; transform: rotate(2deg); z-index: 2; }
@media (max-width: 1100px) { .hero-chit { right: 16px; width: 272px; } }
@media (max-width: 860px) {
  .hero { padding-top: 48px; }
  .hero-copy { grid-template-columns: 1fr; gap: 24px; }
  .hero-stage { margin-top: 48px; }
  .wall { padding: 120px 20px 0; height: 420px; border-radius: 16px 16px 0 0; }
  .hero-chit { left: 20px; right: auto; top: -24px; width: 264px; transform: rotate(-1.5deg); }
}

/* ================================================================ the slip (signature) */
.chit-wrap { filter: drop-shadow(0 1px 1px rgba(26, 23, 19, .08)) drop-shadow(0 12px 20px rgba(26, 23, 19, .16)); }
.chit {
  position: relative; background: var(--thermal); color: var(--ink);
  padding: 20px 20px 28px; font-family: var(--mono); font-size: 12px; line-height: 1.6;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%;
}
.chit-head { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.chit hr { border: 0; border-top: 1px dashed var(--line-2); margin: 12px 0; }
.chit-who { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chit-who b { font-family: var(--sans); font-size: 14px; font-weight: 600; }
.chit-text { font-family: var(--sans); font-size: 15px; line-height: 1.45; margin: 8px 0 0; color: var(--ink); }
.chit-foot { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-2); }
.chit-alert { color: var(--bad); }
.chit .btn { font-family: var(--sans); margin-top: 16px; }
.chit-done { text-align: center; padding: 8px 0; }
.chit-done b { display: block; font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 24px; margin-bottom: 4px; }

.stars { display: inline-flex; gap: 1px; vertical-align: -2px; }
.stars svg { width: 14px; height: 14px; fill: var(--star); }
.stars svg.off { fill: var(--star-off); }

/* ================================================================ the review's journey */
.journey { display: grid; }
.stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; padding: 40px 0; border-top: 1px solid var(--line); }
.stage:first-child { border-top: 0; padding-top: 0; }
.stage-n { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0 0 16px; }
.stage h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.12; margin-bottom: 16px; }
.stage p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; max-width: 30rem; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; font-size: 14px; color: var(--ink); }
.ticks li { display: flex; gap: 12px; align-items: baseline; }
.ticks li::before { content: ""; width: 12px; height: 1.5px; background: var(--green); flex: none; transform: translateY(-4px); }
.tray { background: var(--paper-2); border-radius: 20px; padding: 48px; min-height: 400px; display: grid; place-items: center; position: relative; overflow: hidden; }
@media (max-width: 860px) { .stage { grid-template-columns: 1fr; gap: 32px; } .tray { padding: 32px 20px; min-height: 0; } }

/* 01 standee */
.standee { width: 256px; background: #fff; border-radius: 16px; padding: 24px 24px 20px; text-align: center; box-shadow: var(--shadow); position: relative; }
.standee-biz { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.standee h4 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 20px; line-height: 1.1; margin: 8px 0 16px; }
.standee .qr { width: 168px; height: 168px; margin: 0 auto; padding: 8px; border: 1.5px solid var(--ink); border-radius: 12px; }
.standee .qr svg { width: 100%; height: 100%; display: block; }
.standee p { margin: 12px 0 0; font-size: 12px; color: var(--ink-2); }
.standee .assist { display: block; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.side-tag { position: absolute; right: 32px; bottom: 32px; font-family: var(--mono); font-size: 11px; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
@media (max-width: 860px) { .side-tag { position: static; margin-top: 24px; } }

/* 02 alerts */
.notes { width: min(400px, 100%); display: grid; gap: 12px; }
.note-card { background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow); display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.note-card + .note-card { transform: scale(.97); opacity: .9; }
.note-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.note-icon .ico { width: 16px; height: 16px; }
.note-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.note-top b { color: var(--ink); font-weight: 600; }
.note-card p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; }
.note-card p .bad { color: var(--bad); font-weight: 500; }

/* 03 reply composer */
.mock { width: min(440px, 100%); background: #fff; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.mock-review { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.mock-review .who { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.mock-review .who b { font-weight: 600; }
.mock-review p { margin: 8px 0 0; font-size: 14px; }
.mock-draft { padding: 16px 20px 20px; background: #faf8f4; }
.langs { display: inline-flex; gap: 2px; padding: 2px; background: var(--paper-2); border-radius: 8px; font-size: 12px; margin-bottom: 12px; }
.langs span { padding: 4px 10px; border-radius: 6px; color: var(--ink-2); }
.langs span.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 500; }
.draft { background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; font-size: 14px; line-height: 1.55; }
.draft::after { content: ""; display: inline-block; width: 1.5px; height: 16px; background: var(--ink); margin-left: 2px; vertical-align: -3px; }
.mock-actions { display: flex; gap: 8px; margin-top: 12px; }
.mock-foot { font-family: var(--mono); font-size: 11px; color: var(--muted); padding: 12px 20px; border-top: 1px solid var(--line); }

/* 04 insights */
.insight { width: min(460px, 100%); background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 20px; }
.insight-top { display: flex; justify-content: space-between; align-items: baseline; }
.insight-top b { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 38px; line-height: 1; }
.insight-top span { font-family: var(--mono); font-size: 12px; color: var(--green-ink); }
.insight svg { width: 100%; height: auto; display: block; margin: 12px 0 16px; }
.insight .line { fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.insight .grid line { stroke: var(--line); }
.insight text { font-family: var(--mono); font-size: 9px; fill: var(--muted); }
.insight-topics { border-top: 1px solid var(--line); padding-top: 12px; }

/* teams, steps, trust */
.duo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.duo > div { border-top: 1px solid var(--line-2); padding-top: 20px; }
.duo p { margin: 0; color: var(--ink-2); }
.step-n { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 12px; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; gap: 24px; } }
.trust { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.trust h2 { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -.025em; }
.honest { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px; position: sticky; top: 96px; }
.honest p { margin: 0; color: var(--ink-2); }
@media (max-width: 860px) { .trust { grid-template-columns: 1fr; gap: 32px; } .honest { position: static; } }

.cta-band { background: var(--ink); color: var(--paper); padding: 112px 0; }
.cta-band h2 { font-size: clamp(32px, 4.2vw, 56px); line-height: 1.05; letter-spacing: -.025em; margin-bottom: 24px; }
.cta-band p { color: #b8b0a3; margin: 0 0 32px; font-size: 17px; }
.cta-band .btn-primary { background: var(--paper); color: var(--ink); }
.cta-band .btn-primary:hover { background: #fff; }
.cta-band .btn-ghost { color: #d9d2c5; }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ================================================================ pricing */
.page-head { padding: 88px 0 48px; }
.page-head h1 { font-size: clamp(36px, 4.6vw, 60px); letter-spacing: -.025em; }
.page-head p { color: var(--ink-2); font-size: 17px; max-width: 36rem; margin: 0; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 440px; } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px; position: relative; display: flex; flex-direction: column; }
.plan h3 { font-size: 18px; font-weight: 600; }
.plan > p.muted { margin: 4px 0 0; font-size: 14px; min-height: 42px; }
.plan .btn { margin-top: auto; }
.plan.popular { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.plan.popular .muted, .plan.popular .price span { color: #b8b0a3; }
.plan.popular ul { color: #e4ddd0; }
.plan.popular li::before { background: #7fc4a3; }
.plan.popular .btn-primary { background: var(--paper); color: var(--ink); }
.badge { position: absolute; top: 32px; right: 32px; font-family: var(--mono); font-size: 11px; color: #7fc4a3; }
.price { margin: 24px 0; display: flex; align-items: baseline; gap: 4px; }
.price b { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 48px; line-height: 1; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.price span { color: var(--muted); font-size: 14px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 32px; font-size: 14px; color: var(--ink-2); display: grid; gap: 8px; }
.plan li { display: flex; gap: 12px; align-items: baseline; }
.plan li::before { content: ""; width: 10px; height: 1.5px; background: var(--green); flex: none; transform: translateY(-4px); }
.faq { margin: 96px 0 0; display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; }
.faq h2 { font-size: 40px; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; gap: 16px; } }
details { border-top: 1px solid var(--line-2); padding: 20px 0; }
details:last-child { border-bottom: 1px solid var(--line-2); }
summary { cursor: pointer; font-weight: 500; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--muted); transition: transform 200ms var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 12px 0 0; color: var(--ink-2); max-width: 40rem; }

/* forms */
.auth-box { max-width: 440px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 40px; box-shadow: var(--shadow); }
.auth-box h1 { font-size: 44px; margin-bottom: 24px; }
form label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 16px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 15px; padding: 8px 12px; min-height: 40px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink); transition: border-color 150ms var(--ease); }
input:hover, select:hover, textarea:hover { border-color: rgba(26, 23, 19, .32); }
textarea { resize: vertical; line-height: 1.5; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; min-height: 0; margin-top: 4px; accent-color: var(--ink); }
.error { background: var(--bad-soft); color: var(--bad); padding: 12px 16px; border-radius: 10px; }
.note { background: var(--paper-2); padding: 12px 16px; border-radius: 10px; }
.note.ok { background: var(--green-soft); color: var(--green-ink); }
.summary { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 16px; background: #fff; }
.summary div { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.summary div:last-child { border-bottom: 0; }
.summary span { color: var(--muted); }
.summary .total { font-size: 17px; }
.summary .total b { font-variant-numeric: tabular-nums; }

/* prose (policies, about, contact) */
.prose h1 { margin-bottom: 24px; }
.prose h2 { font-family: var(--sans); font-weight: 600; font-size: 18px; margin: 40px 0 8px; }
.prose li { margin-bottom: 8px; }
.prose p, .prose li { color: var(--ink-2); line-height: 1.65; }
.prose b { color: var(--ink); }
.trust .prose h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -.025em; margin: 0 0 16px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px; }
.panel h2 { font-size: 16px; margin: 0 0 12px; }

/* ================================================================ app shell */
.app-body {
  --paper: #f4f2ee;
  --paper-2: #eceae5;
  --card: #ffffff;
  --ink: #1b1916;
  --ink-2: #565048;
  --muted: #79736a;
  --line: rgba(27, 25, 22, .09);
  --line-2: rgba(27, 25, 22, .16);
  --side: #1b1916;
  --side-2: #27241f;
  --side-ink: #ece6db;
  --side-muted: #9a9286;
  background: var(--paper);
  font-size: 14px;
}
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.sidebar { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 20px 12px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-logo { color: var(--side-ink); padding: 0 8px 28px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a, .side-link {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px; border-radius: 8px;
  color: #c9c2b6; text-decoration: none; font: inherit; font-size: 14px;
  background: none; border: 0; width: 100%; cursor: pointer; text-align: left;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.side-nav .ico, .side-link .ico { color: var(--side-muted); }
.side-nav a:hover, .side-link:hover { background: var(--side-2); color: #fff; }
.side-nav a[aria-current] { background: var(--side-2); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.side-nav a[aria-current] .ico { color: #7fc4a3; }
.side-bottom { margin-top: auto; display: grid; gap: 4px; padding-top: 16px; }
.side-bottom form { margin: 0; }
.side-user { display: flex; gap: 10px; align-items: center; padding: 16px 8px 8px; margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--side-2); color: var(--side-ink); display: grid; place-items: center; font-weight: 500; flex: none; }
.side-who { min-width: 0; display: grid; }
.side-who b { font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-who span { font-size: 12px; color: var(--side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-plan { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 4px; font-size: 13px; }
.side-plan a { color: #7fc4a3; font-weight: 500; text-decoration: none; }
.plan-chip { font-family: var(--mono); font-size: 12px; color: var(--side-muted); }
.plan-chip.paid { color: var(--side-ink); }
.side-cta { background: var(--side-2); border-radius: 12px; padding: 16px; display: grid; gap: 8px; font-size: 13px; color: var(--side-muted); }
.side-cta b { color: #fff; font-weight: 500; font-size: 14px; }
.side-cta .btn-primary { background: var(--side-ink); color: var(--side); }
.side-cta .btn-primary:hover { background: #fff; }
.side-cta .side-link { justify-content: center; height: 32px; }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 16px 32px; background: rgba(244, 242, 238, .92); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; min-height: 80px; border-bottom: 1px solid var(--line); }
.topbar-title { min-width: 0; }
.topbar-title h1 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 24px; line-height: 1.1; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title p { margin: 0; font-size: 13px; color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.loc-select select { margin: 0; width: auto; max-width: 260px; min-height: 32px; height: 32px; padding: 0 32px 0 12px; font-size: 13px; border-radius: 8px; }
.icon-btn { display: none; border: 1px solid var(--line-2); background: var(--card); border-radius: 8px; padding: 6px; cursor: pointer; color: var(--ink); }
.app-content { padding: 24px 32px 64px; max-width: 1480px; width: 100%; }
.scrim { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; z-index: 40; transform: translateX(-100%); transition: transform 300ms var(--ease); }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(27, 25, 22, .4); z-index: 30; }
  .icon-btn { display: inline-flex; }
  .topbar { padding: 12px 16px; gap: 12px; flex-wrap: wrap; min-height: 64px; }
  .topbar-title h1 { font-size: 26px; }
  .topbar-actions { width: 100%; margin-left: 0; }
  .loc-select { flex: 1; }
  .loc-select select { width: 100%; max-width: none; }
  .app-content { padding: 16px 16px 48px; }
}

.card-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-sm); }
.card-panel h2 { font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0; margin: 0 0 16px; }
.panel-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.panel-title h2 { margin: 0; }
.panel-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; color: var(--ink-2); }
.banner::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--star); flex: none; }
.banner.ok::before { background: var(--green); }
.banner b { color: var(--ink); }
.banner .btn { margin-left: auto; }
.dash { padding: 0; }

/* google integration */
.integration, .connect-card { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.integration form { margin: 0 0 0 auto; }
.integration-text { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.integration-text b { font-weight: 500; }
.integration-text > span:last-child { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.g-logo { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; color: var(--ink-2); flex: none; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.ok::before { background: var(--green); }
.status.warn::before { background: var(--star); }
.status.bad { color: var(--bad); }
.connect-card { padding: 20px; }
.connect-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--paper-2); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.connect-text { display: grid; gap: 4px; flex: 1; min-width: 220px; }
.connect-text b { font-weight: 500; }
.connect-text span { color: var(--ink-2); font-size: 13px; }
@media (max-width: 640px) { .integration, .connect-card { flex-wrap: wrap; } .integration form { margin-left: 48px; } }

/* overview: the score and the trend */
.overview { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.score { display: grid; align-content: start; }
.score-label { font-size: 13px; color: var(--ink-2); }
.score-big { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 4px; }
.score-big b { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 60px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.score-big .stars svg { width: 16px; height: 16px; }
.score-sub { font-size: 13px; color: var(--muted); margin: 0; }
.score-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.score-split span { display: block; font-size: 13px; color: var(--ink-2); }
.score-split b { display: block; font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 32px; line-height: 1.05; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.score-split b.bad { color: var(--bad); }
.score-split small { display: block; font-size: 12px; color: var(--muted); }
.score-split small a { font-weight: 500; text-decoration: none; }
.score-split small a:hover { text-decoration: underline; }
@media (max-width: 1100px) { .overview { grid-template-columns: 1fr; } }

.trend svg { display: block; width: 100%; height: auto; overflow: visible; }
.trend .grid line { stroke: var(--line); }
.trend text { font-family: var(--mono); font-size: 10px; fill: var(--muted); }
.trend .vol { fill: var(--paper-2); }
.trend .line { fill: none; stroke: var(--green); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.trend .dot { fill: var(--card); stroke: var(--green); stroke-width: 1.5; }
.trend .dot.now { fill: var(--green); }
.trend .gap { stroke: var(--chart); stroke-width: 1.5; stroke-dasharray: 2 4; fill: none; }
.trend-now { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.trend-now b { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ink); }
.trend-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.trend-legend i { width: 12px; height: 2px; background: var(--green); }
.trend-legend i.v { height: 8px; width: 8px; border-radius: 2px; background: var(--paper-2); }

/* work area */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.dash-grid > * { min-width: 0; }
.side { display: grid; gap: 16px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.next .chit { padding: 20px 20px 32px; }

.inbox { padding: 0; overflow: hidden; scroll-margin-top: 96px; }
.inbox-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); }
.tabs { display: inline-flex; gap: 20px; }
.tabs button { border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font: inherit; font-size: 14px; color: var(--muted); padding: 16px 0 14px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; transition: color 150ms var(--ease), border-color 150ms var(--ease); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }
.tabs button span { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 0; }
.filters select, .filters input { width: auto; margin: 0; min-height: 32px; height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.filters select { padding-right: 28px; }
.filters input { width: 200px; }
@media (max-width: 640px) { .inbox-head { padding: 0 16px; } .tabs { width: 100%; justify-content: space-between; } .filters { width: 100%; } .filters input { flex: 1; width: auto; } }

.review { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; padding: 20px; border-top: 1px solid var(--line); transition: background-color 150ms var(--ease); scroll-margin-top: 120px; }
.review:first-child { border-top: 0; }
.review-list .review:hover { background: #fcfbf9; }
.review-side { display: flex; flex-direction: column; align-items: center; }
.has-reply .review-side::after { content: ""; flex: 1; width: 0; border-left: 1.5px solid var(--green); margin-top: 8px; opacity: .5; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--paper-2); color: var(--ink-2); display: grid; place-items: center; font-weight: 500; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.review-main { min-width: 0; }
.review-head { display: flex; align-items: center; gap: 12px; min-height: 20px; }
.review-head b { font-weight: 600; }
.review-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; font-size: 13px; color: var(--muted); }
.review-meta > span + span::before { content: "·"; margin-right: 8px; }
.review-meta .stars svg { width: 13px; height: 13px; }
.review-meta .via { color: var(--ink-2); }
.review-text { margin: 8px 0 0; line-height: 1.6; max-width: 68ch; font-size: 15px; }
.review-text.empty { color: var(--muted); font-size: 14px; }
.state { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); flex: none; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.state.bad { color: var(--bad); }
.state.bad::before { background: var(--bad); }
.thread { display: block; width: 31px; height: 30px; margin-left: 17px; border-left: 1.5px solid var(--green); border-bottom: 1.5px solid var(--green); border-bottom-left-radius: 12px; opacity: .5; }
.reply-box { margin-top: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 12px; max-width: 68ch; }
.reply-box b { display: block; font-size: 12px; font-weight: 500; color: var(--green-ink); line-height: 20px; }
.reply-box p { margin: 0; color: var(--ink-2); }
.review-actions { margin-top: 12px; }
.composer { margin-top: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.composer label { font-weight: 400; }
.composer textarea { margin: 4px 0 12px; }
.composer-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.empty-state { color: var(--muted); padding: 56px 16px; text-align: center; margin: 0; }
@media (max-width: 640px) { .review { padding: 16px; grid-template-columns: 32px minmax(0, 1fr); } .review .avatar { width: 32px; height: 32px; } .thread { margin-left: 15px; width: 29px; } }

.dist-row { display: grid; grid-template-columns: 32px 1fr 28px; gap: 12px; align-items: center; font-size: 13px; height: 24px; }
.dist-row > span:first-child { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-family: var(--mono); font-size: 12px; }
.dist-row > span:first-child svg { width: 11px; height: 11px; fill: var(--star); }
.dist-row > span:last-child { text-align: right; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.dist-track { background: var(--paper-2); border-radius: 4px; height: 6px; overflow: hidden; }
.dist-fill { background: var(--chart); height: 100%; border-radius: 4px; }

.topic-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 24px; gap: 12px; align-items: center; height: 28px; font-size: 13px; }
.topic-row > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topic-bar { display: flex; height: 6px; border-radius: 4px; overflow: hidden; background: var(--paper-2); }
.topic-bar i { display: block; height: 100%; }
.topic-bar i.pos, .legend .pos { background: var(--green); opacity: .8; }
.topic-bar i.neg, .legend .neg { background: var(--bad); opacity: .7; }
.topic-row .num { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.legend { display: flex; gap: 16px; margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; }

.team-head, .team-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px 56px; gap: 8px; align-items: center; }
.team-head { font-size: 12px; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.team-head span:not(:first-child), .team-row > span, .team-row > b { text-align: right; }
.team-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.team-row:last-of-type { border-bottom: 0; }
.team-row > b { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.team-row > span { color: var(--ink-2); font-family: var(--mono); font-size: 12px; }
.team-name { display: flex; gap: 8px; align-items: center; min-width: 0; }
.team-name > div { min-width: 0; flex: 1; }
.team-name b { font-weight: 500; }
.rank { width: 16px; color: var(--muted); font-family: var(--mono); font-size: 12px; text-align: center; }
.team-bar { display: block; height: 4px; background: var(--paper-2); border-radius: 4px; margin-top: 4px; overflow: hidden; max-width: 120px; }
.team-bar span { display: block; height: 100%; background: var(--chart); border-radius: 4px; }
.team-row:first-of-type .team-bar span { background: var(--green); opacity: .8; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; z-index: 50; box-shadow: var(--shadow); animation: toast-in 300ms var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* settings */
.settings { max-width: 880px; }
.settings .panel { margin-bottom: 16px; }
.settings-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; position: sticky; top: 80px; background: var(--paper); z-index: 10; }
.settings-tabs a { padding: 12px 0; color: var(--muted); text-decoration: none; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color 150ms var(--ease), border-color 150ms var(--ease); }
.settings-tabs a:hover { color: var(--ink); }
.settings-tabs a.on { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }
.set-section { margin-bottom: 16px; scroll-margin-top: 144px; padding: 28px; }
.set-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.set-head h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 22px; margin: 0 0 4px; }
.set-head p { margin: 0; max-width: 64ch; }
.set-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--paper-2); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.settings-form { max-width: 480px; margin-left: 52px; }
.settings-form select { width: 100%; }
.set-section > .note, .loc-row, .team-note { margin-left: 52px; }
.settings input:disabled, .settings select:disabled { background: var(--paper-2); }
.loc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 16px 0; }
.loc-row b { font-weight: 500; }
.loc-row code { font-family: var(--mono); font-size: 12px; background: var(--paper-2); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.loc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.loc-actions form { margin: 0; }
.team-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; max-width: 640px; }
.team-add label { margin: 0; }
.team-add .btn { height: 40px; }
.team-note { margin-top: 16px; }
@media (max-width: 900px) { .settings-tabs { top: 0; position: static; } }
@media (max-width: 640px) {
  .settings-form, .set-section > .note, .loc-row, .team-note { margin-left: 0; }
  .set-section { padding: 20px 16px; }
  .team-add { grid-template-columns: 1fr; }
}

/* one entrance on load */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.hero-copy > *, .hero-stage { animation: rise 500ms var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: 60ms; }
.hero-stage { animation-delay: 120ms; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ================================================================ v4: one page per feature */
.side-group { display: grid; gap: 2px; margin-bottom: 20px; }
.side-label { font-size: 12px; color: var(--side-muted); padding: 0 8px; margin: 0 0 4px; }
.side-nav { display: grid; gap: 2px; }
.side-bottom .side-nav a { color: #b5ad9f; }
.side-up { margin-left: auto; color: #7fc4a3; font-size: 13px; font-weight: 500; text-decoration: none; }
.side-user .side-who span { font-family: var(--mono); }

.app-content { max-width: 1520px; }
.stack { display: grid; gap: 16px; max-width: 880px; }
.block { padding: 24px; }
.block h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 22px; margin: 0 0 4px; display: flex; align-items: center; gap: 12px; }
.block h2 .status { font-family: var(--sans); }
.block.quiet { background: transparent; box-shadow: none; }
.block.quiet h2 { font-size: 22px; }
.block-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.block-head p { margin: 0; }
.lead-sm { font-size: 15px; color: var(--ink-2); max-width: 56ch; margin: 0 0 16px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.row-actions form { margin: 0; }
.row-actions.end { justify-content: flex-end; margin: 0; flex-wrap: nowrap; }
.facts { margin: 0; display: grid; }
.facts > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; }
@media (max-width: 640px) { .facts > div { grid-template-columns: 1fr; gap: 2px; } }
.gate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--paper); border: 1px dashed var(--line-2); border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; color: var(--ink-2); }
.gate .ico { color: var(--muted); }
.gate .btn { margin-left: auto; }
.banner.bad::before { background: var(--bad); }
.btn.danger:hover { color: var(--bad); background: var(--bad-soft); }
.settings-form { margin-left: 0; max-width: 480px; }
.empty-block { padding: 40px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.empty-block p { margin: 0; color: var(--ink-2); max-width: 44ch; }
.empty-row { margin: 20px 0 0; }

/* inbox: pulse strip */
.pulse { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.pulse-item { padding: 16px 20px; border-left: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.pulse-item:first-child { border-left: 0; }
.pulse-item > span { font-size: 13px; color: var(--ink-2); }
.pulse-item b { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.pulse-item.bad b { color: var(--bad); }
.pulse-item small { font-size: 12px; color: var(--muted); min-height: 16px; }
@media (max-width: 900px) { .pulse { grid-template-columns: 1fr 1fr; } .pulse-item:nth-child(3) { border-left: 0; } .pulse-item:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* inbox: the reply desk */
.desk { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; height: calc(100vh - 80px - 24px - 120px - 32px); min-height: 560px; }
.queue { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; }
.queue-head { padding: 0 16px; border-bottom: 1px solid var(--line); }
.queue-head .tabs { width: 100%; justify-content: space-between; }
.queue-head .filters { padding: 0 0 12px; flex-wrap: nowrap; }
.queue-head .filters input { flex: 1; width: auto; min-width: 0; }
.topic-filter { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.queue-list { overflow-y: auto; flex: 1; }
.row { position: relative; display: grid; gap: 4px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 16px 12px 28px; cursor: pointer; transition: background-color 120ms var(--ease); }
.row:hover { background: #fbfaf8; }
.row.on { background: var(--paper); box-shadow: inset 2px 0 0 var(--ink); }
.row-top { display: flex; align-items: center; gap: 8px; }
.row-top b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-top .stars svg { width: 11px; height: 11px; }
.row-top time { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.row-text { font-size: 13px; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mark { position: absolute; left: 12px; top: 19px; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.mark.bad { background: var(--bad); }
.mark.done { background: transparent; border: 1.5px solid var(--green); width: 7px; height: 7px; opacity: .6; }

.detail { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; }
.detail-nav { display: flex; align-items: center; gap: 4px; padding: 8px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.detail-nav .pos { margin-left: auto; margin-right: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.detail-nav .back { display: none; }
.detail-body { padding: 32px 40px 40px; max-width: 760px; width: 100%; }
.detail-head { display: flex; align-items: flex-start; gap: 16px; }
.detail-head h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 24px; line-height: 1.1; margin: 0 0 4px; }
.detail-head .avatar { width: 44px; height: 44px; font-size: 16px; }
.detail-head .state { margin-left: auto; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.detail-meta > span + span::before { content: "·"; margin-right: 8px; }
.detail-text { font-size: 18px; line-height: 1.6; margin: 24px 0 0; max-width: 60ch; }
.detail-text.empty { color: var(--muted); font-size: 15px; }
.detail-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { font: inherit; font-size: 12px; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; cursor: pointer; transition: background-color 120ms var(--ease), color 120ms var(--ease); }
.chip:hover { background: var(--paper-2); color: var(--ink); }
.state.done { color: var(--green-ink); }
.state.done::before { background: var(--green); }
.answer { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; margin-top: 8px; }
.answer .thread { margin-left: 21px; width: 39px; height: 34px; }
.answer .reply-box { margin-top: 16px; font-size: 15px; }
.answer-actions { margin-left: 60px; }
.composer { margin-top: 32px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.composer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.composer-top label { margin: 0; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.composer textarea { margin: 0 0 12px; font-size: 15px; line-height: 1.55; }
.seg { display: inline-flex; padding: 2px; background: var(--paper-2); border-radius: 8px; }
.seg button { font: inherit; font-size: 12px; border: 0; background: none; color: var(--ink-2); padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 500; }
.keys { margin-left: auto; font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
kbd { font-family: var(--mono); font-size: 11px; min-width: 20px; height: 20px; padding: 0 4px; display: inline-grid; place-items: center; background: var(--card); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; color: var(--ink-2); }
.detail-empty { margin: auto; text-align: center; display: grid; gap: 4px; padding: 40px; color: var(--muted); }
.detail-empty b { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 24px; color: var(--ink); }
@media (max-width: 900px) {
  .desk { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .queue { border-right: 0; }
  .queue-list { max-height: none; }
  .detail { display: none; }
  .desk.show-detail .queue { display: none; }
  .desk.show-detail .detail { display: flex; }
  .detail-nav .back { display: inline-flex; }
  .detail-body { padding: 20px 16px 24px; }
  .detail-head h2 { font-size: 26px; }
  .detail-text { font-size: 16px; }
  .keys { display: none; }
  .answer-actions { margin-left: 0; }
}

/* insights */
.ins-top { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.ins-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ins-grid #team-panel { grid-column: 1 / -1; }
@media (max-width: 1100px) { .ins-top, .ins-grid { grid-template-columns: 1fr; } }
.score-dist { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.fig { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.fig:nth-child(-n+2) { border-top: 0; padding-top: 0; }
.fig:nth-child(odd) { padding-right: 16px; }
.fig > span { font-size: 13px; color: var(--ink-2); }
.fig b { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.fig.bad b { color: var(--bad); }
.fig small { font-size: 12px; color: var(--muted); }
a.topic-row { color: var(--ink); text-decoration: none; border-radius: 6px; margin: 0 -8px; padding: 0 8px; grid-template-columns: minmax(0, 1fr) 120px 48px; height: 32px; transition: background-color 120ms var(--ease); }
a.topic-row:hover { background: var(--paper); }

/* review links & QR */
.qr-grid { display: grid; gap: 16px; }
.qr-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding: 24px; align-items: center; }
.qr-frame { background: #fff; border: 1.5px solid var(--ink); border-radius: 16px; padding: 12px; }
.qr-frame img { width: 100%; height: auto; }
.qr-info h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 24px; margin: 0 0 12px; }
.linkbox { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 4px 4px 4px 12px; max-width: 480px; }
.linkbox code { font-family: var(--mono); font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-line { margin: 16px 0 0; color: var(--ink-2); font-size: 14px; }
.stat-line b { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 24px; color: var(--ink); margin-right: 4px; }
@media (max-width: 640px) { .qr-card { grid-template-columns: 1fr; gap: 20px; } .qr-frame { max-width: 200px; } }

/* team links */
.team-add { margin-bottom: 8px; }
.table-wrap { overflow-x: auto; margin-top: 24px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 400; font-size: 12px; color: var(--muted); padding: 0 12px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table td.num { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 18px; }
.table .team-name > div { display: grid; }
details.how { padding: 20px 24px; border-top: 0; }
details.how p { font-size: 14px; }

/* auto-reply rules */
.rules { display: grid; gap: 0; }
.rule { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); margin: 0; font-weight: 400; cursor: pointer; }
.rule:first-child { border-top: 0; padding-top: 0; }
.rule input { width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; accent-color: var(--ink); }
.rule > span { display: grid; gap: 2px; }
.rule b { font-weight: 600; }
.rule.fixed { cursor: default; color: var(--ink-2); }
.rule.fixed .ico { width: 16px; height: 16px; margin: 2px 0 0 1px; color: var(--muted); }

/* plan & billing */
.plan-now { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.plan-now .kicker { margin: 0 0 4px; }
.plan-name { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 40px; line-height: 1; margin: 0 0 8px; }
.plan-now p.muted { margin: 0; }
.banner > span { flex: 1 1 240px; }
p { text-wrap: pretty; }
