/* ============================================================
   Resparo dashboard — built on the design system tokens.
   Tokens come from tokens.css (loaded before this file).
   Patterns mirror the canonical buttons / forms / cards previews.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, h5, ul { margin: 0; padding: 0; }
ul { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

/* Defensive: any element with `hidden` MUST be hidden. The UA's `[hidden]`
   rule has class-level specificity and loses to any author `display:` we set
   on the same element — a trap I keep hitting. Global !important kills it. */
[hidden] { display: none !important; }

body {
  overflow-x: hidden;
  min-height: 100vh;
}
body::before {
  /* Paper noise — non-negotiable per the design system. */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
  mix-blend-mode: multiply;
  background-image: url("/assets/paper-noise.svg");
  background-size: 200px 200px;
}

/* ============================================================
   Screens — top-level views toggle via the hidden attribute
   ============================================================ */
.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.screen[hidden] { display: none; }

/* ============================================================
   Boot loader
   ============================================================ */
.boot {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity .25s ease, visibility .25s;
}
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-mark { animation: bootPulse 1.6s ease-in-out infinite; }
@keyframes bootPulse {
  0%, 100% { transform: scale(1);    opacity: .9; }
  50%      { transform: scale(1.06); opacity: 1;  }
}

/* ============================================================
   Brand mark — exact copy of the marketing-site topbar treatment
   (34×34 pine tile + 22px wordmark). BEM names match the landing page.
   ============================================================ */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.brand__mark {
  width: 34px;
  height: 34px;
  background: var(--pine);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 1px 0 rgba(19, 24, 20, 0.1),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.brand__name {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.brand--small .brand__mark { width: 30px; height: 30px; }
.brand--small .brand__name { font-size: 19px; }

/* Bigger brand-mark variants reuse the same recipe */
.boot-mark   { width: 48px; height: 48px; border-radius: 10px; }
.finale-mark { width: 64px; height: 64px; border-radius: 12px; margin-bottom: var(--space-6); }

/* ============================================================
   Buttons — canonical patterns from the design system
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  min-height: 48px;
  border-radius: var(--radius-md);     /* 9px, not a pill */
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(0); }
.btn:disabled { cursor: not-allowed; opacity: .55; }
.btn-block { width: 100%; }
.btn-arrow {
  width: 14px; height: 14px;
  transition: transform var(--dur-base) var(--ease-out);
}
.btn:hover:not(:disabled) .btn-arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--pine);
  color: var(--paper-3);
  box-shadow: var(--shadow-primary);
  min-height: 52px;
  font-size: 15px;
}
.btn-primary:hover:not(:disabled) {
  background: var(--pine);
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 0.5px var(--rule-strong);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(19, 24, 20, 0.03);
  box-shadow: inset 0 0 0 0.5px var(--ink);
}

.btn-soon {
  background: rgba(19, 24, 20, 0.08);
  color: var(--ash);
  box-shadow: inset 0 0 0 0.5px var(--rule-strong);
  cursor: not-allowed;
}

.link {
  color: var(--pine);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-fast) var(--ease-out);
}
.link:hover { text-decoration-color: currentColor; }

/* ============================================================
   AUTH SCREEN
   ============================================================ */
.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--space-8);
  box-shadow: 0 0.5px 0 var(--rule);
  background: rgba(242, 239, 230, 0.88);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}
.auth-switch {
  font-size: 14px;
  color: var(--ash);
  display: inline-flex; gap: 8px; align-items: baseline;
}
.auth-switch [data-auth-prompt] { display: none; }
.auth-switch[data-mode="signup"] [data-auth-prompt="signup"],
.auth-switch[data-mode="login"]  [data-auth-prompt="login"] { display: inline; }

.auth-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.auth-card {
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 460px;
  padding: var(--space-16) var(--space-10);
}

.auth-step { display: none; flex-direction: column; }
.auth-step.is-active {
  display: flex;
  animation: slideIn var(--dur-slow) var(--ease-out);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}

.auth-step [data-mode] { display: none; }
.auth-step[data-mode="signup"] [data-mode="signup"],
.auth-step[data-mode="login"]  [data-mode="login"] { display: block; }

.auth-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(30px, 3.8vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: var(--space-3);
}
.auth-title-sm {
  font-family: var(--font-quote);
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: var(--space-2);
}
.auth-sub {
  font-size: 17px;
  color: var(--ink-2);
  margin-bottom: var(--space-8);
  letter-spacing: -0.005em;
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-4); }
.field-label {
  font-size: 12px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.005em;
}
.field input {
  width: 100%;
  padding: 13px 14px;
  background: var(--paper-3);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 0.5px var(--rule-strong);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.field input::placeholder { color: var(--ash-2); }
.field input:hover { box-shadow: inset 0 0 0 0.5px var(--ink-2); }
.field input:focus { box-shadow: inset 0 0 0 1px var(--pine); }
.field-hint { font-size: 12px; color: var(--ash); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 46px; }
.reveal {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ash);
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.reveal:hover { background: rgba(19, 24, 20, 0.05); color: var(--ink); }
.reveal svg { width: 18px; height: 18px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ash);
  padding: 4px 0;
  margin-bottom: var(--space-6);
  transition: color var(--dur-fast) var(--ease-out);
}
.back-link:hover { color: var(--ink); }
.back-link svg { opacity: .6; }
.email-echo { font-weight: 500; color: var(--ink-2); }

.form-error {
  background: var(--amber-bg);
  color: var(--amber-ink);
  box-shadow: inset 0 0 0 0.5px var(--amber-line);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: var(--space-3);
}

.auth-fine {
  margin-top: var(--space-5);
  font-size: 12.5px;
  color: var(--ash-2);
  text-align: center;
}
.auth-fine a {
  color: var(--ash);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
}
.auth-fine a:hover { text-decoration-color: currentColor; color: var(--ink-2); }

/* Right-side preview card */
.auth-aside {
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-2);
  box-shadow: inset 0.5px 0 0 var(--rule);
  padding: var(--space-16) var(--space-10);
  position: relative;
  overflow: hidden;
}
.auth-aside::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 70%; height: 60%;
  background: radial-gradient(closest-side, rgba(31, 140, 109, 0.12), transparent 70%);
  pointer-events: none;
}
.aside-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--paper-3);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.stars {
  display: inline-flex; gap: 2px; color: var(--gold);
}
.stars svg { width: 13px; height: 13px; fill: currentColor; }
.aside-quote {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 10px 0 8px;
}
.aside-meta {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ash);
}
.aside-divider {
  height: 0.5px; background: var(--rule); margin: var(--space-5) 0 var(--space-4);
}
/* Reply box — canonical pattern: sage hairline + soft tint, floating label badge */
.aside-reply-wrap {
  position: relative;
  background: rgba(31, 140, 109, 0.04);
  box-shadow: inset 0 0 0 0.5px var(--sage);
  border-radius: var(--radius-sm);
  padding: 14px 14px 13px;
}
.aside-reply-label {
  position: absolute;
  top: -8px; left: 14px;
  background: var(--paper-3);
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.aside-reply-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}
.aside-footer {
  margin-top: var(--space-4);
  font-size: 12px;
  color: var(--ash);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.aside-footer .check {
  width: 12px; height: 12px; color: var(--sage);
}

/* ============================================================
   ONBOARDING
   ============================================================ */
.onb-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-6);
  padding: 20px var(--space-8);
  box-shadow: 0 0.5px 0 var(--rule);
  background: rgba(242, 239, 230, 0.88);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}
.onb-header .brand { justify-self: start; }
.onb-header .link  { justify-self: end; font-size: 13px; }
.onb-progress {
  justify-self: center;
  width: 100%; max-width: 320px;
  height: 3px;
  background: rgba(19, 24, 20, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.onb-progress-fill {
  display: block; height: 100%;
  background: var(--pine);
  transition: width var(--dur-slow) var(--ease-out);
}

.onb-main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: var(--space-12) var(--space-8);
  position: relative;
}
.onb-stage {
  width: 100%; max-width: 620px;
  position: relative;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pine);
  margin-bottom: var(--space-4);
}
.onb-q {
  font-family: var(--font-sans);
  font-size: clamp(28px, 3.6vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.onb-sub {
  font-size: 17px;
  color: var(--ink-2);
  margin-bottom: var(--space-8);
  letter-spacing: -0.005em;
}

.onb-step { display: none; flex-direction: column; }
.onb-step.is-active {
  display: flex;
  animation: onbIn var(--dur-slow) var(--ease-out);
}
.onb-step.is-active.go-back {
  animation: onbInBack var(--dur-slow) var(--ease-out);
}
@keyframes onbIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes onbInBack {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Two-column row inside an onboarding step (city + country) */
.onb-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: var(--space-5);
}
.onb-row .onb-field { margin-top: 0; }
@media (max-width: 600px) { .onb-row { grid-template-columns: 1fr; } }

/* Multi-field step layout — each labelled field wrapped in .onb-field
   stacks vertically with comfortable breathing room. */
.onb-field {
  margin-top: var(--space-5);
}
.onb-field:first-of-type { margin-top: var(--space-6); }
.onb-field .onb-input { margin-top: 8px; }
.onb-field__label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink-2);
}
.onb-field__hint {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ash);
  font-family: var(--font-quote);
  font-style: italic;
  line-height: 1.5;
}
/* Native select used in the onboarding "You" step. Mirrors .settings-select
   but at the larger sizing onb-input uses. */
.onb-step .settings-select {
  margin-top: 8px;
  padding: 14px 38px 14px 16px;
  font-size: 16px;
}

.onb-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--paper-3);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 0.5px var(--rule-strong);
  font-size: 17px;
  color: var(--ink);
  outline: none;
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.onb-input::placeholder { color: var(--ash-2); }
.onb-input:hover { box-shadow: inset 0 0 0 0.5px var(--ink-2); }
.onb-input:focus { box-shadow: inset 0 0 0 1px var(--pine); }
.onb-textarea {
  resize: vertical;
  min-height: 96px;
  font-size: 15.5px;
  line-height: 1.55;
}

/* Chip groups */
.chip-group { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.chip {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--paper-3);
  box-shadow: inset 0 0 0 0.5px var(--rule-strong);
  color: var(--ink-2);
  font-weight: 500;
  font-size: 14.5px;
  transition: background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.chip:hover { box-shadow: inset 0 0 0 0.5px var(--pine); color: var(--ink); }
.chip[aria-checked="true"] {
  background: var(--pine);
  color: var(--paper-3);
  box-shadow: var(--shadow-primary);
}
.chip[aria-checked="true"]:hover { background: var(--pine-2); color: var(--paper-3); }

.chip-group-block { flex-direction: column; gap: 10px; }
.chip-block {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 4px;
  padding: 14px 18px;
  text-align: left;
  border-radius: var(--radius-lg);
}
.chip-title { font-weight: 600; font-size: 15.5px; }
.chip-eg {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ash);
  font-weight: 400;
}
.chip-block[aria-checked="true"] .chip-eg { color: var(--moss); }

.onb-error {
  margin-top: var(--space-3);
  padding: 10px 14px;
  background: var(--amber-bg);
  color: var(--amber-ink);
  box-shadow: inset 0 0 0 0.5px var(--amber-line);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

.onb-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-8);
}
.onb-actions-split { justify-content: space-between; }
.onb-actions-right { display: inline-flex; align-items: center; gap: var(--space-4); }

/* Summary list */
.onb-summary {
  display: grid; gap: 0;
  margin-bottom: var(--space-2);
  background: var(--paper-3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.onb-summary li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-4);
  padding: 14px 18px;
  box-shadow: 0 0.5px 0 var(--rule);
  font-size: 15px;
}
.onb-summary li:last-child { box-shadow: none; }
.summary-key {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash);
  align-self: center;
}
.summary-val { color: var(--ink); word-break: break-word; }
.summary-val.is-empty { color: var(--ash-2); font-style: italic; }

/* Finale */
.onb-finale {
  position: fixed; inset: 0;
  background: var(--paper);
  z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--space-8);
  text-align: center;
  opacity: 0;
  animation: finaleIn .5s var(--ease-out) forwards;
}
.onb-finale[hidden] { display: none; }
.onb-finale.is-leaving { animation: finaleOut .4s var(--ease-out) forwards; }
@keyframes finaleIn  { to { opacity: 1; } }
@keyframes finaleOut { from { opacity: 1; } to { opacity: 0; } }

.finale-mark {
  opacity: 0;
  animation: finaleMark .7s var(--ease-out) forwards;
}
@keyframes finaleMark {
  from { transform: scale(.5); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.finale-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(36px, 4vw, 48px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: var(--space-3);
  opacity: 0;
  animation: finaleText .6s var(--ease-out) .15s forwards;
}
.finale-sub {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink-2);
  opacity: 0;
  animation: finaleText .6s var(--ease-out) .35s forwards;
}
.finale-fine {
  font-size: 14px;
  color: var(--ash);
  margin-top: 2px;
  opacity: 0;
  animation: finaleText .6s var(--ease-out) .55s forwards;
}
@keyframes finaleText {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   DASHBOARD — topbar mirrors the marketing site treatment
   ============================================================ */
.dash-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242, 239, 230, 0.88);
  box-shadow: 0 0.5px 0 var(--rule);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}
.dash-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  gap: var(--space-6);
}

.dash-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  color: var(--ink-2);
}
.nav-link {
  position: relative;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 4px 0;
  transition: color var(--dur-fast) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-link:hover { color: var(--pine); }
.nav-link.is-active { color: var(--ink); font-weight: 600; }
.nav-link.is-active::after {
  /* Quiet pine indicator — sits below the link, aligned to the topbar bottom edge */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -19px;
  height: 2px;
  background: var(--pine);
  border-radius: 2px 2px 0 0;
}
.nav-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sage); display: inline-block;
  box-shadow: 0 0 0 0 rgba(31, 140, 109, 0.55);
  animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(31, 140, 109, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(31, 140, 109, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 140, 109, 0); }
}

.dash-user { display: inline-flex; align-items: center; gap: var(--space-3); }
.plan-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  background: transparent;
  color: var(--ash);
  box-shadow: inset 0 0 0 0.5px var(--rule-strong);
  border-radius: var(--radius-pill);
}
.plan-pill[data-plan="pro"] {
  background: var(--pine);
  color: var(--paper-3);
  box-shadow: none;
}

.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius-pill);
  background: var(--pine);
  color: var(--paper-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; text-transform: uppercase;
  transition: background var(--dur-fast) var(--ease-out);
}
.user-menu summary:hover .avatar { background: var(--pine-2); }
.user-menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 220px;
  background: var(--paper-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 8px;
  z-index: 60;
}
.user-email {
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--ash);
  box-shadow: 0 0.5px 0 var(--rule);
  margin-bottom: 6px;
  word-break: break-all;
}
.menu-item {
  display: block; width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--ink-2);
  transition: background var(--dur-fast) var(--ease-out);
}
.menu-item:hover { background: rgba(19, 24, 20, 0.05); color: var(--ink); }

.dash-main {
  /* Match the topbar so columns align across the page. The reading column
     inside each view (.view) is narrower and centred within this. */
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space-12) var(--gutter) var(--space-20);
  width: 100%;
}

.view {
  /* Readable content column, centred under the wider topbar.
     900px is the sweet spot: wide enough to feel like a dashboard rather
     than a form, narrow enough that reply text doesn't sprawl. */
  max-width: 900px;
  margin: 0 auto;
  animation: fadeIn var(--dur-slow) var(--ease-out);
}
.view[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.view-head { margin-bottom: var(--space-8); }
.view-title {
  font-family: var(--font-sans);
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 4px;
}
.view-sub {
  font-size: 16px;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}

/* ============================================================
   Queue — editorial review cards (full content width)
   ============================================================ */
.queue-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
}
.queue-head__tools { display: inline-flex; gap: 8px; }
.btn-sm {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
}
.btn-sm .btn-arrow { width: 12px; height: 12px; }

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: var(--space-6);
}

/* Square robot button — generates a random fitting test review.
   Sits to the LEFT of "Add manually" in the queue header tools row. */
.queue-robot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--paper-3);
  color: var(--pine);
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: inset 0 0 0 0.5px var(--rule-strong);
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.queue-robot-btn:hover:not(:disabled) {
  background: var(--pine);
  color: var(--paper);
  box-shadow: var(--shadow-primary);
  transform: translateY(-1px);
}
.queue-robot-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.queue-robot-btn.is-loading {
  background: var(--pine);
  color: var(--paper);
}
.queue-robot-btn.is-loading svg {
  animation: robotThink 1s ease-in-out infinite;
}
@keyframes robotThink {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px) rotate(-3deg); }
}
.queue-robot-btn svg { width: 20px; height: 20px; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* First-time hint banner — shown once per user above the queue list */
.queue-hint { margin-top: var(--space-6); }
.hint-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(31, 140, 109, 0.06);
  box-shadow: inset 0 0 0 0.5px rgba(31, 140, 109, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 12px 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  animation: hintIn .4s var(--ease-out);
}
@keyframes hintIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.hint-banner__icon {
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sage);
  flex-shrink: 0;
  margin-top: 1px;
}
.hint-banner__icon svg { width: 14px; height: 14px; }
.hint-banner__copy { flex: 1; min-width: 0; }
.hint-banner__copy strong { color: var(--ink); font-weight: 600; }
.hint-banner__link {
  color: var(--pine);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(19, 94, 72, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-fast) var(--ease-out);
}
.hint-banner__link:hover { text-decoration-color: currentColor; }
.hint-banner__close {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--ash);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.hint-banner__close:hover { background: rgba(19, 24, 20, 0.05); color: var(--ink); }
.hint-banner__close svg { width: 14px; height: 14px; }
.queue-list > * { width: 100%; }

/* Card */
.r-card {
  position: relative;
  background: var(--paper-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px 28px;
  animation: cardIn .42s var(--ease-out);
  transition:
    transform .35s var(--ease-out),
    opacity .35s var(--ease-out),
    max-height .45s var(--ease-out),
    margin .35s var(--ease-out),
    padding .35s var(--ease-out);
}
.r-card.is-leaving {
  opacity: 0;
  transform: translateX(40px);
  max-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
/* 1-2 star: quiet amber left accent. The header stays paper, the pill
   underneath carries the "needs your attention" signal. */
.r-card--negative {
  box-shadow:
    var(--shadow-card),
    inset 3px 0 0 var(--amber-line);
  padding-left: 31px;
}

/* Head row — stars, name, meta on the left; three-dot menu on the right */
.r-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.r-card__head-left { min-width: 0; }
.r-card__head .stars {
  display: inline-flex;
  gap: 2px;
  color: var(--gold);
  margin-bottom: 6px;
}
.r-card__head .stars svg { width: 14px; height: 14px; fill: currentColor; }
.r-card__head .stars svg.is-empty { fill: rgba(0,0,0,0.12); }

.r-card__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.r-card__head .meta {
  margin-top: 3px;
  color: var(--ash);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* "Needs your attention" pill — used on negative reviews ONLY */
.r-card__attention {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-ink);
  padding: 4px 10px;
  background: rgba(110, 81, 25, 0.09);
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

/* Review quote — pullquote style, hairline left rule, Fraunces italic */
.r-card__review {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  padding-left: 18px;
  box-shadow: inset 2px 0 0 var(--rule-strong);
  margin: 0 0 22px;
}

/* Divider with centred label between review and reply */
.r-card__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.r-card__divider-rule {
  flex: 1;
  height: 0.5px;
  background: var(--rule);
}
.r-card__divider-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
}

/* Reply body — inline-editable textarea that looks identical to a paragraph
   until focused. Click anywhere in the text to edit. Approve commits whatever
   is in the textarea. No mode toggle, no Edit button. */
.r-card__reply {
  display: block;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  resize: none;
  overflow: hidden;
  padding: 6px 8px;
  margin: 0 -8px 12px;     /* Negative side margin so the focus rule extends to the natural reading width */
  caret-color: var(--pine);
  cursor: text;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 0.5px transparent;
  transition: box-shadow var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.r-card__reply:hover:not(:focus) {
  background: rgba(19, 24, 20, 0.025);
}
.r-card__reply:focus {
  background: var(--paper);
  box-shadow: inset 0 0 0 0.5px var(--pine);
}
.r-card__timing {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ash);
  margin-bottom: 22px;
}
.r-card__timing .check { width: 12px; height: 12px; color: var(--sage); flex-shrink: 0; }
.r-card__timing .warn  { width: 13px; height: 13px; color: var(--amber-ink); flex-shrink: 0; }
.r-card__timing-text { flex: 1; min-width: 0; }
.r-card__timing--warn { color: var(--amber-ink); }
.r-card__timing--warn .r-card__timing-text { font-weight: 500; }

/* SEO badge — small line below the reply textarea showing the keyword
   that was woven in for local Google ranking lift. Only renders when
   the model actually inserted a keyword. */
.r-card__seo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 18px;
  padding: 8px 12px;
  background: rgba(31, 140, 109, 0.06);
  box-shadow: inset 0 0 0 0.5px rgba(31, 140, 109, 0.22);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
  cursor: help;
}
.r-card__seo-icon {
  width: 14px; height: 14px;
  color: var(--sage);
  flex-shrink: 0;
}
.r-card__seo-text { flex: 1; min-width: 0; }
.r-card__seo-text strong {
  color: var(--pine);
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* "SEO boost" chip used in field labels (Settings + onboarding) so the
   owner can see at a glance which fields drive local SEO. */
.settings-field__chip,
.onb-field__chip {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--pine);
  color: var(--paper);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  vertical-align: 2px;
}

/* Small inline Copy button — copies the draft to clipboard without committing
   the review as responded. Sits at the right end of the timing line. */
.r-card__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ash);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  border: 0;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.r-card__copy svg { width: 12px; height: 12px; }
.r-card__copy:hover { background: rgba(19, 24, 20, 0.05); color: var(--ink); }
.r-card__copy.is-copied { color: var(--sage); background: rgba(31, 140, 109, 0.08); }

/* Drafting state — replaces divider+reply while Gemini is working */
.r-card__drafting {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 15px;
  color: var(--ash);
  margin: 0 0 22px;
}
.r-card__drafting-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sage);
  animation: pulseDot 1.4s infinite;
  flex-shrink: 0;
}

/* (Edit mode CSS was removed — inline editing replaces it.) */

/* Action row — primary + Edit/Regenerate ghost buttons + Skip link.
   Everything important is visible. No hidden three-dot menu. */
.r-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.r-card__primary {
  /* Dominant button — sets the visual centre of the action row. */
  min-height: 48px;
  padding: 12px 22px;
  font-size: 14.5px;
}
.r-card__primary svg { width: 13px; height: 13px; }

.r-card__secondary {
  /* Edit + Regenerate. Visually quieter than primary but same height so the
     row reads as a single unit. */
  min-height: 48px;
  padding: 12px 16px;
  font-size: 13.5px;
}
.r-card__secondary svg { width: 13px; height: 13px; }

.r-card__skip {
  /* Tertiary — text-only link that sits right-aligned. The eye should land
     on Approve first, not here. */
  margin-left: auto;
  font-size: 13.5px;
  color: var(--ash);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.r-card__skip:hover {
  color: var(--ink-2);
  background: rgba(19, 24, 20, 0.04);
}

/* (Edit-mode action row removed — Approve commits the inline textarea value.) */

/* Resparo's read — strategic analysis above the draft. Quieter than the
   reply (ash, italic) so the eye lands on the draft, not the meta-commentary. */
.r-card__divider--read .r-card__divider-label--read {
  color: var(--ash);
}
.r-card__insight {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 22px;
}

/* Inline error per card */
.r-card__error {
  background: var(--amber-bg);
  color: var(--amber-ink);
  box-shadow: inset 0 0 0 0.5px var(--amber-line);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
}

/* Streaming caret — blinks softly while Gemini text arrives */
.streaming-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  background: var(--sage);
  vertical-align: text-bottom;
  animation: caretBlink 1s steps(2, start) infinite;
  transform: translateY(2px);
}
@keyframes caretBlink { 50% { opacity: 0; } }

/* Focused card — set after a successful action so the next card highlights */
.r-card.is-focused {
  box-shadow:
    var(--shadow-card),
    0 0 0 2px var(--sage);
}
.r-card--negative.is-focused {
  box-shadow:
    var(--shadow-card),
    inset 3px 0 0 var(--amber-line),
    0 0 0 2px var(--sage);
}

/* Card restore animation — used by the undo flow when a card slides back in */
.r-card.is-restoring {
  animation: cardRestore .35s var(--ease-out);
}
@keyframes cardRestore {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   Upgrade celebration — fires when free → pro after checkout
   ============================================================ */
.upgrade-finale {
  position: fixed; inset: 0;
  background: var(--paper);
  z-index: 300;                 /* over everything except errors */
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-8);
  opacity: 0;
  animation: upgradeFinaleIn .55s var(--ease-out) forwards;
  overflow-y: auto;
}
.upgrade-finale[hidden] { display: none; }
.upgrade-finale.is-leaving { animation: upgradeFinaleOut .4s var(--ease-out) forwards; }
@keyframes upgradeFinaleIn  { to { opacity: 1; } }
@keyframes upgradeFinaleOut { from { opacity: 1; } to { opacity: 0; } }

.upgrade-finale__inner {
  max-width: 520px;
  width: 100%;
  text-align: center;
  padding: var(--space-10) var(--space-6);
}

.upgrade-finale__mark {
  width: 72px; height: 72px;
  border-radius: 14px;
  margin: 0 auto var(--space-6);
  opacity: 0;
  animation: upgradeMark .7s var(--ease-out) forwards;
}
@keyframes upgradeMark {
  from { transform: scale(.45); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.upgrade-finale__mark svg { width: 44px; height: 44px; }

.upgrade-finale__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pine);
  margin-bottom: var(--space-3);
  opacity: 0;
  animation: upgradeStagger .55s var(--ease-out) .15s forwards;
}
.upgrade-finale__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: var(--space-3);
  opacity: 0;
  animation: upgradeStagger .55s var(--ease-out) .25s forwards;
}
.upgrade-finale__sub {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink-2);
  margin-bottom: var(--space-8);
  opacity: 0;
  animation: upgradeStagger .55s var(--ease-out) .4s forwards;
}

.upgrade-finale__unlocks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  max-width: 360px;
  margin: 0 auto var(--space-8);
}
.upgrade-finale__unlocks li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--paper-3);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.005em;
  opacity: 0;
}
.upgrade-finale__unlocks li:nth-child(1) { animation: upgradeStagger .5s var(--ease-out) .55s forwards; }
.upgrade-finale__unlocks li:nth-child(2) { animation: upgradeStagger .5s var(--ease-out) .7s forwards; }
.upgrade-finale__unlocks li:nth-child(3) { animation: upgradeStagger .5s var(--ease-out) .85s forwards; }
.upgrade-finale__unlocks .check {
  width: 16px; height: 16px;
  color: var(--sage);
  flex-shrink: 0;
}

.upgrade-finale__signoff {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ash);
  max-width: 380px;
  margin: 0 auto var(--space-6);
  opacity: 0;
  animation: upgradeStagger .55s var(--ease-out) 1.05s forwards;
}
.upgrade-finale__sig {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.upgrade-finale__action {
  min-height: 52px;
  padding: 14px 26px;
  font-size: 15px;
  opacity: 0;
  animation: upgradeStagger .55s var(--ease-out) 1.25s forwards;
}

@keyframes upgradeStagger {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .upgrade-finale,
  .upgrade-finale__mark,
  .upgrade-finale__eyebrow,
  .upgrade-finale__title,
  .upgrade-finale__sub,
  .upgrade-finale__unlocks li,
  .upgrade-finale__signoff,
  .upgrade-finale__action {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    opacity: 1 !important;
  }
}

/* ============================================================
   Toasts — undo + error. Bottom-centred, slides up.
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--paper-3);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 12px 6px 12px 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card);
  font-size: 14px;
  letter-spacing: -0.005em;
  z-index: 200;
  opacity: 0;
  transition: opacity .22s var(--ease-out), transform .25s var(--ease-out);
  min-width: 320px;
  max-width: 520px;
  overflow: hidden;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast__check {
  width: 14px; height: 14px;
  color: var(--sage);
  flex-shrink: 0;
}
.toast__message {
  flex: 1;
  font-weight: 500;
}
.toast__sub {
  color: var(--ash);
  margin-left: 4px;
  font-weight: 400;
}
.toast__undo {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pine);
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.toast__undo:hover { background: rgba(19, 94, 72, 0.08); }
.toast__progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: rgba(19, 24, 20, 0.05);
  overflow: hidden;
}
.toast__progress-fill {
  height: 100%;
  width: 100%;
  background: var(--sage);
  /* Width is animated to 0 in JS once the toast appears */
  transition: width 6s linear;
}
.toast--error {
  background: var(--amber-bg);
  color: var(--amber-ink);
  box-shadow: var(--shadow-card), inset 0 0 0 0.5px var(--amber-line);
}
.toast--error .toast__check { color: var(--amber-ink); }

.toast--info {
  background: var(--paper-3);
  color: var(--ink);
  box-shadow: var(--shadow-card), inset 0 0 0 0.5px rgba(31, 140, 109, 0.25);
}
.toast--info .toast__check { color: var(--sage); }

/* Queue empty state — quieter banner pattern */
.empty-state {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: 18px 22px;
  background: var(--paper-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: left;
}

/* All-caught-up variant — the inbox-zero moment after clearing the queue */
.empty-state--clear {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-12) var(--space-8);
  animation: clearIn .55s var(--ease-out);
}
@keyframes clearIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.empty-state__mark {
  width: 56px; height: 56px;
  border-radius: var(--radius-pill);
  background: rgba(31, 140, 109, 0.10);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
  animation: clearMark .55s var(--ease-out);
}
@keyframes clearMark {
  from { transform: scale(.5); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.empty-state__mark .check {
  width: 24px; height: 24px;
  color: var(--sage);
}
.empty-state--clear h3 {
  font-family: var(--font-sans);
  font-size: 24px; font-weight: 700; letter-spacing: -0.025em;
  color: var(--ink); margin-bottom: var(--space-2);
}
.empty-state--clear p {
  font-size: 15px; color: var(--ink-2); max-width: 420px;
}
.empty-state--clear p + p { margin-top: var(--space-2); }
.empty-state .listening-dot {
  flex-shrink: 0;
  display: inline-block;
  width: 10px; height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 0 rgba(31, 140, 109, 0.55);
  animation: pulseDot 1.8s infinite;
}
.empty-state h3 {
  font-family: var(--font-sans);
  font-size: 17px; font-weight: 700; letter-spacing: -0.015em;
  color: var(--ink); margin-bottom: 2px;
}
.empty-state p {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.5;
}
.empty-state .small { font-size: 13px; color: var(--ash); margin-top: 4px; }
.empty-state.subtle {
  padding: var(--space-10);
  text-align: center;
  flex-direction: column;
  align-items: center;
}
.empty-state.subtle p { font-size: 15px; color: var(--ash); }

/* History empty — slightly warmer than .subtle, with a quiet clock icon */
.empty-state--history {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-12) var(--space-8);
}
.empty-state__quiet-icon {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: rgba(19, 24, 20, 0.05);
  color: var(--ash);
  margin-bottom: var(--space-4);
}
.empty-state__quiet-icon svg { width: 22px; height: 22px; }
.empty-state--history h3 {
  font-family: var(--font-sans);
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: var(--space-2);
}
.empty-state--history p {
  font-size: 14.5px;
  color: var(--ink-2);
  max-width: 420px;
  line-height: 1.55;
}

/* "While you wait — here's what a reply will look like" preview */
.demo-wrap {
  max-width: 520px;
  margin: var(--space-10) auto 0;
}
.demo-label {
  text-align: center;
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 14.5px;
  color: var(--ash);
  margin-bottom: var(--space-4);
}
.demo-card {
  background: var(--paper-3);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.demo-card__head {
  background: var(--pine);
  color: var(--paper-3);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.demo-card__source {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.demo-card__badge {
  width: 28px; height: 28px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: var(--paper-3);
  flex-shrink: 0;
}
.demo-card__title { font-size: 14px; font-weight: 600; line-height: 1.1; }
.demo-card__head .meta {
  color: rgba(247, 246, 243, 0.7);
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.demo-card__head .stars { color: var(--gold); flex-shrink: 0; }
.demo-card__head .stars svg { width: 12px; height: 12px; fill: currentColor; }
.demo-card__body { padding: 18px 16px 16px; }
.demo-card__review {
  background: rgba(19, 24, 20, 0.04);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: var(--space-5);
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}
.demo-card__reply { margin: 0 0 14px; }
.demo-card__footer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ash);
}
.demo-card__footer .check { width: 12px; height: 12px; color: var(--sage); }

/* ============================================================
   Settings
   ============================================================ */

/* Basic / Advanced segmented control. Sits at the top of the Settings view
   so the choice is a global modifier — every form inside the view reacts. */
.settings-mode {
  display: inline-flex;
  align-items: center;
  background: var(--paper-2);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: var(--space-6);
  gap: 4px;
  box-shadow: inset 0 0 0 0.5px var(--rule);
}
.settings-mode__tab {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ash);
  background: transparent;
  border: 0;
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.settings-mode__tab:hover { color: var(--ink-2); }
.settings-mode__tab.is-active {
  background: var(--paper-3);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

/* Hide advanced-only fields when the view is in Basic mode. Same-specificity
   override against the global `[hidden]` reset — needs the !important since
   that reset is also !important. */
.view[data-settings-mode="basic"] [data-advanced-only] {
  display: none !important;
}

.settings-group {
  padding: 24px 28px;
  background: var(--paper-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-4);
}
.settings-group--quiet {
  background: transparent;
  box-shadow: none;
  padding: 14px 4px;
}
.settings-group__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.settings-group__head > div { min-width: 0; }
.settings-group__note {
  font-size: 12.5px;
  color: var(--ash);
  margin-top: var(--space-3);
}
.group-title {
  font-size: 18px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 4px;
}
.group-sub { font-size: 14px; color: var(--ash); }

/* "Saved ✓" flag that fades in next to the section title */
.settings-save-flag {
  font-size: 12px;
  font-weight: 600;
  color: var(--sage);
  letter-spacing: -0.005em;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  flex-shrink: 0;
  padding-top: 6px;
}
.settings-save-flag.is-visible { opacity: 1; }
.settings-save-flag.is-error { color: var(--amber-ink); }

/* Voice profile field grid */
.settings-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Two-column row inside a settings group (city + country) */
.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.settings-row .settings-field { margin: 0; }
@media (max-width: 600px) { .settings-row { grid-template-columns: 1fr; } }

/* Sub-headings inside a settings group — organise long forms */
.settings-subhead {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pine);
  margin: var(--space-3) 0 -6px;
  padding-top: var(--space-3);
  box-shadow: inset 0 0.5px 0 var(--rule);
}
.settings-subhead:first-child {
  margin-top: 0;
  padding-top: 0;
  box-shadow: none;
}
.settings-subhead__hint {
  margin-left: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ash);
}

/* Native select for the language dropdown */
.settings-select {
  width: 100%;
  padding: 12px 38px 12px 14px;
  background: var(--paper);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 0.5px var(--rule-strong);
  font-size: 15px;
  font-family: var(--font-sans);
  color: var(--ink);
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235C5F57' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.settings-select:hover  { box-shadow: inset 0 0 0 0.5px var(--ink-2); }
.settings-select:focus  { box-shadow: inset 0 0 0 1px var(--pine); }

/* Auto-fill from web — button + state. Sits below the Business Name input.
   The sparkle icon hints at AI without resorting to robot/lightning icons. */
.settings-autogen-btn,
.onb-autogen-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--paper-3);
  color: var(--pine);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  box-shadow: inset 0 0 0 0.5px rgba(19, 94, 72, 0.28);
  transition: background var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
}
.settings-autogen-btn:hover:not(:disabled),
.onb-autogen-btn:hover:not(:disabled) {
  background: rgba(19, 94, 72, 0.06);
}
.settings-autogen-btn:disabled,
.onb-autogen-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--paper-2);
}
.settings-autogen-btn.is-loading,
.onb-autogen-btn.is-loading {
  background: rgba(19, 94, 72, 0.06);
  opacity: 0.8;
}
.settings-autogen-btn.is-loading .autogen-sparkle,
.onb-autogen-btn.is-loading .autogen-sparkle {
  animation: autogenSpin 1.2s linear infinite;
}
@keyframes autogenSpin {
  to { transform: rotate(360deg); }
}
.autogen-sparkle {
  width: 16px; height: 16px;
  color: var(--pine);
  flex-shrink: 0;
}

.settings-autogen-hint {
  display: inline-block;
  margin-left: 10px;
  font-size: 12px;
  color: var(--ash);
  font-family: var(--font-quote);
  font-style: italic;
}
.settings-field__row--inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

/* Sage glow animation when a field is auto-populated — fades quickly so it
   doesn't compete with the form. */
.is-autogen-flash {
  animation: autogenFlash 2s var(--ease-out);
}
@keyframes autogenFlash {
  0%   { box-shadow: 0 0 0 0 rgba(31, 140, 109, 0.35), 0 0 0 4px rgba(31, 140, 109, 0); border-radius: 8px; }
  30%  { box-shadow: 0 0 0 6px rgba(31, 140, 109, 0.20), 0 0 0 0 rgba(31, 140, 109, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 140, 109, 0), 0 0 0 0 rgba(31, 140, 109, 0); }
}

/* Custom-type input shows below the chip group when "other" is selected.
   The [hidden] attribute toggles via JS; the global [hidden] rule (set at
   the top of this file as !important) handles the visual hide. */
.settings-field--type-custom,
.onb-field--type-custom {
  margin-top: var(--space-3);
  animation: fadeIn .35s var(--ease-out);
}

/* Small ghosted button-as-link for the industry-preset CTA */
.settings-link-btn {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pine);
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-out);
}
.settings-link-btn:hover { background: rgba(19, 94, 72, 0.06); }
.settings-link-btn svg { color: var(--sage); }
.settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.settings-field__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.settings-field input[type="text"],
.settings-field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 0.5px var(--rule-strong);
  font-size: 15px;
  color: var(--ink);
  outline: 0;
  font-family: var(--font-sans);
  line-height: 1.55;
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.settings-field textarea {
  resize: vertical;
  min-height: 80px;
}
.settings-field input:hover,
.settings-field textarea:hover { box-shadow: inset 0 0 0 0.5px var(--ink-2); }
.settings-field input:focus,
.settings-field textarea:focus { box-shadow: inset 0 0 0 1px var(--pine); }
.settings-field input::placeholder,
.settings-field textarea::placeholder { color: var(--ash-2); }
.settings-field__hint {
  font-size: 12.5px;
  color: var(--ash);
  margin-top: 2px;
}

/* Toggle (auto-post) */
.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 14px 16px;
  background: var(--paper);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 0.5px var(--rule);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.settings-toggle:hover { background: rgba(19, 24, 20, 0.03); }
.settings-toggle__copy { flex: 1; min-width: 0; }
.settings-toggle__title {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.settings-toggle__sub {
  display: block;
  font-size: 12.5px;
  color: var(--ash);
  line-height: 1.45;
  margin-top: 3px;
}
.settings-toggle__switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.settings-toggle__switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.settings-toggle__track {
  width: 38px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: rgba(19, 24, 20, 0.12);
  box-shadow: inset 0 0 0 0.5px var(--rule-strong);
  position: relative;
  transition: background var(--dur-base) var(--ease-out);
}
.settings-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper-3);
  box-shadow: 0 1px 2px rgba(19, 24, 20, 0.15);
  transition: transform var(--dur-base) var(--ease-out);
}
.settings-toggle__switch input:checked + .settings-toggle__track {
  background: var(--pine);
  box-shadow: inset 0 0 0 0.5px var(--pine-2);
}
.settings-toggle__switch input:checked + .settings-toggle__track .settings-toggle__knob {
  transform: translateX(16px);
}
.settings-toggle__switch input:focus-visible + .settings-toggle__track {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

/* Connection rows (Facebook / Google) */
.connection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 14px 0;
  box-shadow: 0 0.5px 0 var(--rule);
}
.connection-row:last-child { box-shadow: none; padding-bottom: 0; }
.connection-row:first-of-type { padding-top: 0; }
.connection-row__left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.connection-row__badge {
  width: 32px; height: 32px;
  background: rgba(19, 24, 20, 0.06);
  color: var(--ink-2);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.connection-row__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.connection-row__status {
  font-size: 12.5px;
  color: var(--ash);
  margin-top: 2px;
}
.connection-row__status.is-connected { color: var(--sage); font-weight: 600; }
.connection-row__status.is-connected::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  margin-right: 6px;
  vertical-align: middle;
}

/* Plan usage bar */
.usage-bar {
  width: 100%; height: 6px;
  background: rgba(19, 24, 20, 0.06);
  border-radius: var(--radius-pill); overflow: hidden;
  margin: var(--space-3) 0 4px;
}
.usage-bar > span {
  display: block; height: 100%;
  background: var(--sage);
  transition: width var(--dur-slow) var(--ease-out), background var(--dur-base) var(--ease-out);
}
/* Warning + full states use the amber band — the only "warning" tone in the brand. */
.usage-bar.is-warn > span { background: var(--gold); }
.usage-bar.is-full > span { background: var(--amber-line); }
.muted.small { font-size: 13px; color: var(--ash); }

/* ============================================================
   Add review — manual entry form
   ============================================================ */
.add-form {
  background: var(--paper-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.add-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.add-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.add-form input[type="text"],
.add-form textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 0.5px var(--rule-strong);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  outline: 0;
  font-family: var(--font-sans);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.add-form textarea { resize: vertical; min-height: 110px; }
.add-form input:hover,
.add-form textarea:hover { box-shadow: inset 0 0 0 0.5px var(--ink-2); }
.add-form input:focus,
.add-form textarea:focus { box-shadow: inset 0 0 0 1px var(--pine); }
.add-form input::placeholder,
.add-form textarea::placeholder { color: var(--ash-2); }

/* Rating picker — five clickable stars + label */
.rating-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}
.rating-star {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: rgba(0, 0, 0, 0.14);
  background: transparent;
  border: 0;
  padding: 0;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.rating-star svg { width: 22px; height: 22px; fill: currentColor; }
.rating-star:hover { background: rgba(176, 130, 58, 0.06); }
.rating-star.is-on { color: var(--gold); }
.rating-star.is-hover { color: var(--gold); }
.rating-star:active { transform: scale(.92); }
.rating-picker__label {
  margin-left: 10px;
  font-size: 13px;
  color: var(--ash);
  font-weight: 500;
}
.rating-picker[data-selected] .rating-picker__label { color: var(--ink-2); }

.add-form__error {
  background: var(--amber-bg);
  color: var(--amber-ink);
  box-shadow: inset 0 0 0 0.5px var(--amber-line);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

.add-form__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.add-form__actions .btn { min-height: 48px; }
.add-form__actions .btn-primary { padding: 12px 22px; }

.add-form__note {
  font-size: 13px;
  color: var(--ash);
  line-height: 1.55;
  margin-top: 6px;
}

@media (max-width: 600px) {
  .add-form { padding: 22px; }
  .add-form__row { grid-template-columns: 1fr; }
}

/* ============================================================
   Insights — owner-facing stats. Editorial cards, not SaaS chrome.
   ============================================================ */
.insights {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: var(--space-6);
}
.insights-card {
  background: var(--paper-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px 28px;
  display: block;
}
a.insights-card { text-decoration: none; color: inherit; cursor: pointer; transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
a.insights-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-card), 0 8px 24px -16px rgba(19, 94, 72, 0.25); }
.eyebrow--sage { color: var(--sage); }

/* Hero — the time-saved number. The justifier of $25/month every glance. */
.insights-hero {
  padding: 32px 30px;
}
.insights-hero__number {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 8px 0 var(--space-3);
}
.insights-hero__sub {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ash);
}
.insights-hero__quiet {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 16px;
  color: var(--ash);
  margin-top: var(--space-3);
}

/* Response rate — one line, clickable, colour shifts by state */
.insights-rate {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  font-size: 15.5px;
  color: var(--ink);
}
.insights-rate strong { font-weight: 600; }
.insights-rate--ok { color: var(--sage); font-weight: 500; }
.insights-rate--ok .check { width: 16px; height: 16px; color: var(--sage); flex-shrink: 0; }
.insights-rate--warn {
  color: var(--amber-ink);
  box-shadow: var(--shadow-card), inset 3px 0 0 var(--amber-line);
}
.insights-rate--warn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Track record — the quiet moment of pride */
.insights-track {
  padding: 24px 30px;
}
.insights-track__text {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.insights-track__text strong {
  font-style: normal;
  font-weight: 700;
  color: var(--pine);
}

/* Featured review — hardest or best of the month with response shown */
.insights-featured {
  padding: 26px 30px;
}
.insights-featured--negative { box-shadow: var(--shadow-card), inset 3px 0 0 var(--amber-line); }
.insights-featured__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: var(--space-3) 0 var(--space-4);
}
.insights-featured__head .stars { color: var(--gold); display: inline-flex; gap: 1px; }
.insights-featured__head .stars svg { width: 13px; height: 13px; fill: currentColor; }
.insights-featured__head .stars svg.is-empty { fill: rgba(0,0,0,0.12); }
.insights-featured__meta {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash);
}
.insights-featured__review {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  padding-left: 16px;
  box-shadow: inset 2px 0 0 var(--rule-strong);
  margin: 0;
}
.insights-featured--negative .insights-featured__review {
  box-shadow: inset 2px 0 0 var(--amber-line);
}
.insights-featured__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: var(--space-5) 0 var(--space-3);
}
.insights-featured__divider-rule { flex: 1; height: 0.5px; background: var(--rule); }
.insights-featured__divider-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
}
.insights-featured__reply {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
  white-space: pre-wrap;
}

/* Streak — a quiet bottom line, no card */
.insights-streak {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 14.5px;
  text-align: center;
  color: var(--ash);
  margin-top: var(--space-4);
}
.insights-streak strong { font-style: normal; font-weight: 600; color: var(--pine); }

/* Empty state — pulsing pine dot + Fraunces note */
.insights-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  background: var(--paper-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-top: var(--space-6);
}
.insights-empty .listening-dot {
  width: 12px; height: 12px;
  background: var(--pine);
  margin-bottom: var(--space-5);
  box-shadow: 0 0 0 0 rgba(19, 94, 72, 0.45);
  animation: pulseDot 1.8s infinite;
}
.insights-empty__copy {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 420px;
}

/* ============================================================
   History — editorial timeline of past replies
   ============================================================ */
.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin-top: var(--space-6);
}
.history-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.history-month {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine);
  padding-bottom: 6px;
  box-shadow: 0 0.5px 0 var(--rule);
}
.history-item {
  background: var(--paper-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.history-item__head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.history-item__head .stars { color: var(--gold); display: inline-flex; gap: 1px; }
.history-item__head .stars svg { width: 12px; height: 12px; fill: currentColor; }
.history-item__head .stars svg.is-empty { fill: rgba(0,0,0,0.12); }
.history-item__name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.history-item__meta {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash);
}
.history-item__review {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-2);
  padding-left: 14px;
  box-shadow: inset 2px 0 0 var(--rule-strong);
  margin: 0;
}
.history-item__reply-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
}
.history-item__reply-label .check { width: 11px; height: 11px; color: var(--sage); }
.history-item__reply {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
  white-space: pre-wrap;
}

.small { font-size: 13px; }
.muted { color: var(--ash); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .auth-main { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-card { padding: var(--space-10) var(--space-6); }
  .auth-title { font-size: 28px; }

  .dash-header__inner {
    flex-wrap: wrap;
    padding: 12px var(--space-5);
    gap: var(--space-3);
  }
  .dash-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 22px;
    padding-top: 4px;
    box-shadow: 0 0.5px 0 var(--rule);
  }
  .nav-link { font-size: 14px; padding-top: 8px; padding-bottom: 8px; }
  .nav-link.is-active::after { bottom: -1px; }
  .dash-main { padding: var(--space-8) var(--space-5) var(--space-16); }

  .auth-header { padding: 16px var(--space-5); }
  .onb-header { padding: 16px var(--space-5); gap: var(--space-3); }
  .onb-q { font-size: 26px; }
}

@media (max-width: 600px) {
  /* Cards + forms get tighter padding so they don't waste edge-to-edge room */
  .r-card { padding: 14px 18px; }
  .r-card--negative { padding-left: 21px; }
  .settings-group { padding: 22px 18px; }
  .add-form { padding: 22px 18px; }
  .history-item { padding: 20px 18px; }
}

@media (max-width: 480px) {
  .auth-card { padding: var(--space-8) var(--space-5); }
  .auth-title { font-size: 24px; }
  .empty-state { padding: var(--space-8) var(--space-5); }
  .empty-state--clear { padding: var(--space-10) var(--space-5); }

  /* Topbar nav — 4 items in a tight row, give them air-room */
  .dash-nav { gap: 16px; font-size: 13.5px; }
  .nav-link { padding-left: 2px; padding-right: 2px; }

  /* Action row: keep primary button full-width, secondary on a second line */
  .r-card__primary { flex: 1 1 100%; min-width: 0; }
  .r-card__secondary { padding: 10px 12px; font-size: 13px; }

  /* Onboarding question typography scales down */
  .onb-q { font-size: 24px; }

  /* Upgrade celebration breathing room on small phones */
  .upgrade-finale__inner { padding: var(--space-8) var(--space-4); }
  .upgrade-finale__title { font-size: 32px; }
  .upgrade-finale__sub { font-size: 17px; }
  .upgrade-finale__unlocks li { font-size: 14px; padding: 11px 14px; }
  .upgrade-finale__signoff { font-size: 14px; }

  /* Avoid horizontal overflow on tight headers */
  .auth-header { gap: 10px; }
  .auth-switch { font-size: 13px; gap: 4px; }
}

/* ============================================================
   Facebook page picker -- modal that lets the owner choose which
   Page to connect after the OAuth round-trip. Designed to feel
   like a native part of Settings, not a popup.
   ============================================================ */
.connection-row__badge--fb {
  background: var(--moss);
  color: var(--pine);
}
.connection-row__badge--fb svg { width: 20px; height: 20px; display: block; }

.page-modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.page-modal[hidden] { display: none !important; }
.page-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 62, 48, 0.18);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  animation: fadeIn var(--dur-base) var(--ease-out);
}
.page-modal__card {
  position: relative;
  background: var(--paper-3);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pageModalIn var(--dur-slow) var(--ease-out);
}
@keyframes pageModalIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: translateY(0)   scale(1);     }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.page-modal__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 22px 22px 16px;
  box-shadow: 0 0.5px 0 var(--rule);
}
.page-modal__icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--moss);
  color: var(--pine);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.page-modal__icon svg { width: 22px; height: 22px; }
.page-modal__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 2px 0 4px;
}
.page-modal__sub {
  font-size: 13.5px;
  color: var(--ash);
  margin: 0;
}
.page-modal__close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ash);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  align-self: start;
}
.page-modal__close:hover { background: rgba(19, 24, 20, 0.05); color: var(--ink); }
.page-modal__close svg { width: 18px; height: 18px; }

.page-modal__body {
  padding: 12px 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 80px;
}
.page-modal__loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 10px;
  color: var(--ash);
  font-size: 14px;
}
.page-modal__error {
  margin: 4px 8px 12px;
  padding: 12px 14px;
  background: var(--amber-bg);
  color: var(--amber-ink);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.45;
}

.page-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.page-list__item {
  margin: 0;
}
.page-list__btn {
  width: 100%;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.page-list__btn:hover { background: rgba(19, 24, 20, 0.04); }
.page-list__btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--pine);
}
.page-list__btn[aria-checked="true"] {
  background: var(--moss);
  box-shadow: inset 0 0 0 0.5px rgba(19, 94, 72, 0.35);
}
.page-list__radio {
  width: 16px; height: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--rule-strong);
  position: relative;
  flex-shrink: 0;
  transition: box-shadow var(--dur-fast) var(--ease-out);
}
.page-list__btn[aria-checked="true"] .page-list__radio {
  box-shadow: inset 0 0 0 1.5px var(--pine);
}
.page-list__btn[aria-checked="true"] .page-list__radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--pine);
  border-radius: 50%;
}
.page-list__meta { min-width: 0; }
.page-list__name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-list__category {
  font-size: 12.5px;
  color: var(--ash);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
  box-shadow: 0 -0.5px 0 var(--rule);
  background: var(--paper-3);
}

@media (max-width: 560px) {
  .page-modal { padding: var(--space-3); align-items: flex-end; }
  .page-modal__card { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
