/* ─────────────────────────────────────────────────────────────────────
   AI Vedic Astrologer — v1 design system
   Palette: refined warm cream + ink, deep-indigo accent, warm-gold tier badge.
   Type: Cormorant Garamond (display), Inter (UI), Spectral (reading body).
   Built mobile-first, scales out to 1440. WCAG AA contrast.
   ───────────────────────────────────────────────────────────────────── */

/* ── 1. Tokens ──────────────────────────────────────────────────────── */
:root {
  /* Surface */
  --paper:           #FBF7EE;
  --paper-elev:      #FFFFFF;
  --paper-sunk:      #F4EEDE;

  /* Ink */
  --ink:             #1A1614;
  --ink-muted:       #5A4F45;   /* was #6B5F54 — darkened one step for WCAG AA on cream */
  --ink-soft:        #7A6E60;   /* was #8B7E70 — darkened to keep contrast ratio */
  --ink-faint:       #B0A597;

  /* Rules / borders */
  --rule:            #E8DFCE;
  --rule-soft:       #F0E8D7;
  --rule-strong:     #D6CAB0;

  /* Accents */
  --indigo:          #2D3561;
  --indigo-hover:    #3E477A;
  --indigo-tint:     #ECEDF3;
  --gold:            #B8893B;
  --gold-soft:       #D9B97E;
  --gold-tint:       #F5EBD2;

  /* Warm accent — saffron pulled from the Indian palette per the
     2026-05-28 landing warmup brief. Use sparingly: one CTA hover,
     the yantra glyph stroke, hero eyebrow accent. Deep indigo stays
     the grounding tone; saffron carries the heat. */
  --accent-warm:        #E4A04E;
  --accent-warm-soft:   #F2C283;
  --accent-warm-tint:   #FBEFD8;
  --accent-warm-hover:  #D08A33;

  /* States */
  --danger:          #8B2E2E;
  --danger-tint:     #F5E4E1;
  --success:         #3A6B4F;
  --success-tint:    #E3EDE6;

  /* Per-person stripes (used only in multi-person family readings) */
  --person-1:        #2D3561;  /* indigo */
  --person-2:        #7A4F3A;  /* terracotta */
  --person-3:        #5C6B3A;  /* olive */
  --person-4:        #6B3A5C;  /* plum */
  --person-5:        #3A6B6B;  /* teal */
  --person-6:        #8B7A3A;  /* ochre */

  /* Fonts */
  --font-display:    'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --font-ui:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-reading:    'Spectral', Georgia, 'Times New Roman', serif;
  --font-mono:       'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --font-devanagari: 'Tiro Devanagari Sanskrit', 'Noto Serif Devanagari', serif;

  /* Spacing scale (4px base) */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;
  --s-10: 128px;

  /* Radii — kept low; this is not a bubble-y product */
  --r-sm:   2px;
  --r-md:   4px;
  --r-lg:   8px;
  --r-pill: 999px;

  /* Type scale (UI) — bumped one notch in May-2026 boomer-audit pass.
     Body sits at 17px (close to the 18px recommended threshold),
     lede / featured copy at 20px. Older / less-technical users
     reported the prior 15-16px as fatiguing. */
  --t-xs:   13px;
  --t-sm:   14px;
  --t-base: 17px;
  --t-md:   18px;
  --t-lg:   20px;
  --t-xl:   22px;
  --t-2xl:  28px;
  --t-3xl:  36px;
  --t-4xl:  52px;
  --t-5xl:  72px;

  /* Reading prose */
  --reading-size:    17px;
  --reading-line:    1.7;
  --reading-measure: 65ch;

  /* Motion */
  --ease:        cubic-bezier(.2, .65, .25, 1);
  --ease-in:     cubic-bezier(.4, 0, 1, 1);
  --ease-out:    cubic-bezier(0, 0, .2, 1);
  --dur-fast:    140ms;
  --dur-med:     280ms;
  --dur-slow:    600ms;

  /* Layout */
  --nav-h:       60px;
  --composer-h:  92px;
  --sidebar-w:   292px;

  /* Shadow — very light, paper rests on paper */
  --shadow-1: 0 1px 2px rgba(26, 22, 20, 0.04), 0 1px 1px rgba(26, 22, 20, 0.03);
  --shadow-2: 0 4px 12px rgba(26, 22, 20, 0.05), 0 1px 3px rgba(26, 22, 20, 0.04);
  --shadow-3: 0 12px 32px rgba(26, 22, 20, 0.10), 0 2px 6px rgba(26, 22, 20, 0.04);
}

/* ── 2. Reset + base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  font-size: var(--t-base);
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--indigo); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s-6) 0; }
::selection { background: var(--gold-tint); color: var(--ink); }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: var(--r-sm); }

/* ── 3. Typography utilities ────────────────────────────────────────── */
.display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; }
.display-italic { font-style: italic; }
.serif-body { font-family: var(--font-reading); }
.ui { font-family: var(--font-ui); }
.devanagari { font-family: var(--font-devanagari); font-weight: 400; }

.t-xs { font-size: var(--t-xs); }
.t-sm { font-size: var(--t-sm); }
.t-md { font-size: var(--t-md); }
.t-lg { font-size: var(--t-lg); }
.t-xl { font-size: var(--t-xl); }

.muted     { color: var(--ink-muted); }
.soft      { color: var(--ink-soft); }
.faint     { color: var(--ink-faint); }
.uppercase { text-transform: uppercase; letter-spacing: 0.12em; font-size: var(--t-xs); font-weight: 500; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(36px, 5vw + 12px, 60px); }
h2 { font-size: clamp(28px, 3vw + 12px, 40px); }
h3 { font-size: clamp(22px, 1.5vw + 12px, 28px); }
h4 { font-size: 20px; }
p  { margin: 0 0 var(--s-4) 0; }

/* ── 4. Layout primitives ───────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--s-5); }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--s-5); }

.stack > * + * { margin-top: var(--s-4); }
.stack-tight > * + * { margin-top: var(--s-2); }
.stack-loose > * + * { margin-top: var(--s-6); }

.row { display: flex; align-items: center; gap: var(--s-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.col { display: flex; flex-direction: column; gap: var(--s-3); }

@media (min-width: 768px) {
  .container, .container-narrow { padding: 0 var(--s-6); }
}

/* ── 5. Wordmark + brand glyph ──────────────────────────────────────── */
/* The brand is "Naksha" — set in italic Cormorant Garamond.
   "AI Vedic Astrologer" is a small descriptor used selectively. */
.wordmark {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-family: var(--font-display); font-weight: 500;
  color: var(--ink); letter-spacing: -0.01em;
  text-decoration: none;
  line-height: 1;
}
.wordmark:hover { text-decoration: none; }
.wordmark-text {
  font-style: italic;
  font-size: 26px;
  font-weight: 500;
  display: inline-block;
}
.wordmark-stack { display: inline-flex; flex-direction: column; gap: 2px; }
.wordmark-descriptor {
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  line-height: 1;
}

.glyph {
  width: 22px; height: 22px;
  flex-shrink: 0;
  color: var(--indigo);
}
.glyph svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1; }

/* ── 6. Top navigation ──────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(251, 247, 238, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 var(--s-5);
}
.nav-links {
  display: none;
  list-style: none; margin: 0; padding: 0;
  gap: var(--s-6); align-items: center;
}
.nav-links a {
  color: var(--ink-muted); font-size: var(--t-sm); font-weight: 400;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: var(--s-3); }
.nav-cta .signin { color: var(--ink-muted); font-size: var(--t-sm); }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-inner { padding: 0 var(--s-6); }
}

/* ── 7. Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: 44px; padding: 0 var(--s-5);
  border-radius: var(--r-md);
  font-size: var(--t-sm); font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--ink); color: var(--paper);
}
.btn-primary:hover { background: var(--indigo); text-decoration: none; }
.btn-secondary {
  background: transparent; color: var(--ink);
  border: 1px solid var(--rule-strong);
}
.btn-secondary:hover { border-color: var(--ink); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink-muted); padding: 0 var(--s-3); }
.btn-ghost:hover { color: var(--ink); }
.btn-link {
  background: none; padding: 0; height: auto;
  color: var(--indigo);
  border-bottom: 1px solid var(--indigo);
  border-radius: 0;
}
.btn-link:hover { color: var(--indigo-hover); }
.btn-sm { height: 36px; padding: 0 var(--s-4); font-size: var(--t-xs); }
.btn-lg { height: 52px; padding: 0 var(--s-6); font-size: var(--t-md); }

/* ── 8. Pills, badges, chips ────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--t-xs); font-weight: 500;
  background: var(--paper-sunk); color: var(--ink-muted);
}
.pill-gold {
  background: var(--gold-tint); color: #6B521F;
}
.pill-indigo {
  background: var(--indigo-tint); color: var(--indigo);
}
.pill-success { background: var(--success-tint); color: var(--success); }
.pill-danger  { background: var(--danger-tint); color: var(--danger); }

.lagna-pill {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 2px 8px 3px;
  background: var(--paper-sunk);
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500; color: var(--ink);
}
.lagna-pill .sep { color: var(--ink-faint); }
.lagna-pill .lagna { color: var(--ink-muted); font-weight: 400; }

/* ── 9. Cards ───────────────────────────────────────────────────────── */
.card {
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}
.card-quiet {
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}
.card-sunk {
  background: var(--paper-sunk);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}

/* ── 10. Reading prose (the product) ────────────────────────────────── */
.reading {
  font-family: var(--font-reading);
  font-size: var(--reading-size);
  line-height: var(--reading-line);
  color: var(--ink);
  max-width: var(--reading-measure);
}
.reading p { margin: 0 0 1.1em 0; }
.reading p:last-child { margin-bottom: 0; }
.reading strong { font-weight: 600; color: var(--ink); }
.reading em { font-style: italic; color: var(--ink-muted); }
.reading h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 1.8em 0 0.5em;
  color: var(--ink);
}
.reading h2:first-child { margin-top: 0; }
.reading h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 1.6em 0 0.4em;
}
.reading ul, .reading ol { padding-left: 1.2em; margin: 0 0 1.1em 0; }
.reading li { margin-bottom: 0.4em; }
.reading blockquote {
  margin: 1.2em 0;
  padding-left: var(--s-4);
  border-left: 2px solid var(--rule-strong);
  color: var(--ink-muted);
  font-style: italic;
}
.reading hr { margin: var(--s-6) 0; border-top: 1px solid var(--rule); }
.reading code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--paper-sunk);
  padding: 1px 6px;
  border-radius: var(--r-sm);
}

/* Reading meta header — sits above the prose */
.reading-meta {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--s-5);
  font-size: var(--t-sm);
  color: var(--ink-muted);
}
.reading-meta .subject { color: var(--ink); }
.reading-meta .subject .name { font-weight: 500; }

/* Multi-person stripe — applied to a wrapper section per named person */
.person-block { position: relative; padding-left: var(--s-5); margin-left: -1px; }
.person-block::before {
  content: ''; position: absolute; left: 0; top: 0.4em; bottom: 0.4em;
  width: 2px;
  background: var(--person-1);
}
.person-1 { --p-color: var(--person-1); }
.person-2 { --p-color: var(--person-2); }
.person-3 { --p-color: var(--person-3); }
.person-4 { --p-color: var(--person-4); }
.person-block.person-1::before { background: var(--person-1); }
.person-block.person-2::before { background: var(--person-2); }
.person-block.person-3::before { background: var(--person-3); }
.person-block.person-4::before { background: var(--person-4); }

/* Streaming caret/indicator */
.streaming-indicator {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin-top: var(--s-3);
  font-size: var(--t-sm); color: var(--ink-muted);
  font-family: var(--font-ui);
}
.streaming-indicator .caret {
  display: inline-block; width: 8px; height: 14px; background: var(--ink);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── 11. Follow-up chips ────────────────────────────────────────────── */
.followups {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
}
.followups-label {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-bottom: var(--s-3);
}
.chip-grid {
  display: grid; gap: var(--s-2);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .chip-grid { grid-template-columns: 1fr 1fr; }
}
.chip {
  display: flex; align-items: flex-start; gap: var(--s-3);
  width: 100%; text-align: left;
  padding: var(--s-3) var(--s-4);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  font-size: var(--t-sm); line-height: 1.4;
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  font-family: var(--font-ui);
  min-height: 44px;
}
.chip:hover { border-color: var(--ink); background: var(--paper-elev); }
.chip .num {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 16px;
  line-height: 1.4;
  width: 14px;
}

/* ── 12. Composer ───────────────────────────────────────────────────── */
.composer-wrap {
  position: sticky; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, var(--paper) 80%, rgba(251, 247, 238, 0));
  padding: var(--s-3) 0 var(--s-5);
  z-index: 20;
}
.composer {
  display: flex; align-items: flex-end; gap: var(--s-2);
  background: var(--paper-elev);
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.composer:focus-within {
  border-color: var(--ink);
  box-shadow: var(--shadow-2);
}
.composer textarea {
  flex: 1; min-height: 24px; max-height: 200px;
  border: 0; outline: 0; resize: none;
  background: transparent;
  font-family: var(--font-ui);
  font-size: var(--t-md);
  line-height: 1.5;
  padding: 10px 0;
}
.composer textarea::placeholder { color: var(--ink-faint); }
.composer-send {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.composer-send:hover { background: var(--indigo); }
.composer-send:disabled { background: var(--rule-strong); cursor: not-allowed; }
.composer-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: var(--s-2);
  font-size: var(--t-xs); color: var(--ink-soft);
  padding: 0 var(--s-2);
}
.composer-meta .kbd {
  font-family: var(--font-mono); font-size: 11px;
  padding: 2px 5px;
  background: var(--paper-sunk); color: var(--ink-muted);
  border-radius: var(--r-sm);
  border: 1px solid var(--rule);
}

/* ── My Chart Basics — plain-English summary cards on the empty state ── */
.chart-basics {
  margin: var(--s-6) 0 var(--s-5);
  text-align: left;
}
.chart-basics-title {
  font-family: var(--serif, inherit);
  font-size: var(--t-md);
  color: var(--ink);
  margin: 0 0 var(--s-4);
}
.chart-basics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-3);
}
.basics-card {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--s-4);
}
.basics-card-title {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin-bottom: var(--s-2);
}
.basics-card-value {
  font-size: var(--t-md);
  color: var(--ink);
  margin-bottom: var(--s-2);
}
.basics-card-plain {
  font-size: var(--t-sm);
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Inline glossary term — dotted underline; tap/click opens a definition popover. */
.gloss {
  border-bottom: 1px dotted var(--ink-soft);
  cursor: pointer;
}
.gloss:focus { outline: 2px solid var(--indigo); outline-offset: 2px; }
.basics-learn {
  font-size: var(--t-xs);
  color: var(--indigo);
  border-bottom-style: dotted;
  white-space: nowrap;
}

/* Click/tap definition popover — fixed to the viewport, re-parented into the
   open <dialog> when the term lives inside one so it sits in the top layer. */
.gloss-popover {
  position: fixed;
  z-index: 9999;
  max-width: 280px;
  padding: var(--s-3) var(--s-4);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  line-height: 1.45;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.gloss-popover.hidden { display: none; }

/* Standalone per-profile detail page (/profile?key=…) */
.profile-page { max-width: 720px; padding-top: var(--s-6); padding-bottom: var(--s-9); }
.profile-back { display: inline-block; margin-bottom: var(--s-4); font-size: var(--t-sm); text-decoration: none; }
.profile-back:hover { color: var(--ink); }
.profile-page-head { margin-bottom: var(--s-5); }
.profile-page-head h1 { margin: 0 0 var(--s-2); }
.profile-detail-sub { font-size: var(--t-sm); margin: 0 0 var(--s-2); }
.profile-detail-summary {
  font-size: var(--t-md);
  color: var(--ink);
  line-height: 1.5;
  margin: 0 0 var(--s-5);
}
.profile-page .chart-basics-grid { margin-top: var(--s-2); }

/* Inner / outer "your planets" sections in the profile detail page */
.planet-section { margin-top: var(--s-6); }
.planet-section-title {
  font-family: var(--serif, inherit);
  font-size: var(--t-md);
  color: var(--ink);
  margin: 0 0 var(--s-1);
}
.planet-section-blurb { font-size: var(--t-xs); margin: 0 0 var(--s-3); }
.planet-grid { display: flex; flex-direction: column; gap: var(--s-3); }
.planet-card {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--s-4);
}
.planet-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
}
.planet-card-name {
  font-size: var(--t-md);
  color: var(--ink);
}
.planet-card-pos {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-soft);
  text-align: right;
}
.planet-card-plain {
  font-size: var(--t-sm);
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Named-yoga cards — same shell as planet cards, with a tone accent rail */
.yoga-card {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--s-4);
}
.yoga-card.tone-strength { border-left-color: var(--gold); }
.yoga-card.tone-caution { border-left-color: var(--danger); }

/* North Indian (diamond) birth-chart visualization */
.kundali { margin-top: var(--s-6); }
.kundali-tabs {
  display: flex;
  gap: var(--s-2);
  margin: 0 0 var(--s-3);
  flex-wrap: wrap;
}
.kundali-tab {
  font-family: var(--serif, inherit);
  font-size: var(--t-xs);
  color: var(--ink-soft);
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  padding: var(--s-1) var(--s-3);
  cursor: pointer;
}
.kundali-tab.active {
  color: var(--ink);
  border-color: var(--gold);
  background: var(--gold-tint);
}
.kundali-panels {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--s-4);
}
.kundali-svg {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  height: auto;
}
.kundali-frame { fill: none; stroke: var(--rule-strong); stroke-width: 1.5; }
.kundali-line { fill: none; stroke: var(--rule-strong); stroke-width: 1; }
.kundali-signnum {
  font-size: 11px;
  fill: var(--ink-faint);
  font-family: var(--serif, inherit);
}
.kundali-planet {
  font-size: 12px;
  fill: var(--ink);
  font-weight: 500;
}
.kundali-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  margin-top: var(--s-3);
  font-size: var(--t-xs);
}
.kundali-legend b { color: var(--ink); font-weight: 600; }

/* Vimshottari "life chapters" timeline in the profile detail modal */
.dasha-timeline { margin-top: var(--s-6); }
.chapter-list {
  position: relative;
  margin-top: var(--s-3);
  padding-left: var(--s-5);
}
.chapter-list::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--rule);
}
.chapter { position: relative; padding: 0 0 var(--s-4); }
.chapter:last-child { padding-bottom: 0; }
.chapter-dot {
  position: absolute;
  left: calc(-1 * var(--s-5) + 1px);
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--rule);
}
.chapter-past { opacity: .6; }
.chapter-current .chapter-dot {
  background: var(--indigo);
  border-color: var(--indigo);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--indigo) 22%, transparent);
}
.chapter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
}
.chapter-planet { font-size: var(--t-sm); color: var(--ink); }
.chapter-current .chapter-planet { font-weight: 600; }
.chapter-span {
  font-size: var(--t-xs);
  color: var(--ink-soft);
  white-space: nowrap;
}
.chapter-theme {
  font-size: var(--t-sm);
  color: var(--ink-soft);
  line-height: 1.45;
  margin-top: 2px;
}

/* ── 13. Reflection wait state ──────────────────────────────────────── */
.reflection {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: var(--s-9) var(--s-5);
  min-height: 360px;
}
.reflection-yantra {
  width: 96px; height: 96px;
  color: var(--indigo);
  animation: yantra-rotate 24s linear infinite;
  margin-bottom: var(--s-6);
  opacity: 0.85;
}
.reflection-yantra svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 0.75; }
@keyframes yantra-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.reflection-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin-bottom: var(--s-3);
}
.reflection-status {
  font-family: var(--font-reading);
  font-size: var(--t-md);
  color: var(--ink-muted);
  font-style: italic;
  min-height: 24px;
  animation: status-fade 12s ease-in-out infinite;
}
@keyframes status-fade {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}
.reflection-hint {
  margin-top: var(--s-7);
  font-size: var(--t-xs);
  color: var(--ink-soft);
  max-width: 32ch;
  line-height: 1.6;
}

/* ── 14. Chat shell — sidebar + main ────────────────────────────────── */
.chat-shell {
  display: flex;
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
  background: var(--paper);
  position: relative;  /* containing block for absolutely-positioned children (mobile toggle) */
}
.chat-sidebar {
  position: fixed;
  top: var(--nav-h); left: 0; bottom: 0;
  width: 88vw; max-width: 320px;
  background: var(--paper-sunk);
  border-right: 1px solid var(--rule);
  transform: translateX(-100%);
  transition: transform var(--dur-med) var(--ease);
  z-index: 30;
  display: flex; flex-direction: column;
}
.chat-sidebar.open { transform: translateX(0); box-shadow: 4px 0 28px rgba(26, 22, 20, 0.24); }
.sidebar-backdrop {
  position: fixed; inset: var(--nav-h) 0 0 0; background: rgba(26, 22, 20, 0.5);
  z-index: 25; opacity: 0; pointer-events: none;
  transition: opacity var(--dur-med) var(--ease);
}
.sidebar-backdrop.open { opacity: 1; pointer-events: auto; }

.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--rule);
}
.sidebar-head h4 {
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--ink-soft);
}
.sidebar-list {
  flex: 1; overflow-y: auto;
  list-style: none; margin: 0; padding: var(--s-2) 0;
}
.session-row {
  display: block; width: 100%; text-align: left;
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--rule-soft);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.session-row:hover { background: var(--paper-elev); }
.session-row.active { background: var(--paper-elev); border-left: 2px solid var(--indigo); padding-left: calc(var(--s-5) - 2px); }
.session-row .who {
  font-size: var(--t-sm); font-weight: 500; color: var(--ink);
  margin-bottom: 2px;
}
.session-row .title {
  font-size: var(--t-sm); color: var(--ink-muted);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
}
.session-row .date {
  font-size: var(--t-xs); color: var(--ink-faint);
  margin-top: var(--s-1);
}

.sidebar-account {
  border-top: 1px solid var(--rule);
  padding: var(--s-4) var(--s-5) calc(var(--s-4) + env(safe-area-inset-bottom, 0px));
}
.sidebar-account-link {
  font-size: var(--t-sm);
  color: var(--ink-muted);
  text-decoration: none;
}
.sidebar-account-link:hover { color: var(--ink); text-decoration: underline; }

.chat-main {
  flex: 1; min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  height: 100%;
  position: relative;
}

/* "Jump to latest" pill — floats above the composer only when scrolled up. */
.jump-latest {
  position: absolute;
  bottom: 88px; left: 50%; transform: translateX(-50%);
  z-index: 25;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  font-family: inherit; font-size: var(--t-sm); color: var(--ink-muted);
  background: var(--paper); cursor: pointer;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  box-shadow: 0 2px 10px rgba(45, 53, 97, 0.12);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.jump-latest:hover { color: var(--ink); border-color: var(--gold); }
.jump-latest.hidden { display: none; }
.chat-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: var(--nav-h); z-index: 10;
}
.chat-topbar-left { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.chat-topbar h2 {
  font-size: var(--t-md);
  font-family: var(--font-ui);
  font-weight: 500;
  margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  color: var(--ink-muted);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.icon-btn:hover { background: var(--paper-sunk); color: var(--ink); }

.chat-feed {
  flex: 1;
  padding: var(--s-6) var(--s-5) var(--s-7);
  overflow-y: auto;
}
.chat-feed-inner {
  max-width: 720px; margin: 0 auto;
}

/* User question — small, right-aligned tag (NOT a bubble) — for hybrid future */
.user-turn {
  margin: var(--s-7) 0 var(--s-5) auto;
  max-width: 540px;
  font-family: var(--font-ui);
  font-size: var(--t-md);
  padding: var(--s-3) var(--s-4);
  background: var(--paper-sunk);
  border-radius: var(--r-lg);
  color: var(--ink);
  text-align: right;
}
.user-turn .label {
  display: block;
  font-size: var(--t-xs);
  color: var(--ink-soft);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

@media (min-width: 1024px) {
  .chat-sidebar {
    position: static;
    transform: none !important;
    width: var(--sidebar-w);
    flex-shrink: 0;
    height: 100%;
  }
  .sidebar-backdrop { display: none; }
  .chat-topbar .sidebar-toggle { display: none; }
}

/* ── 15. Usage ring ─────────────────────────────────────────────────── */
.usage {
  display: flex; align-items: center; gap: var(--s-5);
}
.usage-ring {
  position: relative;
  width: 96px; height: 96px;
  flex-shrink: 0;
}
.usage-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.usage-ring .track { stroke: var(--rule); fill: none; stroke-width: 6; }
.usage-ring .progress { stroke: var(--indigo); fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset var(--dur-slow) var(--ease); }
.usage-ring .center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-display);
}
.usage-ring .center .num { font-size: 28px; line-height: 1; }
.usage-ring .center .denom { font-size: var(--t-xs); color: var(--ink-muted); font-family: var(--font-ui); margin-top: 2px; }
.usage-meta { font-size: var(--t-sm); color: var(--ink-muted); }
.usage-meta strong { color: var(--ink); font-weight: 500; }

/* ── 16. Tier cards ─────────────────────────────────────────────────── */
.tier-grid {
  display: grid; gap: var(--s-5);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .tier-grid { grid-template-columns: 1fr 1fr 1fr; align-items: stretch; }
}
.tier {
  display: flex; flex-direction: column;
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  position: relative;
}
.tier-recommended {
  border-color: var(--gold-soft);
  box-shadow: 0 0 0 1px var(--gold-soft);
}
.tier-recommended-flag {
  position: absolute; top: -10px; left: var(--s-6);
  background: var(--gold); color: white;
  font-size: var(--t-xs); font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  letter-spacing: 0.05em;
}
.tier-name {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 500;
  margin-bottom: var(--s-2);
}
.tier-price {
  display: flex; align-items: baseline; gap: var(--s-2);
  margin-bottom: var(--s-1);
}
.tier-price .amount {
  font-family: var(--font-display); font-size: 44px; font-weight: 500;
  line-height: 1;
}
.tier-price .per { color: var(--ink-muted); font-size: var(--t-sm); }
.tier-price-annual {
  font-size: var(--t-sm); color: var(--ink-muted);
}
.tier-price-annual .save {
  color: var(--success); font-weight: 500; margin-left: 6px;
}
.tier-description {
  color: var(--ink-muted); font-size: var(--t-sm); line-height: 1.6;
  margin-top: var(--s-3); margin-bottom: var(--s-5);
}
.tier-features {
  list-style: none; margin: 0 0 var(--s-6) 0; padding: 0;
  flex: 1;
}
.tier-features li {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-2) 0;
  font-size: var(--t-sm); line-height: 1.5;
  border-top: 1px solid var(--rule-soft);
}
.tier-features li:first-child { border-top: 0; padding-top: 0; }
.tier-features .check { color: var(--success); flex-shrink: 0; line-height: 1.5; }
.tier-features .x { color: var(--ink-faint); flex-shrink: 0; line-height: 1.5; }
.tier-features .x ~ span { color: var(--ink-faint); }
.tier .btn { width: 100%; }

/* ── 17. Profile card ───────────────────────────────────────────────── */
.profile-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
}
.profile-card + .profile-card { margin-top: var(--s-3); }
.profile-avatar {
  width: 40px; height: 40px; border-radius: var(--r-pill);
  background: var(--paper-sunk);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 18px;
  color: var(--ink-muted);
  flex-shrink: 0;
}
.profile-meta { flex: 1; min-width: 0; }
.profile-meta .name { font-weight: 500; }
.profile-meta .lagna { font-size: var(--t-sm); color: var(--ink-muted); }

/* ── 18. Birth-data form ────────────────────────────────────────────── */
.form-field {
  display: flex; flex-direction: column; gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.form-field label {
  font-size: var(--t-sm); font-weight: 500; color: var(--ink);
}
.form-field .help {
  font-size: var(--t-xs); color: var(--ink-muted);
}
.input, .select, .textarea {
  width: 100%;
  height: 44px; padding: 0 var(--s-3);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  background: var(--paper-elev);
  font-size: var(--t-md);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.textarea { height: auto; padding: var(--s-3); resize: vertical; min-height: 96px; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  outline: 0;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--indigo-tint);
}
.field-row { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
@media (min-width: 540px) { .field-row { grid-template-columns: 1fr 1fr; } }
.toggle-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3);
  background: var(--paper-sunk);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  margin-top: var(--s-2);
}
.toggle-row input { margin: 0; }

/* ── 19. Modal ──────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(26, 22, 20, 0.5);
  display: none; align-items: center; justify-content: center;
  padding: var(--s-5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--paper); border-radius: var(--r-lg);
  max-width: 460px; width: 100%;
  padding: var(--s-7);
  box-shadow: var(--shadow-3);
  position: relative;
}
.modal-close {
  position: absolute; top: var(--s-3); right: var(--s-3);
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-muted); border-radius: var(--r-md);
}
.modal-close:hover { background: var(--paper-sunk); color: var(--ink); }
.modal h3 { font-size: 28px; margin-bottom: var(--s-3); }
.modal .modal-body { color: var(--ink-muted); font-size: var(--t-md); line-height: 1.6; margin-bottom: var(--s-6); }
.modal-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }

/* ── 20. Toasts ─────────────────────────────────────────────────────── */
.toast-stack {
  position: fixed; bottom: var(--s-5); right: var(--s-5); z-index: 200;
  display: flex; flex-direction: column; gap: var(--s-3);
}
.toast {
  display: flex; align-items: flex-start; gap: var(--s-3);
  background: var(--ink); color: var(--paper);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  min-width: 280px; max-width: 360px;
  font-size: var(--t-sm); line-height: 1.5;
  box-shadow: var(--shadow-2);
}
.toast-success { background: var(--success); }
.toast-error   { background: var(--danger); }
.toast { transition: opacity .35s ease, transform .35s ease; }
.toast-out { opacity: 0; transform: translateY(8px); }

/* ── 21. Empty states ───────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: var(--s-8) var(--s-5);
  color: var(--ink-muted);
  max-width: 440px; margin: 0 auto;
}
.empty .empty-glyph {
  width: 48px; height: 48px;
  margin: 0 auto var(--s-4);
  color: var(--ink-faint);
}
.empty h3 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--ink);
  margin-bottom: var(--s-2);
}
.empty p { font-size: var(--t-sm); line-height: 1.6; margin-bottom: var(--s-5); }

/* ── 22. Footer ─────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--rule);
  padding: var(--s-7) 0 var(--s-6);
  margin-top: var(--s-9);
  background: var(--paper);
}
.footer-inner {
  display: flex; flex-direction: column; gap: var(--s-5);
  max-width: 1200px; margin: 0 auto; padding: 0 var(--s-5);
}
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-5); }
.footer-links a { color: var(--ink-muted); font-size: var(--t-sm); }
.footer-meta { font-size: var(--t-xs); color: var(--ink-soft); }
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row; align-items: center; justify-content: space-between;
    padding: 0 var(--s-6);
  }
}

/* ── 23. Landing-page-specific ──────────────────────────────────────── */
.hero {
  padding: var(--s-9) 0 var(--s-8);
  text-align: center;
}
.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--s-5);
}
.hero .sanskrit {
  font-family: var(--font-devanagari);
  font-size: 18px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  margin-bottom: var(--s-5);
  font-weight: 400;
}
.hero .sanskrit-translation {
  font-size: var(--t-xs);
  color: var(--ink-faint);
  font-style: italic;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  margin-bottom: var(--s-7);
}
.hero h1 {
  max-width: 18ch; margin: 0 auto var(--s-5);
  font-weight: 400;
}
.hero h1 em { font-style: italic; color: var(--indigo); font-weight: 500; }
.hero-lede {
  font-family: var(--font-reading);
  font-size: 19px; line-height: 1.6;
  color: var(--ink-muted);
  max-width: 38ch; margin: 0 auto var(--s-7);
}
.hero-ctas {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  justify-content: center;
}
@media (min-width: 768px) {
  .hero { padding: var(--s-10) 0 var(--s-9); }
}

.section { padding: var(--s-8) 0; }
.section-head { text-align: center; margin-bottom: var(--s-7); }
.section-eyebrow {
  font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ink-soft); font-weight: 500;
  margin-bottom: var(--s-3);
}
.section-head h2 { max-width: 22ch; margin: 0 auto; font-weight: 400; }
.section-head p {
  max-width: 50ch; margin: var(--s-4) auto 0;
  color: var(--ink-muted); font-size: var(--t-md); line-height: 1.6;
}

.feature-grid {
  display: grid; gap: var(--s-5);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature {
  padding: var(--s-5);
  border-top: 1px solid var(--rule);
}
.feature .feature-num {
  font-family: var(--font-display); font-style: italic;
  color: var(--gold); font-size: 20px; margin-bottom: var(--s-3);
}
.feature h3 {
  font-size: 22px; margin-bottom: var(--s-3); font-weight: 500;
}
.feature p {
  color: var(--ink-muted); font-size: var(--t-sm); line-height: 1.65;
}

/* Negative-space "what this isn't" block */
.contrast-strip {
  background: var(--paper-sunk);
  padding: var(--s-8) 0;
  margin: var(--s-8) 0 0;
}
.contrast-grid {
  display: grid; gap: var(--s-5);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .contrast-grid { grid-template-columns: 1fr 1fr; } }
.contrast-col { padding: var(--s-4); }
.contrast-col h4 {
  font-family: var(--font-ui); font-size: var(--t-sm);
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-soft); font-weight: 500;
  margin-bottom: var(--s-4);
}
.contrast-list { list-style: none; padding: 0; margin: 0; }
.contrast-list li {
  padding: var(--s-3) 0;
  border-top: 1px solid var(--rule);
  font-size: var(--t-md);
  font-family: var(--font-reading);
  display: flex; gap: var(--s-3);
}
.contrast-list li::before {
  content: '—'; color: var(--ink-faint); flex-shrink: 0;
}
.contrast-list li.is { color: var(--ink); }
.contrast-list li.is-not { color: var(--ink-muted); }

/* Inline reading sample on landing */
.sample-frame {
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--s-7) var(--s-6);
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}
.sample-frame::before {
  content: '';
  position: absolute; top: -1px; left: var(--s-6);
  width: 60px; height: 2px;
  background: var(--gold);
}

/* ── 24. About / safety page-specific ───────────────────────────────── */
.prose {
  font-family: var(--font-reading);
  font-size: 17px; line-height: 1.75;
  color: var(--ink);
  max-width: 64ch; margin: 0 auto;
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: var(--s-7) 0 var(--s-4);
  font-weight: 500;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: var(--s-6) 0 var(--s-3);
  font-weight: 500;
}
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.1em; }
.prose blockquote {
  padding-left: var(--s-5);
  border-left: 2px solid var(--gold-soft);
  margin: var(--s-5) 0;
  font-style: italic;
  color: var(--ink-muted);
}

/* ── 25. Misc small helpers ─────────────────────────────────────────── */
.divider { height: 1px; background: var(--rule); margin: var(--s-6) 0; }
.divider-soft { height: 1px; background: var(--rule-soft); margin: var(--s-5) 0; }
.center-text { text-align: center; }
.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;
}

/* Annual/monthly pricing toggle */
.period-toggle {
  display: inline-flex;
  padding: 4px;
  background: var(--paper-sunk);
  border-radius: var(--r-pill);
  margin-bottom: var(--s-7);
}
.period-toggle button {
  padding: 8px 18px;
  border-radius: var(--r-pill);
  font-size: var(--t-sm); font-weight: 500;
  color: var(--ink-muted);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.period-toggle button.active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }

/* Reading column on chat page — slightly narrower than text column for prose comfort */
@media (min-width: 1024px) {
  .reading { max-width: 62ch; }
}

/* Mobile-only adjustments */
@media (max-width: 540px) {
  .hero h1 { font-size: 40px; line-height: 1.1; }
  .hero-lede { font-size: var(--t-md); }
  .reading-meta { flex-direction: column; align-items: flex-start; gap: var(--s-1); }
}

/* ─────────────────────────────────────────────────────────────────────
   Rebuild styles (2026-05-26) — utility classes + new components
   added when chat.html / account.html / pricing.html / shared.html
   were rewritten to match the chat.js / account.js / pricing.js /
   shared.js controllers.
   ───────────────────────────────────────────────────────────────── */

/* Utilities */
.hidden { display: none !important; }
.err { color: #b94a4a; font-size: var(--t-sm); }
.small { font-size: var(--t-xs); }
.kbd { font-family: var(--font-mono, ui-monospace, monospace); background: var(--paper-sunk); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 6px; font-size: 12px; color: var(--ink-muted); }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 var(--s-5); }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 var(--s-5); }

/* Signin gate (dev mode, both /chat and /account) */
.centered-pane { min-height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; padding: var(--s-6); }
.signin-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: var(--s-7); max-width: 420px; width: 100%; }
.signin-card h1 { font-family: 'Cormorant Garamond', serif; font-size: 36px; font-weight: 400; margin: 0 0 var(--s-2); }

/* Stacked form pattern (signin, profile modal, signup modal) */
.stacked-form { display: flex; flex-direction: column; gap: var(--s-3); }
.stacked-form label { font-size: var(--t-sm); color: var(--ink-muted); margin-top: var(--s-2); }
.stacked-form input, .stacked-form select, .stacked-form textarea {
  width: 100%; padding: var(--s-3); border: 1px solid var(--rule); border-radius: 8px;
  font: inherit; background: var(--paper); color: var(--ink);
}
.stacked-form input:focus, .stacked-form select:focus { outline: 2px solid var(--ink-soft); outline-offset: -1px; }
.stacked-form > button[type="submit"] { margin-top: var(--s-4); }

/* Modal (dialog element) */
.modal { border: 1px solid var(--rule); border-radius: 12px; padding: var(--s-7); max-width: 480px; width: 90%; background: var(--paper); color: var(--ink); }
.modal::backdrop { background: rgba(0, 0, 0, 0.35); }
.modal h2 { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 400; margin: 0 0 var(--s-2); }
.modal-actions { display: flex; gap: var(--s-3); justify-content: flex-end; margin-top: var(--s-5); }

/* Chat empty / loading states */
.chat-empty { padding: var(--s-8) var(--s-6); text-align: center; max-width: 540px; margin: 0 auto; }
.chat-empty h2 { font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 400; margin: 0 0 var(--s-3); }

/* Conversation history turns (chat.js renders these) */
.turn { padding: var(--s-5) var(--s-6); }
.turn-label { font-size: var(--t-xs); color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: var(--s-2); }

/* User question — opens a new exchange (divider above) and sits in a
   right-aligned bubble so it's instantly distinct from the reading. */
.turn-user { border-top: 1px solid var(--rule); display: flex; flex-direction: column; align-items: flex-end; }
.turn-user .turn-label { color: var(--gold); }
.turn-user .turn-body {
  font-family: 'Spectral', serif; font-size: var(--t-md); color: var(--ink);
  background: var(--gold-tint);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-lg);
  border-top-right-radius: 2px;
  padding: var(--s-3) var(--s-4);
  max-width: 85%;
}

/* Astrologer reading — full-width prose, left-anchored, with a gold mark
   on the label so it clearly reads as our response, not the user. */
.turn-astro .turn-label { color: var(--ink-muted); }
.turn-astro .turn-label::before { content: '\2726'; color: var(--gold); margin-right: 6px; }
.turn-astro .turn-body { font-family: 'Spectral', serif; font-size: var(--t-md); color: var(--ink); line-height: 1.65; }
.turn-astro .turn-body h2 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 22px; margin: var(--s-5) 0 var(--s-2); }
.turn-astro .turn-body p { margin: 0 0 var(--s-3); }
.turn-astro .turn-body ul { margin: var(--s-3) 0; padding-left: var(--s-5); }
.turn-astro .turn-body li { margin-bottom: var(--s-2); }

.turn.streaming { background: var(--paper-tint, var(--paper)); }
.streaming-dots { color: var(--ink-soft); font-style: italic; }
.loading-dots::after { content: '…'; animation: dots 1.4s steps(4, end) infinite; }
@keyframes dots { 0%, 20% { content: '.'; } 40% { content: '..'; } 60%, 100% { content: '…'; } }
.caret { display: inline-block; width: 0.5em; color: var(--ink-soft); animation: blink 1s steps(2, end) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Follow-up chips — rendered INSIDE the assistant turn body, not in a
   separate band. Feels like a polite suggestion at the end of the
   reading, not a static form competing with the composer. */
.chat-chips { display: none; }  /* legacy slot, no longer used */

/* On-the-spot upsell banner — appears above the composer when readings hit 0 */
.upsell-banner {
  margin: 0 var(--s-4) var(--s-3);
  padding: var(--s-5);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-lg);
  background: var(--paper-elev);
  box-shadow: 0 1px 3px rgba(26, 22, 20, 0.05);
}
.upsell-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  width: 100%; padding: 0; margin: 0;
  background: none; border: none; cursor: pointer; text-align: left;
  color: var(--ink); font: inherit;
}
.upsell-head { font-size: var(--t-md); font-weight: 600; color: var(--ink); }
.upsell-chevron { flex: none; color: var(--ink-soft); transition: transform .18s ease; }
.upsell-banner.is-collapsed .upsell-chevron { transform: rotate(-90deg); }
.upsell-banner.is-collapsed { padding-top: var(--s-4); padding-bottom: var(--s-4); }
.upsell-banner.is-collapsed .upsell-body { display: none; }
.upsell-body { margin-top: var(--s-3); }
.upsell-subhead {
  font-size: var(--t-sm); color: var(--ink-soft);
  margin: var(--s-2) 0 var(--s-4); line-height: 1.45;
}
/* $1 "one more full reading" — primary CTA on the trial paywall. */
.upsell-overage {
  display: flex; flex-direction: column; gap: 2px; width: 100%;
  text-align: left; cursor: pointer;
  padding: var(--s-3) var(--s-4);
  border: 1.5px solid var(--gold); border-radius: var(--r-md);
  background: var(--gold); color: #fff;
  transition: filter .12s ease, box-shadow .12s ease;
}
.upsell-overage:hover { filter: brightness(1.06); box-shadow: 0 2px 10px rgba(184,137,59,.35); }
.upsell-overage:disabled { opacity: .7; cursor: default; }
.upsell-overage-main { font-size: 16px; font-weight: 600; }
.upsell-overage-main strong { font-weight: 800; }
.upsell-overage-sub { font-size: 12.5px; opacity: .92; line-height: 1.35; }
/* Timing Unlock (₹69 / $1.99) — the conversion hero on the trial paywall. */
.upsell-unlock {
  display: flex; flex-direction: column; gap: 3px; width: 100%;
  text-align: left; cursor: pointer;
  padding: var(--s-3) var(--s-4);
  border: 1.5px solid var(--gold); border-radius: var(--r-md);
  background: var(--gold); color: #fff;
  transition: filter .12s ease, box-shadow .12s ease;
}
.upsell-unlock:hover { filter: brightness(1.06); box-shadow: 0 2px 10px rgba(184,137,59,.35); }
.upsell-unlock:disabled { opacity: .7; cursor: default; }
.upsell-unlock-main { font-size: 16px; font-weight: 600; }
.upsell-unlock-main strong { font-weight: 800; }
.upsell-unlock-sub { font-size: 12.5px; opacity: .92; line-height: 1.4; }
/* Dakshina (pay-what-you-feel) preset chips — the trial conversion path. */
.dakshina-chips { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.dakshina-chip {
  flex: 1 1 0; min-width: 84px;
  padding: var(--s-3) var(--s-4);
  border: 1.5px solid var(--gold); border-radius: var(--r-md);
  background: var(--gold); color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: filter .12s ease, box-shadow .12s ease;
}
.dakshina-chip:hover { filter: brightness(1.06); box-shadow: 0 2px 10px rgba(184,137,59,.35); }
.dakshina-chip:disabled { opacity: .7; cursor: default; }
.upsell-or {
  margin: var(--s-3) 0 var(--s-2); text-align: center;
  font-size: 12.5px; color: var(--ink-faint, #8a7f72);
}
.upsell-plans { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.upsell-plans-single { grid-template-columns: 1fr; max-width: 380px; }
.upsell-plan {
  position: relative;
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-4);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  background: var(--paper);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.upsell-plan:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 14px rgba(184, 137, 59, 0.16);
  transform: translateY(-2px);
}
.upsell-plan.is-featured { border-color: var(--gold); background: var(--gold-tint); }
.upsell-badge {
  position: absolute; top: -10px; left: var(--s-4);
  background: var(--gold); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 2px 9px; border-radius: var(--r-pill);
}
.upsell-plan-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); }
.upsell-plan-name { font-size: var(--t-base); font-weight: 600; color: var(--ink); }
.upsell-plan-price { font-size: var(--t-lg); font-weight: 700; color: var(--ink); white-space: nowrap; }
.upsell-per { font-size: var(--t-xs); font-weight: 400; color: var(--ink-soft); }
.upsell-plan-feat { font-size: var(--t-xs); color: var(--ink-muted); line-height: 1.4; flex: 1; }
.upsell-plan-cta {
  margin-top: var(--s-1);
  display: block; text-align: center;
  padding: var(--s-3);
  border-radius: var(--r-md);
  background: var(--ink); color: var(--paper-elev);
  font-size: var(--t-sm); font-weight: 600;
}
.upsell-plan.is-featured .upsell-plan-cta { background: var(--gold); color: #fff; }
.upsell-plan:hover .upsell-plan-cta { filter: brightness(1.08); }
.upsell-note { font-size: var(--t-sm); margin: var(--s-3) 0 0; color: var(--ink-soft); }
.upsell-link { color: var(--gold); font-weight: 600; text-decoration: none; }
.upsell-link:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .upsell-plans { grid-template-columns: 1fr; }
}

.turn-followups {
  margin-top: var(--s-5);
  padding: var(--s-4) 0 0;
  border-top: 1px dashed var(--rule);
}
.turn-followups-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.turn-followups-intro {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.turn-followups-label {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: var(--t-md);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.25;
}
.turn-followups-hint {
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: var(--t-xs);
  color: var(--ink-soft);
  line-height: 1.35;
}
.turn-followups-dismiss {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--ink-soft);
  font-size: 18px; line-height: 1; cursor: pointer; border-radius: 50%;
  transition: background 0.12s, color 0.12s;
}
.turn-followups-dismiss:hover {
  background: var(--paper-sunk);
  color: var(--ink);
}
/* Numbered grid chips (matches landing mockup; 2-col on wider phones) */
.turn-followups-chips.chip-grid {
  margin-top: var(--s-1);
}
.turn-followups-chips .chip-follow {
  border-radius: var(--r-md);
  color: var(--ink);
  min-height: 48px;
}
.turn-followups-chips .chip-follow:hover {
  border-color: var(--indigo, #2D3561);
  background: var(--paper-elev);
  box-shadow: 0 1px 0 rgba(45, 53, 97, 0.06);
}
.turn-followups-chips .chip-text {
  flex: 1;
  min-width: 0;
}

/* In-reading recovery — link-styled button (not <a href="#">) for mobile Safari */
.recover-check-btn {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  color: var(--indigo);
  text-decoration: underline;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.recover-check-btn:hover {
  color: var(--indigo-hover);
}

/* Sidebar list items (sessions + profiles) */
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.session-item, .profile-item { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--rule); cursor: pointer; transition: background 0.12s; }
.session-item:hover, .profile-item:hover { background: var(--paper-sunk); }
.session-item.active { background: var(--paper-sunk); border-left: 2px solid var(--ink); }
.session-item-preview { font-size: var(--t-sm); color: var(--ink); margin-bottom: 2px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.session-item-meta { font-size: var(--t-xs); color: var(--ink-soft); }
.profile-item { display: flex; align-items: center; gap: var(--s-2); }
.profile-item-text { flex: 1; min-width: 0; }
.profile-name { font-weight: 500; font-size: var(--t-sm); }
.profile-meta { font-size: var(--t-xs); color: var(--ink-soft); }
.profile-chevron { color: var(--ink-faint); font-size: 20px; line-height: 1; flex-shrink: 0; transition: transform 0.12s, color 0.12s; }
.profile-item:hover .profile-chevron { color: var(--ink); transform: translateX(2px); }
.sidebar-section-hint { font-size: var(--t-xs); padding: 0 var(--s-4) var(--s-2); margin: 0; }
.session-empty, .profile-empty { padding: var(--s-3) var(--s-4); font-size: var(--t-sm); color: var(--ink-soft); }

/* Sidebar sections (chat profiles section) */
.sidebar-section { border-top: 1px solid var(--rule); margin-top: var(--s-3); padding-top: var(--s-3); }
.sidebar-section-head { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--s-4) var(--s-2); }
.sidebar-section-head h4 { margin: 0; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); }


/* Account dashboard */
.account-shell { padding-top: var(--s-7); padding-bottom: var(--s-9); display: flex; flex-direction: column; gap: var(--s-6); }
.account-head h1 { font-family: 'Cormorant Garamond', serif; font-size: 40px; font-weight: 400; margin: 0 0 var(--s-2); }
.account-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: var(--s-6); }
.account-card h2 { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 500; margin: 0 0 var(--s-4); }
.account-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-4); }
.account-card-head h2 { margin: 0; }
.account-card-actions { display: flex; gap: var(--s-3); margin-top: var(--s-4); }
.kv-list { display: flex; flex-direction: column; gap: var(--s-2); }
.kv { display: flex; justify-content: space-between; padding: var(--s-2) 0; border-bottom: 1px solid var(--rule); font-size: var(--t-sm); }
.kv:last-child { border-bottom: 0; }
.kv-k { color: var(--ink-soft); }
.kv-v { color: var(--ink); font-weight: 500; }
.subscription-manage { margin-top: var(--s-3); display: flex; flex-direction: column; gap: var(--s-2); }
.subscription-manage .btn { align-self: flex-start; }
.account-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.account-profile-row, .account-session-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--rule); border-radius: 8px; }

/* Pricing tier buttons (already mostly styled, just ensure button works) */
.tier button[data-checkout] { width: 100%; }

/* Shared reading page */
.shared-head { margin-bottom: var(--s-6); padding-bottom: var(--s-4); border-bottom: 1px solid var(--rule); }
.shared-cta { margin-top: var(--s-8); padding: var(--s-6); background: var(--paper-sunk); border-radius: 12px; text-align: center; }
.shared-cta h2 { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 400; margin: 0 0 var(--s-3); }
.shared-cta .btn { margin-top: var(--s-3); }

/* ─────────────────────────────────────────────────────────────────────
   Layout polish (2026-05-26, post-audit)
   ───────────────────────────────────────────────────────────────── */

/* Sidebar = a fixed header, ONE scrollable middle (sessions + profiles
   together), and a fixed footer. A single scroll region — not two
   nested ones, and NO position:sticky inside it. The previous design
   gave the session list and the profiles box their own internal scroll
   (profiles capped at 30vh); on iOS, nested touch-scroll inside a
   fixed-position container is unreliable AND sticky children inside a
   -webkit-overflow-scrolling:touch region jump the scroll back up. The
   .sidebar-scroll wrapper sidesteps both: header/footer stay put as
   non-scrolling flex siblings, everything else scrolls as one column. */
.chat-sidebar {
  overflow: hidden;
}
.chat-sidebar .sidebar-head {
  flex: none;
}
.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.sidebar-scroll #session-list,
.sidebar-scroll .sidebar-section,
.sidebar-scroll #profile-list {
  flex: none;
  overflow: visible;
  max-height: none;
}

/* Style the signed-in-user email in the top nav as a subtle pill */
.nav .signin[data-user-email] {
  display: inline-flex;
  align-items: center;
  padding: 6px var(--s-3);
  border-radius: 999px;
  background: var(--paper-sunk);
  font-size: var(--t-sm);
  color: var(--ink-muted);
  text-decoration: none;
  border: 1px solid var(--rule);
  transition: background 0.15s, color 0.15s;
}
.nav .signin[data-user-email]:hover {
  background: var(--paper-elev);
  color: var(--ink);
}

/* Account dashboard width constraint (don't stretch full-width on desktop) */
.account-shell { max-width: 880px; }

/* Tighter feed padding when shell is height-locked */
@media (min-width: 1024px) {
  .chat-feed { padding-bottom: var(--s-3); }
}

/* ─────────────────────────────────────────────────────────────────────
   Mobile sidebar toggle + viewport-locked composer (2026-05-26)
   Mobile Safari aggressively manages scroll containers and `100vh` —
   the inner sticky layout breaks. So on <1024px we force the toggle
   and the composer to position:fixed against the viewport. Desktop
   keeps its inline flow.
   ───────────────────────────────────────────────────────────────── */
.sidebar-toggle {
  position: fixed;
  top: calc(var(--nav-h) + 12px);
  left: 12px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 35;
  transition: opacity 0.2s, transform 0.2s, background 0.15s, border-color 0.15s;
}
/* When the sidebar is open, the hamburger overlaps the CONVERSATIONS
   header — fade it out. .sidebar-open is added to .chat-shell by JS
   so the toggle hides regardless of DOM order or :has() support. */
.chat-shell.sidebar-open .sidebar-toggle {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}
.sidebar-toggle:hover {
  background: var(--paper-sunk);
  border-color: var(--ink-soft);
}
@media (min-width: 1024px) {
  .sidebar-toggle { display: none; }
}

/* ── Chat app surface: slim brand header for logged-in users ─────────────
   No marketing nav links / email pill — just the Naksha mark and (on mobile)
   the hamburger that opens the sidebar (conversations + profiles + account).
   A slim --nav-h keeps the chat-shell / sidebar / backdrop math intact. */
body.app-chat { --nav-h: 52px; }
.chat-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  display: flex; align-items: center; gap: var(--s-2);
  padding: 0 var(--s-4) 0 var(--s-3);
  background: var(--paper);
}
.chat-header .sidebar-toggle {
  position: static; flex: none;
  width: 40px; height: 40px;
  background: transparent; border: none;
}
.chat-header .sidebar-toggle:hover { background: var(--paper-sunk); }
.chat-header .glyph { color: var(--gold); }
.chat-header .wordmark-text { font-size: 22px; }
/* Center the brand in the header regardless of the left-aligned hamburger. */
.chat-header .chat-brand {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
/* The hamburger lives in the header (above the drawer) now, so keep it
   visible + tappable as a toggle while the sidebar is open. */
.app-chat .chat-shell.sidebar-open .sidebar-toggle {
  opacity: 1; pointer-events: auto; transform: none;
}
/* The feed no longer needs the floating-hamburger top inset — the header
   reserves that space. */
.app-chat .chat-feed-inner { padding-top: 0; }
@media (min-width: 1024px) {
  /* Desktop: sidebar docked + hamburger hidden — header shows just the mark. */
  .chat-header { padding-left: var(--s-5); }
}
.sidebar-account-email {
  font-size: var(--t-xs); color: var(--ink-soft);
  margin-bottom: var(--s-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Lock the chat behind the open drawer so touch-scroll doesn't leak through
   to the background (iOS overlay scroll-through) — only the drawer scrolls. */
.chat-shell.sidebar-open .chat-feed { overflow: hidden; overscroll-behavior: none; }
/* Explicit close control in the drawer header (mobile only — the desktop
   sidebar is always docked). Backdrop tap + Esc also close. */
.sidebar-head-actions { display: flex; align-items: center; gap: var(--s-2); }
.sidebar-close {
  display: none;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  border-radius: var(--r-md);
  color: var(--ink-muted); background: transparent; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.sidebar-close:hover { background: var(--paper-elev); color: var(--ink); }
@media (max-width: 1023px) { .sidebar-close { display: inline-flex; } }

/* Mobile-only: anchor the composer to the viewport (sticky doesn't
   work because .chat-main isn't the scroll container — only .chat-feed
   is). Plus reserve scroll-space at the bottom of the feed so the last
   line of the reading isn't hidden behind the composer. */
@media (max-width: 1023px) {
  .composer-wrap {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    /* Slimmer than desktop. The keyboard hints below are hidden on
       mobile (no Enter/Shift+Enter convention on touch keyboards),
       so we only need tight padding around the composer card itself. */
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--paper);
    border-top: 1px solid var(--rule);
    z-index: 30;
  }
  .composer {
    /* Tighter padding inside the card too. */
    padding: 4px 4px 4px 12px;
  }
  .composer textarea {
    padding: 6px 0;
    font-size: 16px;  /* prevent iOS auto-zoom when input is focused */
  }
  /* Send-button sizing on mobile/tablet:
     481-1023px (tablet / small laptop) — keep the desktop label+icon
       sizing from Batch 1's .composer-send rule (96×44, label visible).
     ≤480px (phone) — phone-specific rule later in the file collapses
       the button to 40×40 icon-only.
     The old hard 36×36 here was clipping the "Send" label on tablet
     widths because .send-label is still display:flex above 480px. */
  /* Keyboard hints are meaningless on touch — hide them. */
  .composer-meta { justify-content: center; }
  .composer-meta .kb-hint { display: none; }
  /* Sidebar must end ABOVE the fixed composer so its bottom profiles and
     account link aren't hidden behind it. */
  .chat-sidebar {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }
  .chat-feed {
    /* Reserve room for the fixed composer at the bottom. */
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .jump-latest {
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
  /* The hamburger floats on top of the chat-feed scroll; offset the
     first turn so its content doesn't ride directly under it. */
  .chat-feed-inner {
    padding-top: 56px;
  }
}

/* When the slide-in sidebar is open on mobile, give the chat-main a
   little breathing room so the toggle button isn't obscured by the
   backdrop on tap-out (the backdrop sits at z-index 25, toggle at 15
   — toggle is hidden behind backdrop while sidebar is open, which is
   the correct behavior). */

/* ─────────────────────────────────────────────────────────────────────
   Web-push soft-prompt banner (2026-05-27)
   Appears 12s after submitting a question — asks if the user wants to
   be notified when the reading is ready. Inline UI, not the browser's
   permission dialog (that's only triggered after user clicks Yes).
   ───────────────────────────────────────────────────────────────── */
#push-soft-prompt {
  position: fixed;
  left: 50%;
  bottom: calc(var(--composer-h, 80px) + 12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  max-width: calc(100vw - 24px);
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(45, 53, 97, 0.10);
  z-index: 40;
  padding: 10px 14px;
  animation: pushSlideUp 0.25s var(--ease) both;
}
@keyframes pushSlideUp {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
#push-soft-prompt .push-prompt-content {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
#push-soft-prompt .push-prompt-text {
  font-size: 14px;
  color: var(--ink);
  flex: 1 1 auto;
  min-width: 200px;
}
#push-soft-prompt .btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}
@media (min-width: 1024px) {
  /* On desktop, anchor bottom-right instead of centered so it doesn't
     compete with the composer. */
  #push-soft-prompt {
    left: auto;
    right: 24px;
    transform: none;
    max-width: 360px;
  }
  @keyframes pushSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ─────────────────────────────────────────────────────────────────────
   iOS PWA install hint (2026-05-27)
   Shown on /signin and /chat for iOS Safari users who haven't yet
   Added to Home Screen. Magic-link auth + push both depend on the
   user being in PWA standalone mode on iOS — but Safari doesn't
   advertise this UX.
   ───────────────────────────────────────────────────────────────── */
.ios-install-hint {
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 36px 12px 14px;
  margin: 0 0 24px;
  position: relative;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}
.ios-install-hint strong { color: var(--ink); font-weight: 600; }
.ios-install-hint .iih-body {
  display: block;
}
.ios-install-hint .iih-dismiss {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.ios-install-hint .iih-dismiss:hover { color: var(--ink); }

/* Fixed banner variant — used on /chat where space is constrained */
.ios-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0) + 90px);
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(45, 53, 97, 0.10);
  padding: 12px 36px 12px 14px;
  z-index: 35;
  font-size: 13px;
  color: var(--ink);
  /* Y-only slide. Must NOT reuse pushSlideUp — that keyframe ends on
     translate(-50%, 0) for the center-anchored push prompt, and with
     fill-mode 'both' the -50% X persists, shoving this left/right-anchored
     banner half its width off the left edge. */
  animation: bannerSlideUp 0.3s var(--ease) both;
}
@keyframes bannerSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ios-install-banner .iih-dismiss {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
/* Android/Chrome banner reuses the fixed-banner shell + adds an Install
   button. Extra right padding so the button + dismiss × don't overlap. */
.android-install-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 44px;
}
.android-install-banner span { flex: 1 1 auto; }
.aib-install {
  flex: none;
  border: none;
  border-radius: 8px;
  background: var(--gold, #C8A24B);
  color: #1a1a1a;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 14px;
  cursor: pointer;
}
.aib-install:hover { filter: brightness(1.05); }

@media (min-width: 1024px) {
  /* Hide install hint on desktop — only mobile iOS needs it. The
     Android/Chrome banner stays visible (desktop Chromium can install too). */
  .ios-install-hint, .ios-install-banner:not(.android-install-banner) { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   LANDING WARMUP — 2026-05-28
   Implements the brief at landing_warmup_brief.md. Warm accent,
   relaxed typography on the hero, 3-message chat preview, subtle
   motion on the yantra glyph, mobile pass.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Hero warmup ──────────────────────────────────────────────────── */
.hero-warm {
  position: relative;
  overflow: hidden;
}
/* Sanskrit verse — moved off above-the-fold, kept as a low-opacity
   background watermark behind the hero so brand-loyal eyes still see
   it without it gatekeeping cold visitors. */
.hero-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Tiro Devanagari Sanskrit', serif;
  font-size: 12vw;
  color: var(--accent-warm);
  opacity: 0.05;
  letter-spacing: 0.05em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}
.hero-warm > .container-narrow {
  position: relative;
  z-index: 1;
}
/* Warmer eyebrow — uppercase but smaller + warm accent vs cold indigo.
   Inline-block so it can carry an accent underline that hugs the text. */
.eyebrow-warm {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-warm-hover);
  background: var(--accent-warm-tint);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: var(--s-5);
}
/* Hero H1 — drop the all-italic Cormorant pretension. Sans-first
   with one italic word inside for accent (the H1 already has <em>). */
.hero-h1 {
  font-family: 'Inter', 'Söhne', sans-serif;
  font-weight: 600;
  font-size: clamp(38px, 6.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--s-5);
}
.hero-h1 em {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  color: var(--accent-warm-hover);
  letter-spacing: 0;
}
/* Hero tagline — the poetic line, demoted from H1 to a visible subhead so the
   keyword-bearing H1 carries the SEO signal while the brand voice stays above
   the fold. */
.hero-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  color: var(--accent-warm-hover);
  margin: calc(-1 * var(--s-3)) 0 var(--s-5);
}
.hero-warm .hero-lede {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--t-lg);
  color: var(--ink-muted);
  line-height: 1.55;
  max-width: 38ch;
}
/* Primary CTA hover — swap to warm accent on hover, indigo at rest */
.btn-accent-hover:hover {
  background: var(--accent-warm-hover);
  border-color: var(--accent-warm-hover);
}

/* ── Yantra glyph: slow rotation in the nav wordmark ──────────────── */
@keyframes yantra-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes yantra-breathe {
  0%, 100% { opacity: 0.92; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  /* Rotate only the inscribed square — not the outer circle — so the
     wordmark stays visually anchored. Targets the <rect> inside .glyph svg. */
  .nav .glyph svg rect {
    transform-origin: 12px 12px;
    animation: yantra-spin 120s linear infinite;
  }
  /* Soft breathing on the outer circle stroke */
  .nav .glyph svg circle {
    animation: yantra-breathe 6s ease-in-out infinite;
  }
  /* Tint the yantra stroke with the warm accent */
  .nav .glyph svg { color: var(--accent-warm-hover); }
}

/* ── 3-message chat preview ───────────────────────────────────────── */
.preview-section {
  background: var(--paper-sunk);
}
.chat-preview {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  max-width: 560px;
  margin: var(--s-6) auto 0;
  font-family: 'Inter', sans-serif;
  font-size: var(--t-md);
  line-height: 1.5;
}
.chat-bubble {
  padding: 14px 18px;
  border-radius: 18px;
  max-width: 78%;
  box-shadow: 0 1px 3px rgba(45, 53, 97, 0.05);
  animation: bubble-rise 0.4s var(--ease) both;
}
.chat-bubble.bubble-you {
  align-self: flex-end;
  background: var(--indigo);
  color: var(--paper);
  border-bottom-right-radius: 6px;
}
.chat-bubble.bubble-naksha {
  align-self: flex-start;
  background: var(--paper-elev);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-bottom-left-radius: 6px;
  font-family: 'Cormorant Garamond', serif;
  font-size: calc(var(--t-md) + 1px);
  line-height: 1.55;
}
.chat-bubble.bubble-soft {
  font-style: italic;
  opacity: 0.92;
}
.chat-bubble.bubble-you  { animation-delay: 0.0s; }
.chat-bubble.bubble-naksha{ animation-delay: 0.25s; }
.chat-bubble.bubble-soft { animation-delay: 0.6s; }
@keyframes bubble-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Collapsed sample reading ─────────────────────────────────────── */
.reading-more {
  margin-top: var(--s-3);
}
.reading-more > summary {
  cursor: pointer;
  display: inline-block;
  padding: 8px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--accent-warm-hover);
  background: var(--accent-warm-tint);
  border-radius: 999px;
  list-style: none;
  user-select: none;
  transition: background 0.15s;
}
.reading-more > summary::-webkit-details-marker { display: none; }
.reading-more > summary:hover {
  background: var(--accent-warm-soft);
  color: var(--ink);
}
.reading-more[open] > summary {
  background: transparent;
  color: var(--ink-muted);
  margin-bottom: var(--s-4);
}
.reading-more[open] > summary::before {
  content: '— ';
  margin-right: 4px;
}

/* ── Mobile pass for the warm hero ────────────────────────────────── */
@media (max-width: 600px) {
  .hero-warm { padding: var(--s-7) 0 var(--s-6); }
  .hero-watermark { font-size: 24vw; opacity: 0.04; }
  .hero-h1 {
    font-size: 36px;
    line-height: 1.08;
  }
  .hero-warm .hero-lede {
    font-size: var(--t-md);
    max-width: none;
  }
  .eyebrow-warm {
    font-size: 11px;
    letter-spacing: 0.12em;
  }
  .chat-bubble {
    max-width: 88%;
    padding: 12px 14px;
    font-size: 15px;
  }
}

/* ── About page — "Yes, this is AI" disclosure section ────────────
   Lives high on /about, right after the hero header and before the
   founding story. Visually distinct from the surrounding prose so
   it reads as its own dispatch — confident, honest, slightly wry.
   2026-05-28 (landing_warmup_brief.md v2 addition). */
.ai-disclosure {
  margin: 0 auto var(--s-8);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(
      to bottom,
      var(--accent-warm-tint) 0%,
      transparent 100%
    );
}
.ai-disclosure-h2 {
  font-family: 'Inter', 'Söhne', sans-serif;
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 22ch;
  margin: 0 auto var(--s-5);
  text-align: center;
}
.ai-disclosure-h2 em {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--accent-warm-hover);
  font-weight: 500;
  letter-spacing: 0;
}
.ai-disclosure-body p {
  font-family: 'Inter', sans-serif;
  font-size: var(--t-md);
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0 0 var(--s-4);
}
.ai-disclosure-body p em {
  color: var(--ink);
  font-style: italic;
}
.ai-disclosure-list-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-warm-hover);
  margin: var(--s-5) 0 var(--s-3);
}
.ai-disclosure-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-5);
  display: grid;
  gap: var(--s-2);
}
.ai-disclosure-list li {
  font-family: 'Inter', sans-serif;
  font-size: var(--t-md);
  line-height: 1.5;
  color: var(--ink);
  padding-left: var(--s-4);
  position: relative;
}
.ai-disclosure-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--accent-warm);
  font-size: 12px;
  top: 5px;
}
.ai-disclosure-close {
  margin: var(--s-5) 0 0;
  padding-top: var(--s-4);
  border-top: 1px dashed var(--rule);
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--t-lg);
  line-height: 1.5;
  color: var(--ink);
  text-align: center;
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}
.ai-disclosure-close em { font-style: italic; }

@media (max-width: 600px) {
  .ai-disclosure { padding: var(--s-5) 0; }
  .ai-disclosure-h2 { font-size: 22px; }
  .ai-disclosure-close { font-size: var(--t-md); }
}

/* ─────────────────────────────────────────────────────────────────────
   Batch 1 (2026-05-28) — Boomer-audit + onboarding helpers
   ───────────────────────────────────────────────────────────────── */

/* "How it works" 3-step section — slots between hero and chat-preview. */
/* How-it-works section.
   Note: the spacing scale only goes up to --s-10 (128px). Earlier
   this rule used var(--s-12) which falls back to 0 — collapsing the
   section's vertical padding entirely and crashing the cards into
   the next section. Now using --s-10 with extra explicit padding
   so the cards have proper breathing room above and below. */
.how-section {
  padding-top: var(--s-10);
  padding-bottom: var(--s-10);
}
.how-steps {
  list-style: none;
  margin: var(--s-7) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
  align-items: stretch;
}
.how-step {
  position: relative;
  padding: var(--s-6) var(--s-5);
  background: var(--paper-elev);
  border-radius: 14px;
  border: 1px solid var(--rule);
  /* Make the cards align as a uniform row: stretch via grid + a
     flex column inside so the body copy bottom-aligns even when
     content lengths differ slightly. */
  display: flex;
  flex-direction: column;
}
.how-num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-warm-tint);
  color: var(--accent-warm-hover);
  /* Inter (UI font) renders digits as proper lining numerals;
     Cormorant rendered the '1' as a near-vertical stroke that looked
     like a Roman numeral I. Bumped circle size 38→44 for breathing room. */
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  margin-bottom: var(--s-3);
}
.how-step h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 var(--s-2);
  color: var(--ink);
}
.how-step p { margin: 0; line-height: 1.55; }
@media (max-width: 800px) {
  .how-steps { grid-template-columns: 1fr; gap: var(--s-5); }
}

/* Empty-state chip grid (chat page, also reused on /onboarding later) */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  margin: var(--s-4) 0;
}
@media (max-width: 720px) {
  .chip-grid { grid-template-columns: 1fr; }
}
.chip-example {
  appearance: none;
  text-align: left;
  padding: 14px 18px;
  font: inherit;
  font-size: var(--t-base);
  background: var(--paper-elev);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  min-height: 48px;        /* boomer audit: 48px touch target */
  line-height: 1.4;
}
.chip-example:hover {
  background: var(--accent-warm-tint);
  border-color: var(--accent-warm-soft);
}
.chip-example:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 2px;
}
/* Loading placeholder shown while personalized starter chips generate (first
   load only), so a fresh user never sees the generic chips swap to theirs. */
.chip-skeleton {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: linear-gradient(
    90deg,
    var(--paper-elev) 25%, var(--paper-sunk) 37%, var(--paper-elev) 63%
  );
  background-size: 400% 100%;
  animation: chip-shimmer 1.4s ease infinite;
}
@keyframes chip-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .chip-skeleton { animation: none; }
}
.chips-prompt {
  margin-top: var(--s-5);
  font-size: var(--t-base);
}
.chips-footnote {
  margin-top: var(--s-2);
  font-size: var(--t-sm);
}

/* Profile-modal: time-uncertainty toggle + radio group. */
.form-reassure {
  font-size: var(--t-sm);
  background: var(--accent-warm-tint);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: var(--s-4);
}
.form-reassure-soft {
  display: block;
  margin-top: var(--s-2);
  font-size: var(--t-sm);
}
.time-uncertainty {
  margin: var(--s-2) 0;
}
.checkbox-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  cursor: pointer;
  font-size: var(--t-base);
  min-height: 44px;
}
.checkbox-row input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--accent-warm);
  cursor: pointer;
}
.radio-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-size: var(--t-base);
  min-height: 44px;
}
.radio-row input[type="radio"] {
  width: 20px; height: 20px;
  accent-color: var(--accent-warm);
  cursor: pointer;
}
.time-approx {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: var(--s-3) var(--s-4);
  margin-top: var(--s-2);
  background: var(--paper-sunk);
}
.time-approx legend {
  font-size: var(--t-sm);
  padding: 0 6px;
}

/* Send button: show "Send" text alongside the icon (boomer audit).
   Overrides the original .composer-send 40×40 icon-only sizing so the
   button can fit both label + icon on desktop. On mobile (<=480px) the
   original 40×40 (or 36×36 from the existing mobile rule) wins because
   .send-label is display:none. */
.composer-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  width: auto;         /* override the 40px fixed width upstream */
  min-width: 96px;     /* keep some heft even without the label */
  height: 44px;
}
.send-label {
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
@media (max-width: 480px) {
  /* On phones, keep the icon-only look — touch targets are still
     adequate, and the label competes with the textarea for room. */
  .send-label { display: none; }
  .composer-send {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
  }
}

/* Plain-English keyboard hint (replaces ↵ / ⇧↵ glyphs). */
.kb-hint {
  font-size: var(--t-sm);
  color: var(--ink-muted);
}
.kb-hint strong {
  color: var(--ink);
  font-weight: 500;
}
@media (max-width: 480px) {
  /* Touch users don't care about keyboard hints — hide on phones. */
  .kb-hint { display: none; }
}

/* Helper text below form inputs (boomer audit clarity). */
.stacked-form small.muted {
  display: block;
  margin: -10px 0 var(--s-3);
  font-size: var(--t-sm);
  color: var(--ink-muted);
}

/* ─────────────────────────────────────────────────────────────────────
   Batch 2 (2026-05-28) — Onboarding page
   First-time users land here after sign-up. Birth-data form → instant
   deterministic chart snapshot → "Start the conversation →" → /chat.
   ───────────────────────────────────────────────────────────────── */

.onboarding-body {
  background: var(--paper);
  min-height: 100vh;
}

.nav-onboarding {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.onboarding-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--s-10) var(--s-5) var(--s-12);
}
@media (max-width: 720px) {
  .onboarding-shell { padding: var(--s-6) var(--s-4) var(--s-10); }
}

.onboarding-step { animation: fadeUp 0.35s var(--ease-out, ease-out); }
.onboarding-step.hidden { display: none; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.onboarding-head {
  text-align: center;
  margin-bottom: var(--s-8);
}
.onboarding-head .display {
  font-size: clamp(32px, 4vw + 12px, 44px);
  margin: var(--s-2) 0 var(--s-3);
}
.onboarding-head .lede {
  max-width: 480px;
  margin: 0 auto;
  font-size: var(--t-md);
  line-height: 1.55;
}

.onboarding-form {
  background: var(--paper-elev);
  padding: var(--s-6) var(--s-6);
  border-radius: 16px;
  border: 1px solid var(--rule);
}
@media (max-width: 480px) {
  .onboarding-form { padding: var(--s-5) var(--s-4); }
}

.onboarding-actions {
  margin-top: var(--s-6);
  text-align: center;
}
.onboarding-actions .btn-lg {
  min-width: 260px;
}

/* ── Snapshot card on success ─────────────────────────────────── */
.snapshot-card {
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: var(--s-6) var(--s-6);
}
.snapshot-grid {
  display: grid;
  gap: var(--s-4);
  margin: 0;
}
.snapshot-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: baseline;
  gap: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px dotted var(--rule);
}
.snapshot-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.snapshot-row dt {
  font-size: var(--t-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 500;
}
.snapshot-row dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  font-weight: 500;
}
@media (max-width: 540px) {
  .snapshot-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .snapshot-row dd { font-size: 20px; }
}

/* Batch 3 — Account: Help & contact card list */
.account-help-list li {
  padding: 12px 0;
  border-bottom: 1px dotted var(--rule);
  font-size: var(--t-base);
  line-height: 1.5;
  min-height: 44px;
}
.account-help-list li:last-child { border-bottom: 0; }
.account-help-list a {
  color: var(--ink);
  text-decoration: underline;
}
.account-help-list a:hover { color: var(--accent-warm-hover); }
