/* =====================================================================
   thedentist.ai — TEASER · shared theme tokens (light + dark)
   Editorial · calm · positive · "Outcomes, not opinions."
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,900;1,400&family=DM+Sans:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* -------------------------------------------------------------------
   DARK THEME (default — mirrors the existing dark design system)
   ------------------------------------------------------------------- */
/* Default + dark — do not pair :root with dark tokens (breaks light toggle). */
html:not([data-theme="light"]),
[data-theme="dark"] {
  --ink:     #0A0A12;
  --ink-0:   #060810;
  --paper:   #F5F2EB;
  --paper-2: #FAF8F3;
  --bone:    #0F1820;
  --bone-2:  #0F1E28;
  --bone-3:  #13242F;

  --seal:    #C8973A;
  --seal-2:  #E8B84B;
  --sage:    #3A6B5A;
  --sage-2:  #4D8C74;
  --blush:   #C4615A;

  --ink-1:   #F5F2EB;
  --ink-2:   #B7C3CC;
  --ink-3:   #8FA3B1;
  --ink-4:   #5A6B78;
  --ink-5:   rgba(245, 242, 235, 0.10);
  --ink-6:   rgba(245, 242, 235, 0.05);

  --seal-tint:  rgba(200, 151, 58, 0.14);
  --sage-tint:  rgba(58, 107, 90, 0.15);
  --alert-tint: rgba(196, 97, 90, 0.18);

  --shadow-soft:  0 1px 2px rgba(0,0,0,0.35), 0 4px 16px rgba(0,0,0,0.30);
  --shadow-lift:  0 8px 24px rgba(0,0,0,0.40), 0 32px 64px rgba(0,0,0,0.45);
  --shadow-glow:  0 0 0 1px rgba(200,151,58,0.22), 0 8px 32px rgba(200,151,58,0.10);
  --shadow-focus: 0 0 0 2px var(--ink), 0 0 0 4px var(--seal);

  --grain-opacity: 0.018;
  --hero-grad-1: rgba(58,107,90,0.18);
  --hero-grad-2: rgba(200,151,58,0.10);
  --halo: rgba(200,151,58,0.14);
}

/* -------------------------------------------------------------------
   LIGHT THEME (warm cream + ink, deeper gold for AA on light)
   ------------------------------------------------------------------- */
html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] {
  --ink:     #FAF8F3;            /* page bg = warm paper */
  --ink-0:   #F0EDE5;            /* deeper for footer / under-surfaces */
  --paper:   #0F1820;            /* primary text = deep ink */
  --paper-2: #0A0A12;            /* near-black for display headlines */
  --bone:    #FFFFFF;            /* card surface = pure white */
  --bone-2:  #F5F2EB;            /* hover / inset */
  --bone-3:  #EDE9DE;            /* pressed / featured */

  --seal:    #9E7426;            /* gold deepened for AA on light */
  --seal-2:  #B8862A;            /* hover */
  --sage:    #2E5747;            /* sage deepened for contrast */
  --sage-2:  #3A6B5A;
  --blush:   #A24E47;

  --ink-1:   #0F1820;
  --ink-2:   #3D4A55;
  --ink-3:   #6E7B85;
  --ink-4:   #A0ABB5;
  --ink-5:   rgba(10, 10, 18, 0.10);
  --ink-6:   rgba(10, 10, 18, 0.04);

  --seal-tint:  rgba(158, 116, 38, 0.10);
  --sage-tint:  rgba(46, 87, 71, 0.10);
  --alert-tint: rgba(162, 78, 71, 0.12);

  --shadow-soft:  0 1px 2px rgba(15,24,32,0.06), 0 4px 16px rgba(15,24,32,0.06);
  --shadow-lift:  0 8px 24px rgba(15,24,32,0.10), 0 32px 64px rgba(15,24,32,0.10);
  --shadow-glow:  0 0 0 1px rgba(158,116,38,0.25), 0 8px 32px rgba(158,116,38,0.14);
  --shadow-focus: 0 0 0 2px var(--ink), 0 0 0 4px var(--seal);

  --grain-opacity: 0.025;
  --hero-grad-1: rgba(46,87,71,0.10);
  --hero-grad-2: rgba(158,116,38,0.08);
  --halo: rgba(158,116,38,0.12);
}

/* -------------------------------------------------------------------
   TYPOGRAPHY families + tokens
   ------------------------------------------------------------------- */
:root {
  --font-display: "Playfair Display", "Source Serif 4", Georgia, serif;
  --font-body:    "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "DM Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px; --s-24: 96px;

  --r-2: 4px; --r-3: 8px; --r-4: 12px; --r-5: 16px; --r-6: 24px; --r-pill: 999px;

  --t-fast: 120ms;
  --t-base: 240ms;
  --t-slow: 600ms;
  --ease-out:    cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  --content-max: 1240px;
  --gutter: 32px;
  --section-scale: 1;

  /* Type scale — export/src/theme.css (THE DENTIST AI DARK-2) */
  --type-body: 16px;
  --type-body-lg: 1.02rem;
  --type-hero-display: clamp(2.16rem, 5.4vw, 4.86rem);
  --type-hero-lede: clamp(1rem, 1.3vw, 1.2rem);
  --type-section-title: clamp(2rem, 3.6vw, 3rem);
  --hero-title-size: var(--type-hero-display);
}

/* Admin-driven layout density */
.hero, .sec-head, section.alt { transition: padding var(--t-base) var(--ease-out); }
[data-section-scale="compact"] .hero { padding-block: calc(var(--s-16) * var(--section-scale, 0.85)); }
[data-section-scale="relaxed"] .hero { padding-block: calc(var(--s-24) * var(--section-scale, 1.18)); }

html[data-grain="off"] body::before { opacity: 0 !important; }
html[data-motion="reduced"] .rise { animation: none !important; opacity: 1 !important; transform: none !important; }

/* -------------------------------------------------------------------
   BASE
   ------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--ink);
  color: var(--ink-1);
  font-family: var(--font-body);
  font-size: var(--type-body, 16px);
  line-height: 1.55;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" on, "liga" on;
  transition: background-color var(--t-slow) var(--ease-in-out), color var(--t-slow) var(--ease-in-out);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; padding: 0; }
::selection { background: var(--seal-tint); color: var(--paper-2); }
*:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--r-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* -------------------------------------------------------------------
   SHELL
   ------------------------------------------------------------------- */
.shell { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 720px) { .shell { padding: 0 20px; } }

/* -------------------------------------------------------------------
   MASTHEAD
   ------------------------------------------------------------------- */
.mast {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ink-5);
}
.mast-row { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand {
  font-family: var(--font-display);
  font-size: 20px; letter-spacing: -0.3px; font-weight: 700;
  color: var(--paper-2);
  display: flex; align-items: center; gap: 10px;
}
.brand .ai { color: var(--seal); font-style: italic; font-weight: 600; }
.brand .pulse {
  width: 8px; height: 8px; border-radius: 999px; background: var(--seal);
  box-shadow: 0 0 0 0 var(--seal);
  animation: pulse-ring 2.4s var(--ease-out) infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 var(--halo); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.mast-tag {
  margin-left: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--seal); background: var(--seal-tint);
  border: 1px solid color-mix(in srgb, var(--seal) 30%, transparent);
}
.mast-spacer { flex: 1; }
.mast-mini {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 12px;
}
.mast-mini b { color: var(--paper); font-weight: 500; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--ink-5);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-3);
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.theme-toggle:hover { color: var(--paper); border-color: color-mix(in srgb, var(--seal) 40%, transparent); }
.theme-toggle .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--seal); }

@media (max-width: 720px) {
  .mast-mini { display: none; }
  .mast-tag { display: none; }
}

/* -------------------------------------------------------------------
   HERO (teaser)
   ------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 64px;
  background:
    radial-gradient(ellipse 1100px 600px at 78% 18%, var(--hero-grad-1) 0%, transparent 60%),
    radial-gradient(ellipse 900px 500px at 12% 90%, var(--hero-grad-2) 0%, transparent 60%),
    var(--ink);
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill-rule='evenodd'%3E%3Ccircle fill='%23ffffff' fill-opacity='1' cx='40' cy='40' r='0.6'/%3E%3C/g%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
}
html[data-theme="light"] .hero::before {
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill-rule='evenodd'%3E%3Ccircle fill='%23000000' fill-opacity='1' cx='40' cy='40' r='0.6'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; font-weight: 500;
  color: var(--seal); background: var(--seal-tint);
  border: 1px solid color-mix(in srgb, var(--seal) 30%, transparent);
  margin-bottom: 28px;
}
.eyebrow .glyph {
  width: 6px; height: 6px; border-radius: 999px; background: var(--seal);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--hero-title-size, var(--type-hero-display));
  font-weight: 900; line-height: 1.02; letter-spacing: -1.5px;
  margin: 0 0 28px; color: var(--paper-2);
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic; color: var(--seal); font-weight: 700;
  display: inline-block;
}
.hero h1 .dim {
  color: color-mix(in srgb, var(--paper-2) 36%, transparent);
  font-weight: 700;
}

.hero .lede {
  font-size: var(--type-hero-lede);
  color: var(--ink-2); line-height: 1.7;
  max-width: 54ch; margin: 0 0 36px;
  font-weight: 300;
}

.hero-meta {
  display: flex; gap: 28px; flex-wrap: wrap;
  padding-top: 24px; margin-top: 24px;
  border-top: 1px solid var(--ink-5);
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.5px;
}
.hero-meta b { color: var(--paper); font-weight: 500; }

/* -------------------------------------------------------------------
   HERO right-side: live community pulse
   ------------------------------------------------------------------- */
.pulse-card {
  background: var(--bone); border: 1px solid var(--ink-5);
  border-radius: var(--r-5); padding: 28px;
  box-shadow: var(--shadow-lift);
  position: relative; overflow: hidden;
}
.pulse-card::after {
  content: ''; position: absolute; top: 0; right: 0;
  width: 200px; height: 200px;
  background: radial-gradient(circle at 70% 30%, var(--halo) 0%, transparent 60%);
  pointer-events: none;
}
.pulse-head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 4px;
}
.pulse-head .live {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--sage-2); font-weight: 600;
}
.pulse-head .live.off {
  color: var(--ink-3);
  background: var(--bone-2);
  border-color: var(--ink-5);
}
.pulse-head .live.off::before { display: none; }

.pulse-head .live::before {
  content: ''; width: 6px; height: 6px; border-radius: 999px;
  background: var(--sage-2);
  animation: live-blink 1.4s var(--ease-in-out) infinite;
}
@keyframes live-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

.pulse-count {
  font-family: var(--font-mono); font-size: 56px; font-weight: 500;
  color: var(--seal); line-height: 1; letter-spacing: -1px;
  margin: 8px 0 4px;
}
.pulse-sub {
  font-size: 13px; color: var(--ink-3); margin-bottom: 24px;
}

.pulse-rows { display: flex; flex-direction: column; gap: 12px; }
.pulse-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.pulse-row .lbl { font-size: 13px; color: var(--paper); font-weight: 400; }
.pulse-row .trk {
  grid-column: 1 / -1;
  height: 4px; background: var(--ink-5); border-radius: 2px; overflow: hidden;
  position: relative;
}
.pulse-row .fil {
  height: 100%; background: linear-gradient(90deg, var(--sage), var(--seal));
  border-radius: 2px;
  transition: width var(--t-slow) var(--ease-out);
}
.pulse-row .n { font-family: var(--font-mono); font-size: 12px; color: var(--seal); }

.pulse-foot {
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid var(--ink-5);
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.5px;
  display: flex; justify-content: space-between; gap: 12px;
}
.pulse-foot .anon { color: var(--ink-3); }
.pulse-empty {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
  margin: 0;
  padding: 8px 0;
}

/* -------------------------------------------------------------------
   PRIMARY ACTION (Begin button)
   ------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; border-radius: var(--r-4);
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
  border: 1px solid transparent;
}
.btn .arrow {
  display: inline-block; transition: transform var(--t-fast) var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--seal); color: var(--ink); }
.btn-primary:hover { background: var(--seal-2); transform: translateY(-1px); box-shadow: 0 8px 24px var(--halo); }
.btn-ink { background: var(--paper); color: var(--ink); }
.btn-ink:hover { background: var(--paper-2); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--paper);
  border: 1px solid var(--ink-5);
}
.btn-ghost:hover { background: var(--bone); border-color: color-mix(in srgb, var(--seal) 35%, transparent); }
.btn-lg { padding: 20px 32px; font-size: 16px; }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-disabled { background: var(--bone-2); color: var(--ink-4); cursor: not-allowed; border: 1px solid var(--ink-5); }
.btn-disabled:hover { transform: none; box-shadow: none; }

.cta-row {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin-top: 0;
}
.cta-row .note {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-3);
  letter-spacing: 0.5px; flex: 1 1 100%;
}
@media (min-width: 520px) {
  .cta-row .note { flex: 0 1 auto; }
}

/* Light: cream page + gold CTA label */
html[data-theme="light"] .btn-primary { color: #FAF8F3; }

/* -------------------------------------------------------------------
   SECTIONS
   ------------------------------------------------------------------- */
section { padding: 96px 0; position: relative; }
#who { padding-top: clamp(40px, 6vh, 72px); padding-bottom: 64px; }
@media (max-width: 720px) {
  section { padding: 56px 0; }
  #who { padding-top: 32px; padding-bottom: 48px; }
  .theme-toggle span:not(.dot) { display: none; }
  .theme-toggle { padding: 8px 10px; }
  .cta-row .cta-secondary { display: none; }
}
section.alt { background: var(--ink-0); }
.sec-head { margin-bottom: 56px; max-width: 760px; }
.sec-head .eb {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 2px; text-transform: uppercase; color: var(--seal);
  margin-bottom: 16px;
}
.sec-head h2 {
  font-family: var(--font-display);
  font-size: var(--type-section-title); font-weight: 700;
  letter-spacing: -0.5px; line-height: 1.12;
  color: var(--paper-2); margin: 0 0 16px;
  text-wrap: balance;
}
.sec-head h2 em { color: var(--seal); font-style: italic; }
.sec-head p { font-size: var(--type-body-lg); color: var(--ink-2); line-height: 1.7; font-weight: 300; max-width: 60ch; }

/* -------------------------------------------------------------------
   FLOW — overall layout
   ------------------------------------------------------------------- */
.flow {
  padding: 64px 0 96px;
  min-height: 600px;
  position: relative;
}
.flow-grid {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 56px; align-items: start;
}
@media (max-width: 980px) { .flow-grid { grid-template-columns: 1fr; gap: 32px; } }

.flow-main { min-width: 0; }

.crumb {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 16px;
}
.crumb .step { color: var(--seal); }
.crumb .dot { width: 4px; height: 4px; border-radius: 999px; background: var(--ink-4); }
.crumb .back {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-3);
}
.crumb .back:hover { color: var(--paper); }

.progress {
  height: 3px; background: var(--ink-5); border-radius: 2px; overflow: hidden;
  margin-bottom: 32px;
}
.progress .bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--seal));
  border-radius: 2px;
  transition: width var(--t-slow) var(--ease-out);
}

.flow h2.q {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 700;
  letter-spacing: -1px; line-height: 1.08;
  color: var(--paper-2); margin: 0 0 16px;
  text-wrap: balance;
}
.flow h2.q em { font-style: italic; color: var(--seal); }
.flow .q-sub {
  font-size: 1.02rem; color: var(--ink-2); line-height: 1.7;
  max-width: 56ch; margin: 0 0 36px; font-weight: 300;
}

/* -------------------------------------------------------------------
   FLOW — role / option cards
   ------------------------------------------------------------------- */
.role-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 720px) { .role-grid { grid-template-columns: 1fr; } }

a.role-card {
  text-decoration: none; color: inherit;
}
a.role-card:focus-visible {
  outline: 2px solid var(--seal-2); outline-offset: 3px;
}

.boot-fail {
  margin: 32px 0 0; padding: 20px 24px;
  border: 1px solid color-mix(in srgb, var(--blush) 55%, transparent);
  border-radius: var(--r-4);
  background: var(--alert-tint);
  color: var(--paper-2);
  font-size: 14px; line-height: 1.55;
}
.boot-fail p { margin: 0 0 12px; }
.boot-fail p:last-child { margin-bottom: 0; }
.boot-fail a { color: var(--seal-2); }

html.tda-booting .role-grid--static {
  pointer-events: none;
  opacity: 0.55;
}
html.tda-booting #app::after {
  content: 'Loading survey…';
  display: block;
  margin: 24px auto 48px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--ink-3);
}

.role-card {
  position: relative; text-align: left;
  background: var(--bone); border: 1px solid var(--ink-5);
  border-radius: var(--r-5); padding: 28px;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out);
  cursor: pointer; display: flex; flex-direction: column; gap: 14px;
  min-height: 200px;
}
.role-card:hover {
  border-color: color-mix(in srgb, var(--seal) 45%, transparent);
  transform: translateY(-2px); box-shadow: var(--shadow-lift);
}
.role-card.on {
  border-color: var(--seal);
  background: linear-gradient(135deg, var(--bone-2), var(--bone));
  box-shadow: var(--shadow-glow);
}
.role-card .num {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 1.5px;
}
.role-card h3 {
  font-family: var(--font-display); font-size: 1.45rem; font-weight: 700;
  letter-spacing: -0.4px; color: var(--paper-2); margin: 0;
  line-height: 1.15;
}
.role-card p { font-size: 14px; color: var(--ink-2); line-height: 1.55; margin: 0; font-weight: 300; }
.role-card .examples {
  margin-top: auto;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.role-card .tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.5px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--bone-2); color: var(--ink-3);
  border: 1px solid var(--ink-5);
}
.role-card.on .tag { background: var(--seal-tint); color: var(--seal); border-color: transparent; }

.role-card--done {
  opacity: 0.55;
}
.role-card--done::after {
  content: 'Submitted before';
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sage-2);
  margin-top: 10px;
}

.submit-err {
  color: var(--blush);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
  max-width: 42rem;
}

.household-panel {
  background: var(--bone);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-5);
  padding: 22px 24px;
  margin-bottom: 28px;
}
.household-lead {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 18px;
}
.household-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) { .household-modes { grid-template-columns: 1fr; } }
.household-mode {
  text-align: left;
  background: var(--bone-2);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-4);
  padding: 14px 16px;
  cursor: pointer;
  color: var(--paper);
}
.household-mode strong { display: block; font-family: var(--font-display); font-size: 16px; margin-bottom: 4px; }
.household-mode span { font-size: 13px; color: var(--ink-3); }
.household-mode.on {
  border-color: color-mix(in srgb, var(--seal) 50%, transparent);
  box-shadow: inset 2px 0 0 var(--seal);
}
.household-family { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--ink-6); }
.household-size-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-bottom: 10px;
}
.household-size-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.household-size {
  min-width: 44px;
  padding: 10px 14px;
  border-radius: var(--r-3);
  border: 1px solid var(--ink-5);
  background: var(--bone-2);
  color: var(--paper);
  font-weight: 600;
  cursor: pointer;
}
.household-size.on { background: var(--seal-tint); border-color: var(--seal); color: var(--seal); }
.household-names summary { cursor: pointer; font-size: 13px; color: var(--seal); margin-bottom: 12px; }
.household-name-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.member-card {
  text-align: left;
  background: var(--bone);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-4);
  padding: 16px;
  cursor: pointer;
  color: var(--paper);
}
.member-card.on { border-color: var(--seal); box-shadow: inset 2px 0 0 var(--seal); }
.member-card.done { opacity: 0.5; cursor: not-allowed; }
.member-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 1px;
}
.member-name { display: block; font-weight: 600; margin-top: 6px; }
.member-tag {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--sage-2);
}

/* Sub-role chip list */
.chip-stack { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  border: 1px solid var(--ink-5); background: var(--bone); color: var(--ink-2);
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.chip:hover { color: var(--paper); border-color: color-mix(in srgb, var(--seal) 40%, transparent); }
.chip.on { background: var(--sage); border-color: var(--sage); color: var(--paper); }
.chip .x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 999px;
  background: rgba(255,255,255,0.18); font-size: 11px; line-height: 1;
}
.chip.on .x { background: rgba(0,0,0,0.20); }

/* Need / feature multi-select cards (step 3) */
.need-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 32px;
}
@media (max-width: 720px) { .need-grid { grid-template-columns: 1fr; } }
.need-card {
  text-align: left;
  background: var(--bone); border: 1px solid var(--ink-5);
  border-radius: var(--r-4); padding: 18px 20px;
  display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start;
  transition: border-color var(--t-fast) var(--ease-out);
  position: relative;
}
.need-card:hover { border-color: color-mix(in srgb, var(--seal) 40%, transparent); background: var(--bone-2); }
.need-card.on {
  border-color: var(--sage-2); background: var(--sage-tint);
}
.need-card .box {
  width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--ink-4); margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
  transition: border-color var(--t-fast) var(--ease-out);
}
.need-card.on .box { background: var(--sage-2); border-color: var(--sage-2); }
.need-card.on .box::after {
  content: '✓'; color: var(--paper-2); font-size: 12px; font-weight: 700;
}
.need-card.done {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.need-card .body { display: flex; flex-direction: column; gap: 4px; }
.need-card .ttl {
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  color: var(--paper-2); line-height: 1.3;
}
.need-card .des { font-size: 13px; color: var(--ink-3); line-height: 1.5; font-weight: 300; }
.need-card .add {
  position: absolute; top: 12px; right: 14px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px;
  color: var(--ink-4); text-transform: uppercase;
}

/* Free-text rank */
.need-add {
  border: 1px dashed var(--ink-5); border-radius: var(--r-4);
  padding: 14px 18px; display: flex; gap: 12px; align-items: center;
  margin-bottom: 32px;
}
.need-add input {
  flex: 1; background: transparent; border: 0; color: var(--paper);
  font-family: var(--font-body); font-size: 15px; outline: none;
  font-weight: 300;
}
.need-add input::placeholder { color: var(--ink-4); }
.need-add button {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--seal);
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--seal) 35%, transparent);
}
.need-add button:hover { background: var(--seal-tint); }
.added-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.added-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--seal-tint); color: var(--seal);
  font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.5px;
}
.added-chip .rm { cursor: pointer; opacity: 0.7; }
.added-chip .rm:hover { opacity: 1; }

/* -------------------------------------------------------------------
   Form fields (final step)
   ------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 1px; text-transform: uppercase; font-weight: 500;
}
.field input, .field select, .field textarea {
  background: var(--bone); color: var(--paper);
  border: 1px solid var(--ink-5); border-radius: var(--r-3);
  padding: 14px 16px; font-family: var(--font-body); font-size: 15px;
  font-weight: 400;
  transition: border-color var(--t-fast) var(--ease-out);
  width: 100%;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--seal); outline: none; background: var(--bone-2);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.55; font-weight: 300; }
.field .hint { font-size: 11px; color: var(--ink-4); font-family: var(--font-mono); letter-spacing: 0.5px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.consent {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.5px; line-height: 1.6;
  padding: 14px 16px; border-radius: var(--r-3);
  background: var(--bone-2); border: 1px solid var(--ink-5);
  margin-top: 20px;
  display: flex; gap: 12px; align-items: flex-start;
}
.consent input { margin-top: 3px; accent-color: var(--seal); }

/* -------------------------------------------------------------------
   ASIDE — sticky summary of selections
   ------------------------------------------------------------------- */
.aside {
  position: sticky; top: 96px;
  background: var(--bone); border: 1px solid var(--ink-5);
  border-radius: var(--r-5); padding: 24px;
}
.aside .head {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-3);
  display: flex; justify-content: space-between;
  padding-bottom: 14px; border-bottom: 1px solid var(--ink-5); margin-bottom: 14px;
}
.aside .head .id { color: var(--seal); }
.aside dl {
  margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px;
  align-items: baseline;
}
.aside dt {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--ink-3);
}
.aside dd { margin: 0; font-size: 13px; color: var(--paper); font-weight: 400; }
.aside dd em { color: var(--ink-4); font-style: normal; font-weight: 300; }

.aside-foot {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ink-5);
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-3);
  letter-spacing: 0.5px; line-height: 1.6;
}
.aside-foot .saved {
  color: var(--sage-2); display: inline-flex; align-items: center; gap: 6px;
}
.aside-foot .saved::before {
  content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--sage-2);
  animation: live-blink 2s var(--ease-in-out) infinite;
}

/* -------------------------------------------------------------------
   THANK YOU screen
   ------------------------------------------------------------------- */
.thanks {
  text-align: center;
  max-width: 720px; margin: 64px auto;
  padding: 64px 32px;
  background: var(--bone); border: 1px solid var(--ink-5);
  border-radius: var(--r-6);
  box-shadow: var(--shadow-lift);
  position: relative; overflow: hidden;
}
.thanks::before {
  content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--halo) 0%, transparent 60%);
  pointer-events: none;
}
.thanks .seal-glyph {
  width: 64px; height: 64px; margin: 0 auto 24px; position: relative;
  background: linear-gradient(135deg, var(--seal-2), var(--seal));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-family: var(--font-display); font-size: 28px; font-weight: 700;
}
.thanks h2 {
  font-family: var(--font-display); font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 700; letter-spacing: -0.5px; color: var(--paper-2);
  margin: 0 0 20px; line-height: 1.1;
}
.thanks p {
  font-size: 1.02rem; color: var(--ink-2); line-height: 1.7;
  font-weight: 300; max-width: 52ch; margin: 0 auto 20px;
}
.thanks .receipt {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 1px; margin-top: 32px;
  padding: 12px 16px; border: 1px dashed var(--ink-5); border-radius: var(--r-3);
  display: inline-flex; gap: 12px; align-items: center;
}
.thanks .receipt b { color: var(--seal); font-weight: 500; }

.share-row { margin-top: 32px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* -------------------------------------------------------------------
   WHY / FAQ / FOOTER (SEO-rich content below the fold)
   ------------------------------------------------------------------- */
.why-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 880px) { .why-grid { grid-template-columns: 1fr; } }
.why-card {
  background: var(--bone); border: 1px solid var(--ink-5);
  border-radius: var(--r-5); padding: 32px;
  display: flex; flex-direction: column; gap: 12px;
}
.why-card .n {
  font-family: var(--font-mono); font-size: 11px; color: var(--seal);
  letter-spacing: 1.5px;
}
.why-card h3 {
  font-family: var(--font-display); font-size: 22px; color: var(--paper-2);
  font-weight: 700; margin: 0; letter-spacing: -0.3px; line-height: 1.2;
}
.why-card p { color: var(--ink-2); font-size: 14px; line-height: 1.6; font-weight: 300; margin: 0; }

details.faq {
  border-top: 1px solid var(--ink-5);
  padding: 20px 0;
}
details.faq:last-of-type { border-bottom: 1px solid var(--ink-5); }
details.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  font-family: var(--font-display); font-size: 1.15rem;
  color: var(--paper-2); font-weight: 600;
  letter-spacing: -0.2px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+'; color: var(--seal); font-size: 24px; font-weight: 300;
  transition: transform var(--t-base) var(--ease-out);
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq .ans {
  color: var(--ink-2); font-size: 15px; line-height: 1.7;
  font-weight: 300; padding-top: 14px; max-width: 64ch;
}

footer {
  background: var(--ink-0); padding: 80px 0 32px;
  border-top: 1px solid var(--ink-5);
}
.foot-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; }
@media (max-width: 720px) { .foot-row { grid-template-columns: 1fr 1fr; } }
footer h5 {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px;
  font-weight: 500;
}
footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
footer ul a { color: var(--ink-3); transition: color var(--t-fast); }
footer ul a:hover { color: var(--paper); }
footer .brand-mark { font-family: var(--font-display); font-size: 22px; color: var(--paper-2); font-weight: 700; }
footer .brand-mark .ai { color: var(--seal); font-style: italic; font-weight: 600; }
footer .brand-mantra { font-family: var(--font-display); font-style: italic; font-size: 15px; color: var(--ink-3); margin: 12px 0 16px; }
.foot-bot { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--ink-5); display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--ink-4); letter-spacing: 0.5px; flex-wrap: wrap; gap: 12px; }

/* -------------------------------------------------------------------
   No-JS fallback (shows static landing copy)
   ------------------------------------------------------------------- */
.no-js-fallback { display: none; }
.no-js .no-js-fallback { display: block; }
.no-js #app { display: none; }

/* -------------------------------------------------------------------
   Tiny utility animations for screen transitions
   ------------------------------------------------------------------- */
/* Elements are visible by default; the animation just adds a gentle rise.
   If animation never fires (some sandbox contexts), content still renders. */
@keyframes rise {
  from { transform: translateY(14px); }
  to   { transform: translateY(0); }
}
.rise { animation: rise 520ms var(--ease-out) forwards; }
.rise.d1 { animation-delay: 60ms; }
.rise.d2 { animation-delay: 120ms; }
.rise.d3 { animation-delay: 180ms; }
.rise.d4 { animation-delay: 240ms; }
.rise.d5 { animation-delay: 300ms; }
