/*
 * Trust Check styles.
 * Fluid by design: type and space scale with clamp(), grids reflow with
 * auto-fit/minmax(), and components respond to their own width through
 * container queries. There are no per-device layouts.
 */

@font-face {
  font-family: "Comme";
  src: url("fonts/comme-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --cream: #faf8f4;
  --white: #ffffff;
  --ink: #1a1814;
  --muted: #4a4845;
  --purple: #4231a9;
  --purple-hover: #5a47c4;
  /* One action color everywhere: the splash's deep teal. Purple now means Sustain only. */
  --action: #1f5050;
  --action-hover: #2d6e6e;
  --pick: #4a9e9e;            /* your cell in the decision grid, and its result box */
  --select: var(--terracotta-light); /* chosen answers (ratings, change size): ink text on it 6.4:1 */
  --accent-on-cream: #a14f27; /* accent words on cream: 5.6:1 */
  --teal: #2d6e6e;
  --terracotta: #c4673a;
  --danger: #8f3d17; /* darkened terracotta: 8:1 with white text */
  --terracotta-deep: #a14f27; /* no longer used for fills; kept for reference */
  /* Light terracotta: buttons, chosen answers, the Build block, and the orange on teal.
     Always ink text on it (6.4:1). */
  --terracotta-light: #d4895a;
  --terracotta-light-hover: #c97a4b; /* ink on it: 5.4:1 */
  --teal-deep: #1f5050;       /* splash background */
  --peach: #f3b48f;           /* small text on teal-deep: 5:1 */
  --orange-on-dark: #d4895a;  /* terracotta on deep teal for large text and icons: 3.2:1 */
  --lilac: #9d92e0;
  --line: rgba(26, 24, 20, 0.1);
  --line-strong: rgba(26, 24, 20, 0.5); /* borders of fields and options: 3.3:1 on cream (WCAG 1.4.11) */
  --surface: rgba(255, 255, 255, 0.62);

  /* Zones: Build is a colour block only, never text on cream. */
  --zone-build: #d4895a;   /* light trio: same as the stage blocks and the mark */
  --zone-grow: #4a9e9e;
  --zone-sustain: #9d92e0;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Comme", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Fluid type, 320px -> 1600px. rem terms keep zoom and text size working. */
  --t-cap: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --t-small: clamp(0.875rem, 0.84rem + 0.15vw, 0.9375rem);
  --t-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --t-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.75rem);
  --t-h3: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
  --t-h2: clamp(1.625rem, 1.3rem + 1.5vw, 2.625rem);
  --t-statement: clamp(1.75rem, 1.3rem + 2.2vw, 3.25rem);
  --t-h1: clamp(2.25rem, 1.5rem + 3.6vw, 5rem);

  /* Fluid space */
  --s-3xs: clamp(0.25rem, 0.23rem + 0.1vw, 0.3125rem);
  --s-2xs: clamp(0.5rem, 0.46rem + 0.2vw, 0.625rem);
  --s-xs: clamp(0.75rem, 0.69rem + 0.3vw, 0.9375rem);
  --s-s: clamp(1rem, 0.92rem + 0.4vw, 1.25rem);
  --s-m: clamp(1.25rem, 1.05rem + 1vw, 2rem);
  --s-l: clamp(1.75rem, 1.3rem + 2.2vw, 3.5rem);
  --s-xl: clamp(2.5rem, 1.6rem + 4.5vw, 6rem);
  --gutter: clamp(1rem, 0.4rem + 3vw, 3.5rem);

  /* Widths */
  --measure: 66ch;
  --w-narrow: 46rem;
  --w-mid: 64rem;
  --w-wide: 90rem;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  background: var(--cream);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: clip;
  overflow-wrap: break-word;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure, fieldset, blockquote { margin: 0; }
ul, ol { padding: 0; }
button, input, textarea { font: inherit; color: inherit; }

a { color: var(--action); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--action-hover); }

:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

/* Hidden always wins, even over components that set their own display. */
[hidden] { display: none !important; }

.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 {
  position: absolute; left: var(--gutter); top: -10rem;
  z-index: 10; padding: var(--s-2xs) var(--s-xs);
  background: var(--action); color: var(--white);
}
.skip:focus { top: var(--s-2xs); color: var(--white); }

/* Decorative blob, clipped so it can never cause sideways scroll. */
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden; pointer-events: none;
}
.blob {
  position: absolute;
  top: -12rem; right: -10rem;
  width: clamp(18rem, 40vw, 40rem);
  aspect-ratio: 1;
  border-radius: 100px;
  background: #6e5fd4;
  filter: blur(112px);
  opacity: 0.22;
  mix-blend-mode: multiply;
  transition: opacity 600ms var(--ease);
}
body:not([data-screen="welcome"]):not([data-screen="welcomeBack"]) .blob { opacity: 0.1; }

/* ---------- Page frame ---------- */

.app { flex: 1 0 auto; outline: none; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--w-narrow));
  margin-inline: auto;
}
.wrap--mid { width: min(100% - 2 * var(--gutter), var(--w-mid)); }
.wrap--wide { width: min(100% - 2 * var(--gutter), var(--w-wide)); }

.screen {
  padding-block: var(--s-l) var(--s-xl);
  display: flex;
  flex-direction: column;
  gap: var(--s-s); /* paragraph-sized step between items */
}
/* Bigger steps only between groups: under the back/progress bar, above actions. */
.screen > .topbar { margin-bottom: var(--s-2xs); }
.screen > .actions, .screen > .why { margin-top: var(--s-xs); }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ---------- Spacing standards (use these, not one-off values) ----------
   1. Label to its heading      --gap-label    close to its heading; a bit more above
                                               big display headings (scales with size)
   2. Heading to its text       --gap-heading  heading introduces what follows
   3. Paragraph to paragraph    --gap-text     about one line of space
   4. Group to group            --gap-group    e.g. title block to the form below
   5. Section to section        --gap-section  major parts of a long page
   Rule: space above a heading is always larger than space below it.       */
:root {
  --gap-label: var(--s-2xs);       /* 8-10px for regular headings */
  --gap-label-display: clamp(0.375rem, 0.32rem + 0.25vw, 0.5625rem); /* 6-9px above h1 and statements */
  --gap-heading: var(--s-2xs);   /* heading to its text: 8-10px everywhere */
  --gap-text: var(--s-s);
  --gap-group: var(--s-l);
  --gap-section: var(--s-xl);
}
.titleblock { display: flex; flex-direction: column; gap: var(--gap-label); }
.titleblock:has(.h1, .statement) { gap: var(--gap-label-display); }
.stack { display: flex; flex-direction: column; gap: var(--gap-text); }
.stack--tight { gap: var(--gap-label); }
.stack--loose { gap: var(--s-l); }

.measure { max-width: var(--measure); }

/* ---------- Type ---------- */

.eyebrow {
  font-family: var(--sans);
  font-size: var(--t-cap);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted); /* one eyebrow color on cream; peach on the dark teal */
  line-height: 1.4;
}

.h1, .h2, .h3, .statement {
  font-family: var(--serif);
  font-weight: 400;
  text-wrap: balance;
}
.h1 { font-size: var(--t-h1); line-height: 1.06; letter-spacing: -0.02em; }
.h2 { font-size: var(--t-h2); line-height: 1.14; letter-spacing: -0.01em; }
.h3 { font-size: var(--t-h3); line-height: 1.2; }
.statement { font-size: var(--t-statement); line-height: 1.14; letter-spacing: -0.01em; }
.subhead { font-family: var(--sans); font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem); font-weight: 650; line-height: 1.35; }
.focus-line { max-width: 52ch; }
.lead { font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem); font-weight: 600; line-height: 1.4; text-wrap: pretty; }
.accent { font-style: normal; color: var(--accent-on-cream); }
.muted { color: var(--muted); }
.ink { color: var(--ink); }
.small { font-size: var(--t-small); }
.cap { font-size: var(--t-cap); color: var(--muted); }
/* Text system (six styles): display (.h1/.statement), section heading (.h3/.card-title),
   eyebrow, body, body bold (.t-bold), small (.small.muted). Links/buttons: bold teal or buttons. */
.t-bold { font-family: var(--sans); font-size: var(--t-body); font-weight: 650; line-height: 1.4; }
p { text-wrap: pretty; }
strong, b { font-weight: 650; }

/* ---------- Surfaces ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--s-m);
}
.panel--white { background: var(--white); }
.panel--tint { background: rgba(31, 80, 80, 0.06); border-color: rgba(31, 80, 80, 0.22); }
.note {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--s-xs) var(--s-s);
  font-size: var(--t-small);
}
.note--alert { border-left: 4px solid var(--action); background: var(--white); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.7em min(1.4em, 5vw);
  /* Button system: one primary (light terracotta, ink text), one secondary
     (outline: teal on cream, cream on teal), one destructive (dark red). */
  border: 1px solid var(--terracotta-light);
  border-radius: 0;
  background: var(--terracotta-light);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 650; /* same as body bold and links */
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), transform 120ms var(--ease);
}
.btn:hover { background: var(--terracotta-light-hover); border-color: var(--terracotta-light-hover); color: var(--ink); }
.btn:active { transform: scale(0.97); }
/* Secondary: the quieter sibling of the terracotta button. Dark terracotta
   outline (5.6:1 on cream), ink text, light terracotta tint on hover. */
.btn--secondary { background: transparent; border: 2px solid var(--terracotta-deep); color: var(--ink); }
.btn--secondary:hover { background: rgba(212, 137, 90, 0.18); border-color: var(--terracotta-deep); color: var(--ink); }
.btn--green { background: var(--zone-grow); border-color: var(--zone-grow); color: var(--ink); } /* download: brand teal with ink text (5.8:1), apart from the terracotta Done below */
.btn--green:hover { background: #5aabab; border-color: #5aabab; color: var(--ink); } /* lighter on hover keeps ink text at 6.6:1 */
.btn--danger { background: var(--danger); border-color: var(--danger); color: var(--white); }
.btn--danger:hover { background: #a3481d; border-color: #a3481d; color: var(--white); }
.btn--big { min-height: 3.5rem; font-size: var(--t-lead); font-family: var(--sans); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* Buttons share a row while there is room, each never narrower than 13rem. */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-xs);
}
.actions > .btn { flex: 1 1 13rem; }
.actions--start > .btn { flex: 0 1 auto; min-width: min(100%, 13rem); }

.linkbtn {
  display: inline-flex; align-items: center; gap: 0.4em;
  min-height: 2.75rem;
  padding: 0;
  border: 0; background: none;
  color: var(--action);
  font-size: var(--t-body);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.linkbtn:hover { color: var(--action-hover); }
.linkbtn svg { width: 1em; height: 1em; }

/* ---------- App bar: the Trust Check mark on every inner screen ---------- */
.appbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s-2xs) var(--s-s);
  padding-top: clamp(1rem, 0.7rem + 1.5vw, 2rem);
}
.appbar .mark { font-size: clamp(0.9rem, 0.8rem + 0.5vw, 1.25rem); color: var(--ink); }
.appbar .mark-sq i { width: clamp(0.6rem, 0.5rem + 0.4vw, 0.9rem); }
.appbar .count { font-weight: 650; font-size: var(--t-small); }
.appbar + .screen { padding-top: var(--s-m); }
.appbar + .stages-screen .wrap:first-child { padding-top: 0; }

.mark-btn { display: inline-flex; align-items: center; gap: inherit; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; min-height: 2.75rem; }
.mark-btn:hover { opacity: 0.8; } /* no underline; a slight fade shows it's clickable */

/* ---------- Steps menu ---------- */
.appbar-right { display: inline-flex; align-items: center; gap: var(--s-s); }
.steps-btn {
  display: inline-flex; align-items: center; gap: 0.45em;
  min-height: 2.75rem; padding: 0 0.25rem;
  border: 0; background: none; cursor: pointer;
  font: 650 var(--t-small)/1 var(--sans); color: inherit;
}
.steps-btn svg { width: 1.15em; height: 1.15em; }
.steps-btn:hover { opacity: 0.8; } /* same quiet fade as the Trust Check mark */
.band .steps-btn { color: var(--cream); }
.steps-list { list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.step {
  width: 100%; min-height: 2.75rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3xs); /* answer sits under its question, not beside it */
  padding: var(--s-xs) 0.25rem;
  border: 0; border-bottom: 1px solid var(--line); background: none;
  text-align: left; font: inherit; font-size: var(--t-small); color: var(--ink); cursor: pointer;
}
.step:hover:not(:disabled) { background: rgba(31, 80, 80, 0.06); }
.step:disabled { color: var(--muted); cursor: not-allowed; }
.step.is-current { font-weight: 650; box-shadow: inset 3px 0 0 var(--action); padding-left: 0.6rem; }
.step-label { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.step-meta { display: inline-flex; align-items: center; gap: 0.3em; color: var(--muted); font-size: var(--t-cap); font-weight: 400; white-space: nowrap; }
.step-meta em { font-style: italic; } /* the answer itself in italics so it reads apart from its question */
.step-meta svg { width: 1em; height: 1em; }

/* ---------- Top bar: back + progress ---------- */

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2xs) var(--s-s);
}
.topbar .count { font-weight: 600; font-size: var(--t-small); }
.topbar .linkbtn { text-decoration: none; }
.progress {
  height: 4px;
  background: var(--line);
  overflow: hidden;
}
.progress > span {
  display: block; height: 100%;
  width: var(--p, 0%);
  background: var(--action);
  transition: width 400ms var(--ease);
}

/* ---------- Welcome ---------- */

/* Headline and details sit side by side once each can be at least 22rem wide. */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: var(--s-l) var(--s-xl);
  align-items: start;
}
.split > * { min-width: 0; }

.foot-gap { margin-top: var(--s-xs); }

/* ---------- Text fields ---------- */

.field { display: flex; flex-direction: column; gap: var(--s-3xs); }
.field textarea {
  width: 100%;
  min-height: 7.5rem;
  padding: var(--s-xs) var(--s-s);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--white);
  font-size: var(--t-body);
  line-height: 1.5;
  resize: vertical;
}
.field-hint { font-size: var(--t-body); color: var(--ink); }
/* The answer area is its own group: a group-sized step above it, the hint snug
   on its box (it labels the box), the button a step below. */
.below > .answer { margin-top: calc(var(--gap-group) - var(--gap-text)); display: flex; flex-direction: column; gap: var(--s-m); }
.answer .field { gap: var(--gap-label); }
.field textarea:focus-visible { outline-offset: 0; border-color: var(--action); }
.field .counter { align-self: flex-end; font-size: var(--t-small); color: var(--muted); } /* small gray */

.examples { list-style: none; display: flex; flex-direction: column; gap: var(--s-2xs); }
.examples li {
  padding-left: var(--s-s);
  border-left: 2px solid rgba(31, 80, 80, 0.35);
  line-height: 1.4;
}

/* ---------- Zone color swatches (used by the score bar, grid and legends) ---------- */

.swatch {
  display: inline-block; flex: none;
  width: 0.85em; height: 0.85em;
  background: var(--z);
}
.z-build { --z: var(--zone-build); }
.z-grow { --z: var(--zone-grow); }
.z-sustain { --z: var(--zone-sustain); }

/* ---------- Rating group ---------- */

.rating { container-type: inline-size; border: 0; padding: 0; min-width: 0; }
.rating legend { padding: 0; margin-bottom: var(--s-xs); font-size: var(--t-body); color: var(--ink); }
.rating-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2xs);
}
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-xs);
  min-height: 3.25rem;
  padding: var(--s-2xs) var(--s-s);
  background: var(--white);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  line-height: 1.25;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.opt:hover { border-color: var(--action); }
.opt input {
  position: absolute; opacity: 0;
  width: 1px; height: 1px; margin: 0;
}
.opt .num { font-weight: 700; min-width: 1ch; }
.opt:has(input:checked) { background: var(--select); border-color: var(--select); color: var(--ink); }
.opt:has(input:focus-visible) { outline: 3px solid var(--action); outline-offset: 3px; }
.opt.is-checked { background: var(--select); border-color: var(--select); color: var(--ink); }

/* When the group itself has room for five readable columns, it becomes a row.
   This is the one place the shape changes, and it follows the group's width,
   not the device. */
@container (min-width: 38rem) {
  .rating-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* Every button: same padding top and bottom, number on one shared line, and a
     two-line slot for the label with the text centered in it, so one-line and
     two-line labels look equally balanced. */
  .opt {
    flex-direction: column;
    justify-content: center;
    gap: var(--s-2xs);
    padding: var(--s-s) var(--s-2xs);
    text-align: center;
  }
  .opt .num { font-weight: 700; font-size: 1.5em; line-height: 1; }
  .opt .word {
    display: flex; align-items: center; justify-content: center;
    min-height: 2.5em; /* two lines at line-height 1.25 */
    line-height: 1.25;
  }
}

/* ---------- Why card ---------- */

.why [data-impact] { margin-top: var(--s-xs); }
.why { display: flex; flex-direction: column; gap: var(--s-s); animation: rise 450ms var(--ease) both; }
.why .impact, .why-head { display: flex; flex-direction: column; gap: var(--gap-label); }

/* ---------- Results ---------- */

.results { --zone: var(--zone-grow); --zone-tint: #dcecec; --zone-text: var(--ink); gap: var(--s-xl); }
.results.z-build { --zone: var(--zone-build); --zone-tint: #f6e5da; --zone-text: var(--ink); }
.results.z-sustain { --zone: var(--zone-sustain); --zone-tint: #ebe8f9; --zone-text: var(--ink); }

.zone-word { font-style: normal; color: var(--zone-text); }
/* Every zone word: ink text (readable) with a thick underline in the zone's
   light color (the light trio is too pale for text on cream). The masked
   word inside it (when animating) carries the same underline. */
.zone-word { --brush-color: var(--zone); }
/* Room for the brush stroke under the results headline (scales with the heading). */
.results h1 { margin-bottom: 0.3em; }
.band .statement:has(.accent) { margin-bottom: 0.3em; } /* same room under "three stages." */

/* Overview: summary and decision grid side by side when both fit. */
.overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: var(--s-l);
  align-items: start;
}
.overview > * { min-width: 0; }

.score-line { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-2xs) var(--s-m); }

.zonebar { display: flex; flex-direction: column; gap: calc(0.4rem + var(--s-2xs)); } /* clears the marker's overhang, then a small gap */
.zonebar-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2px;
  height: 0.75rem;
}
.zonebar-track > span:not(.zonebar-marker) { background: var(--z); } /* full theme colors; the marker and bold label show where you are */
.zonebar-marker {
  position: absolute;
  top: -0.4rem; bottom: -0.4rem;
  left: var(--at, 0%);
  width: 3px;
  margin-left: -1px;
  background: var(--ink);
}
.zonebar-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  font-size: var(--t-cap);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase; /* eyebrow style */
  color: var(--muted);
  line-height: 1.3;
}
.zonebar-labels .on { color: var(--ink); }

.zone-change { font-weight: 600; }

/* Sparklines */
.spark { display: inline-flex; flex-direction: column; gap: var(--s-3xs); max-width: 100%; }
.spark-btn {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-3xs) var(--s-2xs);
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.25rem 0.5rem 0.25rem 0;
  border: 0; background: none; cursor: pointer;
  font-size: var(--t-cap); color: var(--muted); text-align: left;
}
.spark-btn:hover .spark-label { color: var(--action); }
.spark-label { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 0.2em; }
.spark svg { width: 6.5rem; height: 2rem; flex: none; overflow: visible; }
.spark--total svg { width: 8rem; height: 2.5rem; }
.spark polyline { fill: none; stroke: var(--zone); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark circle { fill: var(--zone); }
.spark circle.last { fill: var(--ink); }
.spark-dates { font-size: var(--t-cap); color: var(--ink); }

/* Decision grid */
.card.decide { padding: clamp(0.75rem, 0.3rem + 2.2vw, 2rem); }
.decide > :first-child { margin-bottom: var(--s-xs); } /* their change, then a step before the question */
.decide { container-type: inline-size; display: flex; flex-direction: column; gap: var(--s-s); }
.sizes {
  border: 0; padding: 0; min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-2xs);
}
/* Three sizes go side by side only when all three fit; never 2 + 1. */
@container (min-width: 36rem) {
  .sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.size {
  position: relative;
  display: flex; flex-direction: column; gap: var(--s-3xs);
  padding: var(--s-xs) var(--s-s);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  line-height: 1.45;
}
.size:hover { border-color: var(--action); }
.size input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.size .size-name { font-weight: 650; display: flex; align-items: center; gap: 0.5em; }
.size .size-name::before {
  content: ""; flex: none;
  width: 1rem; height: 1rem;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}
.size .size-desc { font-size: var(--t-small); color: var(--muted); }
.size:has(input:checked) { background: var(--select); border-color: var(--select); }
.size:has(input:checked) .size-desc { color: var(--ink); }
.size:has(input:checked) .size-name::before { border-color: var(--ink); background: radial-gradient(circle, var(--ink) 0 45%, transparent 50%); }
.size.is-checked { background: var(--select); border-color: var(--select); }
.size.is-checked .size-desc { color: var(--ink); }
.size.is-checked .size-name::before { border-color: var(--ink); background: radial-gradient(circle, var(--ink) 0 45%, transparent 50%); }
.size:has(input:focus-visible) { outline: 3px solid var(--action); outline-offset: 3px; }

.grid-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  table-layout: fixed;
  text-align: center;
  font-size: min(var(--t-body), 0.55rem + 2.4cqi); /* body size; only shrinks on the narrowest phones */
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}
.grid-table th { font-weight: 650; padding: 0.4em 0.1em; }
.grid-table thead th { vertical-align: bottom; }
/* On the narrowest phones the headers drop "change" (the question already says it). */
@container (max-width: 19rem) { .th-change { display: none; } .grid-table thead th { font-size: 0.7rem; } }
@media (max-width: 22.5rem) { .grid-table tbody th { font-size: 0.92em; } }
.grid-table .corner { width: 22%; border: 0; background: none; }
.grid-table tbody th { text-align: left; padding-left: 0.2em; }
.grid-table tbody th span.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3em 0.45em; }
@media (max-width: 47.99rem) { .grid-table tbody th span.row { flex-direction: column; align-items: flex-start; } } /* phones: every zone name sits under its color square, not just the longest */
.grid-table td {
  height: clamp(3rem, 12cqi, 4.5rem);
  padding: 0.3em 0.15em;
  border: 1px solid var(--line);
  background: var(--white);
}
.grid-table td.pick {
  background: var(--zone); /* your zone's color; ink text on it 5.6:1 or better */
  color: var(--ink);
  font-weight: 650;
  outline: 3px solid var(--ink);
  outline-offset: -3px;
}
.pick-tag { display: block; margin-top: 0.45em; font-size: var(--t-cap); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; } /* eyebrow style */

.verdict { display: flex; flex-direction: column; gap: var(--gap-heading); } /* standard heading-to-text gap */
.verdict:empty { display: none; }
.verdict-next { margin-top: var(--s-s); display: flex; flex-direction: column; gap: var(--gap-label); } /* standard label-to-text gap; more room above so it groups with its own text */
.verdict-next .eyebrow { color: var(--ink); }
/* The result box matches the highlighted cell, so the two read as one. */
.verdict.panel { background: var(--zone-tint); border-color: var(--zone-tint); color: var(--ink); } /* light tint of your zone: easy to read */

/* Per-statement chart: groups flow into as many columns as fit. */
.chart { container-type: inline-size; }
.cue-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-s); /* the boxes separate the areas */
  align-items: start;
}
/* Four groups: one column, then two, then all four. Never 3 + 1. */
@container (min-width: 40rem) { .cue-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 82rem) { .cue-groups { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cue-group { display: flex; flex-direction: column; gap: var(--s-s); min-width: 0; background: var(--white); border: 1px solid var(--line); padding: var(--s-s); } /* one box per area */
.cues { list-style: none; display: flex; flex-direction: column; gap: var(--s-m); } /* clear space between cues */
.cue { display: flex; flex-direction: column; gap: var(--s-2xs); } /* statement and its bar stay together */
.cue-text { font-size: var(--t-body); line-height: 1.45; }
.bars { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-3xs) var(--s-2xs); }
.bars .lbl { font-size: var(--t-small); color: var(--muted); }
.bars .val { font-weight: 650; font-size: var(--t-body); min-width: 1.5ch; text-align: right; }
.track { height: 0.6rem; background: rgba(26, 24, 20, 0.08); }
.track > span { display: block; height: 100%; width: var(--v, 0%); background: var(--zone); }
.track.first > span { background: transparent; border: 1px solid var(--muted); background-image: repeating-linear-gradient(135deg, rgba(26,24,20,0.28) 0 2px, transparent 2px 5px); }
.bars--single { grid-template-columns: 1fr auto; }
.cue-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--s-s); }
.change { font-weight: 650; font-size: var(--t-body); font-variant-numeric: tabular-nums; }

/* Your 11 cues: closed accordion under the score */
.cues-acc { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cues-acc > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-s);
  min-height: 3rem; padding-block: var(--s-2xs);
  cursor: pointer; list-style: none;
  font-weight: 650; color: var(--action);
}
.cues-acc > summary::-webkit-details-marker { display: none; }
.cues-acc > summary::after {
  content: ""; flex: none; width: 0.6em; height: 0.6em;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-0.15em);
  transition: transform 250ms var(--ease);
}
.cues-acc[open] > summary::after { transform: rotate(-135deg) translateY(-0.15em); }
.cues-body { padding-block: var(--s-xs) var(--s-m); }
details.table-alt summary { cursor: pointer; color: var(--action); font-weight: 650; min-height: 2.75rem; display: inline-flex; align-items: center; }
details.table-alt summary { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; } /* reads as a link, like the Download table link */
details.table-alt summary:hover { color: var(--action-hover); }
.table-scroll { max-width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--t-small); line-height: 1.4; }
.data-table th, .data-table td { padding: 0.5em 0.6em; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table td.n, .data-table th.n { text-align: right; white-space: nowrap; }
.data-table thead th { font-weight: 650; }

/* ---------- Results page system ----------
   Page title (serif h1) > card titles (serif, one size) > subheads (sans bold) > body.
   Every section is the same card: white, thin border, zone-color strip on top. */
.card {
  display: flex; flex-direction: column; gap: var(--gap-text);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 6px solid var(--zone);
  padding: var(--s-m);
  min-width: 0;
}
/* Results: only the page title (h1) is serif. Section headings are bold sans,
   one step larger than body bold so they still lead each section. */
.card-title { font-family: var(--sans); font-weight: 650; font-size: clamp(1.25rem, 1.12rem + 0.6vw, 1.5rem); line-height: 1.3; text-wrap: balance; }
.save-card .after { margin-top: var(--s-xs); }

/* Tips panel: the next step after the result, tied to it by the zone color. */
/* Results intro: one framing sentence with an inline jump, and a quick download. */
.results-intro { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2xs); }
.inline-link {
  display: inline; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--action); font-weight: 650;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em;
}
.inline-link:hover { color: var(--action-hover); }
/* "On this page" map: two numbered jumps, quiet but obvious. */
/* Wraps: the Download link sits beside the parts when there's room, below them when not. */
.page-map { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--gap-label) var(--s-m); }
.page-map > .eyebrow { flex-basis: 100%; }
.page-map ol { min-width: 0; }
.map-pdf { font-weight: 650; text-decoration: none; color: var(--action); }
.map-pdf:hover { text-decoration: underline; }

.page-map ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2xs) var(--s-m); }
.map-link {
  display: inline-flex; align-items: center; gap: 0.55em;
  min-height: 2.75rem; padding: 0;
  border: 0; background: none; cursor: pointer;
  font: 650 var(--t-body)/1.3 var(--sans); color: var(--action); text-align: left;
}
.map-link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.map-n {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 1.6em; height: 1.6em;
  background: var(--action); color: var(--white); font-size: 0.85em;
}
#results-h, #change-h { scroll-margin-top: var(--s-m); }

/* Part 1 reads as one unit: the tips sit close under the score. */
.results > .cues-section, .results > .tips-card { margin-top: calc(var(--gap-group) - var(--s-xl)); }
.tips-card .watch { background: var(--zone-tint); padding: var(--s-s); } /* same zone tint as the planner result box */

/* Tips flow into columns as space allows. */
.tips {
  list-style: none;
  counter-reset: tip;
  display: grid;
  /* One column, then at most two, so 4 or 5 tips never leave an orphan row of one. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, max(19rem, 50% - var(--s-l))), 1fr));
  gap: var(--s-m) var(--s-l);
}
.tips-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: var(--s-m) var(--s-l);
  align-items: start;
}
.tips-layout > * { min-width: 0; }
@media (min-width: 75rem) { .tips-layout { grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr); } }
.tip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-xs); align-items: start; }
.tip .tip-n { font-weight: 650; font-size: var(--t-body); line-height: 1.6; color: var(--ink); min-width: 1ch; } /* same as the tip title */
.z-build .tip .tip-n { color: var(--ink); }
.watch h3 { display: flex; align-items: flex-start; gap: 0.5em; }
.watch h3 svg { flex: none; width: 1.5em; height: 1.5em; margin-top: -0.05em; } /* larger eye, centered on the first line */
.watch h3 { font-family: var(--sans); font-weight: 650; font-size: var(--t-body); line-height: 1.35; }

.reflect-quote { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); font-weight: 600; line-height: 1.45; }

.reason { font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem); font-weight: 600; line-height: 1.5; max-width: 52ch; }

.download {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: var(--s-s) var(--s-l);
  align-items: center;
}
.download > .note, .download > [role="status"] { grid-column: 1 / -1; }
.download > [role="status"]:empty { display: none; }

.after { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-xs) var(--s-s); }
.after > .btn { flex: 0 1 auto; min-width: min(100%, 11rem); }
.after > p { flex-basis: 100%; }

/* ---------- Dialog ---------- */

.dialog {
  width: min(100% - 2 * min(1rem, 3vw), 34rem);
  max-width: none;
  max-height: calc(100dvh - 2 * min(1rem, 3vh));
  margin: auto;
  padding: min(var(--s-m), 5vw);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(26, 24, 20, 0.25);
}
.dialog::backdrop { background: rgba(26, 24, 20, 0.45); }
.dialog[open] { animation: rise 300ms var(--ease) both; }
.dialog .stack { gap: var(--s-s); }
.dialog .actions > .btn { flex-basis: 11rem; }

/* Steps menu as a side drawer: full height, slides in from the right. */
.dialog.dialog--drawer {
  margin: 0 0 0 auto;
  width: min(100%, 28rem);
  height: 100vh; height: 100dvh;
  max-height: none;
  border: 0; border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px rgba(26, 24, 20, 0.2);
}
.dialog.dialog--drawer[open] { animation: drawer-in 380ms var(--ease) both; }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-s); }
.drawer-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; flex: none;
  border: 0; background: none; color: var(--ink); cursor: pointer;
}
.drawer-close svg { width: 1.4rem; height: 1.4rem; }
.drawer-close:hover { color: var(--action); }

/* ---------- Footer ---------- */

.site-foot {
  display: flex; flex-wrap: wrap; gap: 0.25em 0.6em;
  padding-block: var(--s-s) var(--s-l);
  font-size: var(--t-body);
  color: var(--muted);
}
.site-foot[hidden] { display: none; }
.site-foot-privacy { flex-basis: 100%; }
.site-foot-sep2 { display: none; }
@media (min-width: 48rem) { .site-foot-privacy { flex-basis: auto; } .site-foot-sep2 { display: inline; } } /* one line on wider screens */
/* Welcome: the splash fills the screen minus the footer, so the footer shows too. */
body[data-screen="welcome"] .app, body[data-screen="welcomeBack"] .app { display: flex; flex-direction: column; }
body[data-screen="welcome"] .splash, body[data-screen="welcomeBack"] .splash { min-height: 0; flex: 1 0 auto; padding-bottom: clamp(1.25rem, 4svh, 4rem); }
body[data-screen="welcome"] .site-foot, body[data-screen="welcomeBack"] .site-foot { padding-block: 0 var(--s-s); }
.site-foot a { color: var(--action); display: inline-flex; align-items: center; min-height: 1.5rem; }

/* ---------- Splash (Welcome, Welcome back) ---------- */

/* Brand mark: one square per zone, Build · Grow · Sustain. */
.mark {
  display: flex; align-items: center; gap: clamp(0.6rem, 0.4rem + 0.6vw, 1rem);
  font: 700 clamp(1.05rem, 0.85rem + 1vw, 1.75rem)/1 var(--sans);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.mark-sq { display: flex; gap: 4px; }
.mark-sq i { width: clamp(0.7rem, 0.55rem + 0.5vw, 1.1rem); aspect-ratio: 1; }
/* The mark uses the design system's lighter zone colors, matched in lightness
   so no square looks heavier than the others. */
.mark-sq i:nth-child(1) { background: #d4895a; } /* Build */
.mark-sq i:nth-child(2) { background: #4a9e9e; } /* Grow */
.mark-sq i:nth-child(3) { background: #9d92e0; } /* Sustain */

body[data-screen="welcome"], body[data-screen="welcomeBack"] { background: var(--teal-deep); color: var(--cream); }
body[data-screen="welcome"] .backdrop, body[data-screen="welcomeBack"] .backdrop { display: none; }
body[data-screen="welcome"] :focus-visible, body[data-screen="welcomeBack"] :focus-visible { outline-color: var(--cream); }
body[data-screen="welcome"] .site-foot, body[data-screen="welcomeBack"] .site-foot, body[data-screen="stages"] .site-foot { color: rgba(250, 248, 244, 0.8); } /* stages: the footer continues the teal closing band */
body[data-screen="welcome"] .site-foot a, body[data-screen="welcomeBack"] .site-foot a, body[data-screen="stages"] .site-foot a { color: var(--peach); }

/* Screens that open with the teal band: the page itself is teal and the content
   area is cream, so a phone's status bar (which takes its color from the page,
   not from the band) is teal from the start instead of turning teal only once
   the band pins. */
html:has(body[data-screen="statement"]), html:has(body[data-screen="ask"]),
html:has(body[data-screen="tried"]), html:has(body[data-screen="stages"]),
html:has(body[data-screen="welcome"]), html:has(body[data-screen="welcomeBack"]),
body[data-screen="statement"], body[data-screen="ask"],
body[data-screen="tried"], body[data-screen="stages"] { background: var(--teal-deep); }
body[data-screen="statement"] .app, body[data-screen="ask"] .app,
body[data-screen="tried"] .app, body[data-screen="stages"] .app { background: var(--cream); }
/* The footer runs full width in cream on these screens too (the page behind it is teal). */
body[data-screen="statement"] .site-foot, body[data-screen="ask"] .site-foot,
body[data-screen="tried"] .site-foot {
  background: var(--cream); box-shadow: 0 0 0 100vmax var(--cream); clip-path: inset(0 -100vmax);
}
body[data-screen="statement"] .backdrop, body[data-screen="ask"] .backdrop,
body[data-screen="tried"] .backdrop, body[data-screen="stages"] .backdrop { display: none; }

.splash {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  padding-block: clamp(1.75rem, 6svh, 6rem) clamp(1.75rem, 6svh, 6.5rem); /* breathing room that scales with screen height, so it fits above the fold */
}
.splash-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  gap: clamp(1.5rem, 5svh, 3.5rem); /* space, not a line, splits headline from details; shrinks on short screens */
  container-type: inline-size;
}
.splash-title { margin-top: auto; display: flex; flex-direction: column; gap: clamp(0.75rem, 2.5svh, 1.5rem); }
.splash-h {
  /* Sized to its container so the longest line (about 9.5em) always fits on
     one line; the three lines then keep their shape, shortest last. */
  font: 400 clamp(1.75rem, min(8cqi, 8.5svh), 6.5rem)/1.02 var(--serif); /* sized to width and height, so the whole welcome fits above the fold */
  letter-spacing: -0.025em;
}
/* Phrase per line: each phrase starts a new line; a phrase too long for the
   screen wraps inside itself, balanced. */
.splash-h .ph { display: block; text-wrap: balance; }
/* The brush stroke hangs below the last line, so add space equal to its height
   (scales with the headline) to keep the gap to the details clearly a group gap. */
.splash-h { margin-bottom: 0.25em; }

/* Splash entrance: each word rises from behind its own mask, one at a time,
   then each detail rises on its own. Transform and opacity only. */
.splash .mark { animation: fade-in 600ms var(--ease) both; }
.splash .mark { font-weight: 600; font-size: clamp(0.95rem, 0.8rem + 0.7vw, 1.4rem); } /* lighter and a step smaller, so the headline is what the eye lands on first */
@keyframes line-up { from { transform: translateY(135%); } to { transform: none; } } /* start fully below the mask, padding included */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.splash-h--short { font-size: clamp(3rem, 14cqi, 10rem); }
.splash-h em { font-style: normal; color: inherit; --brush-color: var(--orange-on-dark); }
.splash-body { display: flex; flex-direction: column; gap: clamp(0.75rem, 3.5svh, var(--s-m)); max-width: 46rem; } /* tighter on short screens so it fits above the fold */
/* Proximity: the lede and its paragraph are one unit, so they sit close. */
.splash-intro { display: flex; flex-direction: column; gap: var(--s-2xs); }
.splash-intro > p:not(.splash-lede) { max-width: 62ch; color: rgba(250, 248, 244, 0.92); }
.splash-lede { font: 650 clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem)/1.4 var(--sans); text-wrap: pretty; }
.splash-body > .actions { margin-top: var(--s-2xs); }
/* Start alone (nothing saved yet): same width it has next to "View previous results", full width on phones. */
@media (min-width: 30rem) { .splash-body > .actions > .btn:only-child { flex: 0 1 calc(50% - var(--s-xs) / 2); } }

.facts {
  list-style: none;
  display: flex; flex-wrap: wrap;
  gap: 0.5rem clamp(1rem, 0.7rem + 1vw, 1.75rem);
  font-size: var(--t-body); /* same size as the paragraph above */
  color: rgba(250, 248, 244, 0.88);
}
.facts li { display: inline-flex; align-items: center; gap: 0.5em; }
.facts svg { width: 1.4em; height: 1.4em; flex: none; stroke: var(--orange-on-dark); }

.btn--outline-light { background: transparent; border-color: var(--cream); color: var(--cream); }
.btn--outline-light:hover { background: rgba(250, 248, 244, 0.12); border-color: var(--cream); color: var(--cream); }

/* ---------- Stages: full-bleed color fields ---------- */
/* The four areas, listed before Begin. */
.areas { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-3xs) var(--s-2xs); }
.areas li { font-weight: 650; } /* plain bold names, not boxes (boxes read as buttons) */
.areas li:not(:last-child)::after { content: "\00b7"; margin-left: var(--s-2xs); font-weight: 400; color: var(--muted); }


.stages-screen { display: flex; flex-direction: column; container-type: inline-size; }
.stages-foot { display: flex; flex-direction: column; gap: var(--gap-text); padding-block: var(--gap-group) var(--s-xl); }
.fields { list-style: none; display: grid; grid-template-columns: 1fr; }
/* All three side by side once each can be ~17rem; never 2 + 1. */
@container (min-width: 52rem) { .fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.field-block {
  /* Top-anchored so "Stage n" and the zone word line up across all three blocks,
     whatever the length of each description. */
  display: flex; flex-direction: column; justify-content: flex-start;
  gap: var(--s-l);
  padding: clamp(1.5rem, 1rem + 2.5vw, 3.5rem) var(--gutter) clamp(2rem, 1rem + 3.5vw, 4.5rem);
  color: var(--white);
}
.f-build { background: var(--terracotta-light); color: var(--ink); } /* ink on light terracotta: 6.4:1 */
.field-block :focus-visible { outline-color: var(--ink); }
.f-grow { background: #4a9e9e; color: var(--ink); }     /* ink: 5.6:1 */
.f-sustain { background: #9d92e0; color: var(--ink); }  /* ink: 6.3:1 */
.field-n { font-size: var(--t-cap); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.field-body { display: flex; flex-direction: column; gap: var(--s-2xs); }
.field-word { font: 400 clamp(3rem, 2rem + 4.5vw, 6.5rem)/0.9 var(--serif); letter-spacing: -0.02em; }
.field-where { font-weight: 650; font-size: var(--t-body); line-height: 1.35; max-width: 30ch; } /* bold lead line: same tighter leading as our bold headings */
.field-what { font-size: var(--t-body); max-width: 42ch; }
.field-block :focus-visible { outline-color: var(--white); }

/* ---------- Statement screen: teal band ---------- */

.band { background: var(--teal-deep); color: var(--cream); }
.band .appbar .mark, .band .appbar .count { color: var(--cream); }
.band :focus-visible { outline-color: var(--cream); }
.band-inner { padding-block: var(--s-m) var(--s-l); display: flex; flex-direction: column; gap: var(--gap-text); }
.band .linkbtn { color: var(--cream); }
.band .progress { background: rgba(250, 248, 244, 0.18); }
.band .progress > span { background: var(--orange-on-dark); }
.band .progress + .titleblock { margin-top: var(--s-xs); } /* breathing room between progress and the title */
.band .eyebrow { color: var(--peach); } /* small text on dark: peach, 5:1 */
.band .accent { color: inherit; --brush-color: var(--orange-on-dark); }
.band-text { max-width: 52ch; color: rgba(250, 248, 244, 0.92); margin-top: calc(var(--gap-heading) - var(--gap-text)); }
/* A statement, not a hero: about 40 characters per line (13em of this
   condensed serif), type that scales with the screen, balanced lines. */
.band .statement {
  font-size: clamp(2rem, 0.9rem + 5vw, 7.5rem);
  line-height: 1.06;
  max-width: 13em;
  text-wrap: balance;
}
.below { padding-block: var(--gap-group) var(--s-xl); display: flex; flex-direction: column; gap: var(--gap-text); }
.below > * { max-width: 60rem; } /* ratings and card keep a readable width, aligned with the statement */
.below > .why { margin-top: var(--s-xs); }

/* ---------- Brush-stroke underline ----------
   Accent words keep the heading's own color; the color comes from a painted
   stroke underneath, which draws in left to right after the heading appears. */
.splash-h em, .band .accent, .zone-word, .zone-mark {
  position: relative;
  isolation: isolate;
  white-space: nowrap;
}
.splash-h em::after, .band .accent::after, .zone-word::after, .zone-mark::after {
  content: "";
  position: absolute; z-index: -1;
  left: -0.06em; right: -0.08em; bottom: -0.02em;
  height: 0.3em;
  background: var(--brush-color, currentColor);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20300%2024%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M4%2013.5C38%208.2%2074%209.6%20112%208.4c39-1.2%2077%20.4%20116-.6%2023-.6%2047-2.2%2068-1.4%202.3.1%203.1%203.6.9%204.4-9.6%203.4-6.1%204.9-2.6%206.7%202.4%201.2%201.3%204.6-1.4%204.5-36-1.2-72%201.6-108%201.3-41-.4-82-1.7-123%20.4-20%201-39%202.6-58%203.1C1.9%2022.1%201%2019.2%203%2018c3.6-2.1%202.4-3.1-1.2-3.4-1.7-.2-1-1.6%202.2-1.1z%22%20fill%3D%22black%22/%3E%3Cpath%20d%3D%22M22%2011.2c50-2.4%20120-3.6%20200-3.1M30%2019.4c70-1.8%20150-1.2%20230-2.6%22%20stroke%3D%22black%22%20stroke-width%3D%221.2%22%20fill%3D%22none%22%20opacity%3D%22.5%22/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20300%2024%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M4%2013.5C38%208.2%2074%209.6%20112%208.4c39-1.2%2077%20.4%20116-.6%2023-.6%2047-2.2%2068-1.4%202.3.1%203.1%203.6.9%204.4-9.6%203.4-6.1%204.9-2.6%206.7%202.4%201.2%201.3%204.6-1.4%204.5-36-1.2-72%201.6-108%201.3-41-.4-82-1.7-123%20.4-20%201-39%202.6-58%203.1C1.9%2022.1%201%2019.2%203%2018c3.6-2.1%202.4-3.1-1.2-3.4-1.7-.2-1-1.6%202.2-1.1z%22%20fill%3D%22black%22/%3E%3Cpath%20d%3D%22M22%2011.2c50-2.4%20120-3.6%20200-3.1M30%2019.4c70-1.8%20150-1.2%20230-2.6%22%20stroke%3D%22black%22%20stroke-width%3D%221.2%22%20fill%3D%22none%22%20opacity%3D%22.5%22/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  animation: brush-in 650ms var(--ease) both;
  animation-delay: var(--brush-delay, 300ms);
}
/* Zone names in section headings: same brush in the zone color, no draw-in. */
.zone-mark { --brush-color: var(--zone); }
.zone-mark::after { animation: none; height: 0.32em; bottom: -0.06em; }
@keyframes brush-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- Motion system (see app.js animateScreen) ---------- */
/* Each word sits in a mask and rises into view; delays come from JS (--d). */
.mw {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.1em 0.16em 0;   /* room for descenders */
  margin: 0 -0.1em -0.16em 0;
}
.mw-in { display: inline-block; animation: line-up 700ms var(--ease) both; animation-delay: var(--d, 0ms); }
/* Content after the heading rises once. */
.enter { animation: rise 600ms var(--ease) both; animation-delay: var(--d, 0ms); }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important; /* no waiting for staggered items */
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Windows high contrast: keep selected states visible. */
@media (forced-colors: active) {
  .opt:has(input:checked), .size:has(input:checked), .grid-table td.pick { outline: 3px solid CanvasText; }
  .swatch, .zonebar-track > span, .track > span { forced-color-adjust: none; }
}

@media print {
  .backdrop, .site-foot, .topbar { display: none; }
}

/* Download table link: a little room below the Total row */
details.table-alt > p { margin-top: var(--s-xs); }

/* Table total: not an answer, so it reads as a summary row */
.data-table .total-row th, .data-table .total-row td { font-weight: 650; font-size: var(--t-body); border-top: 2px solid var(--ink); border-bottom: 0; background: var(--zone-tint); }

/* Quiet icon link (e.g. Download under the table): no underline, icon does the work */
.icon-link {
  display: inline-flex; align-items: center; gap: 0.4em; min-height: 2.75rem; padding: 0;
  border: 0; background: none; cursor: pointer; font: inherit; font-weight: 650; color: var(--action);
}
.icon-link svg { width: 1.1em; height: 1.1em; flex: none; }
.icon-link:hover { opacity: 0.8; }

/* Table: the column headings are labels, not rows. Eyebrow style plus a heavier
   rule; the statements themselves are regular text. */
.data-table thead th { font-size: var(--t-cap); font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); padding-bottom: 0.6em; }
.data-table tbody th { font-weight: 400; }
/* Keep statements and answers apart: a clear gutter before the answer column */
.data-table td.n, .data-table th.n { padding-left: var(--s-l); width: 1%; }

/* Welcome: two body paragraphs get normal paragraph spacing (the lede stays tight) */
.splash-intro > p:not(.splash-lede) + p { margin-top: clamp(0px, calc(2.5svh - var(--s-2xs)), calc(var(--gap-text) - var(--s-2xs))); }

/* Per-cue "Why this matters": a small link-style toggle under each bar */
.cue-more > summary {
  display: inline-flex; align-items: center; gap: 0.35em; min-height: 1.75rem; margin-top: calc(-1 * var(--s-3xs)); cursor: pointer; list-style: none; /* sits close under its bar; 28px tall still clears the 24px target minimum */
  color: var(--action); font-weight: 650; font-size: var(--t-small);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em;
}
.cue-more > summary::-webkit-details-marker { display: none; }
.cue-more > summary::after { content: ""; width: 0.45em; height: 0.45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-0.15em); }
.cue-more[open] > summary::after { transform: rotate(-135deg) translateY(-0.1em); }
.cue-more > summary:hover { color: var(--action-hover); }
.cue-more-body { display: flex; flex-direction: column; gap: var(--s-xs); padding: var(--s-2xs) 0 var(--s-xs); font-size: var(--t-small); }
.cue-more-body .impact { display: flex; flex-direction: column; gap: var(--s-3xs); }

/* Menu: statements grouped under their area, with a small label heading */
.step-group { padding-top: var(--s-s); }
.step-group-h { font-size: var(--t-cap); font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0 0.25rem var(--s-3xs); }
.steps-list .steps-sub { border-top: 1px solid var(--line); }
.step-group + li:not(.step-group) { margin-top: var(--s-s); } /* the last statement's bottom line already sits above Your results */


/* Stages intro: the four areas sit inline in bold; two short paragraphs */
.band-text.stack { gap: var(--gap-text); } /* normal paragraph spacing */
.band-text strong { font-weight: 650; color: var(--cream); }

/* Scroll hint on stages: a small chevron at the bottom of the screen, fades out on scroll */
.scroll-hint {
  position: fixed; left: 50%; bottom: var(--s-s); z-index: 20; translate: -50% 0;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cream); color: var(--ink); box-shadow: 0 4px 14px rgba(26, 24, 20, 0.18);
  pointer-events: none;
  transition: opacity 300ms var(--ease);
  animation: hint-bob 1.6s var(--ease) 1.4s infinite both;
}
.scroll-hint svg { width: 1.4rem; height: 1.4rem; }
.scroll-hint.is-gone { opacity: 0; }
@keyframes hint-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint { animation: none; } }
@media print { .scroll-hint { display: none !important; } }


/* Stages: closing teal band around Begin, mirroring the band at the top */
.stages-close { background: var(--teal-deep); color: var(--cream); }
.stages-close :focus-visible { outline-color: var(--cream); }
.stages-ready { font-size: var(--t-body); font-weight: 400; } /* plain paragraph text */
/* On tall screens the teal band fills to the bottom, so there's never a cream strip under it */
.stages-screen { min-height: 100svh; }
.stages-close { flex: 1 0 auto; }


/* Statement screens: collapsing band. Sticky with a negative top (set in JS) so
   only its bottom strip stays pinned; the strip shows the statement small. */
.band--collapse.is-pinnable { position: sticky; top: var(--band-top, 0px); z-index: 10; transition: box-shadow 200ms var(--ease); }
.band--collapse.is-collapsed { box-shadow: 0 6px 18px rgba(26, 24, 20, 0.16); }
html:has(.band--collapse.is-pinnable) { scroll-padding-top: calc(var(--pin-h, 4.5rem) + 1rem); } /* focused content stays clear of the pinned statement */
/* Collapsing band: the statement shrinks into the strip (transform set in JS);
   the rest of the band fades out early; "n of 11" fades into the strip. */
