/* bundle-diagnosis.css — GENERATED, do not edit. Sources, in order:
     css/base/fonts.css
     css/base/tokens.css
     css/base/reset.css
     css/base/typography.css
     css/components/cursor.css
     css/pages/diagnosis.css
   Regenerate with the bundler; the ?v= hash in the HTML must be updated too. */

/* ==== css/base/fonts.css ==== */
/* Self-hosted variable fonts — generated from Google Fonts, latin + latin-ext only.
   Replaces the render-blocking fonts.googleapis.com stylesheet.
   One file per (family, style); font-weight declares the variable axis range. */
@font-face{font-family:'Cormorant Garamond';font-style:italic;font-weight:400 600;font-display:swap;src:url('/fonts/cormorant-garamond-italic-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Cormorant Garamond';font-style:italic;font-weight:400 600;font-display:swap;src:url('/fonts/cormorant-garamond-italic-latin.woff2') format('woff2');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:'Cormorant Garamond';font-style:normal;font-weight:400 700;font-display:swap;src:url('/fonts/cormorant-garamond-normal-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:400 700;font-display:swap;src:url('/fonts/cormorant-garamond-normal-latin.woff2') format('woff2');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:'DM Sans';font-style:italic;font-weight:300;font-display:swap;src:url('/fonts/dm-sans-italic-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'DM Sans';font-style:italic;font-weight:300;font-display:swap;src:url('/fonts/dm-sans-italic-latin.woff2') format('woff2');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:'DM Sans';font-style:normal;font-weight:300 500;font-display:swap;src:url('/fonts/dm-sans-normal-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'DM Sans';font-style:normal;font-weight:300 500;font-display:swap;src:url('/fonts/dm-sans-normal-latin.woff2') format('woff2');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;}

/* ==== css/base/tokens.css ==== */
/* tokens.css — single source of truth for all design tokens */

:root {

  /* ─── COLOR ──────────────────────────────────────────────
     WMWH brand — pure monochrome, gallery-wall philosophy.
     - #050505 near-black (logo fill, brand preview --bg)
     - #F6F5F0 gallery-wall white (reads white-first, warmth on dwell)
     - #F5F5F0 sibling cream for type-on-dark (brand preview reference)
     - Neutral grays from brand preview (#A1A1A1, #6F6F6F)
     No accent hue. All emphasis via inversion contrast.
  ──────────────────────────────────────────────────────── */
  --color-bg:             #FFFFFF;  /* white-first — no cream backgrounds */
  --color-bg-dark:        #050505;
  --color-charcoal:       #1F1F24;  /* nav — lifted off pure black so the bar reads as a distinct object */
  --color-surface:        #FFFFFF;  /* same white as bg — sections separated by border/shadow, not tint */
  --color-surface-dark:   #0B0B0D;
  --color-text-primary:   #050505;
  --color-text-secondary: #6F6F6F;
  --color-text-inverse:   #F5F5F0;
  --color-text-muted:     #A1A1A1;

  /* Primary CTA — brand near-black, inversion-based contrast.
     ONE USE per page applies to weight, not hue (multiple solid-black
     fills dilute "this is THE action"). */
  --color-accent:         #050505;
  --color-accent-hover:   #1F1F1F;

  --color-border:         rgba(5, 5, 5, 0.10);
  --color-border-dark:    rgba(245, 245, 240, 0.10);
  --color-spotlight:      rgba(245, 245, 240, 0.06);

  /* ─── TYPOGRAPHY ─────────────────────────────────────── */
  --font-display: 'Cormorant Garamond', serif;
  --font-body:    'DM Sans', sans-serif;

  --size-hero:   clamp(4rem, 9vw, 9rem);
  --size-h1:     clamp(2.5rem, 5vw, 5rem);
  --size-h2:     clamp(1.75rem, 3vw, 3rem);
  --size-h3:     clamp(1.25rem, 2vw, 1.75rem);
  --size-body:   1rem;
  --size-small:  0.875rem;
  --size-eyebrow:0.6875rem;

  --leading-tight: 1.05;
  --leading-body:  1.65;

  --tracking-tight: -0.02em;
  --tracking-wide:   0.12em;

  /* ─── SPACING ────────────────────────────────────────── */
  --space-xs:     0.5rem;
  --space-sm:     1rem;
  --space-md:     1.75rem;   /* tightened from 2rem — less dead air */
  --space-lg:     3rem;      /* tightened from 4rem */
  --space-xl:     5rem;      /* tightened from 8rem — luxury, not empty */
  --space-2xl:    9rem;      /* tightened from 14rem */
  --section-pad:  clamp(3rem, 6vw, 6rem); /* tightened from 5-10rem — sections breathe, not yawn */

  /* ─── LAYOUT ─────────────────────────────────────────── */
  --container-max: 1280px;
  --container-pad: clamp(1.5rem, 5vw, 4rem);

  /* ─── RADIUS ─────────────────────────────────────────── */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-card: 16px;
  --radius-pill: 999px;

  /* ─── SHADOW ─────────────────────────────────────────── */
  --shadow-card: 0 2px 12px rgba(5, 5, 5, 0.06);
  --shadow-nav:  0 4px 24px rgba(5, 5, 5, 0.08);

  /* ─── Z-INDEX ────────────────────────────────────────── */
  --z-base:       0;
  --z-above:      10;
  --z-sticky:     100;
  --z-nav:        900;
  --z-drawer:     950;
  --z-overlay:    940;
  --z-cursor:     9999;
  --z-transition: 9998;

  /* ─── MOTION ─────────────────────────────────────────── */
  /* All tween durations/eases live in animations.js MOTION_SYSTEM.
     These vars are for CSS-only transitions only. */
  --ease-feedback: cubic-bezier(0.37, 0, 0.63, 1);   /* sine.inOut equivalent */
  --ease-entrance: cubic-bezier(0.16, 1, 0.3, 1);    /* power2.out equivalent */
  --ease-morph:    cubic-bezier(0.87, 0, 0.13, 1);   /* power3.inOut equivalent */

  --dur-feedback: 0.18s;
  --dur-entrance: 0.6s;
  --dur-morph:    0.5s;

  /* ─── MATERIALIZATION ────────────────────────────────────
     Apple-style placeholder → content reveal. These are NOT
     skeleton loaders. The metaphor is matte paper under a
     drifting gallery spotlight. See css/components/materialize.css.
  ──────────────────────────────────────────────────────── */
  --ease-spring:     cubic-bezier(0.34, 1.30, 0.64, 1);  /* gentle overshoot, content arriving */
  --ease-settle:     cubic-bezier(0.16, 1, 0.3, 1);      /* alias of --ease-entrance, placeholder leaving */
  --dur-materialize: 320ms;
  --dur-blur-focus:  420ms;
  --dur-layer-gap:    90ms;  /* spacing between materialization layers */
  --dur-mat-min:     180ms;  /* minimum placeholder display window */

}

/* ==== css/base/reset.css ==== */
/* reset.css — modern CSS reset */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  min-height: 100dvh;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Remove list semantics that are purely visual */
ul, ol {
  list-style: none;
}

/* Remove anchor decoration — components style links explicitly */
a {
  color: inherit;
  text-decoration: none;
}

/* Images + media block-level by default */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* Form elements inherit font */
input, button, textarea, select {
  font: inherit;
}

/* Avoid text overflow on long words */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* Remove button defaults */
button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* Restore native pointer over interactives while custom cursor is hidden.
   Two classes on <html> outrank the single-class `html.has-custom-cursor a` rule. */
html.has-custom-cursor.cursor-native a,
html.has-custom-cursor.cursor-native button,
html.has-custom-cursor.cursor-native [role="button"],
html.has-custom-cursor.cursor-native input,
html.has-custom-cursor.cursor-native textarea,
html.has-custom-cursor.cursor-native label,
html.has-custom-cursor.cursor-native .btn,
html.has-custom-cursor.cursor-native summary,
html.has-custom-cursor.cursor-native [data-magnetic] {
  cursor: pointer;
}

/* Root stacking context for page transition curtain */
#page-transition-curtain {
  position: fixed;
  inset: 0;
  z-index: var(--z-transition);
  background: var(--color-bg-dark);
  transform: translateY(-100%);
  pointer-events: none;
}

/* ==== css/base/typography.css ==== */
/* typography.css — type scale, utilities. Fonts via Google CDN in HTML <head>. */

/* ─── HEADINGS ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: 600;
}

h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); }

/* ─── TYPE SCALE UTILITIES ──────────────────────────────── */

.text-hero {
  font-family: var(--font-display);
  font-size: var(--size-hero);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: 600;
}

.text-h1 {
  font-family: var(--font-display);
  font-size: var(--size-h1);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: 600;
}

.text-h2 {
  font-family: var(--font-display);
  font-size: var(--size-h2);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: 600;
}

.text-h3 {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  line-height: var(--leading-tight);
  font-weight: 600;
}

.text-body {
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--leading-body);
  font-weight: 400;
}

.text-small {
  font-family: var(--font-body);
  font-size: var(--size-small);
  line-height: var(--leading-body);
  font-weight: 400;
}

.text-eyebrow {
  font-family: var(--font-body);
  font-size: var(--size-eyebrow);
  line-height: 1;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
}

@media (max-width: 767px) {
  .text-eyebrow {
    margin-top: var(--space-md);
    margin-bottom: var(--space-sm);
  }
}

/* ─── DISPLAY ITALIC (editorial quotes, hero secondary lines) */
.text-display-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
}

/* ─── COLOR UTILITIES ────────────────────────────────────── */
.text-primary   { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-inverse   { color: var(--color-text-inverse); }
.text-muted     { color: var(--color-text-muted); }

/* ─── ALIGNMENT ──────────────────────────────────────────── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* ─── BODY COPY ──────────────────────────────────────────── */
p {
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--leading-body);
  color: var(--color-text-secondary);
}

p + p {
  margin-top: var(--space-sm);
}

/* ─── STRONG / EM ────────────────────────────────────────── */
strong {
  font-weight: 600;
  color: var(--color-text-primary);
}

em {
  font-style: italic;
}

/* ==== css/components/cursor.css ==== */
/* cursor.css — WMWH brand pointer + trailing diamond motif.
   Native cursor hidden where the custom cursor is active; restored for touch
   and reduced-motion users. Extracted from inline <style> in index.html so it
   can be reused across pages. */

html.has-custom-cursor,
html.has-custom-cursor body,
html.has-custom-cursor a,
html.has-custom-cursor button,
html.has-custom-cursor [role="button"],
html.has-custom-cursor input,
html.has-custom-cursor textarea,
html.has-custom-cursor label,
html.has-custom-cursor .btn,
html.has-custom-cursor .diag-btn,
html.has-custom-cursor .diag-btn-o { cursor: none; }

#cursor-arrow,
#cursor-diamond {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  opacity: 0;
  will-change: transform, opacity;
}

/* Arrow: tip at (0,0) so transform x/y = pointer position exactly. */
#cursor-arrow {
  width: 22px;
  height: 22px;
  transform: translate(-100px, -100px);
  filter: drop-shadow(0 1px 2px rgba(5, 5, 5, 0.18));
}
#cursor-arrow svg { display: block; width: 100%; height: 100%; }

/* Diamond: trails behind, centered on transform origin. */
#cursor-diamond {
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  transform: translate(-100px, -100px) rotate(45deg);
  color: var(--color-accent);
  transition: color 0.18s var(--ease-feedback);
}
#cursor-diamond::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid currentColor;
  background: transparent;
}

/* Inverted on dark regions (sections + nav) — cream fill so it reads on dark. */
html.cursor-on-dark #cursor-diamond { color: var(--color-text-inverse); }
html.cursor-on-dark #cursor-arrow svg .arrow-fill   { fill:   var(--color-text-inverse); }
html.cursor-on-dark #cursor-arrow svg .arrow-stroke { stroke: var(--color-accent); }
html.cursor-on-dark #cursor-arrow { filter: drop-shadow(0 0 2px rgba(245, 245, 240, 0.35)); }

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  html.has-custom-cursor,
  html.has-custom-cursor body,
  html.has-custom-cursor a,
  html.has-custom-cursor button,
  html.has-custom-cursor .btn,
  html.has-custom-cursor .diag-btn,
  html.has-custom-cursor .diag-btn-o { cursor: auto; }
  #cursor-arrow,
  #cursor-diamond { display: none; }
}

/* ==== css/pages/diagnosis.css ==== */
/* diagnosis.css — WMWH Free Website Diagnosis funnel.
   Dark-surface scope. All color sourced from tokens.css.
   No hex, no rgba literals — derived alphas use color-mix(). */

body.diagnosis {
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body.diagnosis a { color: inherit; }
body.diagnosis button { font: inherit; cursor: pointer; }
body.diagnosis input { font: inherit; }

/* ─── Fixed progress bar ───────────────────────────────── */
.diag-pbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: color-mix(in srgb, var(--color-text-primary) 5%, transparent);
  z-index: var(--z-sticky);
}
.diag-pbar-fill {
  height: 100%;
  width: 0%;
  background: var(--color-text-primary);
  transition: width var(--dur-entrance) var(--ease-entrance);
}

/* ─── Fixed top nav ──────────────────────────────────────
   3-column grid. Sides are `auto` so the prev label gets the space
   it needs without wrapping; step in middle stays visually centered. */
.diag-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  min-height: 56px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-md);
  z-index: var(--z-above);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.25s var(--ease-feedback),
    border-color 0.25s var(--ease-feedback),
    backdrop-filter 0.25s var(--ease-feedback);
}
.diag-nav.is-scrolled {
  background: var(--color-bg);
  border-bottom-color: var(--color-border);
  backdrop-filter: saturate(140%) blur(6px);
}
.diag-nav-step {
  font-family: var(--font-body);
  font-size: var(--size-eyebrow);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-primary);
  font-weight: 500;
  grid-column: 2;
  text-align: center;
}

/* ─── Previous Question (top-left) ─────────────────────── */
.diag-nav-prev {
  grid-column: 1;
  justify-self: start;
  font-family: var(--font-body);
  font-size: var(--size-eyebrow);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-primary);
  font-weight: 500;
  background: none;
  border: none;
  padding: 12px 0;
  min-height: 44px;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity var(--dur-feedback) var(--ease-feedback);
}
.diag-nav-prev:hover { opacity: 0.6; }
.diag-nav-prev[hidden] { display: none; }

/* ─── Close X (top-right) ──────────────────────────────── */
.diag-nav-close {
  grid-column: 3;
  justify-self: end;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1;
  color: var(--color-text-primary);
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity var(--dur-feedback) var(--ease-feedback);
}
.diag-nav-close:hover { opacity: 0.6; }
.diag-nav-close[hidden] { display: none; }

/* ─── Screens ──────────────────────────────────────────── */
.diag-screen {
  display: none;
  min-height: 100vh;
  padding: 100px var(--space-md) 80px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.diag-screen.show {
  display: flex;
  animation: diagFadeUp 0.4s var(--ease-entrance) both;
}
.diag-inner {
  width: 100%;
  max-width: 660px;
}

/* s0 landing — all content is centered. Other screens stay left-aligned. */
#s0 .diag-inner { text-align: center; }
#s0 .diag-sub { margin-left: auto; margin-right: auto; }
#s0 .diag-btn-row { justify-content: center; }
#s0 .diag-note { text-align: center; }

/* Custom cursor only on landing (s0) + result (s6). Toggled by diagnosis.js
   based on the current screen — inner steps use the native pointer. */
html.diag-hide-cursor #cursor-arrow,
html.diag-hide-cursor #cursor-diamond { display: none !important; }
html.diag-hide-cursor,
html.diag-hide-cursor body,
html.diag-hide-cursor a,
html.diag-hide-cursor button,
html.diag-hide-cursor input,
html.diag-hide-cursor textarea,
html.diag-hide-cursor label,
html.diag-hide-cursor [role="button"],
html.diag-hide-cursor .diag-btn,
html.diag-hide-cursor .diag-btn-o { cursor: auto !important; }

@keyframes diagFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Typography (page-scoped) ──────────────────────────
   h1, h2 cascade from typography.css. Only set spacing + color here. */
.diag-eyebrow {
  font-family: var(--font-body);
  font-size: var(--size-eyebrow);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-primary);
  font-weight: 500;
  line-height: 1;
  margin-bottom: 22px;
}
.diag-screen h1,
.diag-screen h2 {
  color: var(--color-text-primary);
}
.diag-screen h1 { margin-bottom: 18px; }
.diag-screen h2 { margin-bottom: 14px; }

.diag-sub {
  font-family: var(--font-body);
  font-size: var(--size-body);
  color: var(--color-text-primary);
  line-height: var(--leading-body);
  margin-bottom: 38px;
  max-width: 520px;
}

/* ─── Buttons ──────────────────────────────────────────── */
.diag-btn,
.diag-btn-o {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--size-small);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 14px 28px;
  min-width: 240px;
  white-space: nowrap;
  transition: opacity var(--dur-feedback) var(--ease-feedback),
              border-color var(--dur-feedback) var(--ease-feedback),
              color var(--dur-feedback) var(--ease-feedback),
              transform var(--dur-feedback) var(--ease-feedback);
  text-decoration: none;
}
.diag-btn {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-text-primary);
}
.diag-btn:hover {
  background: var(--color-text-primary);
  color: var(--color-bg);
}
.diag-btn:active { transform: translateY(1px); }
.diag-btn[disabled], .diag-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.diag-btn-o {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid color-mix(in srgb, var(--color-text-primary) 20%, transparent);
}
.diag-btn-o:hover {
  border-color: color-mix(in srgb, var(--color-text-primary) 80%, transparent);
}

.diag-btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.diag-note {
  font-family: var(--font-body);
  font-size: 12px;
  color: color-mix(in srgb, var(--color-text-primary) 28%, transparent);
  letter-spacing: 0.08em;
  margin-top: 22px;
}

/* ─── Card grid (symptoms) ─────────────────────────────── */
.diag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: var(--space-lg);
}
.diag-card {
  position: relative;
  padding: 20px 18px;
  border: 1px solid var(--color-border);
  background: transparent;
  text-align: left;
  transition: border-color var(--dur-feedback) var(--ease-feedback),
              background var(--dur-feedback) var(--ease-feedback);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  font-family: var(--font-body);
  color: var(--color-text-primary);
}
.diag-card:hover {
  border-color: color-mix(in srgb, var(--color-text-primary) 35%, transparent);
}
.diag-card.on {
  border-color: color-mix(in srgb, var(--color-text-primary) 80%, transparent);
  background: color-mix(in srgb, var(--color-text-primary) 2%, transparent);
}
.diag-card.on::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 6px;
  height: 6px;
  background: var(--color-text-primary);
  border-radius: var(--radius-pill);
}
.diag-card-title {
  font-size: var(--size-small);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--color-text-primary);
}
.diag-card-sub {
  font-size: 12px;
  color: var(--color-text-primary);
  line-height: 1.45;
}

/* ─── Full-width rows (sub-questions, goals) ───────────── */
.diag-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: var(--space-lg);
}
.diag-row {
  position: relative;
  padding: 20px 22px;
  border: 1px solid var(--color-border);
  background: transparent;
  text-align: left;
  width: 100%;
  font-family: var(--font-body);
  color: var(--color-text-primary);
  transition: border-color var(--dur-feedback) var(--ease-feedback),
              background var(--dur-feedback) var(--ease-feedback);
}
.diag-row:hover {
  border-color: color-mix(in srgb, var(--color-text-primary) 35%, transparent);
}
.diag-row.on {
  border-color: color-mix(in srgb, var(--color-text-primary) 80%, transparent);
  background: color-mix(in srgb, var(--color-text-primary) 2%, transparent);
}
.diag-row.on::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--color-text-primary);
  border-radius: var(--radius-pill);
}
.diag-row-title {
  font-size: var(--size-body);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--color-text-primary);
}
.diag-row-sub {
  font-size: var(--size-small);
  color: var(--color-text-primary);
  line-height: 1.45;
}

/* ─── Fields ───────────────────────────────────────────── */
.diag-fields {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-bottom: 36px;
}
.diag-field {
  display: flex;
  flex-direction: column;
}
.diag-field-label {
  font-family: var(--font-body);
  font-size: var(--size-eyebrow);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-primary);
  font-weight: 500;
  margin-bottom: 10px;
}
.diag-field-label-opt {
  color: color-mix(in srgb, var(--color-text-primary) 28%, transparent);
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 400;
}
.diag-field-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 18px;
  padding: 8px 0 10px;
  outline: none;
  transition: border-color var(--dur-feedback) var(--ease-feedback);
  width: 100%;
}
.diag-field-input::placeholder {
  color: color-mix(in srgb, var(--color-text-primary) 28%, transparent);
}
.diag-field-input:focus {
  border-bottom-color: color-mix(in srgb, var(--color-text-primary) 80%, transparent);
}
.diag-field-input.error {
  border-bottom-color: #FF5A5A;
}

/* ─── Scan screen ──────────────────────────────────────── */
.diag-scan {
  width: 100%;
  max-width: 480px;
  margin-top: 40px;
}
.diag-scan-line {
  position: relative;
  height: 1px;
  background: color-mix(in srgb, var(--color-text-primary) 8%, transparent);
  overflow: hidden;
  margin: 30px 0;
}
.diag-scan-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  height: 100%;
  width: 40%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-text-primary),
    transparent
  );
  animation: diagSweep 1.3s linear infinite;
}
@keyframes diagSweep {
  0%   { left: -40%; }
  100% { left: 100%; }
}
.diag-scan-label {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-primary);
  font-weight: 500;
  animation: diagBlink 1.3s ease-in-out infinite;
}
@keyframes diagBlink {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

/* ─── Result: diagnosis box ────────────────────────────── */
.diag-box {
  border: 1px solid var(--color-border);
  padding: 32px 30px;
  margin-bottom: 28px;
  background: var(--color-surface);
}
.diag-box-eyebrow {
  font-family: var(--font-body);
  font-size: var(--size-eyebrow);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-primary);
  font-weight: 500;
  margin-bottom: 16px;
}
.diag-box-name {
  font-family: var(--font-display);
  font-size: var(--size-h2);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin-bottom: 14px;
  color: var(--color-text-primary);
}
.diag-box-stmt {
  font-family: var(--font-body);
  font-size: var(--size-body);
  color: var(--color-text-primary);
  line-height: var(--leading-body);
  white-space: pre-line;
  margin-bottom: 28px;
}

/* ─── Severity bar ─────────────────────────────────────── */
.diag-sev {
  display: flex;
  align-items: center;
  gap: 14px;
}
.diag-sev-label {
  font-family: var(--font-body);
  font-size: var(--size-eyebrow);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-primary);
  font-weight: 500;
  min-width: 70px;
}
.diag-sev-bar {
  flex: 1;
  height: 4px;
  background: color-mix(in srgb, var(--color-text-primary) 8%, transparent);
  position: relative;
  overflow: hidden;
}
.diag-sev-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: var(--color-text-primary);
  transition: width 1s var(--ease-morph) 0.4s;
}
.diag-sev-pct {
  font-family: var(--font-body);
  font-size: var(--size-small);
  font-weight: 600;
  color: var(--color-text-primary);
  min-width: 40px;
  text-align: right;
  letter-spacing: 0.01em;
}

/* ─── Findings ─────────────────────────────────────────── */
.diag-finds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 40px;
}
.diag-find {
  border: 1px solid var(--color-border);
  padding: 22px 20px;
  background: transparent;
}
.diag-find-num {
  font-family: var(--font-body);
  font-size: var(--size-eyebrow);
  line-height: 1;
  letter-spacing: var(--tracking-wide);
  color: color-mix(in srgb, var(--color-text-primary) 28%, transparent);
  font-weight: 500;
  margin-bottom: 14px;
}
.diag-find-title {
  font-family: var(--font-body);
  font-size: var(--size-small);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--color-text-primary);
}
.diag-find-desc {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-primary);
  line-height: var(--leading-body);
  white-space: pre-line;
}

/* ─── Section divider ──────────────────────────────────── */
.diag-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 22px;
}
.diag-divider::before,
.diag-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--color-text-primary) 8%, transparent);
}
.diag-divider span {
  font-family: var(--font-body);
  font-size: var(--size-eyebrow);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-primary);
  font-weight: 500;
}

/* ─── Recommendation tiers ─────────────────────────────── */
.diag-rx-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 36px;
}
.diag-rx {
  position: relative;
  border: 1px solid var(--color-border);
  padding: 24px 22px;
}
.diag-rx.recommended {
  border-color: color-mix(in srgb, var(--color-text-primary) 80%, transparent);
  background: color-mix(in srgb, var(--color-text-primary) 2%, transparent);
}
.diag-rx-tier {
  font-family: var(--font-body);
  font-size: var(--size-eyebrow);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-primary);
  font-weight: 500;
  margin-bottom: 8px;
}
.diag-rx-name {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  font-weight: 600;
  line-height: var(--leading-tight);
  margin-bottom: 10px;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}
.diag-rx-desc {
  font-family: var(--font-body);
  font-size: var(--size-small);
  color: var(--color-text-primary);
  line-height: var(--leading-body);
  white-space: pre-line;
}
.diag-rx-partner {
  border-color: color-mix(in srgb, var(--color-text-primary) 25%, transparent);
  background: color-mix(in srgb, var(--color-text-primary) 3%, transparent);
  margin-top: var(--space-xs);
}
.diag-rx-partner-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-sm);
  font-family: var(--font-body);
  font-size: var(--size-small);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 12px 22px;
  color: var(--color-text-primary);
  background: transparent;
  border: 1px solid var(--color-text-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-feedback) var(--ease-feedback),
              color var(--dur-feedback) var(--ease-feedback);
}
.diag-rx-partner-cta:hover {
  background: var(--color-text-primary);
  color: var(--color-bg);
}

.diag-rx-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  font-family: var(--font-body);
  font-size: var(--size-eyebrow);
  line-height: 1;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-text-primary);
  padding: 6px 10px;
  font-weight: 500;
}

/* ─── Footnote ─────────────────────────────────────────── */
.diag-footnote {
  font-family: var(--font-body);
  font-size: 12px;
  color: color-mix(in srgb, var(--color-text-primary) 28%, transparent);
  letter-spacing: 0.06em;
  margin-top: 20px;
}
.diag-footnote a { color: var(--color-text-primary); }
.diag-footnote a:hover { color: var(--color-text-primary); }

/* ─── Report modal ─────────────────────────────────────── */
.diag-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--color-text-primary) 60%, transparent);
  z-index: var(--z-overlay);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.diag-modal.show {
  display: flex;
  animation: diagFadeUp 0.3s var(--ease-entrance) both;
}
.diag-modal-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  width: 100%;
  max-width: 460px;
  padding: 36px 32px 30px;
  position: relative;
}
.diag-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 18px;
  color: var(--color-text-primary);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.diag-modal-close:hover { color: var(--color-text-primary); }
.diag-modal-title {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: 8px;
  color: var(--color-text-primary);
}
.diag-modal-sub {
  font-family: var(--font-body);
  font-size: var(--size-small);
  color: var(--color-text-primary);
  line-height: 1.5;
  margin-bottom: 24px;
}
.diag-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.diag-mact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 18px;
  text-align: left;
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid color-mix(in srgb, var(--color-text-primary) 20%, transparent);
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color var(--dur-feedback) var(--ease-feedback),
              background var(--dur-feedback) var(--ease-feedback),
              transform var(--dur-feedback) var(--ease-feedback);
}
.diag-mact:hover {
  border-color: color-mix(in srgb, var(--color-text-primary) 80%, transparent);
}
.diag-mact:active { transform: translateY(1px); }
.diag-mact[disabled] { opacity: 0.55; pointer-events: none; }
.diag-mact-t {
  font-size: var(--size-small);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--color-text-primary);
}
.diag-mact-s {
  font-size: 11px;
  color: color-mix(in srgb, var(--color-text-primary) 55%, transparent);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
}
.diag-mact[data-state="ok"] .diag-mact-t::after { content: ' ✓'; }

/* ─── Modal view swap (chooser ↔ email interstitial) ──────
   data-step on .diag-modal-box drives which [data-view] panel shows.
   Higher specificity than [hidden] so the email view reveals on swap. */
.diag-modal-box[data-step="chooser"] [data-view="email"]   { display: none; }
.diag-modal-box[data-step="email"]   [data-view="chooser"] { display: none; }
.diag-modal-box[data-step="email"]   [data-view="email"]   { display: block; }

.diag-mback {
  display: inline-block;
  background: none;
  border: 0;
  padding: 0 0 14px;
  font-family: var(--font-body);
  font-size: var(--size-eyebrow);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-weight: 500;
  color: color-mix(in srgb, var(--color-text-primary) 55%, transparent);
  cursor: pointer;
  transition: color var(--dur-feedback) var(--ease-feedback);
}
.diag-mback:hover {
  color: var(--color-text-primary);
}

.diag-memail-err {
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 12px;
  color: color-mix(in srgb, var(--color-text-primary) 55%, transparent);
  letter-spacing: 0.04em;
  text-align: center;
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 720px) {
  /* Vertical center on mobile. .diag-screen is min-height:100vh; when content
     fits (s0..s5) flex centers it. When content overflows (s6 result),
     justify-content:center is a no-op because there's no excess space. */
  .diag-screen {
    padding: 88px var(--space-sm) 100px;
    justify-content: center;
  }

  /* Mobile: solid backdrop behind the fixed nav so the prev/close controls
     never read overlapped against scrolling content (e.g. the goal screen's rows). */
  .diag-nav {
    padding: 0 var(--space-sm);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
  }
  /* Slightly smaller label so it sits comfortably in the corner. */
  .diag-nav-prev { font-size: 11px; }
  .diag-box { padding: 26px 22px; }
}
@media (max-width: 560px) {
  .diag-grid { grid-template-columns: repeat(2, 1fr); }
  .diag-finds { grid-template-columns: 1fr; }
  .diag-sub { font-size: var(--size-small); margin-bottom: 30px; }
  .diag-card { min-height: 100px; padding: 18px 16px; }
  .diag-btn,
  .diag-btn-o { padding: 14px 22px; font-size: var(--size-small); width: 100%; }
  .diag-btn-row { flex-direction: column; }
  .diag-mact { padding: 16px 18px; }
}
@media (max-width: 400px) {
  .diag-screen { padding: 80px var(--space-xs) 110px; }
  .diag-nav { padding: 0 var(--space-xs); }
}
