/* 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; }
[hidden] { display: none !important; }
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: 26px; height: 26px; border-radius: 7px; background: var(--green); display: grid; place-items: center; flex: none; }
.logo-mark svg { width: 21px; height: 21px; }
.logo .wm { height: 28px; width: auto; display: block; }
.side-logo .wm { height: 24px; }
.footer-grid .logo .wm { height: 26px; }
.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; }
.appbar { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 32px; background: rgba(244, 242, 238, .94); backdrop-filter: blur(8px); color: var(--ink); position: sticky; top: 0; z-index: 25; border-bottom: 1px solid var(--line); }
.appbar-end { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.appbar-plan { font-size: 13px; color: var(--muted); margin-right: 8px; }
.appbar-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: var(--ink-2); }
.appbar-icon:hover { background: var(--paper-2); color: var(--ink); }
.appbar-icon .ico { width: 18px; height: 18px; }
.appbar-demo { display: flex; flex-direction: column; line-height: 1.2; }
.appbar-demo small { font-size: 11px; color: var(--muted); }
.appbar-demo b { font-weight: 500; font-size: 14px; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 24px 32px 8px; }
.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; }
  .appbar { padding: 0 12px; height: 60px; gap: 8px; }
  .appbar-plan { display: none; }
  .topbar { padding: 16px 16px 4px; gap: 12px; flex-wrap: wrap; }
  .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-sub { display: grid; gap: 2px; margin: 0 0 2px 17px; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, .08); }
.side-nav .side-sub a { height: 30px; font-size: 13px; }
.side-nav .side-sub a .ico { width: 14px; height: 14px; }
.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, minmax(0, 1fr)); margin: 0 0 16px; }
.pulse-item { padding: 4px 20px; border-left: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.pulse-item:first-child { padding-left: 0; }
.pulse-item:first-child { border-left: 0; }
.pulse-item > span { grid-column: 2; grid-row: 1; font-size: 13px; color: var(--ink-2); align-self: end; }
.pulse-item b { grid-column: 1; grid-row: 1 / 3; font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.pulse-item.bad b { color: var(--bad); }
.pulse-item small { grid-column: 2; grid-row: 2; font-size: 12px; color: var(--muted); align-self: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse-item small .stars svg { width: 11px; height: 11px; }
@media (max-width: 900px) { .pulse { grid-template-columns: 1fr 1fr; row-gap: 12px; } .pulse-item:nth-child(3) { border-left: 0; padding-left: 0; } }
@media (max-width: 640px) { .pulse-item { grid-template-columns: minmax(0, 1fr); row-gap: 4px; padding: 4px 16px; } .pulse-item > span, .pulse-item small { grid-column: 1; } .pulse-item b { grid-row: 1; font-size: 26px; } .pulse-item > span { grid-row: 2; } .pulse-item small { grid-row: 3; white-space: normal; } }

/* 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 - 64px - 88px - 64px - 40px); 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; min-width: 0; 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; min-width: 0; }
.row-top b { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.row-top .stars { flex: none; }
.row-top .stars svg { width: 11px; height: 11px; }
.row-top time { margin-left: auto; padding-left: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.row-src { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.row-src .d { width: 12px; height: 12px; opacity: 1; }
.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; }
@media (max-width: 640px) { .detail-meta { flex-direction: column; align-items: flex-start; gap: 2px; } .detail-meta > span + span::before { content: none; } }
.detail-text { font-size: 18px; line-height: 1.6; margin: 24px 0 0; max-width: 60ch; }
.detail-context { margin: 20px 0 0; font-size: 13px; color: var(--muted); }
.detail-context + .detail-text { margin-top: 8px; }
.detail-meta a { color: inherit; }
/* Source tags: Google, Facebook, Instagram, YouTube */
.src { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; line-height: 18px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); white-space: nowrap; }
.src::before { content: ""; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--pf) center / contain no-repeat; mask: var(--pf) center / contain no-repeat; }
.src:not(.src-google):not(.src-facebook):not(.src-instagram):not(.src-youtube)::before { width: 6px; height: 6px; border-radius: 50%; -webkit-mask: none; mask: none; }
/* Connections page */
.conn-list { display: grid; gap: 8px; margin: 16px 0 0; }
.conn-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; }
.conn-row .conn-name { flex: 1; min-width: 0; }
.conn-row .conn-name b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn-row .conn-name span { font-size: 13px; color: var(--muted); }
.conn-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.conn-head h2 { margin: 0; }
.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: minmax(0, 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; }

/* Platform icons: line icons in the app's style, coloured by the surrounding text */
.d.d-google, .d.d-facebook, .d.d-instagram, .d.d-youtube, .d.d-whatsapp { width: 14px; height: 14px; border-radius: 0; background: currentColor; -webkit-mask: var(--pf) center / contain no-repeat; mask: var(--pf) center / contain no-repeat; vertical-align: -2px; opacity: .85; }
.d-google, .src-google { --pf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.945 11a9 9 0 1 1 -3.284 -5.997l-2.655 2.392a5.5 5.5 0 1 0 2.119 6.605h-4.125v-3h7.945'/%3E%3C/svg%3E"); }
.d-facebook, .src-facebook { --pf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3'/%3E%3C/svg%3E"); }
.d-instagram, .src-instagram { --pf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10'/%3E %3Cpath d='M8.5 12a3.5 3.5 0 1 0 7 0a3.5 3.5 0 0 0 -7 0'/%3E %3Cpath d='M17 7v.01'/%3E%3C/svg%3E"); }
.d-youtube, .src-youtube { --pf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8'/%3E %3Cpath d='M10 9l5 3l-5 3l0 -6'/%3E%3C/svg%3E"); }
.d-whatsapp, .src-whatsapp { --pf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21l1.65 -3.8a9 9 0 1 1 3.4 2.9l-5.05 .9'/%3E %3Cpath d='M9 10a.5 .5 0 0 0 1 0v-1a.5 .5 0 0 0 -1 0v1a5 5 0 0 0 5 5h1a.5 .5 0 0 0 0 -1h-1a.5 .5 0 0 0 0 1'/%3E%3C/svg%3E"); }

/* Home: platforms */
.pf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pf-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.pf-card h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 22px; }
.pf-card h3 .ico { width: 16px; height: 16px; }
.pf-card > p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.pf-card .ticks { margin: 0; }
.pf-sample { margin-top: auto; padding: 12px 16px; background: var(--paper-2); border-radius: 12px; }
.pf-who { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pf-who b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-who .stars svg { width: 12px; height: 12px; }
.pf-sample p { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink); }
@media (max-width: 1100px) { .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pf-grid { grid-template-columns: 1fr; } }

/* Insights: by platform */
.pf-rows { display: grid; }
.pf-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pf-row:first-child { border-top: 0; color: var(--muted); font-size: 12px; }
.pf-row > span:first-child { display: flex; align-items: center; gap: 8px; }
.pf-row .ico.dot { width: 16px; height: 16px; }
.pf-row .num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
select[hidden] { display: none; }

/* Review requests */
.req-pulse { margin: 0; }
.req-add, .req-message { display: grid; gap: 12px; max-width: 640px; }
.req-add label, .req-message label { margin: 0; }
.req-add textarea, .req-message textarea { width: 100%; font: inherit; line-height: 1.5; }
.file-btn { cursor: pointer; }
.file-btn input { display: none !important; }
.req-previews { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.req-previews p { margin: 0 0 8px; }
.wa-chat { background: #e9e2d6; border-radius: 12px; padding: 16px; min-height: 160px; }
.wa-bubble { background: #d9fdd3; color: #111b21; border-radius: 8px 0 8px 8px; padding: 8px 12px; margin-left: auto; max-width: 92%; width: fit-content; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.mail-frame { width: 100%; height: 360px; border: 1px solid var(--line); border-radius: 12px; background: #f4f2ec; }
.mail-frame.tall { height: 640px; margin-top: 12px; }
.req-table td { vertical-align: middle; }
.req-contact { display: block; margin-top: 2px; }
.status.muted { color: var(--muted); }
.report-preview summary { cursor: pointer; font-weight: 600; font-size: 14px; }
@media (max-width: 760px) { .req-previews { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- shared bits for the feature pages */
.stack.wide { max-width: 1120px; }
.row-actions.tight { margin-top: 8px; }
.flip .ico { transform: rotate(180deg); }
.status.muted { color: var(--muted); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.empty-note { color: var(--muted); font-size: 14px; margin: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.d { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.d-news { background: var(--ink-2); }

/* ---------------------------------------------------------------- posts */
.pub-compose { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; margin-top: 16px; }
@media (max-width: 980px) { .pub-compose { grid-template-columns: 1fr; } }
.pub-form { display: grid; gap: 12px; }
.pub-targets { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pub-targets legend { margin-bottom: 8px; }
.pub-target { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font-size: 14px; font-weight: 400; cursor: pointer; margin: 0; }
.pub-target input { width: auto; min-height: 0; margin: 0; accent-color: var(--ink); }
.pub-target:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pub-target.warn { border-style: dashed; }
.pub-target-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-label { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 -8px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.pub-form textarea { margin: 0; }
.pub-ai { display: flex; gap: 8px; align-items: center; }
.pub-ai input { margin: 0; }
.pub-cta { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; }
.pub-cta label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
#pub-warn { min-height: 18px; margin: 0; color: var(--bad); }
.pub-when { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pub-when input { width: auto; margin: 0; }
.pub-preview { position: sticky; top: 16px; display: grid; gap: 12px; justify-items: start; }
.pv { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; box-shadow: var(--shadow-sm); }
.pv img { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.pv p { margin: 0; padding: 0 0 12px; white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.pv-pad { padding: 12px 14px 0; }
.pv-head { display: flex; align-items: center; gap: 8px; padding: 0 0 10px; }
.pv-head > div { display: grid; line-height: 1.2; }
.pv-head b { font-size: 14px; font-weight: 600; }
.pv-av { width: 32px; height: 32px; border-radius: 50%; background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--line); flex: none; }
.pv-instagram .pv-head { padding: 10px 12px; }
.pv-instagram p { padding: 10px 12px 14px; }
.pv-instagram img, .pv-noimg { aspect-ratio: 1; }
.pv-noimg { display: grid; place-items: center; background: var(--paper-2); color: var(--muted); font-size: 13px; }
.pv-tag { color: #00376b; }
.pv-btn { display: inline-block; margin: 0 0 14px; color: #1a73e8; font-weight: 500; font-size: 14px; }
.pub-list { display: grid; gap: 12px; }
.pub-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.pub-card:first-child { border-top: 0; padding-top: 0; }
.pub-card:not(:has(img)) { grid-template-columns: minmax(0, 1fr); }
.pub-card img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.pub-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pub-text { margin: 8px 0; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pub-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.pub-results { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.pub-results li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pub-results a { color: var(--ink); }
.cal { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--paper); }
.cal-cell { min-height: 96px; padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; align-content: start; gap: 4px; background: #fff; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.off { background: var(--paper); }
.cal-day { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cal-cell.today .cal-day { color: var(--paper); background: var(--ink); border-radius: 6px; padding: 0 6px; justify-self: start; }
.cal-post { display: flex; align-items: center; gap: 3px; font-size: 12px; text-decoration: none; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.cal-post span { margin-left: 3px; font-family: var(--mono); font-size: 11px; }
.cal-post.failed { border-color: var(--bad); color: var(--bad); }
.cal-post.published { background: var(--green-soft); }
@media (max-width: 700px) { .cal-cell { min-height: 64px; padding: 4px; } .cal-post span { display: none; } }

/* ---------------------------------------------------------------- chats (Messages and WhatsApp) */
.seg-a { font-size: 12px; color: var(--ink-2); padding: 4px 10px; border-radius: 6px; text-decoration: none; }
.seg-a[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 500; }
.chat { display: grid; grid-template-columns: 340px minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; height: calc(100vh - 160px); min-height: 480px; box-shadow: var(--shadow-sm); }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-tools { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.chat-row { display: flex; gap: 12px; padding: 12px 16px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); align-items: center; }
.chat-row:hover { background: var(--paper); }
.chat-row.on { background: var(--paper-2); }
.chat-row .avatar, .chat-head .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; color: var(--ink-2); }
.chat-row-main { min-width: 0; flex: 1; display: grid; gap: 2px; }
.chat-row-top { display: flex; justify-content: space-between; gap: 8px; }
.chat-row-top b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row-top time { font-size: 12px; color: var(--muted); flex: none; }
.chat-row-snip { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.chat-row.unread b { font-weight: 600; }
.chat-row.unread .chat-row-snip { color: var(--ink); }
.chat-row.unread .chat-row-top time { color: var(--green); font-weight: 500; }
.chat-empty { padding: 24px 16px; font-size: 14px; }
.chat-thread { display: flex; flex-direction: column; min-height: 0; }
.chat-head { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-head > div { display: grid; }
.chat-head .tiny { display: flex; gap: 6px; align-items: center; }
.chat-back { display: none; }
.chat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 6px; background: var(--paper); }
.bubble { max-width: 72%; padding: 8px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); align-self: flex-start; font-size: 14px; }
.bubble.out { align-self: flex-end; background: var(--green-soft); border-color: transparent; }
.bubble p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.bubble img { display: block; max-width: 240px; border-radius: 10px; margin-bottom: 4px; }
.bubble time { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; text-align: right; }
.bubble .tpl { font-size: 11px; color: var(--muted); display: block; margin-bottom: 2px; }
.chat-send { padding: 12px 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.chat-send textarea { margin: 0; min-height: 56px; }
.chat-closed { padding: 16px; margin: 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.center { text-align: center; }
@media (max-width: 860px) {
  .chat { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .chat .chat-thread { display: none; }
  .chat.show-thread .chat-list { display: none; }
  .chat.show-thread .chat-thread { display: flex; height: calc(100vh - 140px); }
  .chat-back { display: inline-flex; }
}

/* ---------------------------------------------------------------- WhatsApp */
.subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.subnav a { padding: 10px 12px; font-size: 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current] { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }
.wa-number { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.wa-number form { margin: 0 0 0 auto; }
.ticks { margin: 0 0 20px; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; }
.tpl-form { display: grid; gap: 12px; }
.tpl-form label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.tpl-body { max-width: 420px; font-size: 13px; white-space: pre-wrap; }
.tpl-body .bad { display: block; color: var(--bad); }
.tick { margin-left: 4px; }
.tick.read { color: #34b7f1; }
.tick.failed { color: var(--bad); }
.wa-connect .lead-sm { max-width: 64ch; }

/* ---------------------------------------------------------------- Google performance */
.lc { width: 100%; height: auto; display: block; }
.lc-grid line { stroke: var(--line); }
.lc-grid text, .lc-x text { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.lc-line { fill: none; stroke: var(--green); stroke-width: 2; stroke-linejoin: round; }
.lc-area { fill: var(--green-soft); opacity: .7; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) 72px; grid-template-areas: "l v" "b b"; column-gap: 12px; row-gap: 4px; font-size: 14px; }
.bars li span { grid-area: l; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars li b { grid-area: v; text-align: right; font-family: var(--mono); font-weight: 500; font-size: 13px; font-variant-numeric: tabular-nums; }
.bars li i { grid-area: b; height: 4px; border-radius: 2px; background: var(--paper-2); position: relative; overflow: hidden; }
.bars li i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--chart); border-radius: 2px; }
.bars li:first-child i::after { background: var(--green); }
.panel-title.spaced { margin-top: 24px; }
.health-top { position: relative; width: 120px; margin: 0 auto 12px; }
.health-top b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 34px; font-weight: 600; letter-spacing: -.02em; }
.ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--paper-2); stroke-width: 10; }
.ring .ring-fill { stroke: var(--green); stroke-linecap: round; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; }
.checks li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.checks .ck { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; }
.checks li.ok .ck { background: var(--green); border-color: var(--green); color: #fff; }
.checks li.part .ck { border-color: var(--star); }
.checks .ck .ico { width: 12px; height: 12px; stroke-width: 2.5; }
.ck-main { flex: 1; min-width: 0; display: grid; font-size: 14px; }
.ck-main b { font-weight: 500; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.loc-pick select { max-width: 360px; margin: 0; }

/* ---------------------------------------------------------------- competitors */
.comp-table tr.me td { background: var(--green-soft); }
.comp-table tr.me td:first-child { box-shadow: inset 3px 0 0 var(--green); padding-left: 10px; }
.comp-bar { min-width: 160px; }
.comp-bar i { display: block; height: 4px; border-radius: 2px; background: var(--paper-2); position: relative; overflow: hidden; margin-bottom: 4px; }
.comp-bar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--chart); }
.comp-table tr.me .comp-bar i::after { background: var(--green); }
.comp-bar span { font-family: var(--mono); font-size: 13px; }
.comp-results { list-style: none; margin: 12px 0 0; padding: 0; display: grid; }
.comp-results li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.comp-results li > div { flex: 1; min-width: 0; display: grid; }
.comp-results li b { font-weight: 500; }
.attribution { margin-top: 12px; }
.table .bad { color: var(--bad); }

/* ---------------------------------------------------------------- review showcase */
.code-row { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 20px; }
.code-row code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; overflow-x: auto; white-space: nowrap; }
.sc-form { align-items: end; margin-bottom: 20px; }
.sc-form label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.sc-checks { display: grid; gap: 4px; }
.sc-checks label.check { font-size: 14px; font-weight: 400; color: var(--ink); }
.sc-preview { border: 1px dashed var(--line-2); border-radius: 12px; padding: 16px; background: #fff; }
.sc-preview.dark { background: #1b1916; }
.sc-maker { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: start; }
@media (max-width: 980px) { .sc-maker { grid-template-columns: 1fr; } }
.sc-list { display: grid; gap: 8px; max-height: 620px; overflow-y: auto; padding-right: 4px; }
.sc-pick { text-align: left; display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; cursor: pointer; color: var(--ink); }
.sc-pick:hover { border-color: var(--line-2); }
.sc-pick.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.sc-pick .st { color: var(--star); font-size: 13px; letter-spacing: 1px; }
.sc-pick-text { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sc-canvas canvas { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); display: block; }

/* ---------------------------------------------------------------- mentions */
.mention-form textarea { margin-top: 4px; }
.mention-list { list-style: none; margin: 0; padding: 0; }
.mention-list li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.mention-list li:first-child { border-top: 0; }
.mention-list li > .d { margin-top: 8px; }
.mention-list li > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mention-list a { color: var(--ink); font-weight: 500; text-decoration: none; }
.mention-list a:hover { text-decoration: underline; }
.mention-list p { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.new-tag { font-size: 11px; font-family: var(--mono); color: var(--green-ink); background: var(--green-soft); border-radius: 6px; padding: 1px 6px; }

/* ---------------------------------------------------------------- agency */
.client-edit { display: inline-block; position: relative; }
.client-edit summary { list-style: none; }
.client-edit summary::-webkit-details-marker { display: none; }
.client-edit[open] > form { position: absolute; right: 0; top: 36px; z-index: 5; width: 320px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); text-align: left; }
.brand-logo { max-height: 36px; max-width: 160px; border-radius: 6px; border: 1px solid var(--line); }

/* Organization switcher (app bar) */
.org-switch { position: relative; border: 0 !important; padding: 0; }
.org-sum { border: 0; background: none; font: inherit; text-align: left; display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 12px; margin-left: -12px; border-radius: 10px; cursor: pointer; max-width: 300px; color: var(--ink); font-size: 14px; }
.org-sum:hover, .org-switch.open .org-sum { background: var(--paper-2); }
.org-sum:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.org-sum .ico { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.5; transition: transform 150ms var(--ease); }
.org-switch.open .org-sum .ico { transform: rotate(180deg); }
.org-cur { font-weight: 500; font-size: 16px; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.org-av { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--paper-2, #ebe6dc); color: var(--ink); font-weight: 500; flex: none; }
.org-av.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
.org-menu { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: 280px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(27, 25, 22, .18); padding: 8px; }
.org-menu-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 4px 8px 8px; margin: 0; }
.org-menu .org-list { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow: auto; }
.org-menu hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.org-menu button, .org-menu a { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 8px; border: 0; background: none; border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); text-align: left; cursor: pointer; text-decoration: none; }
.org-menu button span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-menu button:hover, .org-menu a:hover { background: var(--paper-2, #f1ede6); }
.org-menu button[aria-current] { font-weight: 500; }
.org-menu .ico { width: 16px; height: 16px; color: var(--muted); }
.org-menu button { justify-content: space-between; padding: 0 10px; }
.org-menu a { padding: 0 10px; }
/* Organizations page */
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.org-card { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.org-card.on { border-color: var(--accent); }
.org-top { display: flex; align-items: center; gap: 12px; }
.org-name { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; } .org-name b { font-weight: 500; font-size: 16px; }
.org-form { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 640px) { .org-sum { max-width: 200px; margin-left: 0; } }

/* React app: top loading bar and page fade */
.rw-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 100; pointer-events: none; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); opacity: 0; }
.rw-progress.on { opacity: 1; animation: rw-progress 1.6s var(--ease) forwards; }
@keyframes rw-progress { 0% { transform: scaleX(0); } 30% { transform: scaleX(.45); } 100% { transform: scaleX(.85); } }
.page-view { animation: rw-fade 160ms var(--ease); }
@keyframes rw-fade { from { opacity: .4; } to { opacity: 1; } }

/* Loading placeholders (React pages) */
.skel-list { padding: 4px 0; }
.skel-row { display: grid; gap: 8px; padding: 16px 16px 16px 28px; border-bottom: 1px solid var(--line); }
.skel-row i { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--paper-2) 0%, #f6f3ee 50%, var(--paper-2) 100%); background-size: 200% 100%; animation: rw-shimmer 1.2s linear infinite; }
@keyframes rw-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
