/* ───────────────────────────────────────────────────────────────
   Pomelo — design system v3.2 in production.
   Switzer for UI, Fraunces italic for editorial moments.
   No borders. No washes. Soft shadows on elevated surfaces.
   Status indicators are dot + text. Banners use a leading dot.
   ─────────────────────────────────────────────────────────────── */

:root {
  /* ── Single accent ── */
  --pomelo:       #7DD134;
  --pomelo-deep:  #65B720;

  /* ── Ink + surface ── */
  --ink:        #0A0A0A;
  --ink-mute:   #6B6B6B;
  --ink-faint:  #B0B0B0;
  --surface:    #FFFFFF;
  --surface-2:  #F4F4F4;
  --surface-3:  #EDEDED;

  /* ── Error: crimson dot only, never a wash ── */
  --err:        #DC143C;

  /* Legacy aliases (so existing app.py classes keep working) */
  --bg:         var(--surface);
  --paper:      var(--surface);
  --canvas:     var(--surface);
  --line:       var(--surface-3);
  --brand:      var(--pomelo);
  --brand-dark: var(--pomelo-deep);
  --brand-soft: var(--surface-2);
  --ok:         var(--pomelo);
  --ok-soft:    var(--surface-2);
  --warn:       var(--pomelo);
  --err-soft:   var(--surface);
  --muted:      var(--ink-mute);

  /* ── Type ── */
  --font:         "Switzer", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Fraunces", "Switzer", Georgia, serif;
  --font-mono:    ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* ── Radius ── */
  --r:      10px;
  --r-lg:   16px;
  --r-pill: 999px;
  --radius:      var(--r-lg);  /* legacy alias */
  --radius-chip: var(--r-pill);

  /* ── Space ── */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 40px;

  /* ── Shadow ── */
  --lift:       0 1px 2px rgba(10,10,10,0.04), 0 8px 24px -12px rgba(10,10,10,0.12);
  --lift-hover: 0 2px 4px rgba(10,10,10,0.05), 0 16px 36px -14px rgba(10,10,10,0.16);

  /* ── Motion ── */
  --spring: cubic-bezier(0.2, 0.9, 0.3, 1.2);
  --ease:   cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ────────── RESET + ROOT ────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* `overflow-x: clip` instead of `hidden` — clip prevents horizontal
     scroll without creating a scroll-containing block, so `position:
     sticky` on the header still works. `hidden` here used to break
     sticky on Safari + Chrome. MDN: developer.mozilla.org/Web/CSS/overflow. */
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }

/* ────────── HEADER ────────── */
header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-decoration: none;
}
.logo svg { width: 24px; height: 24px; display: block; flex-shrink: 0; }
.logo span { line-height: 1; }

.tagline { display: none; }   /* Pomelo wordmark carries the brand — tagline retired */

header .header-action { margin: 0; }
header .logout { margin-left: auto; }

.logout-btn {
  background: transparent;
  border: 0;
  color: var(--ink-mute);
  font-family: inherit;
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.logout-btn:hover { background: var(--surface-2); color: var(--ink); }

/* ────────── MAIN ────────── */
main {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--s-4) var(--s-4) var(--s-6);
  display: flex; flex-direction: column; gap: var(--s-4);
  min-height: calc(100vh - 60px);
}

#chat-log {
  display: flex; flex-direction: column;
  gap: var(--s-3);
  padding-bottom: var(--s-4);
}

/* ────────── BUBBLES (used by app.py's render_bot_bubble) ────────── */
.bubble {
  background: var(--surface);
  border: 0;
  border-radius: var(--r-lg);
  padding: var(--s-4);
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  box-shadow: var(--lift);
  animation: pop-in 0.32s var(--spring) both;
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(6px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.bubble.bot     { align-self: flex-start; }
.bubble.welcome { background: var(--surface); }
.welcome-list {
  list-style: none;
  margin: var(--s-3) 0 0;
  padding: 0;
  display: flex; flex-direction: column;
  gap: var(--s-2);
  font-size: 14.5px;
}
.welcome-list li {
  padding-left: 22px;
  position: relative;
  color: var(--ink);
  line-height: 1.5;
}
.welcome-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--pomelo);
}
.welcome-list li b { font-weight: 600; }

/* User bubble — pomelo bg, ink text */
.bubble.user {
  align-self: flex-end;
  background: var(--pomelo);
  color: var(--ink);
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--r-lg);
  box-shadow: var(--lift);
  max-width: 80%;
}
.bubble.user code {
  background: rgba(255,255,255,0.55);
  color: var(--ink);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* Error bubble — white card + crimson dot */
.bubble.error {
  align-self: flex-start;
  background: var(--surface);
  color: var(--ink);
  position: relative;
  padding-left: calc(var(--s-4) + 18px);
}
.bubble.error::before {
  content: "";
  position: absolute;
  left: var(--s-4); top: 22px;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--err);
}
.bubble.error .error-tech {
  margin-top: 8px; padding: 8px 12px;
  background: var(--surface-2); border-radius: var(--r);
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink);
}
.bubble.error .muted { color: var(--ink-mute); font-size: 12.5px; }

/* Success / terminal — ink-on-white card; the win is in the type */
.bubble.success, .bubble.terminal {
  background: var(--surface);
  position: relative;
  padding-left: calc(var(--s-4) + 18px);
}
.bubble.success::before, .bubble.terminal::before {
  content: "";
  position: absolute;
  left: var(--s-4); top: 22px;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--pomelo);
}

/* Processing — soft text + typing indicator */
.bubble.processing {
  background: var(--surface);
  color: var(--ink-mute);
  display: flex; align-items: center; gap: 10px;
  padding: 12px var(--s-4);
}

/* Bubble typography */
.bubble h2 {
  margin: 0 0 var(--s-2);
  font-size: clamp(20px, 2.6vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
.bubble p { margin: 6px 0; color: var(--ink); }
.bubble p.subq {
  color: var(--ink-mute);
  font-size: 14px;
  margin-top: 6px;
}
.bubble p.exp {
  color: var(--ink-mute);
  font-size: 13.5px;
  font-style: normal;
  border-left: 0;
  padding-left: 16px;
  margin: 10px 0;
  position: relative;
}
.bubble p.exp::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--pomelo);
}
.bubble code {
  background: var(--surface-2);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.bubble .next-steps {
  margin-top: var(--s-3);
  padding: var(--s-3);
  background: var(--surface-2);
  border-radius: var(--r);
  font-size: 14px;
  color: var(--ink);
}

/* Inline estimate inside a question bubble — quiet supporting text only.
   Real price moments live on .plan-card (.plan-price) and on the confirm card
   (.summary-premium). This rule keeps the estimate visible but stops it from
   competing with the question. */
.bubble .premium {
  display: block;
  margin-top: var(--s-2);
  font-family: var(--font);
  font-style: normal;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-mute);
  line-height: 1.4;
}

/* ────────── ACK ────────── */
.ack {
  font-size: 12.5px;
  color: var(--ink-mute);
  padding: 0 var(--s-2);
  margin: 0 0 -2px var(--s-1);
  letter-spacing: -0.005em;
}

/* ────────── GLOSSARY ────────── */
.glossary {
  margin-top: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border-radius: var(--r);
  font-size: 13.5px;
  color: var(--ink-mute);
}
.glossary b { color: var(--ink); font-weight: 600; }
.glossary div { margin: 2px 0; }

/* ────────── SIDE-EFFECT (upload result / progress notice) ────────── */
.side-effect {
  align-self: flex-start;
  max-width: 100%;
  padding: var(--s-3) var(--s-4);
  padding-left: calc(var(--s-4) + 18px);
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--lift);
  font-size: 14px;
  position: relative;
}
.side-effect::before {
  content: "";
  position: absolute;
  left: var(--s-4); top: 18px;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--pomelo);
}
.side-effect.error::before { background: var(--err); }
.side-effect.warn::before  { background: var(--ink); }

/* Contract render — "What's in your draft" summary list + download CTA. */
.contract-side-effect ul.contract-answers {
  list-style: none;
  margin: var(--s-2) 0 var(--s-3);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2);
}
.contract-side-effect ul.contract-answers li {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  padding: 6px 0;
  border-bottom: 1px solid var(--surface-3);
  font-size: 14.5px;
}
.contract-side-effect ul.contract-answers li:last-child { border-bottom: 0; }
.contract-side-effect ul.contract-answers .muted {
  flex: 0 0 38%;
  font-size: 13px;
  color: var(--ink-mute);
}
.contract-side-effect ul.contract-answers b { flex: 1; font-weight: 600; }
.contract-download {
  margin: 0 0 var(--s-3);
  display: flex; align-items: center; gap: var(--s-3);
  flex-wrap: wrap;
}
.contract-pdf-link { text-decoration: none; }
.contract-pdf-link:hover { text-decoration: none; }

.side-effect .coverage { margin: var(--s-3) 0 var(--s-2); color: var(--ink); }
.side-effect .coverage-counts {
  display: flex; justify-content: space-between; gap: var(--s-2);
  font-weight: 600; font-size: 14px; margin-bottom: var(--s-1);
}
.side-effect .cov-extracted { color: var(--pomelo-deep, #3a7a00); }
.side-effect .cov-provide { color: var(--ink-2, #555); }
.side-effect .progress {
  background: var(--surface-2);
  height: 10px; border-radius: 999px;
  overflow: hidden;
  margin: var(--s-1) 0;
}
.side-effect .progress-bar {
  background: var(--pomelo);
  height: 100%;
  border-radius: 999px;
  transition: width 320ms var(--spring);
}
.side-effect .cov-sub { font-size: 12px; margin: var(--s-1) 0 0; }
.side-effect .nudge {
  background: var(--surface-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r);
  margin: var(--s-3) 0 0;
  color: var(--ink);
  font-size: 13.5px;
}
.side-effect ul { margin: var(--s-2) 0 0; padding-left: 22px; }
.side-effect .conf { color: var(--ink-mute); font-size: 11.5px; }

/* ────────── TYPING INDICATOR (3 dots) ────────── */
.spinner {
  display: inline-block;
  position: relative;
  width: 30px; height: 8px;
  vertical-align: middle;
}
.spinner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 4px 4px,  var(--ink-mute) 3px, transparent 3.5px),
    radial-gradient(circle at 15px 4px, var(--ink-mute) 3px, transparent 3.5px),
    radial-gradient(circle at 26px 4px, var(--ink-mute) 3px, transparent 3.5px);
  animation: typebreathe 1.4s var(--ease) infinite;
}
@keyframes typebreathe {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50%      { opacity: 1;    transform: translateY(-1px); }
}

/* ────────── INPUT AREA ────────── */
#input-area {
  position: sticky; bottom: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--surface) 18%);
  padding: var(--s-4) 0 var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: opacity .2s ease;
}
#input-area > * { margin: 0; }
/* The input area's form stacks chips on top, free-text row below. They
   used to sit side-by-side at flex: 1 each, which split the row into 50/50
   and forced the input + Send button to stretch awkwardly — the wide Send
   was visually competing with the primary chip. Stacking puts the chips
   in one rail (full width, wraps cleanly), and the text row in its own
   line below at sensible size. */
#input-area form { display: flex; flex-direction: column; gap: var(--s-3); }

/* While the OCR pipeline is running (a .bubble.processing exists in the
   chat log), the input area becomes click-blocked + dimmed. Prevents the
   user from queueing a second upload or hitting submit twice. */
#chat-log:has(.bubble.processing) ~ #input-area {
  pointer-events: none;
  opacity: 0.45;
}
.chips    { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.text-row { display: flex; gap: var(--s-3); align-items: stretch; }
/* Text input fills the row; Send button stays compact. */
.text-row input[type="text"] {
  flex: 1;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid var(--surface-3);
  background: var(--surface);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  min-height: 44px;
}
.text-row input[type="text"]:focus {
  outline: none;
  border-color: var(--pomelo);
  box-shadow: 0 0 0 3px rgba(125, 209, 52, 0.18);
}
.text-row input[type="text"]::placeholder { color: var(--ink-faint); }
.text-row .chip {
  flex: 0 0 auto;        /* don't stretch — compact Send button */
  align-self: stretch;   /* match input's height visually */
}

/* ────────── CHIPS (answer rail) ────────── */
.chip {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  padding: 11px 18px;
  border-radius: var(--r);
  border: 0;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  font: 600 14px/1.3 var(--font);
  letter-spacing: -0.005em;
  text-align: left;
  min-height: 44px;
  transition: background .12s var(--ease), box-shadow .15s var(--ease), transform .12s var(--spring);
}
.chip:hover {
  background: var(--surface-3);
  box-shadow: var(--lift);
  transform: translateY(-1px);
}
.chip:active { transform: translateY(0); }

/* Multi-select: checkbox chips (tick several, then Continue) */
.chips-multi { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip-check {
  flex-direction: row; align-items: center; gap: 8px;
  user-select: none;
}
.chip-check input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-dark); cursor: pointer; }
.chip-check:has(input:checked) {
  background: rgba(125, 209, 52, 0.14);   /* light Pomelo-green tint */
  box-shadow: inset 0 0 0 1.5px var(--brand-dark);
}
.multi-continue { margin-top: var(--s-2); }

/* Composition: one number input per household band */
.comp-grid { display: flex; flex-direction: column; gap: 6px; }
.comp-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 14px;
  background: var(--surface-2); border-radius: var(--r);
}
.comp-label { font: 600 14px/1.3 var(--font); color: var(--ink); }
.comp-row input[type="number"] {
  width: 64px; text-align: center; padding: 7px 8px;
  border: 1.5px solid var(--line, #d9dcd6); border-radius: 10px;
  font: 600 15px/1 var(--font); background: var(--surface);
}
.comp-row input[type="number"]:focus {
  outline: none; border-color: var(--brand-dark);
}

.chip.primary,
.chip.terminal,
.chip.submit {
  background: var(--pomelo);
  color: var(--ink);
  box-shadow: var(--lift);
}
.chip.primary:hover,
.chip.terminal:hover,
.chip.submit:hover {
  background: var(--pomelo-deep);
  color: #fff;
  box-shadow: var(--lift-hover);
}

.chip.secondary { background: var(--surface-2); }

.chip .desc {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 3px;
  font-weight: 400;
  letter-spacing: 0;
}
.chip.primary .desc,
.chip.terminal .desc,
.chip.submit .desc { color: rgba(10,10,10,0.7); }
.chip.primary:hover .desc,
.chip.terminal:hover .desc,
.chip.submit:hover .desc { color: rgba(255,255,255,0.85); }

.chip small.note {
  color: var(--ink-mute);
  font-size: 11.5px;
  margin-top: 3px;
  font-weight: 400;
}

/* ────────── CANCEL CHIP (last option, every chat step) ──────────
   Visually identical to the other answer chips: same shape, same fill,
   sizes to its content like its siblings. The label "← Cancel renewal"
   communicates intent. Always last in the rail. */
.cancel-chip-wrap {
  margin-top: var(--s-3);
}

/* ────────── DROPZONE ────────── */
.dropzone {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--s-5);
  background: var(--surface-2);
  border-radius: var(--r-lg);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  min-height: 120px;
  transition: background .15s var(--ease), box-shadow .15s var(--ease);
}
.dropzone:hover,
.dropzone.dragover {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--pomelo), var(--lift);
}
.dropzone input { display: none; }
.dropzone span { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.dropzone-hint {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-mute);
  font-weight: 400;
}
.upload-form { display: flex; gap: var(--s-3); align-items: stretch; flex-direction: column; }
.submit-row  { margin-top: var(--s-2); }

/* Auto-upload: idle vs "reading…" state. htmx adds .htmx-request to
   #input-area (hx-indicator) for the duration of the OCR request. */
.dropzone .dz-busy { display: none; }
#input-area.htmx-request .dropzone .dz-idle { display: none; }
#input-area.htmx-request .dropzone .dz-busy { display: block; }
#input-area.htmx-request .dropzone {
  pointer-events: none;
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--pomelo);
}

/* ────────── INPUTS ────────── */
input[type="text"],
input[type="email"] {
  flex: 1;
  padding: 12px 14px;
  font: 16px var(--font);          /* 16px = no iOS zoom */
  letter-spacing: -0.005em;
  background: var(--surface-2);
  color: var(--ink);
  border: 0;
  border-radius: var(--r);
  transition: background .12s ease, box-shadow .12s ease;
  outline: 0;
}
input[type="text"]::placeholder,
input[type="email"]::placeholder { color: var(--ink-faint); }
input[type="text"]:focus,
input[type="email"]:focus {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--pomelo);
}

details.resume { margin-top: var(--s-3); }
details.resume summary {
  color: var(--ink-mute);
  cursor: pointer;
  font-size: 13.5px;
  padding: 4px 0;
  list-style: none;
}
.resume-form { margin-top: var(--s-3); display: flex; gap: var(--s-3); }

/* ────────── BANNER (white card + leading dot) ────────── */
.banner {
  position: relative;
  padding: var(--s-3) var(--s-4);
  padding-left: calc(var(--s-4) + 18px);
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--lift);
  font-size: 14px;
  color: var(--ink);
  margin-bottom: var(--s-2);
}
.banner::before {
  content: "";
  position: absolute;
  left: var(--s-4); top: 18px;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--ink);
}
.banner strong { display: block; margin-bottom: 3px; font-size: 15px; font-weight: 600; }
.banner code {
  background: var(--surface-2);
  color: var(--ink);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.banner-in_progress::before,
.banner-reminder_due::before { background: var(--ink); }
.banner-filled::before,
.banner-pending::before      { background: var(--pomelo); }
.banner-failed::before       { background: var(--err); }

/* ────────── CHECKLIST ────────── */
.checklist {
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 0;
  font-size: 14px;
}
.checklist-head {
  margin: var(--s-3) 0 var(--s-1);
  color: var(--ink-mute);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.checklist ul,
.checklist ol { margin: var(--s-2) 0 var(--s-3); padding: 0; list-style: none; }
.checklist li {
  margin: 6px 0;
  padding-left: 18px;
  position: relative;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--pomelo);
}
.checklist .fee   { color: var(--ink); font-weight: 600; }
.checklist .muted { color: var(--ink-mute); }
.checklist a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--pomelo);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.checklist a:hover { color: var(--pomelo-deep); }

/* ────────── RENEWAL PLAN HUB ────────── */
.renewal-plan {
  margin-top: var(--s-3);
  padding: var(--s-4);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--lift);
}
.renewal-plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
}
.renewal-plan-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.renewal-plan-progress {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.renewal-plan-sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-mute);
}
.renewal-track {
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  position: relative;
}
.renewal-track::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--surface-3);
}
.renewal-track:first-of-type {
  margin-top: var(--s-3);
}
.renewal-track-name {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 700;
  margin-bottom: var(--s-2);
}
.renewal-items {
  margin: 0;
  padding: 0;
  list-style: none;
}
.renewal-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  padding: var(--s-2) 0;
}
.renewal-item + .renewal-item {
  border-top: 1px solid var(--surface-3);
}
.renewal-item-glyph {
  flex: none;
  font-size: 15px;
  line-height: 1.4;
}
.renewal-item-body { flex: 1; min-width: 0; }
.renewal-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
}
.renewal-item-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.renewal-item-who {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.renewal-item-hint {
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.4;
}
/* Status accents: "next" leans on the accent, done/na recede. */
.renewal-item.is-next .renewal-item-label { color: var(--pomelo-deep); }
.renewal-item.is-next .renewal-item-who {
  color: var(--surface);
  background: var(--pomelo-deep);
}
.renewal-item.is-done .renewal-item-label { color: var(--ink-mute); }
.renewal-item.is-na { opacity: 0.55; }
.renewal-item.is-na .renewal-item-label { color: var(--ink-mute); }
.renewal-plan-closing {
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  position: relative;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}
.renewal-plan-closing::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--surface-3);
}

/* ────────── PLAN CARDS ────────── */
.plan-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  margin-top: var(--s-3);
}
@media (min-width: 720px) {
  .plan-cards { grid-template-columns: 1fr 1fr 1fr; }
}
.plan-card {
  background: var(--surface);
  border: 0;
  border-radius: var(--r-lg);
  padding: var(--s-4);
  box-shadow: var(--lift);
  transition: box-shadow .18s ease, transform .15s ease;
}
.plan-card:hover {
  box-shadow: var(--lift-hover);
  transform: translateY(-1px);
}
.plan-card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: var(--s-2);
  margin-bottom: var(--s-3);
  border-bottom: 0;
}
.plan-card-head h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.plan-price {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.plan-increment {
  color: var(--ink-mute);
  font-size: 12px;
  font-weight: 500;
  font-style: normal;
  font-family: var(--font);
}
.plan-line { margin: var(--s-2) 0; padding: 0; }
.plan-line-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--s-2);
  margin-bottom: 2px;
}
.plan-line-label { font-size: 13px; color: var(--ink-mute); }
.plan-line-limit { font-weight: 600; font-size: 14px; color: var(--ink); }
.plan-line-plain { font-size: 13px; color: var(--ink); }
.plan-gut        { font-size: 12.5px; color: var(--ink-mute); margin-top: 2px; }
.plan-best-for {
  margin-top: var(--s-3);
  padding-top: var(--s-2);
  border-top: 0;
  font-size: 12.5px;
  color: var(--ink);
}
.plan-best-for b { color: var(--pomelo-deep); font-weight: 600; }

/* ────────── SUMMARY CARD (review) ────────── */
.summary-card {
  margin-top: var(--s-3);
  padding: var(--s-4);
  background: var(--surface);
  border: 0;
  border-radius: var(--r-lg);
  box-shadow: var(--lift);
}
.summary-section {
  padding: var(--s-2) 0;
  border-bottom: 0;
}
.summary-section + .summary-section {
  margin-top: var(--s-2);
  padding-top: var(--s-3);
  position: relative;
}
.summary-section + .summary-section::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--surface-3);
}
.summary-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 700;
  margin-bottom: 6px;
  display: flex; justify-content: space-between; align-items: center;
}
.edit-pill {
  background: var(--surface-2);
  border: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease;
}
.edit-pill:hover { background: var(--pomelo); }

.row-edit {
  background: transparent; border: 0; cursor: pointer;
  color: var(--ink-mute); font-size: 13px; padding: 0 6px;
  border-radius: 4px;
  opacity: 0.45;
  transition: opacity 120ms ease, background 120ms ease;
}
.summary-card dd:hover .row-edit, .row-edit:focus { opacity: 1; }
.row-edit:hover { background: var(--surface-2); color: var(--ink); opacity: 1; }
.summary-card dd { display: flex; align-items: center; gap: 6px; }

.summary-card dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: 14px;
}
.summary-card dt { color: var(--ink-mute); }
.summary-card dd { margin: 0; color: var(--ink); }
.summary-card dd.missing { color: var(--err); font-style: italic; }
.summary-premium {
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  position: relative;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.summary-premium::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--surface-3);
}

.src-badge {
  display: inline-block;
  padding: 0 4px;
  font-size: 11px;
  color: var(--ink-mute);
  cursor: help;
  opacity: 0.7;
  font-family: var(--font-mono);
}
.src-badge:hover { opacity: 1; }

.back-bail { margin-top: var(--s-2); opacity: 0.85; }
.back-bail .chip { font-size: 12px; padding: 6px 14px; }

.submit-cta { width: 100%; margin-bottom: var(--s-2); }
.submit-chip {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--r);
  background: var(--pomelo);
  color: var(--ink);
  border: 0;
  box-shadow: var(--lift);
  letter-spacing: -0.01em;
}
.submit-chip:hover {
  background: var(--pomelo-deep);
  color: #fff;
  box-shadow: var(--lift-hover);
}
.submit-chip .desc {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 4px;
}

/* ────────── AUTH FORMS ────────── */
.auth-form {
  display: flex; flex-direction: column;
  gap: var(--s-3);
  max-width: 360px;
  padding: var(--s-4);
  background: var(--surface);
  border: 0;
  border-radius: var(--r-lg);
  box-shadow: var(--lift);
}
.auth-form .auth-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.auth-form .auth-field span { color: var(--ink-mute); }
.auth-form input[type="email"],
.auth-form input[type="text"] {
  padding: 12px 14px;
  background: var(--surface-2);
  border: 0;
  border-radius: var(--r);
  font-size: 15px;
  font-family: inherit;
}
.auth-form input:focus {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--pomelo);
}
.auth-hint  { font-size: 12.5px; margin: 0; color: var(--ink-mute); }
.auth-step  { font-size: 14px; margin: 0; color: var(--ink); }
.auth-error { color: var(--err); font-size: 13px; margin: 0; }
.auth-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }

/* ────────── BADGES (dot + text style) ────────── */
.badge {
  display: inline-flex; align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 0;
}
.badge::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--ink-mute);
}
.badge-ok::before   { background: var(--pomelo); }
.badge-warn::before { background: var(--ink); }
.badge-info        { color: var(--ink-mute); }
.badge-info::before { background: var(--ink-faint); }
.badge-err         { color: var(--ink); }
.badge-err::before  { background: var(--err); }

/* ────────── STATUS ROWS ────────── */
.status-row { padding: var(--s-2) 0; border-bottom: 0; position: relative; }
.status-row + .status-row { padding-top: var(--s-3); margin-top: var(--s-2); }
.status-row + .status-row::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--surface-3);
}
.status-row-head {
  display: flex; align-items: center; gap: var(--s-2);
  margin-bottom: 3px;
}
.status-helper { font-weight: 600; color: var(--ink); }
.status-row-meta { color: var(--ink-mute); font-size: 13px; }
.status-row-meta code {
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11.5px;
  font-family: var(--font-mono);
}

/* ────────── EXTERNAL LINK CHIPS ────────── */
.terminal-chips { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-2); }
.link-chip {
  text-decoration: none;
  background: var(--surface-2);
  color: var(--ink);
}
.link-chip:hover {
  background: var(--pomelo);
  color: var(--ink);
}

/* ────────── 'My policies (N) →' link on the picker page ──────────
   Single quiet entry-point into /my-submissions. Sits below the 3-card
   picker. Same chip-family treatment so it reads as part of the page. */
.my-policies-link {
  display: inline-flex; align-items: center;
  gap: 8px;
  align-self: center;
  margin-top: var(--s-3);
  padding: 10px 18px;
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--r-pill);
  transition: background .12s ease, transform .12s var(--spring);
}
.my-policies-link:hover {
  background: var(--surface-3);
  transform: translateY(-1px);
}
.my-policies-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px;
  padding: 0 7px;
  background: var(--pomelo);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0;
}
.my-policies-arrow {
  font-size: 16px;
  color: var(--ink-mute);
  font-weight: 400;
  transition: transform .15s var(--spring);
}
.my-policies-link:hover .my-policies-arrow { transform: translateX(3px); }

/* ────────── PICKER (welcome / picker mode) ────────── */
.picker {
  display: flex; flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  padding: var(--s-4) var(--s-3) var(--s-5);
  gap: var(--s-4);
}
.picker-head {
  display: flex; flex-direction: column;
  gap: 6px;
  padding: 0 var(--s-1);
}
.picker-title {
  margin: 0;
  font-size: clamp(24px, 4.6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}
.picker-sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-mute);
}
.picker-sub code {
  background: var(--surface-2);
  color: var(--ink);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.product-grid {
  display: flex; flex-direction: column;
  gap: var(--s-2);
}
.product-grid form { margin: 0; display: block; }

.product-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  padding: var(--s-3);
  background: var(--surface);
  border: 0;
  border-radius: var(--r-lg);
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--lift);
  transition: box-shadow .15s ease, transform .12s var(--spring), background .12s ease;
}
.product-card:hover {
  box-shadow: var(--lift-hover);
  transform: translateY(-1px);
}
.product-card:active { transform: translateY(0); }
.product-card[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  background: var(--surface-2);
  box-shadow: none;
}
.product-card[disabled]:hover { transform: none; box-shadow: none; }

.product-card--available { background: var(--surface); }

.product-art {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border-radius: var(--r);
}
.product-art svg { width: 30px; height: 30px; display: block; }
.product-card--available .product-art { background: var(--surface-2); }

.product-meta {
  display: flex; flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.product-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.product-blurb {
  font-size: 13.5px;
  color: var(--ink-mute);
  line-height: 1.35;
}

.product-status {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  background: transparent;
}

.product-go {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pomelo);
  color: var(--ink);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  transition: background .12s ease, transform .15s var(--spring);
}
.product-card--available:hover .product-go {
  background: var(--pomelo-deep);
  color: #fff;
  transform: translateX(3px);
}

.picker-resume {
  display: flex; justify-content: center;
  margin-top: var(--s-2);
}
.picker-resume form, .picker-resume { margin: 0; }

/* ────────── LINK-ACTION (tertiary nav) ────────── */
.link-action {
  background: transparent;
  border: 0;
  font: 500 14.5px/1 var(--font);
  color: var(--ink-mute);
  padding: 10px 14px;
  cursor: pointer;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .15s ease, background .15s ease;
}
.link-action .arrow {
  display: inline-block;
  transition: transform .2s var(--spring);
}
.link-action:hover {
  color: var(--ink);
  background: var(--surface-2);
}
.link-action:hover .arrow { transform: translateX(3px); }

/* Generic muted text — used by bubble copy, footer links, hints. */
.muted { color: var(--ink-mute); }

/* ────────── PHASE CHECKLIST (submit-progress bubble) ────────── */
.phases {
  list-style: none;
  margin: var(--s-3) 0 0;
  padding: 0;
  display: flex; flex-direction: column;
  gap: var(--s-2);
}
.phase {
  display: flex; align-items: center; gap: var(--s-3);
  font-size: 14.5px;
  transition: color .25s var(--ease);
}
.phase-dot {
  width: 16px; height: 16px;
  border-radius: 999px;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font);
  transition: background .25s var(--ease);
}
.phase-completed { color: var(--ink); }
.phase-completed .phase-dot { background: var(--pomelo); }
.phase-completed .phase-dot::after {
  content: "✓";
  font-size: 10px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1;
}
.phase-active { color: var(--ink); font-weight: 500; }
.phase-active .phase-dot {
  background: var(--pomelo);
  animation: phase-pulse 1.4s var(--ease) infinite;
}
.phase-future { color: var(--ink-faint); }
.phase-future .phase-dot { background: var(--surface-3); }
.phase-failed { color: var(--ink-mute); }
.phase-failed .phase-dot { background: #b94646; }
.phase-failed .phase-dot::after {
  content: "✕";
  font-size: 10px;
  color: #fff;
  font-weight: 700;
  line-height: 1;
}
.phase .muted { color: var(--ink-mute); font-size: 12.5px; }
.phase .err   { color: #b94646; font-size: 12.5px; }
@keyframes phase-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(125, 209, 52, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(125, 209, 52, 0);
    transform: scale(1.1);
  }
}

/* ────────── /my-submissions + /submissions/<id>/summary pages ────────── */
.ms-page {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--s-4) var(--s-4) var(--s-6);
}
.ms-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-mute);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: var(--s-2) 0;
  transition: color .15s ease;
}
.ms-back:hover { color: var(--ink); }
.ms-back .arrow { display: inline-block; transition: transform .15s var(--spring); }
.ms-back:hover .arrow { transform: translateX(-3px); }

.ms-title {
  margin: var(--s-3) 0 4px;
  font-size: clamp(24px, 4.6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.ms-sub {
  margin: 0 0 var(--s-5);
  color: var(--ink-mute);
  font-size: 14.5px;
  line-height: 1.5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.ms-sub code {
  background: var(--surface-2);
  color: var(--ink);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.ms-dot { color: var(--ink-faint); }

/* Empty state */
.ms-empty {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-5);
  text-align: center;
  box-shadow: var(--lift);
  display: flex; flex-direction: column;
  align-items: center; gap: var(--s-3);
}
.ms-empty p { margin: 0; }
.ms-empty p:first-child { font-size: 17px; font-weight: 600; }
.ms-empty p.muted { color: var(--ink-mute); max-width: 32ch; }
.ms-empty .chip { margin-top: var(--s-2); }

/* Card list */
.ms-list {
  display: flex; flex-direction: column;
  gap: var(--s-3);
}
.ms-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  box-shadow: var(--lift);
  display: flex; flex-direction: column; gap: var(--s-3);
  transition: box-shadow .15s ease, transform .12s var(--spring);
}
.ms-card:hover { box-shadow: var(--lift-hover); transform: translateY(-1px); }

.ms-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3);
}

/* Status: dot + label (not a badge pill) */
.ms-status {
  display: inline-flex; align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.ms-status-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--ink-faint);
}
.ms-status--ok       .ms-status-dot { background: var(--pomelo); }
.ms-status--warn     .ms-status-dot { background: var(--ink); }
.ms-status--info     .ms-status-dot { background: var(--ink-faint); }
.ms-status--err      .ms-status-dot { background: var(--err); }
.ms-status--err      { color: var(--ink); }
.ms-status--draft    .ms-status-dot { background: var(--ink-faint); }

.ms-ref {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
}

.ms-card-body {
  display: flex; flex-direction: column;
  gap: 4px;
}
.ms-card-name {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.ms-card-name .muted { font-weight: 400; color: var(--ink-mute); }
.ms-card-meta {
  font-size: 13.5px;
  color: var(--ink-mute);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}

.ms-card-actions {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  align-items: stretch;
}
.ms-action-form { margin: 0; display: block; }
.ms-card-actions .chip {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13.5px;
}

/* Summary-page sections */
.ms-section {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-4);
  box-shadow: var(--lift);
  margin-bottom: var(--s-3);
}
.ms-section-title {
  margin: 0 0 var(--s-3);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.ms-dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 14px;
}
.ms-dl dt {
  color: var(--ink-mute);
  font-weight: 500;
}
.ms-dl dd {
  margin: 0;
  color: var(--ink);
  word-break: break-word;
}
.ms-dl dd code {
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.ms-dl .missing {
  color: var(--ink-faint);
  font-style: italic;
}

@media (max-width: 540px) {
  .ms-dl { grid-template-columns: 1fr; gap: 2px 0; }
  .ms-dl dt { margin-top: var(--s-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
  .ms-dl dt:first-child { margin-top: 0; }
}

/* ═══════════════════════════════════════════════════════════════════
   LANDING PAGE — pomeloinsured.com
   Namespaced with `lp-` to keep it from colliding with the chat UI.
   Reuses every token from :root (--pomelo, --ink*, --font*, --r*,
   --s-*, --lift, --spring, --ease). No new colors. No new fonts.
   ═══════════════════════════════════════════════════════════════════ */

/* Scroll-reveal utility — IntersectionObserver toggles `.in-view`. */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  will-change: opacity, transform;
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* ────────── LP: STICKY HEADER ────────── */
.lp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--s-5);
  background: transparent;
  transition: background 0.24s var(--ease), box-shadow 0.24s var(--ease),
              backdrop-filter 0.24s var(--ease);
}
.lp-header[data-lp-condensed="true"] {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: var(--lift);
}
.lp-header .logo {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.lp-header .logo svg { width: 26px; height: 26px; }
.lp-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--surface);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.2s var(--spring), background 0.2s var(--ease);
}
.lp-header__cta:hover { background: #1a1a1a; transform: translateY(-1px); }
.lp-header__cta .arrow { transition: transform 0.2s var(--ease); }
.lp-header__cta:hover .arrow { transform: translateX(2px); }

/* ────────── LP: HERO ────────── */
.lp-hero {
  min-height: 95svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s-6) var(--s-5) calc(var(--s-6) * 1.5);
  max-width: 1100px;
  margin: 0 auto;
}
.lp-hero__eyebrow {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: var(--s-5);
}
.lp-hero__eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pomelo);
  margin-right: 8px;
  vertical-align: middle;
}
.lp-hero__title {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(36px, 6.4vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 var(--s-5);
  color: var(--ink);
  max-width: 22ch;
  overflow-wrap: anywhere;
}
.lp-hero__title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--pomelo-deep);
}
.lp-hero__sub {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--ink-mute);
  max-width: 52ch;
  margin: 0 0 var(--s-6);
}
.lp-hero__cta-row {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  justify-content: center;
}
.lp-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s var(--spring), box-shadow 0.2s var(--ease),
              background 0.2s var(--ease);
  border: none;
  cursor: pointer;
}
.lp-cta--primary {
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--lift);
}
.lp-cta--primary:hover {
  background: #1a1a1a;
  box-shadow: var(--lift-hover);
  transform: translateY(-1px);
}
.lp-cta--ghost {
  background: transparent;
  color: var(--ink);
}
.lp-cta--ghost:hover { color: var(--pomelo-deep); }
.lp-cta .arrow { transition: transform 0.2s var(--ease); }
.lp-cta:hover .arrow { transform: translateX(3px); }

/* ────────── LP: VALUE BAND (Fraunces italic pull quote) ────────── */
.lp-valueband {
  padding: calc(var(--s-6) * 2.4) var(--s-5);
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.lp-valueband__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(26px, 3.6vw, 48px);
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.015em;
  max-width: 22ch;
  margin: 0 auto;
}
.lp-valueband__quote .accent { color: var(--pomelo-deep); }
.lp-valueband__quote .word {
  display: inline-block;
  opacity: 0.18;
  transition: opacity 0.4s var(--ease);
}
.lp-valueband.in-view .lp-valueband__quote .word { opacity: 1; }
.lp-valueband__quote .word:nth-child(1) { transition-delay: 0s; }
.lp-valueband__quote .word:nth-child(2) { transition-delay: 0.04s; }
.lp-valueband__quote .word:nth-child(3) { transition-delay: 0.08s; }
.lp-valueband__quote .word:nth-child(4) { transition-delay: 0.12s; }
.lp-valueband__quote .word:nth-child(5) { transition-delay: 0.16s; }
.lp-valueband__quote .word:nth-child(6) { transition-delay: 0.20s; }
.lp-valueband__quote .word:nth-child(7) { transition-delay: 0.24s; }
.lp-valueband__quote .word:nth-child(8) { transition-delay: 0.28s; }
.lp-valueband__quote .word:nth-child(9) { transition-delay: 0.32s; }
.lp-valueband__quote .word:nth-child(10) { transition-delay: 0.36s; }
.lp-valueband__quote .word:nth-child(11) { transition-delay: 0.40s; }
.lp-valueband__quote .word:nth-child(12) { transition-delay: 0.44s; }
.lp-valueband__quote .word:nth-child(13) { transition-delay: 0.48s; }
.lp-valueband__quote .word:nth-child(14) { transition-delay: 0.52s; }

/* ────────── LP: WHAT IT COSTS ────────── */
.lp-cost {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--s-6) * 1.6) var(--s-5);
  text-align: center;
}
.lp-cost__title {
  font-family: var(--font);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: var(--s-3) 0 var(--s-4);
}
.lp-cost__title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--pomelo-deep);
}
.lp-cost__body {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-mute);
  margin: 0;
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}
.lp-cost__closing {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 19px;
  line-height: 1.4;
  color: var(--ink);
  margin: var(--s-5) auto 0;
  max-width: 44ch;
}

/* ────────── LP: PRODUCT GRID (3-up) ────────── */
.lp-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--s-6) var(--s-5);
}
.lp-section__head {
  /* These are <header> elements, so the generic `header` rule (sticky flex)
     applies unless we reset it here. Without this they stick to the top and
     collapse into overlapping columns on scroll. */
  display: block;
  position: static;
  text-align: center;
  margin-bottom: var(--s-6);
}
.lp-section__eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: var(--s-3);
}
.lp-section__title {
  font-family: var(--font);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
}
.lp-section__lead {
  max-width: 56ch;
  margin: var(--s-3) auto 0;
  color: var(--ink-mute);
  font-size: 16px;
  line-height: 1.55;
}
/* Landing pages don't use the chat's narrow 640px main. */
.lp-main {
  max-width: none;
  padding: 0;
  display: block;
  min-height: 0;
}

.lp-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  align-items: stretch;
}
.lp-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--surface-3);
  border-radius: var(--r-lg);
  box-shadow: var(--lift);
  transition: transform 0.24s var(--spring), box-shadow 0.24s var(--ease),
              border-color 0.24s var(--ease);
  min-height: 220px;
  text-decoration: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lp-product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--lift-hover);
}
/* Live card = same vertical shape as the others, marked by the green border. */
.lp-product-card--live {
  border-color: var(--pomelo);
  border-width: 1.5px;
}
.lp-product-card--live:hover { border-color: var(--pomelo-deep); }
.lp-product-card--live .lp-product-card__copy {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  flex: 1;
}
.lp-product-card--live .lp-product-card__go { color: var(--pomelo-deep); }
.lp-product-card--soon { opacity: 0.86; }
.lp-product-card__icon { width: 40px; height: 40px; }
.lp-product-card__title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.lp-product-card__blurb {
  color: var(--ink-mute);
  font-size: 14.5px;
  line-height: 1.45;
  margin: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
.lp-product-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s-3);
}
.lp-product-card__go {
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
}
.lp-product-card__go .arrow { transition: transform 0.2s var(--ease); }
.lp-product-card:hover .lp-product-card__go .arrow { transform: translateX(3px); }
.lp-product-card--live .lp-product-card__go { color: var(--pomelo-deep); }
/* Legacy top-right badge — kept for back-compat if any other page uses it.
   Soon cards now use .lp-product-card__pill in the foot instead. */
.lp-product-card__badge {
  position: absolute;
  top: var(--s-4);
  right: var(--s-4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-mute);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.lp-product-card__badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
}

/* In-foot "Coming soon" pill, sits beside the action arrow.
   Replaces the top-right badge so they can't visually clash in narrow cards. */
.lp-product-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-mute);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.lp-product-card__pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
}
.lp-product-card--soon .lp-product-card__go { color: var(--ink-mute); }

/* ────────── LP: WHITE-GLOVE PROOF ────────── */
.lp-whiteglove {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--s-6) * 1.4) var(--s-5);
}
.lp-whiteglove__copy { max-width: 36ch; }
.lp-whiteglove__title {
  font-family: var(--font);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: var(--s-3) 0 var(--s-4);
}
.lp-whiteglove__title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
}
.lp-whiteglove__body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-mute);
  margin: 0 0 var(--s-4);
}
.lp-whiteglove__forthcoming {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-faint);
  margin: 0;
}
.lp-doc {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--lift);
  padding: var(--s-5);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink);
  position: relative;
  transform: translateY(40px);
  opacity: 0;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--spring);
  transition-delay: 0.12s;
}
.lp-whiteglove.in-view .lp-doc { opacity: 1; transform: none; }
.lp-doc__corner {
  position: absolute;
  top: var(--s-3);
  right: var(--s-4);
  font-family: var(--font);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.lp-doc__title {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 var(--s-3);
}
.lp-doc__line {
  margin: 4px 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.lp-doc__line .fld {
  color: var(--pomelo-deep);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.lp-doc__sig {
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px dashed var(--surface-3);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-mute);
}

/* ────────── LP: FLOW CARDS (white-glove right column) ──────────
   Vertical stack of "checklist" cards. As .lp-whiteglove enters
   view (.in-view), each card fades up and its tick fills in lime
   with a drawing checkmark, staggered via --stagger per card. */
.lp-flow {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.lp-flow-card {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--lift);
  opacity: 0.45;
  transform: translateY(8px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  transition-delay: var(--stagger, 0s);
}
.lp-flow-card[data-flow-step="1"] { --stagger: 0s; }
.lp-flow-card[data-flow-step="2"] { --stagger: 0.22s; }
.lp-flow-card[data-flow-step="3"] { --stagger: 0.44s; }
.lp-flow-card[data-flow-step="4"] { --stagger: 0.66s; }
.lp-flow-card[data-flow-step="5"] { --stagger: 0.88s; }

.lp-whiteglove.in-view .lp-flow-card {
  opacity: 1;
  transform: none;
}

.lp-flow-card__tick {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.lp-flow-card__tick svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.lp-flow-card__tick-bg {
  fill: transparent;
  stroke: var(--ink-faint);
  stroke-width: 1.5;
  transition: fill 0.35s var(--ease), stroke 0.35s var(--ease);
  transition-delay: calc(var(--stagger, 0s) + 0.15s);
}
.lp-flow-card__tick-check {
  fill: none;
  stroke: var(--surface);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 0.4s var(--ease);
  transition-delay: calc(var(--stagger, 0s) + 0.3s);
}
.lp-whiteglove.in-view .lp-flow-card__tick-bg {
  fill: var(--pomelo);
  stroke: var(--pomelo);
}
.lp-whiteglove.in-view .lp-flow-card__tick-check {
  stroke-dashoffset: 0;
}

.lp-flow-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.lp-flow-card__title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.lp-flow-card__sub {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-mute);
  margin: 0;
}

/* ────────── LP: HOW IT WORKS ────────── */
.lp-how__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
.lp-step {
  padding: var(--s-5) 0;
  border-top: 1px solid var(--surface-3);
}
.lp-step__num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 44px;
  color: var(--pomelo-deep);
  line-height: 1;
  margin-bottom: var(--s-3);
}
.lp-step__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-2);
}
.lp-step__body {
  color: var(--ink-mute);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

/* ────────── LP: FAQ ────────── */
.lp-faq__list { max-width: 720px; margin: 0 auto; }
.lp-faq__item {
  border-top: 1px solid var(--surface-3);
  padding: 0;
}
.lp-faq__item:last-of-type { border-bottom: 1px solid var(--surface-3); }
.lp-faq__item > summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s-4) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.lp-faq__item > summary::-webkit-details-marker { display: none; }
.lp-faq__item > summary::after {
  content: "+";
  font-size: 22px;
  color: var(--ink-faint);
  font-weight: 300;
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}
.lp-faq__item[open] > summary::after {
  content: "−";
  color: var(--pomelo-deep);
}
.lp-faq__body {
  padding: 0 0 var(--s-4);
  color: var(--ink-mute);
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 60ch;
}

/* ────────── LP: FOOTER ────────── */
.lp-footer {
  margin: var(--s-6) auto 0;
  padding: var(--s-5);
  border-top: 1px solid var(--surface-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  text-align: center;
  font-size: 13px;
  color: var(--ink-faint);
  max-width: 1100px;
}
.lp-footer nav {
  display: flex;
  gap: var(--s-4);
  flex-wrap: wrap;
  justify-content: center;
}
.lp-footer a { color: var(--ink-mute); text-decoration: none; }
.lp-footer a:hover { color: var(--ink); }

/* ────────── LP: WAITLIST DIALOG ────────── */
.lp-modal {
  border: none;
  border-radius: var(--r-lg);
  padding: 0;
  background: var(--surface);
  box-shadow: var(--lift-hover);
  width: min(440px, calc(100vw - 32px));
  color: var(--ink);
}
.lp-modal::backdrop { background: rgba(10, 10, 10, 0.6); }
.lp-modal__inner { padding: var(--s-5); }
.lp-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.lp-modal__title {
  font-family: var(--font);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}
.lp-modal__close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-faint);
  padding: 4px;
}
.lp-modal__close:hover { color: var(--ink); }
.lp-modal__sub {
  color: var(--ink-mute);
  font-size: 14.5px;
  line-height: 1.5;
  margin: 0 0 var(--s-4);
}
.lp-modal__form { display: flex; flex-direction: column; gap: var(--s-3); }
.lp-modal__input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid var(--surface-3);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.2s var(--ease);
}
.lp-modal__input:focus {
  outline: none;
  border-color: var(--pomelo);
}
.lp-modal__error {
  color: var(--err);
  font-size: 13px;
  margin: 0;
  min-height: 16px;
}
.lp-modal__success {
  padding: var(--s-5) var(--s-3);
  text-align: center;
  color: var(--ink);
}
.lp-modal__success-tick {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--pomelo);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--surface);
  font-weight: 600;
  margin-bottom: var(--s-3);
}

/* ────────── LP: RESPONSIVE ────────── */
@media (max-width: 860px) {
  .lp-product-grid { grid-template-columns: 1fr; }
  .lp-whiteglove { grid-template-columns: 1fr; gap: var(--s-5); }
  .lp-how__steps { grid-template-columns: 1fr; }
  .lp-step { border-top: 1px solid var(--surface-3); }
}
@media (max-width: 540px) {
  .lp-header { padding: var(--s-3) var(--s-4); }
  .lp-header__cta { padding: 8px 12px; font-size: 13px; }
  .lp-hero { padding-top: var(--s-5); }
  .lp-section { padding: var(--s-5) var(--s-4); }
  .lp-whiteglove { padding: var(--s-5) var(--s-4); }
  .lp-doc { padding: var(--s-4); }
  .lp-valueband { padding: calc(var(--s-6) * 1.4) var(--s-4); }
}

/* ────────── REDUCED MOTION ────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .lp-valueband__quote .word { opacity: 1; }
  .lp-doc { opacity: 1; transform: none; }
  .lp-product-card:hover { transform: none; }
  .lp-flow-card { opacity: 1; transform: none; }
  .lp-flow-card__tick-bg { fill: var(--pomelo); stroke: var(--pomelo); }
  .lp-flow-card__tick-check { stroke-dashoffset: 0; }
}
