/* ==========================================================================
   My Pregnancy Due Date — "Soft Dawn" design system (v1 production)
   Light theme only (dark mode deferred to v2). Mobile-first.
   ========================================================================== */

/* ---------- 0. Fonts (self-hosted, SIL OFL 1.1 — see fonts/*-OFL.txt) ----------
   Source: github.com/google/fonts (ofl/fraunces, ofl/figtree). Subset to Latin.
   Fraunces is instanced at SOFT 50, WONK 0, opsz 48. */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic-500.woff2") format("woff2");
  font-weight: 500; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-var-400-800.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metric-matched local fallbacks: keep layout stable while web fonts swap in.
   Values computed from the subset files vs. Georgia / Arial with fontTools. */
@font-face { font-family: "Fraunces Fallback"; src: local("Georgia Bold"), local("Georgia-Bold"); font-weight: 600; font-style: normal;
  size-adjust: 91.5%; ascent-override: 106.9%; descent-override: 27.9%; line-gap-override: 0%; }
@font-face { font-family: "Fraunces Fallback"; src: local("Georgia Italic"), local("Georgia-Italic"); font-weight: 500; font-style: italic;
  size-adjust: 98.5%; ascent-override: 99.3%; descent-override: 25.9%; line-gap-override: 0%; }
@font-face { font-family: "Figtree Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 400 800;
  size-adjust: 100.1%; ascent-override: 94.9%; descent-override: 25%; line-gap-override: 0%; }

/* ---------- 1. Tokens ---------- */
:root {
  /* Color — contrast ratios verified (see report). Coral is decorative only. */
  --cream-50: #FFF9F4;
  --peach-100: #FDECE2;
  --peach-200: #FADCCB;
  --apricot-300: #F7B994;
  --coral-500: #E3765C;          /* decorative fills only — 2.9:1, never text */
  --berry-600: #A3416E;          /* 5.9:1 on white */
  --plum-700: #6B2D5C;           /* 9.7:1 on white */
  --plum-900: #2D1A2A;           /* 16.2:1 on white */
  --ink-muted: #6A5566;          /* 6.8:1 on white */
  --lavender-100: #F1EAF8;
  --lavender-300: #D9C8EE;
  --sage-50: #EEF5EF;
  --sage-500: #5E8A6B;           /* fills/borders only (3.9:1) */
  --sage-600: #4A7356;           /* sage text — 5.4:1 on white */
  --amber-50: #FFF4E0;
  --amber-700: #8A5200;
  --error-700: #B3261E;
  --white: #FFFFFF;

  --grad-cta: linear-gradient(135deg, var(--plum-700) 0%, var(--berry-600) 100%);
  --grad-dawn:
    radial-gradient(60% 55% at 85% 8%, rgb(247 185 148 / .55) 0%, transparent 70%),
    radial-gradient(55% 50% at 5% 30%, rgb(217 200 238 / .55) 0%, transparent 70%),
    radial-gradient(80% 60% at 50% 100%, rgb(253 236 226 / .9) 0%, transparent 75%),
    linear-gradient(180deg, #FFF3EA 0%, var(--cream-50) 70%);

  /* Typography — self-hosted Fraunces (display) + Figtree (body/UI) */
  --font-display: "Fraunces", "Fraunces Fallback", Georgia, serif;
  --font-body: "Figtree", "Figtree Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --fs-display: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);
  --fs-h1: clamp(2.125rem, 1.5rem + 2.6vw, 3.25rem);
  --fs-h2: clamp(1.625rem, 1.3rem + 1.3vw, 2.125rem);
  --fs-h3: clamp(1.25rem, 1.15rem + .4vw, 1.5rem);
  --fs-body: clamp(1.0625rem, 1.03rem + .15vw, 1.125rem);
  --fs-small: .9375rem;
  --fs-xs: .8125rem;

  /* Spacing — 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;

  /* Radius */
  --r-input: 14px; --r-card: 24px; --r-hero: 32px; --r-pill: 999px;

  /* Elevation — warm-tinted, never grey */
  --shadow-sm: 0 1px 2px rgb(107 45 92 / .06), 0 2px 8px -2px rgb(107 45 92 / .08);
  --shadow-md: 0 1px 2px rgb(107 45 92 / .06), 0 12px 32px -12px rgb(107 45 92 / .18);
  --shadow-lg: 0 2px 4px rgb(107 45 92 / .05), 0 28px 64px -24px rgb(107 45 92 / .28);

  /* Motion */
  --dur-fast: 150ms; --dur-base: 250ms; --dur-slow: 450ms; --dur-reveal: 700ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);

  /* Layout */
  --container: 1200px;
  --prose: 720px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  interpolate-size: allow-keywords;
}
body {
  margin: 0;
  background: var(--cream-50);
  color: var(--plum-900);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none; /* never fake-bold the single-weight Fraunces files */
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 var(--s-4); text-wrap: pretty; }
a { color: var(--plum-700); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--berry-600); text-decoration-thickness: 2px; }
:focus-visible {
  outline: 2px solid var(--plum-700);
  outline-offset: 2px;
  border-radius: 6px;
}
::selection { background: var(--peach-200); color: var(--plum-900); }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.prose { max-width: var(--prose); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--plum-700); color: var(--white); padding: var(--s-3) var(--s-4);
  border-radius: var(--r-pill); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s-3); color: var(--white); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--berry-600); margin: 0 0 var(--s-3);
}
.lead { font-size: clamp(1.125rem, 1.05rem + .35vw, 1.3125rem); color: var(--ink-muted); line-height: 1.55; }
.section { padding-block: clamp(56px, 8vw, var(--s-9)); }
.section-head { max-width: 640px; margin-bottom: var(--s-6); }
.section-head p { color: var(--ink-muted); }

/* ---------- 4. Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 249 244 / .72);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: rgb(107 45 92 / .08); box-shadow: 0 6px 24px -18px rgb(107 45 92 / .4); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--plum-900); }
.brand:hover { color: var(--plum-900); }
.brand-mark { width: 36px; height: 36px; flex: none; transition: transform var(--dur-slow) var(--ease-spring); }
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.05); }
.brand-word { font-family: var(--font-display); font-size: clamp(1rem, .8rem + 1vw, 1.1875rem); font-weight: 600; letter-spacing: -.01em; line-height: 1; white-space: nowrap; }
.brand-word em {
  font-style: italic; font-weight: 500;
  color: var(--berry-600);
  background: var(--grad-cta); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-toggle {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font: inherit; font-weight: 600; font-size: var(--fs-small); color: var(--plum-900);
  background: var(--white); border: 1px solid rgb(107 45 92 / .14); border-radius: var(--r-pill);
  padding: 0 var(--s-4); min-height: 44px; cursor: pointer; box-shadow: var(--shadow-sm);
}
.nav-toggle-icon { position: relative; width: 18px; height: 12px; }
@media (max-width: 419.98px) {
  .nav-toggle { width: 44px; padding: 0; justify-content: center; flex: none; }
  .nav-toggle-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .brand-mark { width: 32px; height: 32px; }
  .brand { gap: 8px; min-width: 0; }
}
.nav-toggle-icon::before, .nav-toggle-icon::after, .nav-toggle-icon span {
  content: ""; position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast) linear, top var(--dur-base) var(--ease-out);
}
.nav-toggle-icon::before { top: 0; }
.nav-toggle-icon span { top: 5px; }
.nav-toggle-icon::after { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { top: 5px; transform: rotate(-45deg); }

.site-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--cream-50);
  border-bottom: 1px solid rgb(107 45 92 / .1);
  box-shadow: 0 24px 48px -24px rgb(107 45 92 / .35);
  padding: var(--s-3) var(--gutter) var(--s-6);
}
.js .site-nav:not(.is-open) { display: none; }
.site-nav.is-open { animation: menu-in var(--dur-base) var(--ease-out); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-4); min-height: 48px; border-radius: 14px;
  color: var(--plum-900); text-decoration: none; font-weight: 600;
  transition: background var(--dur-fast) var(--ease-out);
}
.nav-list a:hover { background: var(--peach-100); }
.nav-list a[aria-current="page"] { background: var(--white); box-shadow: var(--shadow-sm); }
.nav-list a[aria-current="page"]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--coral-500); }
.nav-group-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); padding: var(--s-4) var(--s-4) var(--s-1); }

@media (min-width: 1200px) {
  .nav-toggle { display: none; }
  .site-nav, .js .site-nav:not(.is-open) {
    display: block; position: static; background: none; border: 0; box-shadow: none; padding: 0; animation: none;
  }
  .nav-list { display: flex; align-items: center; gap: var(--s-1); }
  .nav-list a { min-height: 44px; padding: 0 var(--s-4); font-size: var(--fs-small); border-radius: var(--r-pill); position: relative; white-space: nowrap; }
  .nav-list a[aria-current="page"] { background: var(--white); }
  .nav-list a[aria-current="page"]::after { position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; transform: translateX(-50%); }
  .nav-group-label { display: none; }
  .nav-sep { width: 1px; height: 20px; background: rgb(107 45 92 / .15); margin-inline: var(--s-2); }
}
@media (max-width: 1199.98px) { .nav-sep { height: 1px; background: rgb(107 45 92 / .1); margin: var(--s-2) var(--s-4); } }

/* ---------- 5. Hero / Soft Dawn background ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--grad-dawn); padding-block: var(--s-6) var(--s-8); }
.dawn { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; opacity: .7; }
.blob-1 { width: 420px; height: 420px; right: -140px; top: -120px;
  background: radial-gradient(circle at 35% 35%, rgb(247 185 148 / .7), rgb(227 118 92 / .18) 60%, transparent 72%); }
.blob-2 { width: 360px; height: 360px; left: -160px; top: 38%;
  background: radial-gradient(circle at 60% 40%, rgb(217 200 238 / .8), rgb(217 200 238 / .1) 65%, transparent 75%); }
/* Moon and stars live only in empty sky above the hero copy and in the side gutters, so they never
   sit under hero text at any width (square boxes: the drawn shape matches the positioned box). */
.moon { position: absolute; width: 40px; right: calc(var(--gutter) + 4px); top: 0; color: var(--apricot-300); }
.moon, .star { height: auto; aspect-ratio: 1; }
.star { position: absolute; width: 10px; color: var(--berry-600); opacity: .45; }
.star.s1 { left: calc(var(--gutter) / 2 - 5px); top: 34%; }
.star.s2 { left: 46%; top: 14px; width: 9px; opacity: .3; }
.star.s3 { right: calc(var(--gutter) + 64px); top: 8px; width: 14px; color: var(--coral-500); opacity: .55; }
.star.s4 { right: calc(var(--gutter) / 2 - 5px); bottom: 26%; opacity: .3; }
.hero-path { position: absolute; left: -2%; right: -2%; bottom: 18px; height: 90px; color: var(--plum-700); opacity: .16; }

.hero-grid { display: grid; gap: var(--s-6); align-items: start; }
.hero-copy { padding-top: var(--s-2); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-5); padding: 0; font-size: var(--fs-small); color: var(--ink-muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: var(--s-2); color: var(--apricot-300); font-weight: 700; }
.breadcrumbs a { color: var(--ink-muted); }
/* 44px tap target: padding enlarges the hit area, equal negative margins keep the visual layout unchanged */
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 6px; margin: -12px -6px; border-radius: 10px; position: relative; z-index: 1; }
.hero h1 { max-width: 13ch; margin-bottom: var(--s-4); }
.hero h1 .accent {
  font-style: italic; font-weight: 500; color: var(--berry-600);
  background: var(--grad-cta); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .lead { max-width: 34ch; }
.trust-row { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); padding: 0; margin: var(--s-5) 0 0; }
.trust-row li {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-small); font-weight: 600; color: var(--plum-900);
  background: rgb(255 255 255 / .7); border: 1px solid rgb(107 45 92 / .08);
  padding: 6px 14px 6px 8px; border-radius: var(--r-pill);
}
.trust-row svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--sage-50); color: var(--sage-600); }

@media (min-width: 1024px) {
  .hero { padding-block: var(--s-7) var(--s-9); }
  .hero-grid { grid-template-columns: 1fr minmax(400px, 500px); gap: var(--s-7); }
  .hero-copy { padding-top: var(--s-7); }
  .blob-1 { width: 640px; height: 640px; right: -200px; top: -220px; }
  .moon { right: auto; left: 30%; top: 16px; width: 52px; }
}
@media (min-width: 1280px) {
  .hero-grid { grid-template-columns: 1fr minmax(440px, 560px); gap: var(--s-8); }
  .moon { left: 40%; top: 14px; width: 64px; }
}

/* ---------- 6. Calculator card ---------- */
.calc-card {
  position: relative;
  background: var(--white);
  border-radius: var(--r-hero);
  /* layered warm glow (box-shadow keeps the card surface pure white) */
  box-shadow: var(--shadow-lg), -24px -16px 64px -28px rgb(247 185 148 / .9), 24px 24px 72px -30px rgb(217 200 238 / 1), 0 0 0 6px rgb(255 255 255 / .45);
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid rgb(107 45 92 / .06);
}
.calc-card h2 { font-size: clamp(1.375rem, 1.25rem + .5vw, 1.625rem); margin-bottom: var(--s-2); }
.calc-card .calc-sub { color: var(--ink-muted); font-size: var(--fs-small); margin-bottom: var(--s-5); }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }

/* Method switcher — radio group styled as segmented pills */
.methods legend { font-weight: 700; font-size: var(--fs-small); margin-bottom: var(--s-3); }
.method-options {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  background: var(--cream-50); border: 1px solid rgb(107 45 92 / .08);
  border-radius: 18px; padding: 4px;
}
.method-options input { position: absolute; opacity: 0; pointer-events: none; }
.method-options label {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 60px; padding: var(--s-2); border-radius: 14px; cursor: pointer; text-align: center;
  font-size: var(--fs-small); font-weight: 600; line-height: 1.2; color: var(--ink-muted);
  transition: color var(--dur-base) var(--ease-out);
}
.method-options label svg { width: 22px; height: 22px; transition: transform var(--dur-slow) var(--ease-spring); }
.method-options label small { font-weight: 500; font-size: .75rem; color: inherit; opacity: .85; }
.method-options input:checked + label { color: var(--plum-900); }
.method-options input:checked + label svg { transform: scale(1.12); color: var(--berry-600); }
.method-options input:focus-visible + label { outline: 2px solid var(--plum-700); outline-offset: 2px; }
.method-options label:hover { color: var(--plum-900); }
.method-thumb { /* sliding highlight, positioned by JS via --i */
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 16px) / 3);
  border-radius: 14px; background: var(--white); box-shadow: var(--shadow-md);
  transform: translateX(calc(var(--i, 0) * (100% + 4px)));
  transition: transform var(--dur-slow) var(--ease-spring);
}
.no-thumb .method-options input:checked + label { background: var(--white); box-shadow: var(--shadow-md); }

.method-panel { margin-top: var(--s-5); }
.method-panel.is-entering { animation: panel-in var(--dur-slow) var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }

/* Fields */
.field { margin-bottom: var(--s-5); }
.field-label { display: block; font-weight: 700; margin-bottom: 6px; }
.field-hint { display: block; font-size: var(--fs-small); color: var(--ink-muted); margin: -2px 0 var(--s-2); }
.field-error {
  display: flex; align-items: flex-start; gap: 6px;
  color: var(--error-700); font-size: var(--fs-small); font-weight: 600; margin-top: var(--s-2);
}
.field-error svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.field-error[hidden] { display: none; }

.input-wrap { position: relative; }
.input {
  width: 100%; min-height: 56px;
  font: inherit; font-weight: 600; color: var(--plum-900);
  background: var(--cream-50);
  border: 1.5px solid rgb(107 45 92 / .2);
  border-radius: var(--r-input);
  padding: 0 var(--s-4);
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  appearance: none; -webkit-appearance: none;
}
.input::-webkit-date-and-time-value { text-align: left; }
.input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .6; padding: 6px; border-radius: 8px; }
.input:hover { border-color: rgb(107 45 92 / .38); }
.input:focus { outline: none; border-color: var(--plum-700); background: var(--white); box-shadow: 0 0 0 4px rgb(163 65 110 / .14); }
.input:focus-visible { outline: none; }
.input[aria-invalid="true"] { border-color: var(--error-700); background: #FFF6F5; }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgb(179 38 30 / .14); }
/* focus underline that grows from the center */
.input-wrap::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--grad-cta); transform: scaleX(0); transition: transform var(--dur-slow) var(--ease-out);
}
.input-wrap:focus-within::after { transform: scaleX(1); }
.field:focus-within .field-label { color: var(--plum-700); }


/* Choice cards (embryo age) */
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.choice-row input { position: absolute; opacity: 0; pointer-events: none; }
.choice-row label {
  display: flex; flex-direction: column; gap: 2px; padding: var(--s-3) var(--s-4); min-height: 56px; justify-content: center;
  border: 1.5px solid rgb(107 45 92 / .2); border-radius: var(--r-input); cursor: pointer; background: var(--cream-50);
  font-weight: 700; transition: border-color var(--dur-base), background var(--dur-base), box-shadow var(--dur-base);
}
.choice-row label small { font-weight: 500; color: var(--ink-muted); font-size: var(--fs-xs); }
.choice-row input:checked + label { border-color: var(--plum-700); background: var(--white); box-shadow: 0 0 0 3px rgb(163 65 110 / .12); }
.choice-row input:focus-visible + label { outline: 2px solid var(--plum-700); outline-offset: 2px; }

/* Error summary */
.error-summary {
  border: 2px solid var(--error-700); background: #FFF6F5; border-radius: 18px;
  padding: var(--s-4) var(--s-5); margin-bottom: var(--s-5);
}
.error-summary:focus { outline: 3px solid rgb(179 38 30 / .3); outline-offset: 2px; }
.error-summary h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 800; color: var(--error-700); margin-bottom: var(--s-2); }
.error-summary ul { margin: 0; padding-left: 1.1em; }
.error-summary a { color: var(--error-700); font-weight: 600; }
.error-summary[hidden] { display: none; }

.privacy-note {
  display: flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-size: var(--fs-small); color: var(--ink-muted); margin: var(--s-4) 0 0; text-align: center;
}
.privacy-note svg { width: 16px; height: 16px; color: var(--sage-600); flex: none; }

/* ---------- 7. Buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 52px; padding: 0 var(--s-6);
  font: inherit; font-weight: 700; letter-spacing: .005em; text-decoration: none;
  border-radius: var(--r-pill); border: 0; cursor: pointer;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background-position var(--dur-slow) var(--ease-out), color var(--dur-fast);
}
.btn svg { width: 20px; height: 20px; transition: transform var(--dur-base) var(--ease-out); }
.btn-primary {
  color: var(--white);
  background: linear-gradient(120deg, var(--plum-700) 0%, var(--berry-600) 50%, var(--plum-700) 100%);
  background-size: 200% 100%; background-position: 0% 0;
  box-shadow: 0 10px 24px -10px rgb(107 45 92 / .6);
}
.btn-primary:hover { color: var(--white); background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgb(107 45 92 / .65); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-primary::after { /* sheen */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .28) 50%, transparent 65%);
  transform: translateX(-120%);
}
.btn-primary:hover::after { transition: transform 900ms var(--ease-out); transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-block { width: 100%; }
.btn-secondary { color: var(--plum-700); background: var(--white); box-shadow: inset 0 0 0 1.5px rgb(107 45 92 / .3); }
.btn-secondary:hover { color: var(--plum-700); box-shadow: inset 0 0 0 1.5px var(--plum-700), var(--shadow-sm); transform: translateY(-1px); }
.btn-tertiary { color: var(--plum-700); background: none; padding-inline: var(--s-3); min-height: 44px; text-decoration: underline; text-underline-offset: .2em; }
.btn-tertiary:hover { color: var(--berry-600); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sm { min-height: 44px; padding: 0 var(--s-5); font-size: var(--fs-small); }

/* ---------- 8. Result panel ---------- */
.result { padding-block: var(--s-7) var(--s-8); background: linear-gradient(180deg, var(--cream-50), #FFF4EC 50%, var(--cream-50)); }
.result[hidden] { display: none; }
.result-card {
  position: relative; overflow: hidden;
  background: var(--white); border-radius: var(--r-hero); box-shadow: var(--shadow-lg);
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid rgb(107 45 92 / .06);
}
.result-card::before { /* dawn wash in the corner */
  content: ""; position: absolute; width: 520px; height: 520px; right: -220px; top: -260px; border-radius: 50%;
  background: radial-gradient(circle, rgb(247 185 148 / .45), transparent 65%); pointer-events: none;
}
.result-head { position: relative; text-align: center; max-width: 640px; margin: 0 auto var(--s-6); }
.result-head h2 { font-family: var(--font-body); font-size: var(--fs-small); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--berry-600); margin-bottom: var(--s-3); }
.result-head h2:focus { outline: none; }
.result-head h2:focus-visible { outline: 2px solid var(--plum-700); outline-offset: 4px; }
.edd {
  font-family: var(--font-display); font-size: var(--fs-display); font-weight: 600; line-height: 1.02; letter-spacing: -.02em;
  margin: 0 0 var(--s-2); color: var(--plum-900);
}
.edd .w { display: inline-block; }
.edd-weekday { font-size: 1.125rem; color: var(--ink-muted); font-weight: 600; margin-bottom: var(--s-4); }
.estimate-pill {
  display: inline-flex; align-items: center; gap: var(--s-2); max-width: 100%;
  font-size: var(--fs-small); font-weight: 600; color: var(--plum-700);
  background: var(--lavender-100); border-radius: var(--r-pill); padding: 8px 16px; text-align: left;
}
.estimate-pill svg { width: 18px; height: 18px; flex: none; }
.estimate-pill sup a, .cite { font-size: .75em; font-weight: 700; text-decoration: none; }
.passed-note { margin-top: var(--s-4); text-align: left; }

/* Stat chips */
.chips { list-style: none; padding: 0; margin: 0 0 var(--s-6); display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
.chip {
  display: flex; align-items: center; gap: var(--s-4);
  background: var(--cream-50); border: 1px solid rgb(107 45 92 / .08); border-radius: 20px;
  padding: var(--s-4) var(--s-5);
}
.chip-icon { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; }
.chip-icon svg { width: 22px; height: 22px; }
.chip:nth-child(1) .chip-icon { background: var(--peach-100); color: var(--berry-600); }
.chip:nth-child(2) .chip-icon { background: var(--lavender-100); color: var(--plum-700); }
.chip:nth-child(3) .chip-icon { background: var(--sage-50); color: var(--sage-600); }
.chip-value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.chip-value small { font-size: .6em; font-weight: 600; color: var(--ink-muted); margin-left: 2px; }
.chip-label { font-size: var(--fs-small); color: var(--ink-muted); font-weight: 600; }
@media (min-width: 768px) { .chips { grid-template-columns: repeat(3, 1fr); } }

/* Week path */
.journey { margin-bottom: var(--s-7); }
.journey-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-2); }
.journey-head h3 { margin: 0; font-size: 1.25rem; }
.journey-head p { margin: 0; font-size: var(--fs-small); color: var(--ink-muted); }
.week-path { width: 100%; height: auto; overflow: visible; }
.week-path .track { fill: none; stroke: rgb(107 45 92 / .12); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.week-path .dot { fill: var(--white); stroke: rgb(107 45 92 / .22); stroke-width: 1.5;
  transition: fill var(--dur-slow) var(--ease-out), stroke var(--dur-slow) var(--ease-out);
  transition-delay: calc(var(--d, 0) * 18ms); }
.week-path .dot.term { stroke: var(--sage-500); stroke-width: 2; }
.week-path .dot.done { fill: url(#dot-grad); stroke: transparent; }
.week-path .now-ring { fill: none; stroke: var(--berry-600); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; animation: pulse 2.4s var(--ease-out) 1.2s 3; }
.week-path .now-dot { fill: var(--berry-600); stroke: var(--white); stroke-width: 3; }
.week-path .lbl { font: 600 13px var(--font-body); fill: var(--ink-muted); }
.week-path .lbl-now { font: 700 14px var(--font-body); fill: var(--plum-900); }
@keyframes pulse { 0% { transform: scale(.8); opacity: .6; } 70%, 100% { transform: scale(1.9); opacity: 0; } }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); padding: 0; margin: var(--s-3) 0 0; font-size: var(--fs-small); color: var(--ink-muted); }
.legend li { display: inline-flex; align-items: center; gap: var(--s-2); }
.legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.legend .l-done { background: linear-gradient(135deg, var(--coral-500), var(--berry-600)); }
.legend .l-term { border: 2px solid var(--sage-500); }
.legend .l-ahead { border: 1.5px solid rgb(107 45 92 / .3); }

/* Timeline */
.timeline-block h3 { font-size: 1.25rem; margin-bottom: var(--s-2); }
.timeline-block > p { color: var(--ink-muted); font-size: var(--fs-small); max-width: 60ch; }
.timeline { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: grid; gap: var(--s-3); counter-reset: t; }
.tl-item {
  position: relative; display: grid; grid-template-columns: 14px 1fr; gap: var(--s-4); align-items: start;
  padding: var(--s-4) var(--s-5); border-radius: 18px; background: var(--cream-50); border: 1px solid rgb(107 45 92 / .07);
}
.tl-item::before { content: ""; width: 14px; height: 14px; margin-top: 6px; border-radius: 50%; background: var(--c, var(--apricot-300)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--apricot-300)) 22%, transparent); }
.tl-item:nth-child(1) { --c: var(--apricot-300); }
.tl-item:nth-child(2) { --c: var(--sage-500); background: var(--sage-50); border-color: rgb(94 138 107 / .25); }
.tl-item:nth-child(3) { --c: var(--lavender-300); }
.tl-item:nth-child(4) { --c: var(--berry-600); }
.tl-title { font-weight: 800; display: block; }
.tl-ga { font-size: var(--fs-small); color: var(--ink-muted); font-weight: 600; }
.tl-dates { display: block; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--plum-700); margin-top: 2px; }
.tl-item:nth-child(2) .tl-dates { color: var(--sage-600); }
.tl-badge { display: inline-block; margin-left: var(--s-2); font-size: var(--fs-xs); font-weight: 700; color: var(--sage-600); background: var(--white); border-radius: var(--r-pill); padding: 2px 10px; vertical-align: 2px; }
@media (min-width: 768px) {
  .timeline { grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
  .timeline::before { content: ""; position: absolute; left: 7%; right: 7%; top: 28px; height: 2px; background: linear-gradient(90deg, var(--apricot-300), var(--sage-500), var(--lavender-300), var(--berry-600)); border-radius: 2px; transform-origin: left; }
  .tl-item { grid-template-columns: 1fr; text-align: center; justify-items: center; background: none; border: 0; padding: var(--s-4) var(--s-3); }
  .tl-item:nth-child(2) { background: var(--sage-50); }
  .tl-item::before { position: relative; z-index: 1; margin-top: 7px; }
}

.result-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; margin-top: var(--s-7); }
.result-disclaimer { margin: var(--s-5) auto 0; max-width: 62ch; text-align: center; font-size: var(--fs-small); color: var(--ink-muted); }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 20px); opacity: 0;
  background: var(--plum-900); color: var(--white); font-weight: 600; font-size: var(--fs-small);
  padding: 12px 20px; border-radius: var(--r-pill); box-shadow: var(--shadow-lg); pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Result reveal choreography */
.result.is-revealing .result-card { animation: card-in 650ms var(--ease-out) both; }
.result.is-revealing .result-head h2 { animation: rise 500ms var(--ease-out) 120ms both; }
.result.is-revealing .edd .w { animation: rise 600ms var(--ease-out) both; animation-delay: calc(220ms + var(--w) * 90ms); }
.result.is-revealing .edd-weekday, .result.is-revealing .estimate-pill { animation: rise 500ms var(--ease-out) 520ms both; }
.result.is-revealing .chip { animation: rise 500ms var(--ease-out) both; animation-delay: calc(600ms + var(--n) * 90ms); }
.result.is-revealing .journey, .result.is-revealing .timeline-block { animation: rise 600ms var(--ease-out) 820ms both; }
.result.is-revealing .timeline::before { animation: draw 900ms var(--ease-out) 1000ms both; }
@keyframes card-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes draw { from { transform: scaleX(0); } }

/* ---------- 9. Content sections ---------- */
.method-cards { display: grid; gap: var(--s-4); }
@media (min-width: 768px) { .method-cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; background: var(--white); border-radius: var(--r-card); padding: var(--s-6);
  border: 1px solid rgb(107 45 92 / .07); box-shadow: var(--shadow-sm);
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}
.card h3 { font-size: 1.3125rem; margin-bottom: var(--s-2); }
.card p { color: var(--ink-muted); font-size: var(--fs-small); }
.card-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; margin-bottom: var(--s-4); background: var(--peach-100); color: var(--berry-600); }
.card-icon svg { width: 24px; height: 24px; }
.formula {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--plum-900);
  background: var(--cream-50); border-radius: 14px; padding: var(--s-3) var(--s-4); margin: var(--s-4) 0 var(--s-3);
  border: 1px dashed rgb(107 45 92 / .2);
}

.callout { display: flex; gap: var(--s-4); border-radius: 20px; padding: var(--s-5); font-size: var(--fs-small); }
.callout svg { width: 24px; height: 24px; flex: none; }
.callout p { margin: 0; }
.callout strong { display: block; margin-bottom: 2px; font-size: var(--fs-body); }
.callout-note { background: var(--lavender-100); color: var(--plum-900); }
.callout-note svg { color: var(--plum-700); }
.callout-caution { background: var(--amber-50); color: var(--plum-900); }
.callout-caution svg { color: var(--amber-700); }
.callout-privacy { background: var(--sage-50); color: var(--plum-900); }
.callout-privacy svg { color: var(--sage-600); }

/* FAQ */
.faq-wrap { display: grid; gap: var(--s-6); }
@media (min-width: 1024px) {
  .faq-wrap { grid-template-columns: 1fr 1.6fr; gap: var(--s-8); }
  .faq-wrap > .section-head { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
}
.faq-list { display: grid; gap: var(--s-3); }
.faq-item { background: var(--white); border-radius: 20px; border: 1px solid rgb(107 45 92 / .08); box-shadow: var(--shadow-sm); transition: box-shadow var(--dur-base) var(--ease-out); }
.faq-item[open] { box-shadow: var(--shadow-md); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-5); min-height: 64px; font-weight: 700; font-size: 1.0625rem; border-radius: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--plum-700); }
.faq-icon { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--peach-100); position: relative; transition: transform var(--dur-slow) var(--ease-spring), background var(--dur-base); }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--berry-600); border-radius: 2px; }
.faq-icon::after { transform: rotate(90deg); transition: transform var(--dur-base) var(--ease-out); }
.faq-item[open] .faq-icon { transform: rotate(180deg); background: var(--lavender-100); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }
.faq-answer { padding: 0 var(--s-5) var(--s-5); color: var(--ink-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-item::details-content { block-size: 0; overflow: hidden; transition: block-size var(--dur-slow) var(--ease-out), content-visibility var(--dur-slow) allow-discrete; }
.faq-item[open]::details-content { block-size: auto; }

/* Guide cards */
.guides { background: linear-gradient(180deg, var(--cream-50), var(--peach-100) 60%, var(--cream-50)); }
.guide-grid { display: grid; gap: var(--s-4); }
@media (min-width: 768px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .guide-grid { grid-template-columns: repeat(4, 1fr); } }
.guide-card {
  position: relative; display: flex; flex-direction: column; gap: var(--s-2); min-height: 220px;
  background: var(--white); border-radius: var(--r-card); padding: var(--s-6);
  color: var(--plum-900); text-decoration: none; overflow: hidden;
  border: 1px solid rgb(107 45 92 / .07); box-shadow: var(--shadow-sm);
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}
.guide-card::before { content: ""; position: absolute; width: 180px; height: 180px; right: -70px; top: -70px; border-radius: 50%; background: var(--wash, var(--peach-100)); transition: transform var(--dur-reveal) var(--ease-out); }
.guide-card:nth-child(2) { --wash: var(--lavender-100); }
.guide-card:nth-child(3) { --wash: var(--sage-50); }
.guide-card:nth-child(4) { --wash: var(--amber-50); }
.guide-card > * { position: relative; }
.guide-card:hover { color: var(--plum-900); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.guide-card:hover::before { transform: scale(1.35); }
.guide-kind { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--berry-600); }
.guide-card h3 { font-size: 1.3125rem; margin: 0; }
.guide-card p { font-size: var(--fs-small); color: var(--ink-muted); margin: 0; }
.guide-go { margin-top: auto; padding-top: var(--s-4); display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; font-size: var(--fs-small); color: var(--plum-700); }
.guide-go svg { width: 18px; height: 18px; transition: transform var(--dur-base) var(--ease-out); }
.guide-card:hover .guide-go svg { transform: translateX(4px); }
.guide-card:focus-visible { outline-offset: 4px; border-radius: var(--r-card); }

/* Sources */
.sources { font-size: var(--fs-small); color: var(--ink-muted); }
.sources ol { padding-left: 1.25em; display: grid; gap: var(--s-2); }
.review-stamp { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-small); color: var(--ink-muted); background: var(--white); border: 1px solid rgb(107 45 92 / .08); border-radius: var(--r-pill); padding: 6px 14px; margin-top: var(--s-4); }
.review-stamp svg { width: 16px; height: 16px; color: var(--sage-600); }

/* ---------- 11. Footer ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--plum-900); color: #EADBE5; padding-block: var(--s-8) var(--s-6); }
.site-footer::before { content: ""; position: absolute; width: 600px; height: 600px; left: -240px; bottom: -380px; border-radius: 50%; background: radial-gradient(circle, rgb(163 65 110 / .45), transparent 65%); }
.site-footer > .container { position: relative; }
.footer-grid { display: grid; gap: var(--s-6); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.site-footer .brand { color: var(--white); }
.site-footer .brand-word em { -webkit-text-fill-color: currentColor; background: none; color: var(--apricot-300); }
.footer-about { font-size: var(--fs-small); color: #D4C1CE; max-width: 32ch; margin-top: var(--s-4); }
.footer-col h2 { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--apricot-300); margin-bottom: var(--s-3); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.footer-col a { display: inline-flex; align-items: center; min-height: 40px; color: #F5E9F1; text-decoration: none; font-size: var(--fs-small); }
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--apricot-300); }
.footer-bottom { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid rgb(255 255 255 / .12); display: grid; gap: var(--s-3); font-size: var(--fs-xs); color: #C9B4C2; }
@media (min-width: 768px) { .footer-bottom { grid-template-columns: 1fr auto; } }

/* ---------- 12. Hero entrance & ambient motion ---------- */
/* The H1 (LCP) is never hidden; only decorative/secondary elements animate in. */
.hero .blob, .hero .moon, .hero .star { animation: fade-drift-in 1200ms var(--ease-out) both; }
/* Hero text (possible LCP candidates on mobile) never starts hidden. The card
   rises with transform only, so it is painted and usable from the first frame. */
.calc-card { animation: card-rise 900ms var(--ease-out) both; }
@keyframes fade-drift-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes card-rise { from { transform: translateY(18px); } }

/* Ambient loops animate only HTML-level elements (composited transform/opacity —
   never SVG children, which would repaint every frame). Entrance uses `transform`;
   loops use the independent `translate`/`rotate`/`scale` properties so both can run. */
.ambient .moon { animation: fade-drift-in 1200ms var(--ease-out) 150ms both, float 12s ease-in-out 1.4s infinite; }
.ambient .star { animation: fade-drift-in 1200ms var(--ease-out) 300ms both, twinkle 6s ease-in-out 1.5s infinite; }
.ambient .star.s2 { animation-delay: 320ms, -2s; }
.ambient .star.s3 { animation-delay: 390ms, -4s; animation-duration: 1200ms, 8s; }
.ambient .blob-1 { animation: fade-drift-in 1200ms var(--ease-out) both, drift-a 18s ease-in-out 1.2s infinite alternate; }
.ambient .blob-2 { animation: fade-drift-in 1200ms var(--ease-out) both, drift-b 22s ease-in-out 1.2s infinite alternate; }
.blob, .moon, .star { will-change: transform, opacity; }
.hero.is-offscreen, .hero.is-offscreen * { animation-play-state: paused !important; }
@keyframes float { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -10px; rotate: -4deg; } }
@keyframes twinkle { 0%, 100% { scale: 1; rotate: 0deg; } 50% { scale: .75; rotate: 20deg; } }
@keyframes drift-a { to { translate: -30px 24px; scale: 1.06; } }
@keyframes drift-b { to { translate: 24px -20px; scale: 1.04; } }

/* Hero week path: dots light up once in sequence on load, then rest */
.hero-path circle { opacity: .5; animation: dot-glow 900ms ease-out both; animation-delay: calc(400ms + var(--d) * 45ms); }
@keyframes dot-glow { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: .5; } }

/* Scroll reveal (only when JS is present; content is visible without JS) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); transition-delay: calc(var(--n, 0) * 80ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 13. Production additions (Step 3) ---------- */
.method-note { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-small); color: var(--plum-900);
  background: var(--lavender-100); border-radius: 16px; padding: var(--s-3) var(--s-4); margin: calc(-1 * var(--s-2)) 0 var(--s-5); }
.method-note svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--plum-700); }
.method-note p { margin: 0; }
.noscript-note { margin-top: var(--s-4); }
.chip-text { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.result-notes { display: grid; gap: var(--s-3); margin: 0 0 var(--s-6); }
.conception-note .note-date { display: block; font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; margin: 2px 0 4px; }
.estimate-tag { display: inline-block; white-space: nowrap; margin: 4px 0 0; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; color: var(--plum-700);
  background: var(--white); border: 1px solid rgb(107 45 92 / .2); border-radius: var(--r-pill); padding: 2px 10px; }
#result-title, #calculator, .faq-item { scroll-margin-top: calc(var(--header-h) + 24px); }
.chip-value > [aria-hidden="true"] { white-space: nowrap; }
/* 44px minimum interactive targets (WCAG 2.2 AA+, approved spec) */
.btn-sm { min-height: 46px; }
.brand { min-height: 44px; }
.footer-col a { min-height: 44px; }
.week-path { display: block; width: 100%; height: auto; }
@media (max-width: 479.98px) {
  .result-card { padding: 24px 16px; border-radius: var(--r-card); }
  .result .container { width: min(100% - 24px, var(--container)); }
  .callout { padding: var(--s-4); gap: var(--s-3); }
  .chip { padding: var(--s-3) var(--s-4); gap: var(--s-3); }
  .chip-icon { width: 36px; height: 36px; border-radius: 12px; }
  .chip-value { font-size: 1.375rem; }
  .estimate-pill { border-radius: 20px; padding: 10px 14px; }
}
.result-head .callout { text-align: left; }
.prose h3 { margin-top: var(--s-6); }
.prose ul { padding-left: 1.2em; display: grid; gap: var(--s-2); }
.research { background: linear-gradient(180deg, var(--cream-50), var(--peach-100) 70%, var(--cream-50)); }
.research-grid { display: grid; gap: var(--s-4); margin-top: var(--s-5); }
@media (min-width: 768px) { .research-grid { grid-template-columns: repeat(3, 1fr); } }
.fact { background: var(--white); border-radius: var(--r-card); padding: var(--s-6); border: 1px solid rgb(107 45 92 / .07); box-shadow: var(--shadow-sm); }
.fact-value { display: block; font-family: var(--font-display); font-size: clamp(2rem, 1.6rem + 1.4vw, 2.625rem); font-weight: 600; line-height: 1.05; color: var(--berry-600); margin-bottom: var(--s-2); }
.fact p { margin: 0; font-size: var(--fs-small); color: var(--ink-muted); }
.fact-note { margin-top: var(--s-5); font-size: var(--fs-small); color: var(--ink-muted); max-width: 70ch; }
.meaning-list { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: grid; gap: var(--s-3); }
.meaning-list li { display: grid; grid-template-columns: 28px 1fr; gap: var(--s-3); align-items: start; }
.meaning-list svg { width: 28px; height: 28px; padding: 6px; border-radius: 50%; background: var(--sage-50); color: var(--sage-600); }
.sources-section { padding-block: var(--s-7) var(--s-8); }
.sources-section h2 { font-size: 1.375rem; }
.sources-section ol { padding-left: 1.4em; display: grid; gap: var(--s-3); margin: 0; }
.sources-section li { font-size: var(--fs-small); color: var(--ink-muted); padding-left: var(--s-1); }
.sources-section li:target { background: var(--peach-100); border-radius: 8px; outline: 2px solid var(--apricot-300); outline-offset: 4px; }
.sources-section cite { font-style: normal; color: var(--plum-900); font-weight: 600; }
.sources-section a { overflow-wrap: anywhere; }
.site-footer .footer-note { font-size: var(--fs-small); color: #D4C1CE; margin: 0; max-width: 60ch; }
.breadcrumbs [aria-current="page"] { color: var(--plum-900); }
.journey-head p strong { color: var(--plum-900); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.card-icon-lavender { background: var(--lavender-100); color: var(--plum-700); }
.card-icon-sage { background: var(--sage-50); color: var(--sage-600); }
.how .prose { margin-top: var(--s-6); }
.how .callout { margin-top: var(--s-5); }
#method-line { margin: var(--s-3) 0 0; }
@media (min-width: 768px) { .method-cards-2 { grid-template-columns: repeat(2, 1fr); } }
.method-options-2 { grid-template-columns: repeat(2, 1fr); }
.method-options-2 .method-thumb { width: calc((100% - 12px) / 2); }
.result-actions a.btn { text-decoration: underline; text-underline-offset: .2em; }
.d-0 { --n: 0; } .d-1 { --n: 1; } .d-2 { --n: 2; } .d-3 { --n: 3; } .d-4 { --n: 4; } .d-5 { --n: 5; } .d-6 { --n: 6; }

/* ---------- 13b. Step 6: navigation group, content pages ---------- */
/* Calculators disclosure group (native <details>: keyboard and screen-reader friendly) */
.nav-group details > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  padding: var(--s-3) var(--s-4); min-height: 48px; border-radius: 14px; font-weight: 600; color: var(--plum-900);
  transition: background var(--dur-fast) var(--ease-out);
}
.nav-group details > summary::-webkit-details-marker { display: none; }
.nav-group details > summary::after {
  content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform var(--dur-base) var(--ease-out);
}
.nav-group details[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.nav-group details > summary:hover { background: var(--peach-100); }
.nav-group-current > details > summary { background: var(--white); box-shadow: var(--shadow-sm); }
.nav-sub { list-style: none; margin: 0; padding: 0 0 var(--s-2) var(--s-4); display: grid; gap: 2px; }
@media (min-width: 1200px) {
  .nav-group { position: relative; }
  .nav-group details > summary { min-height: 44px; padding: 0 var(--s-4); font-size: var(--fs-small); border-radius: var(--r-pill); }
  .nav-sub {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 270px; padding: var(--s-2);
    background: var(--white); border: 1px solid rgb(107 45 92 / .08); border-radius: 18px; box-shadow: var(--shadow-lg);
  }
  .nav-sub a { border-radius: 12px; }
}
/* Without JavaScript the menu button can't toggle, so the navigation is shown inline. */
html:not(.js) .nav-toggle { display: none; }
html:not(.js) .header-inner { flex-wrap: wrap; padding-block: var(--s-2); }
html:not(.js) .site-nav { position: static; display: block; width: 100%; padding: 0; box-shadow: none; border: 0; background: none; }

/* Hero eyebrows sit over the apricot dawn blob: berry measured ~3.9:1 there (below 4.5:1 for small text), plum passes */
.hero .eyebrow { color: var(--plum-700); }

/* Content-page hero (no calculator) */
.hero-simple { padding-block: var(--s-6) var(--s-7); }
.hero-simple .hero-grid { grid-template-columns: 1fr; }
.hero-simple .hero-copy { padding-top: var(--s-2); max-width: 780px; }
.hero-simple h1 { max-width: 22ch; }
/* Content heroes have a shallow sky band; on wide screens the moon sits right of the copy (max 780px) */
@media (min-width: 1024px) { .hero-simple .moon { left: auto; right: 12%; top: 24px; } }
.hero-simple .lead { max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.hero-actions .btn-secondary { background: rgb(255 255 255 / .85); }
.article-meta { font-size: var(--fs-small); color: var(--ink-muted); margin: var(--s-4) 0 0; }

/* Article / long-form body */
.article-body { padding-block: var(--s-7) var(--s-8); }
.article-body .prose > h2 { font-size: var(--fs-h2); margin-top: var(--s-8); }
.article-body .prose > h2:first-child { margin-top: 0; }
.article-body .prose > h3 { margin-top: var(--s-6); }
.article-body .prose p, .article-body .prose li { color: var(--plum-900); }
.article-body .prose ul, .article-body .prose ol { padding-left: 1.3em; display: grid; gap: var(--s-2); margin: 0 0 var(--s-4); }
.article-body .callout { margin: var(--s-6) 0; }
.cta-box { display: grid; gap: var(--s-3); justify-items: start; background: var(--white); border-radius: var(--r-card);
  border: 1px solid rgb(107 45 92 / .08); box-shadow: var(--shadow-md); padding: var(--s-6); margin: var(--s-7) 0 0; }
.cta-box h2 { font-size: 1.375rem; margin: 0; }
.cta-box p { margin: 0; color: var(--ink-muted); }
.table-wrap { overflow-x: auto; margin: var(--s-5) 0; border-radius: 18px; border: 1px solid rgb(107 45 92 / .1); background: var(--white); }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.data-table caption { text-align: left; font-weight: 700; padding: var(--s-4) var(--s-4) var(--s-2); }
.data-table th, .data-table td { text-align: left; padding: var(--s-3) var(--s-4); border-top: 1px solid rgb(107 45 92 / .08); vertical-align: top; }
.data-table thead th { color: var(--ink-muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; }

/* Home + blog index cards */
.tool-grid { display: grid; gap: var(--s-4); }
@media (min-width: 768px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
.tool-grid .guide-card { min-height: 0; }
.trust-grid { display: grid; gap: var(--s-4); }
@media (min-width: 768px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.article-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-4); }
@media (min-width: 768px) { .article-list { grid-template-columns: repeat(2, 1fr); } }
.article-list .guide-card { min-height: 0; height: 100%; }
/* Blog index: the article's photo sits at the top of its card, edge to edge, in a fixed 16:9 box
   (a centred crop of the 3:2 file) so every card's image is the same height and the title leads */
.article-card .guide-media { display: block; width: calc(100% + 2 * var(--s-6)); max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  margin: calc(-1 * var(--s-6)) calc(-1 * var(--s-6)) var(--s-3); background: var(--peach-100); }
.not-found-links { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: grid; gap: var(--s-3); max-width: 520px; }
.not-found-links a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 var(--s-5);
  background: var(--white); border-radius: 16px; border: 1px solid rgb(107 45 92 / .08); box-shadow: var(--shadow-sm); font-weight: 600; text-decoration: none; }
.not-found-links a:hover { box-shadow: var(--shadow-md); }
/* Article photo (3:2, explicit size, no layout shift), contents list and sourcing note */
.article-figure { margin: 0 0 var(--s-6); }
.article-figure img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--r-card); background: var(--peach-100); box-shadow: var(--shadow-md); }
.article-figure figcaption { margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--ink-muted); }
.article-figure figcaption a { color: inherit; }
.toc { background: var(--white); border: 1px solid rgb(107 45 92 / .08); border-radius: 18px; padding: var(--s-4) var(--s-5); margin: 0 0 var(--s-7); }
.toc-title { font-weight: 800; font-size: var(--fs-small); text-transform: uppercase; letter-spacing: .08em; color: var(--plum-700); margin: 0 0 var(--s-2); }
.article-body .prose .toc ol { margin: 0; gap: 0; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-small); font-weight: 600; }
.article-trust { font-size: var(--fs-small); color: var(--ink-muted); border-top: 1px solid rgb(107 45 92 / .1); padding-top: var(--s-4); margin-top: var(--s-7); }
.article-body .prose .article-trust { color: var(--ink-muted); }

/* Contact page: existing card, field, error and button components; two columns from 1024px */
.contact-grid { display: grid; gap: var(--s-7); align-items: start; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(400px, 520px); gap: var(--s-8); } }
.contact-copy > h2 { font-size: var(--fs-h2); }
.contact-copy ul { padding-left: 1.3em; display: grid; gap: var(--s-2); margin: 0 0 var(--s-5); }
.contact-copy .callout { margin: var(--s-6) 0; }
textarea.input { display: block; min-height: 180px; padding: var(--s-3) var(--s-4); line-height: 1.6; font-weight: 500; resize: vertical; }
.contact-card .btn-block { margin-top: var(--s-2); }
.contact-note { max-width: 640px; margin-bottom: var(--s-5); }
/* Honeypot: off-screen and hidden from assistive technology; people never see or reach it */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

@media print {
  .hero.hero-simple { display: block !important; padding: 0; background: none; }
  .hero-simple .dawn, .hero-actions, .cta-box { display: none !important; }
}

/* ---------- 14. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; transition: none !important; }
  .week-path .now-ring { display: none; }
}

/* ---------- 15. Print: the result card only ---------- */
.print-only { display: none; }
@media print {
  .site-header, .hero, .result-actions, .prose-section, .research, .faq, .related, .site-footer, .toast, .skip-link, .breadcrumbs, .week-path .now-ring { display: none !important; }
  body { background: #fff; color: #000; }
  .result { padding: 0; background: none; }
  .result-card { box-shadow: none; border: 1px solid #bbb; }
  .result-card::before { display: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .print-only { display: block !important; }
}
