/* Health Loom site. Same palette and type as the episodes: Powder Blue & Plum,
   Lexend (display), Atkinson Hyperlegible (body), IBM Plex Mono (data). */
:root {
  --bg: #DDEEF4; --page: #EAF4F8; --surface: #FFFFFF; --card: #FFFFFF;
  --ink: #163039; --ink-2: #4C646E; --rule: #C3D9E2; --line: #9DBBC9;
  --accent: #0D7562; --accent-ink: #FFFFFF; --accent-soft: #D7EDE8;
  --plum: #7B3F98; --plum-soft: #EDE1F3;
  --signal: #9A5B06; --danger: #B4232C; --danger-soft: #F8E1E2;
  --brand-red: #881315; --brand-blue: #174C78;
  --btn: #163039; --btn-ink: #FFFFFF;
  --shadow: 0 1px 0 rgba(22, 48, 57, .06), 0 10px 30px -18px rgba(22, 48, 57, .35);
  --font-display: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-data: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --r: 16px; --gutter: 16px; --max: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12252B; --page: #0E1C21; --surface: #15292F; --card: #15292F;
    --ink: #E2EEF2; --ink-2: #9BB3BC; --rule: #28404A; --line: #3A5560;
    --accent: #3FB59C; --accent-ink: #062019; --accent-soft: #143A33;
    --plum: #C79BE0; --plum-soft: #2E2238; --danger: #F07C83; --danger-soft: #3A1E22; --signal: #E0A54A;
    --btn: #DDEEF4; --btn-ink: #0E1C21;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 30px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12252B; --page: #0E1C21; --surface: #15292F; --card: #15292F;
  --ink: #E2EEF2; --ink-2: #9BB3BC; --rule: #28404A; --line: #3A5560;
  --accent: #3FB59C; --accent-ink: #062019; --accent-soft: #143A33;
  --plum: #C79BE0; --plum-soft: #2E2238; --danger: #F07C83; --danger-soft: #3A1E22; --signal: #E0A54A;
  --btn: #DDEEF4; --btn-ink: #0E1C21;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 30px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
section[id] { scroll-margin-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--page); color: var(--ink); font: 17px/1.6 var(--font-body); overflow-x: hidden; }
img, svg, video { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
/* headings get focus programmatically on each step change, for screen readers; no ring needed */
[tabindex="-1"]:focus { outline: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 700; }
h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.kicker { font: 500 13px/1.2 var(--font-data); letter-spacing: .08em; text-transform: uppercase; color: var(--plum); margin: 0 0 12px; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-2); }
.small { font-size: 15px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--btn); color: var(--btn-ink); padding: 10px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 600 16px/1 var(--font-display); padding: 15px 24px; min-height: 48px;
  text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px var(--accent); text-decoration: none; }
.btn:active { transform: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.dark { background: var(--btn); color: var(--btn-ink); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.btn.small { padding: 10px 16px; min-height: 40px; font-size: 15px; }
.link-btn { appearance: none; background: none; border: 0; padding: 6px 2px; color: var(--ink-2); font: 500 15px/1.3 var(--font-body);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--ink); }

/* ---------- header / footer ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 20px/1 var(--font-display); letter-spacing: -.01em; }
.brand img { width: 44px; height: auto; }
.brand .h { color: var(--brand-red); } .brand .l { color: var(--brand-blue); }
:root[data-theme="dark"] .brand .h, :root[data-theme="dark"] .brand .l { color: var(--ink); }
/* the red and blue mark needs a light backing on dark pages */
:root[data-theme="dark"] .brand img { background: #DDEEF4; border-radius: 10px; padding: 3px 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { background: #DDEEF4; border-radius: 10px; padding: 3px 4px; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand .h, :root:not([data-theme="light"]) .brand .l { color: var(--ink); } }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:not(.btn):hover { color: var(--accent); }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

.site-footer { border-top: 1px solid var(--rule); padding: 40px 0 56px; margin-top: 40px; font-size: 15px; color: var(--ink-2); }
.site-footer .wrap { display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr; }
.site-footer h4 { font-size: 14px; font-family: var(--font-data); text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--ink-2); }
.site-footer .badge { width: 72px; margin-bottom: 12px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- landing ---------- */
.hero { padding: clamp(36px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 em { font-style: normal; color: var(--plum); }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.hero .fine { font-size: 14px; color: var(--ink-2); }
.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; overflow: visible; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero-art { max-width: 520px; } }

/* the drawings wiggle like the episodes; words stay steady */
.wiggle { filter: url(#hl-wiggle); }
.a-fill-bg { fill: var(--bg); } .a-fill-surface { fill: var(--surface); } .a-fill-ink { fill: var(--ink); } .a-fill-ink2 { fill: var(--ink-2); }
.a-fill-accent { fill: var(--accent); } .a-fill-plum { fill: var(--plum); } .a-fill-red { fill: var(--brand-red); } .a-fill-blue { fill: var(--brand-blue); }
.a-fill-plum-soft { fill: var(--plum-soft); } .a-fill-accent-soft { fill: var(--accent-soft); }
.a-stroke-ink { stroke: var(--ink); } .a-stroke-line { stroke: var(--line); } .a-stroke-plum { stroke: var(--plum); } .a-stroke-accent { stroke: var(--accent); }
.a-stroke-red { stroke: var(--brand-red); } .a-stroke-blue { stroke: var(--brand-blue); }
.a-font-d { font-family: var(--font-display); } .a-font-m { font-family: var(--font-data); } .a-font-b { font-family: var(--font-body); }
.thread { stroke-dasharray: 6 10; animation: thread 2.4s linear infinite; }
@keyframes thread { to { stroke-dashoffset: -32; } }

.band { background: var(--bg); padding: clamp(48px, 7vw, 88px) 0; }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-head { max-width: 680px; margin-bottom: 36px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.steps li { background: var(--card); border-radius: var(--r); padding: 22px 20px 24px; box-shadow: var(--shadow); position: relative; }
.steps li::before { counter-increment: step; content: '0' counter(step); display: block; font: 500 13px/1 var(--font-data); color: var(--plum); letter-spacing: .08em; margin-bottom: 14px; }
.steps .icon { width: 44px; height: 44px; margin-bottom: 14px; }
.steps h3 { margin-bottom: 8px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 940px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.example { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.example .poster { border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); position: relative; }
.example .poster img { width: 100%; height: auto; }
.example .poster video { width: 100%; height: auto; background: #000; }
.example blockquote { margin: 0 0 20px; padding: 18px 20px; background: var(--card); border-left: 4px solid var(--plum); border-radius: 0 12px 12px 0; font-size: 18px; }
.example blockquote footer { margin-top: 8px; font: 500 13px/1.2 var(--font-data); color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; }
.chapters { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 2px; }
.chapters li { display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.chapters time { font: 500 14px/1.6 var(--font-data); color: var(--plum); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 0; }
.stat { background: var(--card); border-radius: 12px; padding: 14px 14px 12px; box-shadow: var(--shadow); }
.stat b { display: block; font: 500 26px/1.1 var(--font-data); color: var(--danger); }
.stat span { font-size: 14px; color: var(--ink-2); line-height: 1.35; display: block; margin-top: 4px; }
@media (max-width: 860px) { .example { grid-template-columns: 1fr; } }

.standards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.standard { display: grid; grid-template-columns: 40px 1fr; gap: 14px; background: var(--card); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.standard svg { width: 40px; height: 40px; }
.standard h3 { margin-bottom: 4px; font-size: 18px; }
.standard p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 700px) { .standards { grid-template-columns: 1fr; } }

.research { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.research .panel { background: var(--card); border-radius: 20px; padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.checks li::before { content: ''; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%230D7562' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.weave-art svg { width: 100%; height: auto; }
@media (max-width: 860px) { .research { grid-template-columns: 1fr; } .weave-art { max-width: 420px; } }

.faq { display: grid; gap: 10px; }
.faq details { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font: 600 17px/1.35 var(--font-display); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 14px; font: 400 26px/1 var(--font-display); color: var(--plum); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 18px; color: var(--ink-2); }
.faq details > div p:last-child { margin: 0; }

.cta-band { background: var(--btn); color: var(--btn-ink); border-radius: 24px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; opacity: .8; }
.cta-band .btn { background: var(--accent); }
@media (max-width: 700px) { .cta-band { grid-template-columns: 1fr; } }

.notice { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); font-size: 15px; color: var(--ink-2); }
.notice svg { width: 22px; height: 22px; margin-top: 1px; color: var(--signal); }
.notice strong { color: var(--ink); }
#safety { margin-bottom: 22px; }
.notice.urgent a { color: var(--ink); font-weight: 700; }
.notice.urgent { background: var(--danger-soft); box-shadow: inset 0 0 0 1.5px var(--danger); color: var(--ink); }
.notice.urgent svg { color: var(--danger); }
.notice p { margin: 0 0 6px; } .notice p:last-child { margin: 0; }

/* ---------- prose pages ---------- */
.prose { padding: 48px 0 24px; }
.prose h1 { font-size: clamp(32px, 5vw, 46px); }
.prose h2 { font-size: 24px; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose .updated { font: 500 13px/1 var(--font-data); color: var(--ink-2); letter-spacing: .04em; }
.prose .callout { background: var(--card); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); margin: 1.2em 0; }

/* ---------- intake form ---------- */
.intake { padding: 28px 0 40px; }
.intake .wrap { max-width: 760px; }
.progress { display: flex; align-items: center; gap: 12px; margin: 4px 0 22px; }
.progress ol { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex: 1; }
.progress li { flex: 1; height: 6px; border-radius: 99px; background: var(--rule); position: relative; overflow: hidden; }
.progress li.done, .progress li.current { background: var(--accent); }
.progress li.current { background: linear-gradient(90deg, var(--accent) 50%, var(--rule) 50%); }
.progress .label { font: 500 13px/1 var(--font-data); color: var(--ink-2); white-space: nowrap; letter-spacing: .04em; }

.step { display: none; }
.step.active { display: block; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step h1 { font-size: clamp(28px, 4.6vw, 40px); }
.step > .lede { margin-bottom: 22px; }
.card { background: var(--card); border-radius: 20px; padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); margin-bottom: 18px; }
.card h2 { font-size: 22px; margin-bottom: 4px; }

.field-label { display: block; font: 600 16px/1.35 var(--font-display); margin: 0 0 8px; color: var(--ink); padding: 0; }
.hint { display: block; font-size: 14px; color: var(--ink-2); margin: -4px 0 10px; font-family: var(--font-body); font-weight: 400; }
textarea, input[type="text"], input[type="email"], input[type="number"], select {
  width: 100%; font: 17px/1.5 var(--font-body); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 140px; resize: vertical; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.counter { text-align: right; font: 500 12px/1 var(--font-data); color: var(--ink-2); margin-top: 6px; }
.counter.over { color: var(--danger); }
fieldset { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.field { margin-bottom: 22px; }
.field:last-child, fieldset:last-child { margin-bottom: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 9px 15px; border-radius: 999px; background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line); font-size: 15px; line-height: 1.25; cursor: pointer; transition: background .12s, box-shadow .12s, color .12s; user-select: none; }
.chip:hover span { box-shadow: inset 0 0 0 1.5px var(--ink-2); }
/* Selection changes colour only, never width, so chips don't reflow under the pointer. */
.chip input:checked + span { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); color: var(--ink); }
.chip input[type="checkbox"] + span::before { content: ''; flex: none; width: 16px; height: 16px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface) center/12px no-repeat; }
.chip input[type="checkbox"]:checked + span::before { box-shadow: none; background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.chips.stack { flex-direction: column; align-items: stretch; }
.chips.stack .chip span { border-radius: 12px; width: 100%; padding: 12px 16px; }

.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.examples button { appearance: none; border: 0; background: var(--plum-soft); color: var(--ink); font: 15px/1.3 var(--font-body); padding: 8px 12px; border-radius: 10px; cursor: pointer; text-align: left; }
.examples button:hover { box-shadow: inset 0 0 0 1.5px var(--plum); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.actions .spacer { flex: 1; }
.error { color: var(--danger); font-size: 15px; margin: 10px 0 0; min-height: 1em; }
.error:empty { display: none; }

/* interview */
.transcript { display: grid; gap: 10px; margin-bottom: 16px; }
.bubble { padding: 12px 16px; border-radius: 16px; max-width: 92%; font-size: 16px; }
.bubble.you { background: var(--accent-soft); justify-self: end; border-bottom-right-radius: 6px; }
.bubble.us { background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); justify-self: start; border-bottom-left-radius: 6px; }
.bubble .who { display: block; font: 500 11px/1 var(--font-data); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 6px; }
.bubble.skipped { opacity: .7; font-style: italic; }
.asker { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.asker .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--rule); display: grid; place-items: center; }
.asker .avatar img { width: 28px; }
.asker h2 { font-size: clamp(20px, 3vw, 24px); margin: 6px 0 14px; }
.thinking { display: flex; align-items: center; gap: 10px; color: var(--ink-2); padding: 18px 0; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--plum); animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: scale(.85); } 40% { opacity: 1; transform: none; } }
.count-pill { display: inline-block; font: 500 12px/1 var(--font-data); letter-spacing: .06em; color: var(--plum); background: var(--plum-soft); padding: 6px 9px; border-radius: 99px; }

/* brief */
.brief-list { margin: 8px 0 0; padding-left: 1.2em; color: var(--ink-2); }
.brief-list li { margin-bottom: 4px; }
.tag { display: inline-block; font: 500 12px/1 var(--font-data); color: var(--brand-blue); background: color-mix(in srgb, var(--brand-blue) 12%, var(--surface)); padding: 6px 9px; border-radius: 99px; margin: 0 6px 6px 0; }
:root[data-theme="dark"] .tag { color: var(--ink); }

/* research */
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card { position: relative; }
.choice-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-card span { display: block; height: 100%; padding: 16px 18px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; }
.choice-card b { display: block; font: 600 17px/1.3 var(--font-display); margin-bottom: 4px; }
.choice-card small { color: var(--ink-2); font-size: 14px; line-height: 1.4; display: block; }
.choice-card input:checked + span { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.choice-card input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 560px) { .choice-cards { grid-template-columns: 1fr; } }
.history-section h3 { font-size: 15px; font-family: var(--font-data); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--plum); margin: 28px 0 16px; padding-top: 20px; border-top: 1px solid var(--rule); }
.history-section:first-child h3 { border-top: 0; padding-top: 0; margin-top: 4px; }
.measure { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.measure label { font-size: 14px; color: var(--ink-2); display: grid; gap: 4px; }
.measure .unit-toggle { display: flex; }
.measure .unit-toggle .chip span { min-height: 48px; }
.ft-in { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 560px) { .measure { grid-template-columns: 1fr 1fr; } .measure .unit-toggle { grid-column: 1 / -1; } }

.check { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 12px 0; cursor: pointer; font-size: 16px; }
.check + .check { border-top: 1px solid var(--rule); }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.check .req { font: 500 11px/1 var(--font-data); color: var(--plum); text-transform: uppercase; letter-spacing: .06em; margin-left: 6px; }

.review dl { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; margin: 0; }
.review dt { font: 500 13px/1.6 var(--font-data); color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.review dd { margin: 0; }
@media (max-width: 560px) { .review dl { grid-template-columns: 1fr; gap: 2px; } .review dd { margin-bottom: 10px; } }

.done-hero { text-align: center; padding: 20px 0 8px; }
.done-hero svg { width: 120px; margin: 0 auto 18px; }
.code { display: inline-block; font: 500 clamp(20px, 4vw, 26px)/1 var(--font-data); letter-spacing: .06em; background: var(--surface); padding: 12px 16px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line); user-select: all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.codes .card { margin: 0; text-align: left; }
@media (max-width: 600px) { .codes { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* small utilities (inline style attributes are blocked by the Content-Security-Policy) */
.mt-14 { margin-top: 14px; } .mb-18 { margin-bottom: 18px; } .mt-16 { margin-top: 16px; }
.centered { margin-left: auto; margin-right: auto; }
.actions.center { justify-content: center; }
textarea.short { min-height: 120px; }
.brief-gap { margin-top: 20px; }
.topics { margin-top: 14px; }
.codes.single { grid-template-columns: minmax(0, 420px); justify-content: center; }
