/* ==========================================================================
   Haven — haven.study homepage ("The Haven Path" identity)
   Plain CSS, no framework. The page works without JavaScript; the only
   scripts are GA4, the bfcache reload and the optional sale-price fetch.
   Colour values reuse the study app's Tailwind tokens (haven-app/tailwind.config.js)
   so the marketing site and the app share one palette.
   ========================================================================== */

/* Self-hosted fonts (SIL Open Font License) — same families as the study app.
   Latin subset, one variable file per family. */
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/source-sans-3.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 600 700; font-display: swap; src: url('fonts/source-serif-4.woff2') format('woff2'); }

:root {
  /* Surfaces */
  --ivory: #FAF7F2;          /* existing "cream" — page background */
  --paper: #FFFFFF;
  --sage-50: #F4F7F5;        /* existing "app-bg" */
  --sage-100: #E6EFEA;
  --sage-200: #C7DAD1;
  --sage-300: #A7C5B8;

  /* Haven greens */
  --green-500: #5F9D86;      /* path thread, decorative only */
  --green-600: #4E8571;      /* brand green — fills, icons, large text */
  --green-700: #3F6D5D;      /* links + button fills (AA with white) */
  --forest-800: #31574A;
  --forest-900: #244238;     /* deep sections */

  /* Text */
  --charcoal: #17201E;
  --ink-2: #394744;
  --muted: #4F5F5B;          /* 6.3:1 on ivory */

  /* Accents — used sparingly */
  --terracotta: #B65F3F;     /* marks, underlines (UI-level contrast) */
  --terracotta-text: #9C4B30;/* text-safe terracotta, 5.7:1 */
  --gold: #C9973F;           /* decorative only */
  --gold-text: #946A22;      /* text-safe gold, 4.5:1 */
  --gold-light: #E3BE75;     /* gold on forest, 6.2:1 */

  /* Type */
  --font-heading: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.06rem + 0.3vw, 1.25rem);
  --step-2: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem);

  /* Shape + space */
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-soft: 0 1px 2px rgba(23, 32, 30, .04), 0 8px 24px -12px rgba(23, 32, 30, .18);
  --shadow-lift: 0 2px 4px rgba(23, 32, 30, .05), 0 18px 40px -18px rgba(23, 32, 30, .28);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --section: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --wrap: 72rem;

  /* The Haven Path — dotted thread, as a reusable background */
  --thread: radial-gradient(circle, var(--green-500) 1.6px, transparent 2.2px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--ivory); color: var(--charcoal);
  font: 400 var(--step-0)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--green-700); text-underline-offset: .18em; }
a:hover { color: var(--forest-900); }
:focus-visible { outline: 3px solid var(--green-700); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: var(--gold-light); }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: var(--step-4); line-height: 1.06; letter-spacing: -0.02em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font: 600 var(--step--1)/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--green-700); margin: 0 0 1rem; }
.eyebrow::before { content: ""; width: 1.75rem; height: 6px; background: var(--thread) 0 50% / 9px 6px repeat-x; }
.lead { font-size: var(--step-1); color: var(--ink-2); max-width: 38rem; }
.muted { color: var(--muted); }
.center { text-align: center; margin-inline: auto; }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section-head.center .eyebrow { justify-content: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--forest-900); color: #fff; padding: .75rem 1rem; border-radius: var(--radius-sm); }
.skip:focus { top: 1rem; color: #fff; }

/* ── Path underline accent (hand-drawn curve under a key phrase) ───────── */
.path-underline { position: relative; white-space: nowrap; }
.path-underline::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: -.12em; height: .32em; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M3 14C60 4 120 3 170 8s95 6 127-4' fill='none' stroke='%23C9973F' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .8rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  font: 700 var(--step-0)/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--forest-900); color: #fff; }
.btn-secondary { background: transparent; color: var(--forest-900); border-color: var(--sage-300); }
.btn-secondary:hover { border-color: var(--green-700); color: var(--forest-900); background: var(--paper); }
.btn-light { background: #fff; color: var(--forest-900); }
.btn-light:hover { background: var(--sage-100); color: var(--forest-900); }
.btn-gold { background: var(--gold-light); color: var(--forest-900); }
.btn-gold:hover { background: #EED7A8; color: var(--forest-900); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-block { width: 100%; }

/* ── Header (same links + behaviour as the live site) ─────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 247, 242, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid rgba(199, 218, 209, .7); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.logo { display: inline-flex; align-items: center; min-height: 44px; font: 700 1.5rem/1 var(--font-heading); color: var(--charcoal); text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--green-600); }
.site-nav { display: none; gap: .25rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: .55rem .8rem; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { background: var(--sage-100); color: var(--forest-900); }
.site-nav .nav-tools { color: var(--green-700); }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.header-actions .signin { display: none; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.header-actions .btn { min-height: 44px; padding: .6rem 1.1rem; font-size: .95rem; }
@media (min-width: 640px) { .header-actions .signin { display: inline-flex; align-items: center; min-height: 44px; } }
@media (min-width: 960px) { .site-nav { display: flex; } }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding-block: clamp(2.25rem, 1.5rem + 3vw, 5rem) 0; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { max-width: 15ch; }
.hero .lead { margin-bottom: 1.75rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.hero-ctas .btn { flex: 1 1 auto; }
.reassure { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--ink-2); font-size: var(--step--1); font-weight: 600; }
.reassure li { display: inline-flex; align-items: center; gap: .45rem; }
.reassure li::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 3px solid var(--green-600); background: radial-gradient(circle, var(--green-600) 2px, #fff 2.5px); }

.hero-stage { position: relative; min-height: 360px; display: grid; place-items: center; }
.hero-blob { position: absolute; inset: 6% -10% -2% 4%; background: var(--sage-100); border-radius: 46% 54% 42% 58% / 56% 44% 56% 44%; }
.hero-thread { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-thread path { vector-effect: non-scaling-stroke; }
.frame-browser { display: none; }
.frame-phone {
  position: relative; z-index: 2; width: min(270px, 68vw); aspect-ratio: 600 / 1040; overflow: hidden;
  border-radius: 34px; border: 8px solid var(--charcoal); background: var(--charcoal); box-shadow: var(--shadow-lift);
}
.frame-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 26px; }
.hero-note { position: absolute; z-index: 3; left: 0; bottom: 12%; max-width: 13rem; background: #fff; border-radius: var(--radius); padding: .8rem 1rem; box-shadow: var(--shadow-soft); font-size: .85rem; line-height: 1.35; color: var(--ink-2); }
.hero-note strong { display: block; font-family: var(--font-heading); color: var(--charcoal); font-size: 1rem; }
.hero-note::before { content: ""; position: absolute; right: -6px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--green-600); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 8px var(--green-600); }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 3rem; }
  .hero-ctas .btn { flex: 0 0 auto; }
  .hero-stage { min-height: 540px; }
  .frame-browser {
    display: block; position: absolute; z-index: 1; top: 8%; right: -14%; width: 560px; border-radius: 14px; overflow: hidden;
    background: #fff; box-shadow: var(--shadow-lift); border: 1px solid var(--sage-200);
  }
  .frame-browser .bar { display: flex; gap: 6px; padding: 10px 12px; background: var(--sage-50); border-bottom: 1px solid var(--sage-200); }
  .frame-browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--sage-200); }
  .frame-phone { width: 250px; margin-right: 40%; margin-top: 12%; }
  .hero-note { left: auto; right: 2%; bottom: 6%; }
  .hero-note::before { right: auto; left: -8px; }
}

/* Proof strip — real numbers, quiet treatment */
.proof { margin-top: clamp(2rem, 1rem + 3vw, 3.5rem); border-top: 1px solid var(--sage-200); }
.proof ul { list-style: none; margin: 0; padding: 1.25rem 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.proof li { display: flex; flex-direction: column; }
.proof b { font: 600 var(--step-2)/1.1 var(--font-heading); color: var(--forest-900); }
.proof span { font-size: var(--step--1); color: var(--muted); }
@media (min-width: 720px) { .proof ul { grid-template-columns: repeat(4, 1fr); } }

/* ── Curved section transition with the path riding along it ─────────── */
.curve { display: block; width: 100%; height: clamp(40px, 6vw, 90px); margin-bottom: -1px; }
.curve .thread { vector-effect: non-scaling-stroke; }
.bg-sage { background: var(--sage-50); }
.bg-paper { background: var(--paper); }
.bg-forest { background: var(--forest-900); color: #EAF1ED; }
.bg-forest h2, .bg-forest h3 { color: #fff; }
.bg-forest .eyebrow { color: var(--gold-light); }
.bg-forest .eyebrow::before { background-image: radial-gradient(circle, var(--gold-light) 1.6px, transparent 2.2px); }
.bg-forest .muted, .bg-forest .lead { color: var(--sage-200); }

/* ── Product experience (real screens) ────────────────────────────────── */
.screens { list-style: none; margin: 0; padding: 0 0 1rem; display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 300px); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.screens:focus-visible { outline-offset: -3px; }
.screen { scroll-snap-align: start; background: #fff; border-radius: var(--radius-lg); padding: 1rem 1rem 1.25rem; box-shadow: var(--shadow-soft); border: 1px solid var(--sage-200); display: flex; flex-direction: column; }
.screen figure { margin: 0 0 1rem; border-radius: 18px; overflow: hidden; background: var(--sage-50); aspect-ratio: 4 / 5; border: 1px solid var(--sage-200); }
.screen figure img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.screen h3 { margin-bottom: .3rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.screen p { margin: 0; color: var(--muted); font-size: var(--step--1); }
.badge { display: inline-flex; align-items: center; padding: .2rem .55rem; border-radius: 999px; font: 700 .72rem/1.2 var(--font-body); letter-spacing: .04em; text-transform: uppercase; }
.badge-premium { background: #F8F1E1; color: #7A5719; border: 1px solid #EED7A8; }
.badge-free { background: var(--sage-100); color: var(--green-700); }
.access { display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start; margin-top: .75rem; padding: .3rem .65rem; border-radius: 999px; font: 700 .78rem/1.2 var(--font-body); }
.access::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: currentColor; }
.access-free { background: var(--sage-100); color: var(--green-700); }
.access-pass { background: #fff; color: var(--forest-900); box-shadow: inset 0 0 0 1.5px var(--forest-900); }
.access-premium { background: var(--forest-900); color: var(--gold-light); }
.access-legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; list-style: none; margin: -1rem 0 1.5rem; padding: 0; }
.access-legend .access { margin: 0; }
.screens-hint { font-size: var(--step--1); color: var(--muted); margin-top: .25rem; }
.demo-note { font-size: .8rem; color: var(--muted); margin-top: 1rem; }
@media (min-width: 960px) {
  .screens { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin-inline: 0; padding-inline: 0; }
  .screens-hint { display: none; }
}

/* ── Why Haven works — alternating editorial rows ─────────────────────── */
.why-row { display: grid; gap: 2rem; align-items: center; }
.why-row + .why-row { margin-top: clamp(3rem, 2rem + 4vw, 6rem); }
.why-media { position: relative; }
.why-media .shot { border-radius: 14px; overflow: hidden; border: 1px solid var(--sage-200); box-shadow: var(--shadow-lift); background: #fff; }
.why-media .shot .bar { display: flex; gap: 6px; padding: 9px 12px; background: var(--sage-50); border-bottom: 1px solid var(--sage-200); }
.why-media .shot .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--sage-200); }
.why-media .spot { position: absolute; width: clamp(96px, 22%, 150px); bottom: -12%; right: -4%; filter: drop-shadow(0 10px 16px rgba(23, 32, 30, .12)); }
.why-copy h3 { font-size: var(--step-2); }
.why-copy .pull { font: 600 var(--step-1)/1.4 var(--font-heading); color: var(--forest-900); border-left: 4px solid var(--gold); padding-left: 1rem; margin: 1.25rem 0; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: .6rem; align-items: start; color: var(--ink-2); }
.ticks li::before { content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--sage-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3L17 8.5' fill='none' stroke='%233F6D5D' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.plan-note { font-size: var(--step--1); color: var(--muted); margin-top: 1rem; }
@media (min-width: 900px) {
  .why-row { grid-template-columns: 1.15fr 1fr; gap: 4rem; }
  .why-row.flip .why-media { order: 2; }
}

/* ── How Haven works — the path, step by step ─────────────────────────── */
.path-steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1.75rem; counter-reset: step; }
.path-steps::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 6px; background: var(--thread) 50% 0 / 6px 11px repeat-y; }
.path-step { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: start; align-content: start; }
.node { width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 4px solid var(--green-600); display: grid; place-items: center; font: 700 1rem/1 var(--font-heading); color: var(--forest-900); position: relative; z-index: 1; }
.path-step:last-child .node { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.path-step h3 { margin: .55rem 0 .25rem; }
.path-step p { margin: 0; color: var(--muted); }
.path-svg { display: none; }
@media (min-width: 900px) {
  .path-wrap { position: relative; }
  .path-svg { display: block; position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 120px; }
  .path-svg path { vector-effect: non-scaling-stroke; }
  .path-steps { grid-template-columns: repeat(var(--steps, 5), 1fr); gap: 1.5rem; padding-top: 36px; }
  .path-steps::before { display: none; }
  .path-step { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .path-step h3 { margin-top: .9rem; }
}

/* ── The test at a glance (SEO content kept, restyled) ────────────────── */
.facts { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.facts li { background: #fff; border: 1px solid var(--sage-200); border-radius: var(--radius); padding: 1rem 1.1rem; }
.facts b { display: block; font: 600 var(--step-2)/1.1 var(--font-heading); color: var(--forest-900); }
.facts span { font-size: var(--step--1); color: var(--muted); }
.about-grid { display: grid; gap: 2.5rem; }
.topics { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.topics li { display: grid; grid-template-columns: 2.25rem 1fr; gap: .75rem; padding: .85rem 0; border-bottom: 1px dashed var(--sage-300); }
.topics li:last-child { border-bottom: 0; }
.topics .num { font: 600 1.25rem/1 var(--font-heading); color: var(--green-700); padding-top: .15rem; }
.topics strong { display: block; color: var(--charcoal); }
.topics span { color: var(--muted); font-size: var(--step--1); }
.card-panel { background: #fff; border-radius: var(--radius-lg); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); border: 1px solid var(--sage-200); }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; } }

/* ── Founder story — editorial ────────────────────────────────────────── */
.story { display: grid; gap: 2rem; }
.story-quote { position: relative; }
.story-quote blockquote { margin: 0; font: 600 var(--step-3)/1.2 var(--font-heading); color: var(--forest-900); }
.story-quote blockquote::before { content: "\201C"; display: block; font-size: 4rem; line-height: .6; color: var(--terracotta); margin-bottom: .5rem; }
.story-quote img { width: min(320px, 80%); margin-top: 1.5rem; }
.story-body { font-size: var(--step-1); color: var(--ink-2); max-width: 38rem; }
.story-body .sign { font: 600 var(--step-0)/1.4 var(--font-heading); color: var(--charcoal); margin-top: 1.5rem; display: flex; align-items: center; gap: .75rem; }
.story-body .sign::before { content: ""; width: 2.5rem; height: 6px; background: var(--thread) 0 50% / 9px 6px repeat-x; }
@media (min-width: 900px) { .story { grid-template-columns: .9fr 1.1fr; gap: 5rem; align-items: start; } .story-quote { position: sticky; top: 6rem; } }

/* ── Trial introduction (future commercial model only) ───────────────── */
.trial { background: var(--paper); border: 1px solid var(--sage-200); border-radius: var(--radius-lg); padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); box-shadow: var(--shadow-soft); display: grid; gap: clamp(1.5rem, 1rem + 2vw, 3rem); }
.trial h2 { margin-bottom: .4em; }
.trial .lead { margin-bottom: 1.25rem; }
.trial-badge { display: inline-flex; align-items: center; gap: .6rem; font: 600 var(--step-2)/1 var(--font-heading); color: var(--forest-900); margin-bottom: 1rem; }
.trial-badge::before { content: ""; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 4px solid var(--green-600); background: conic-gradient(var(--sage-100) 0 75%, var(--gold) 75% 100%); box-shadow: inset 0 0 0 5px #fff; }
.trial-lists { display: grid; gap: 1rem; }
.trial-lists h3 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 700; margin-bottom: .6rem; }
.trial-box { border-radius: var(--radius); padding: 1rem 1.1rem; }
.trial-box.yes { background: var(--sage-50); border: 1px solid var(--sage-200); }
.trial-box.no { background: #FBF6EF; border: 1px solid #EAD0AC; }
.trial-steps { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .9rem; counter-reset: tstep; }
.trial-steps li { display: grid; grid-template-columns: 32px 1fr; gap: .75rem; align-items: start; color: var(--ink-2); counter-increment: tstep; }
.trial-steps li::before { content: counter(tstep); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--forest-900); color: #fff; font: 700 .9rem/1 var(--font-body); }
.trial-steps strong { color: var(--charcoal); }
.trial .small { font-size: var(--step--1); color: var(--muted); margin: .75rem 0 0; }
@media (min-width: 640px) { .trial-lists { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .trial { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Excluded items in a feature list (e.g. "No Pippa") */
.ticks li.no { color: var(--muted); }
.ticks li.no::before { background: #F3EEE7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 12h8' fill='none' stroke='%239C4B30' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 16px no-repeat; }

/* ── Pricing: three plan groups — Free, Plus (choose a duration), Premium ─ */
.plans { display: grid; gap: 1.25rem; align-items: stretch; }
.plan { background: #fff; border: 1px solid var(--sage-200); border-radius: var(--radius-lg); padding: 1.5rem; display: flex; flex-direction: column; position: relative; }
.plan h3 { font-size: var(--step-2); margin-bottom: .15rem; }
.plan .term { font-weight: 700; color: var(--green-700); font-size: var(--step--1); margin: 0 0 .9rem; }
.plan .price { font: 600 2.5rem/1 var(--font-heading); color: var(--charcoal); margin: 0; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.plan .price small { font: 600 var(--step--1)/1.2 var(--font-body); color: var(--muted); }
.plan .was { font: 600 1.25rem/1 var(--font-heading); color: var(--muted); text-decoration: line-through; }
.plan .per { font-size: var(--step--1); color: var(--muted); margin: .4rem 0 1.25rem; }
.plan .ticks { margin-bottom: 1.5rem; font-size: var(--step--1); }
.plan .cta { margin-top: auto; }
.plan .small { font-size: .8rem; color: var(--muted); text-align: center; margin: .6rem 0 0; }
.plan .flag { position: absolute; top: -.85rem; left: 1.5rem; background: var(--green-700); color: #fff; font: 700 .72rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; padding: .45rem .7rem; border-radius: 999px; }
.plan-plus { border: 2px solid var(--green-600); box-shadow: var(--shadow-lift); }

/* Plus duration choice: native radios styled as a two-option switch.
   Both options and prices are always visible; the choice only swaps the
   per-week line and the button label. Both buttons go to the same paywall. */
.duration { border: 0; margin: 0 0 .4rem; padding: 0; min-width: 0; }
.duration legend { font-weight: 700; font-size: var(--step--1); color: var(--ink-2); padding: 0; margin-bottom: .5rem; }
.duration-options { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.duration input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.duration label { position: relative; display: flex; flex-direction: column; gap: .2rem; min-height: 72px; padding: .7rem .8rem; border: 2px solid var(--sage-200); border-radius: var(--radius); background: var(--sage-50); cursor: pointer; }
.duration label .d { font-weight: 700; color: var(--ink-2); font-size: var(--step--1); }
.duration label .p { font: 600 1.6rem/1 var(--font-heading); color: var(--charcoal); display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; }
.duration label .was { font-size: 1rem; }
.duration label .tag { position: absolute; top: -.7rem; right: .6rem; background: var(--gold-light); color: var(--forest-900); font: 700 .68rem/1 var(--font-body); letter-spacing: .05em; text-transform: uppercase; padding: .3rem .5rem; border-radius: 999px; }
.duration input:checked + label { border-color: var(--green-700); background: #fff; box-shadow: inset 0 0 0 1px var(--green-700); }
.duration input:checked + label .d::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: .4rem; border-radius: 50%; background: var(--green-700); }
.duration input:focus-visible + label { outline: 3px solid var(--green-700); outline-offset: 3px; }
.plan-plus .cta.opt-1m { margin-top: .6rem; }
@supports selector(:has(*)) {
  .plan-plus:has(#plus-3m:checked) .opt-1m,
  .plan-plus:has(#plus-1m:checked) .opt-3m { display: none; }
  .plan-plus .cta.opt-1m { margin-top: auto; }
}

/* Premium: the distinctive dark-green treatment */
.plan-premium { background: var(--forest-900); color: #EAF1ED; border: 0; box-shadow: var(--shadow-lift); }
.plan-premium::after { content: ""; position: absolute; left: 1.5rem; right: 1.5rem; top: 0; height: 4px; border-radius: 0 0 4px 4px; background: var(--gold-light); z-index: 1; }
.plan-premium h3, .plan-premium .price { color: #fff; }
.plan-premium .term { color: var(--gold-light); }
.plan-premium .per, .plan-premium .price small, .plan-premium .was, .plan-premium .small { color: var(--sage-200); }
.plan-premium .ticks li { color: #EAF1ED; }
.plan-premium .ticks li::before { background-color: rgba(255, 255, 255, .12); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3L17 8.5' fill='none' stroke='%23E3BE75' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.plan-premium .flag { background: var(--gold-light); color: var(--forest-900); z-index: 2; box-shadow: 0 0 0 3px var(--forest-900); }
.plan-premium .ticks strong { color: #fff; }
.plan-premium :focus-visible { outline-color: var(--gold-light); }

.value-line { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; margin: 0 auto 2.25rem; color: var(--ink-2); font-size: var(--step--1); }
.value-line b { color: var(--forest-900); }
.pricing-note { text-align: center; font-size: var(--step--1); color: var(--muted); max-width: 44rem; margin: 1.5rem auto 0; }
.resit { margin-top: 1.25rem; display: grid; gap: 1rem; align-items: center; background: #FBF6EF; border: 1px solid #EAD0AC; border-radius: var(--radius-lg); padding: 1.5rem; }
.resit img { width: 120px; }
.resit h3 { margin-bottom: .25rem; }
.resit p { margin: 0; color: var(--ink-2); font-size: var(--step--1); }
.resit p + p { margin-top: .5rem; }
@media (min-width: 760px) { .resit { grid-template-columns: auto 1fr; } }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) and (max-width: 1099px) { .plan { padding: 1.25rem; } .duration label { padding: .6rem; } }

/* ── Guides — reusable category thumbnails ────────────────────────────── */
.guides { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.guide { position: relative; background: #fff; border: 1px solid var(--sage-200); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s ease, transform .15s ease; }
.guide:hover { box-shadow: var(--shadow-lift); }
.guide:focus-within { box-shadow: 0 0 0 3px var(--green-700); }
.thumb { position: relative; aspect-ratio: 16 / 8; display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 46%; position: relative; z-index: 1; }
.thumb::after { content: ""; position: absolute; left: -5%; right: -5%; bottom: 18%; height: 6px; background: var(--thread) 0 50% / 11px 6px repeat-x; opacity: .7; }
.thumb[data-cat="guide"] { background: var(--sage-100); }
.thumb[data-cat="data"] { background: #F8F1E1; }
.thumb[data-cat="choosing"] { background: var(--sage-50); }
.thumb[data-cat="timing"] { background: #EEF3EF; }
.thumb[data-cat="resits"] { background: #FBF1EE; }
.thumb[data-cat="culture"] { background: #FDF9F0; }
.guide-body { padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.guide .cat { font: 700 .75rem/1 var(--font-body); letter-spacing: .07em; text-transform: uppercase; color: var(--green-700); margin-bottom: .6rem; }
.guide h3 { margin-bottom: .5rem; }
.guide h3 a { color: var(--charcoal); text-decoration: none; }
.guide h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable, one link */
.guide h3 a:hover { color: var(--green-700); }
.guide h3 a:focus-visible { outline: none; }
.guide p { color: var(--muted); font-size: var(--step--1); margin: 0; }
@media (min-width: 640px) { .guides { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .guides { grid-template-columns: repeat(3, 1fr); } }

/* ── Handbook coverage map ─────────────────────────────────────────────── */
.hb-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.hb-chapter { background: var(--ivory); border: 1px solid var(--sage-200); border-radius: var(--radius-lg); padding: 1.4rem 1.4rem 1.2rem; display: flex; flex-direction: column; }
.hb-num { font: 700 .75rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--green-700); margin: 0 0 .5rem; }
.hb-chapter h3 { font-size: var(--step-1); margin-bottom: 1rem; }
.hb-chapter .ticks { font-size: var(--step--1); gap: .45rem; margin-bottom: 1.25rem; }
.hb-haven { margin: auto 0 0; padding-top: .9rem; border-top: 1px dashed var(--sage-300); font-size: var(--step--1); font-weight: 600; color: var(--forest-900); }
.hb-haven span { display: inline-block; margin-right: .4rem; padding: .15rem .55rem; border-radius: 999px; background: var(--forest-900); color: var(--gold-light); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.hb-summary { background: var(--forest-900); color: #EAF1ED; border-radius: var(--radius-lg); padding: 1.6rem 1.4rem; display: flex; flex-direction: column; gap: .75rem; justify-content: center; }
.hb-summary p { margin: 0; color: var(--sage-200); }
.hb-big { font: 600 var(--step-2)/1.1 var(--font-heading); color: #fff !important; }
.hb-big span { font-size: 2.4em; color: var(--gold-light); display: block; line-height: 1; }
.hb-summary .btn { align-self: flex-start; margin-top: .5rem; }
.hb-note { max-width: 48rem; margin: 1.75rem auto 0; text-align: center; font-size: var(--step--1); color: var(--muted); }
@media (min-width: 700px) { .hb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .hb-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── FAQ — native <details>, no script, content stays in the HTML ─────── */
.faq { max-width: 48rem; margin-inline: auto; display: grid; gap: .6rem; }
.faq details { background: #fff; border: 1px solid var(--sage-200); border-radius: var(--radius); }
.faq summary { list-style: none; cursor: pointer; padding: 1.1rem 1.25rem; font-weight: 700; display: flex; justify-content: space-between; gap: 1rem; align-items: center; min-height: 48px; border-radius: var(--radius); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--sage-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%233F6D5D' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq .answer { padding: 0 1.25rem 1.2rem; color: var(--ink-2); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ── Free tools ───────────────────────────────────────────────────────── */
.tool { display: grid; gap: 1.25rem; align-items: center; background: var(--sage-50); border: 1px solid var(--sage-200); border-radius: var(--radius-lg); padding: 1.5rem; text-decoration: none; color: inherit; max-width: 48rem; margin-inline: auto; }
.tool:hover { border-color: var(--green-600); }
.tool img { width: 140px; }
.tool h3 { color: var(--charcoal); margin-bottom: .3rem; }
.tool p { margin: 0 0 .5rem; color: var(--muted); }
.tool .go { color: var(--green-700); font-weight: 700; }
@media (min-width: 640px) { .tool { grid-template-columns: auto 1fr; } }

/* ── Final CTA ────────────────────────────────────────────────────────── */
.final { overflow: hidden; }
.final-grid { display: grid; gap: 2rem; align-items: center; }
.final h2 { font-size: var(--step-4); line-height: 1.05; }
.final .lead { color: var(--sage-200); }
.final .art { width: min(360px, 80%); justify-self: center; }
.final .reassure { color: var(--sage-200); margin-top: 1.25rem; }
.final .reassure li::before { border-color: var(--gold-light); background: radial-gradient(circle, var(--gold-light) 2px, var(--forest-900) 2.5px); }
@media (min-width: 900px) { .final-grid { grid-template-columns: 1.2fr .8fr; } }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer { background: #17201E; color: #BFCBC6; padding-block: 3.5rem 2rem; font-size: var(--step--1); }
.site-footer a { color: #DDE5E2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2.5rem; }
.site-footer .logo { color: #fff; }
.site-footer h2 { font: 700 var(--step--1)/1.2 var(--font-body); color: #fff; letter-spacing: .04em; text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer-base { border-top: 1px solid #26312F; padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

/* Unreleased-copy preview banner (preview build only, never in index.html) */
.preview-banner { background: #9C4B30; color: #fff; font-size: .9rem; font-weight: 600; text-align: center; padding: .6rem var(--gutter); margin: 0; }

/* ── Mobile tightening (keeps the page shorter than today's 16.5k px) ── */
@media (max-width: 899px) {
  .hero h1 { max-width: none; }
  .frame-phone { aspect-ratio: 600 / 760; width: min(250px, 64vw); }
  .hero-stage { min-height: 0; padding-block: 1rem 0; }
  .hero-note { bottom: 10%; }
  /* Real screens are already in the carousel above; rows lead with the illustration */
  .why-row { gap: 1.25rem; }
  .why-media .spot { width: 110px; right: 0; }
  .story-quote img, .final .art { display: none; }
  .story-quote blockquote { font-size: var(--step-2); }
  .tool img { width: 96px; }
}
@media (max-width: 639px) {
  /* Real screens are already in the carousel above; rows lead with the illustration */
  .why-row { gap: 1rem; }
  .why-media .shot { display: none; }
  .why-media .spot { position: static; width: 120px; filter: none; }
  .hero-note { display: none; }
  .guide { flex-direction: row; align-items: stretch; }
  .thumb { aspect-ratio: auto; width: 96px; flex: none; }
  .thumb img { width: 84px; }
  .thumb::after { display: none; }
  .guide-body { padding: 1rem; }
  .guide p { display: none; }        /* title + category carry the link on phones */
  .plan .ticks { gap: .4rem; }
}

/* Free plan: the 48-hour trial callout (v2) */
.plan-trial { display: grid; gap: .2rem; margin: 0 0 1.25rem; padding: .85rem 1rem; border-radius: var(--radius); background: var(--sage-100); border: 1.5px solid var(--green-600); color: var(--forest-900); text-decoration: none; font-size: var(--step--1); }
.plan-trial strong { font-weight: 700; }
.plan-trial span { color: var(--green-700); font-weight: 600; }
.plan-trial:hover { background: var(--sage-50); }
.plan-trial:focus-visible { outline: 3px solid var(--green-700); outline-offset: 2px; }
