/* Save Our Smiles
   Mobile first. Breakpoints: 600px (large phones, small tablets),
   900px (iPad and up), 1100px (desktop). Everything spaces, rounds and
   moves from the tokens below, so components always line up. */

@font-face { font-family: 'Quicksand'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/quicksand-700.woff2') format('woff2'); }
@font-face { font-family: 'Quicksand'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/quicksand-500.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/nunito-400.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/nunito-700.woff2') format('woff2'); }

:root {
  /* Brand */
  --indigo: #180845;
  --violet: #5a47c8;
  --coral: #ff7a5c;
  --coral-hi: #ff9177;
  --mint: #7edcc0;
  --mint-hi: #9be6cf;
  --lilac: #eeebfa;
  --lilac-hi: #e4dff8;
  --paper: #fbfaf7;

  /* Roles */
  --ink: var(--indigo);
  --ink-soft: #4b4170;
  --rule: #dcd7ee;
  --on-dark-soft: #c9c3e6;
  --on-dark-rule: rgba(251, 250, 247, 0.16);
  --focus: var(--violet);

  /* Type */
  --font-head: 'Quicksand', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif;
  --font-body: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --step--1: clamp(0.8125rem, 0.79rem + 0.12vw, 0.875rem);
  --step-0: clamp(1rem, 0.97rem + 0.16vw, 1.0938rem);
  --step-1: clamp(1.125rem, 1.06rem + 0.32vw, 1.3125rem);
  --step-2: clamp(1.375rem, 1.22rem + 0.78vw, 1.875rem);
  --step-3: clamp(1.75rem, 1.44rem + 1.55vw, 2.75rem);
  --step-4: clamp(2.25rem, 1.65rem + 3vw, 4rem);
  --step-5: clamp(2.5rem, 1.7rem + 4vw, 4.75rem);

  /* Space: 4, 8, 12, 16, 24, 32, 48, 64 */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --section-y: clamp(64px, 6vw + 40px, 128px);
  --gutter: clamp(16px, 4.5vw, 48px);

  /* Layout */
  --wide: 72rem;
  --measure: 36rem;
  --prose: 40rem;
  --container: calc(var(--wide) + 2 * var(--gutter));

  /* Shape: controls, cards and rows share --r-m; panels use --r-l; actions are pills */
  --r-s: 12px;
  --r-m: 20px;
  --r-l: 32px;
  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --t-fast: 160ms;
  --t-med: 260ms;
  --t-slow: 700ms;

  color-scheme: light;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
p, ul, ol, blockquote, figure { margin: 0; }
p { text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

a { color: var(--violet); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: color var(--t-fast) var(--ease); }
a:not([class]):hover { color: var(--indigo); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
:target { scroll-margin-top: var(--s-6); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-s);
  background: var(--paper); color: var(--indigo); font-weight: 700;
}
.skip-link:focus { top: var(--s-3); }

.icon { flex: none; }

/* One container for every full-width row */
.site-header__inner, .hero__inner, .section, .page-hero, .doc, .prose:not(.doc .prose),
.site-footer__top, .site-footer__base {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.on-dark { background: var(--indigo); color: var(--paper); --focus: var(--mint); --ink-soft: var(--on-dark-soft); --rule: var(--on-dark-rule); }
.on-dark a:not([class]) { color: var(--mint); }
.on-dark a:not([class]):hover { color: var(--paper); }

body:where(.home-page) { background: var(--indigo); }
.home-page .site-header, .home-page .hero { background: transparent; }
.home-content { background: var(--paper); }

/* ---------- Header and navigation ---------- */

.site-header { position: relative; z-index: 40; }
.site-header--dark { background: var(--indigo); color: var(--paper); --focus: var(--mint); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding-block: var(--s-4);
}
.brand { display: inline-flex; flex: none; border-radius: var(--r-s); }
.brand img { width: clamp(100px, 30vw, 128px); height: auto; }

.site-header__actions { display: flex; align-items: center; gap: var(--s-2); }

.site-nav { display: none; }
.site-nav ul, .menu-nav ul { list-style: none; padding: 0; margin: 0; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: var(--s-2) var(--s-3);
  color: inherit; font-family: var(--font-head); font-weight: 700; text-decoration: none;
}
.nav-link[aria-current='page'] .line-link,
.nav-link:focus-visible .line-link { background-size: 100% 2px; }

/* ---------- Pills and buttons ---------- */

.help-pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: var(--s-2) var(--s-4) var(--s-2) var(--s-3);
  border: 0; border-radius: var(--r-pill);
  background: var(--coral); color: var(--indigo);
  font-family: var(--font-head); font-weight: 700; font-size: 1rem; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.help-pill .icon { transition: transform var(--t-med) var(--ease-spring); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3);
  min-height: 52px; padding: var(--s-3) var(--s-5);
  border: 2px solid transparent; border-radius: var(--r-pill);
  font-family: var(--font-head); font-weight: 700; font-size: 1.0625rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:active, .help-pill:active { transform: scale(0.97); }
.btn--primary { background: var(--indigo); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--indigo); border-color: currentColor; }
.btn--mint { background: var(--mint); color: var(--indigo); }
.on-dark .btn--ghost, .stage:not(.stage--paper) .btn--ghost { color: var(--paper); }
.on-dark .btn--primary { background: var(--mint); color: var(--indigo); }
.btn--block { width: 100%; }

.text-btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: var(--s-2) var(--s-1); border: 0; background: none;
  font-weight: 700; color: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: var(--r-pill); background: transparent; color: inherit; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease);
}

/* Links that draw their underline in on hover (nav, footer, contents) */
.line-link {
  color: inherit; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size var(--t-med) var(--ease), color var(--t-fast) var(--ease);
}

/* ---------- Hover: only on devices that can hover, so taps never stick ---------- */

@media (hover: hover) {
  .help-pill:hover { background: var(--coral-hi); color: var(--indigo); }
  .help-pill:hover .icon { transform: rotate(-35deg); }
  .btn:hover { transform: translateY(-2px); }
  .btn--primary:hover { background: var(--violet); color: var(--paper); }
  .on-dark .btn--primary:hover { background: var(--mint-hi); color: var(--indigo); }
  .btn--ghost:hover { background: var(--lilac); color: var(--indigo); border-color: var(--indigo); }
  .on-dark .btn--ghost:hover, .stage:not(.stage--paper) .btn--ghost:hover { background: rgba(251, 250, 247, 0.1); color: var(--paper); border-color: var(--paper); }
  .btn--mint:hover { background: var(--mint-hi); color: var(--indigo); }
  .icon-btn:hover { background: rgba(127, 127, 160, 0.16); }
  .nav-link:hover .line-link,
  .line-link:hover { background-size: 100% 2px; }
  .answer:hover { border-color: rgba(251, 250, 247, 0.7); background: rgba(251, 250, 247, 0.08); }
  .answer[aria-pressed='true']:hover { background: var(--mint); border-color: var(--mint); }
  .type-card:hover { transform: translateY(-4px); }
  .type-card:hover .character { transform: rotate(-8deg) scale(1.05); }
  .contact:hover, .menu-nav .nav-link:hover { background: var(--lilac-hi); color: var(--indigo); }
  .contact:hover .contact__icon { transform: scale(1.08) rotate(-6deg); }
  .contact--urgent:hover { background: var(--coral-hi); }
  .text-btn:hover { text-decoration-color: var(--mint); }
}

/* ---------- Home hero ---------- */

.hero { position: relative; }
.hero__inner {
  display: grid; gap: var(--s-5);
  padding-block: var(--s-5) var(--s-7);
}
.hero__line { width: 100%; height: auto; color: var(--paper); overflow: visible; }
.hero__line path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.hero__line.is-drawing path { animation: draw 1100ms cubic-bezier(0.6, 0.1, 0.3, 1) both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.hero__ask { display: grid; gap: var(--s-5); max-width: var(--measure); }
.hero__q { font-size: var(--step-5); line-height: 1.04; letter-spacing: -0.025em; }
.hero__q span { display: block; }
.hero__q .hero__quick { font-size: var(--step-2); letter-spacing: -0.01em; color: var(--mint); margin-bottom: var(--s-2); }
.hero__meta { color: var(--on-dark-soft); font-size: var(--step--1); }
.hero__caption { display: none; }

@media (width < 900px) {
  /* Reserve space around the stroke rather than around its whole SVG viewBox. */
  .hero__visual { position: relative; aspect-ratio: 8 / 1; overflow: hidden; }
  .hero__line { position: absolute; inset: -10% 0 auto; }
}

/* ---------- Answers (hero and quiz) ---------- */

.answers { display: grid; gap: var(--s-3); padding: 0; list-style: none; }
.answer {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  width: 100%; min-height: 60px; padding: var(--s-4) var(--s-5);
  border: 2px solid rgba(251, 250, 247, 0.3); border-radius: var(--r-m);
  background: rgba(251, 250, 247, 0.04); color: var(--paper);
  font-family: var(--font-head); font-weight: 700; font-size: var(--step-1); line-height: 1.25; text-align: left;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.answer:active { transform: scale(0.985); }
.answer .icon { opacity: 0; transform: scale(0.6); transition: opacity var(--t-fast) var(--ease), transform var(--t-med) var(--ease-spring); }
.answer[aria-pressed='true'] { background: var(--mint); border-color: var(--mint); color: var(--indigo); }
.answer[aria-pressed='true'] .icon { opacity: 1; transform: none; }

/* ---------- Quiz stage ---------- */

.stage {
  position: fixed; inset: 0; z-index: 50;
  display: none; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--indigo); color: var(--paper);
  --focus: var(--mint); --ink-soft: var(--on-dark-soft);
}
.stage.is-open { display: flex; }
.stage--paper { background: var(--paper); color: var(--indigo); --focus: var(--violet); --ink-soft: #4b4170; }
html.has-stage, html.has-stage body { overflow: hidden; }

.topbar {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: var(--s-3);
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding: max(var(--s-3), env(safe-area-inset-top)) var(--gutter) var(--s-3);
}
.topbar .icon-btn[hidden] { display: inline-grid; visibility: hidden; }
.progress { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.progress svg { flex: 1; min-width: 0; height: 34px; color: inherit; }
.stage--paper .progress svg { color: var(--violet); }
.progress__count { flex: none; font-size: var(--step--1); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.progress__count:empty { display: none; }
.topbar .help-pill { justify-content: center; min-width: 44px; padding: var(--s-2); }
.topbar .help-pill span { display: none; }

.stage__body { flex: 1; display: flex; flex-direction: column; }

.screen {
  flex: 1; display: flex; flex-direction: column; gap: var(--s-5);
  width: 100%; max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto;
  padding: var(--s-4) var(--gutter) max(var(--s-5), env(safe-area-inset-bottom));
}
.screen.is-entering { animation: enter var(--t-med) var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

.screen__q { font-size: var(--step-3); outline: none; }
.screen__lede { color: var(--ink-soft); }
.screen__foot { margin-top: auto; display: grid; gap: var(--s-3); }
.screen .answers { margin-top: auto; }
.screen__skip { align-self: center; color: var(--ink-soft); }

.notice { display: grid; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-l); background: rgba(126, 220, 192, 0.14); }
.notice__big { font-family: var(--font-head); font-weight: 700; font-size: var(--step-2); line-height: 1.2; }

.small-print { font-size: var(--step--1); color: var(--ink-soft); }

/* ---------- Result and type pages ---------- */

.result { display: grid; width: 100%; }
.result__hero { padding: var(--s-2) var(--gutter) var(--s-7); display: grid; gap: var(--s-3); }
.result__hero > * { width: 100%; max-width: var(--measure); margin-inline: auto; }
.result__art { width: 168px !important; margin-bottom: var(--s-2) !important; justify-self: center; }
.result__you { font-family: var(--font-head); font-weight: 700; font-size: var(--step-1); }
.result__name { font-size: var(--step-4); }
.result__line { font-size: var(--step-1); }

.t-night_shift { background: var(--indigo); color: var(--paper); --focus: var(--mint); --ink-soft: var(--on-dark-soft); }
.t-clamp { background: var(--violet); color: var(--paper); --focus: var(--mint); --ink-soft: var(--lilac); }
.t-overthinker { background: var(--lilac); color: var(--indigo); }
.t-fuel_tank { background: var(--coral); color: var(--indigo); --focus: var(--indigo); --ink-soft: var(--indigo); }
.t-steady { background: var(--mint); color: var(--indigo); --focus: var(--indigo); --ink-soft: var(--indigo); }
.t-wildcard { background: var(--paper); color: var(--indigo); box-shadow: inset 0 -2px 0 var(--rule); }

.result__body { display: grid; gap: var(--s-5); width: 100%; max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto; padding: var(--s-6) var(--gutter) var(--s-7); }
.result__body h2, .result__body h3 { font-size: var(--step-1); }
.block { display: grid; gap: var(--s-3); }

.signs { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.signs li { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-3); align-items: start; }
.signs .icon { margin-top: 2px; color: var(--violet); }
.signs .is-off { color: var(--ink-soft); }
.signs .is-off .icon { color: var(--rule); }

.panel { display: grid; align-content: start; gap: var(--s-2); padding: var(--s-5); border-radius: var(--r-l); background: var(--lilac); }
.panel--try { background: transparent; box-shadow: inset 0 0 0 2px var(--indigo); }
.panel--good { background: rgba(126, 220, 192, 0.3); }
.panel--good .panel__label { color: var(--indigo); }
.panel__label { font-family: var(--font-head); font-weight: 700; color: var(--violet); }
.source { font-size: var(--step--1); color: var(--ink-soft); }

.actions { display: grid; gap: var(--s-3); }
.block > .help-pill { justify-self: start; }

.compare { display: grid; gap: var(--s-5); }
.compare__row { display: grid; gap: var(--s-2); }
.compare__label { font-weight: 700; }

/* ---------- Bars ---------- */

.bars { display: grid; gap: var(--s-3); padding: 0; list-style: none; }
.bar { display: grid; gap: var(--s-1); }
.bar__top { display: flex; justify-content: space-between; gap: var(--s-3); font-size: 0.9375rem; }
.bar__value { font-weight: 700; font-variant-numeric: tabular-nums; }
.bar__track { height: 12px; border-radius: var(--r-pill); background: var(--lilac); overflow: hidden; }
.bar__fill { height: 100%; width: 0; border-radius: var(--r-pill); background: var(--violet); transition: width var(--t-slow) var(--ease); }
.bar--you .bar__fill { background: var(--coral); }
.bar--you .bar__top { font-weight: 700; }
.on-dark .bar__track { background: rgba(251, 250, 247, 0.12); }
.on-dark .bar__fill { background: var(--mint); }

/* ---------- Reset ---------- */

.reset { display: grid; gap: var(--s-5); justify-items: center; text-align: center; }
.reset__line { width: 100%; max-width: 420px; height: auto; color: var(--mint); overflow: visible; }
.reset__step { font-family: var(--font-head); font-weight: 700; font-size: var(--step-2); line-height: 1.2; min-height: 3.6em; display: grid; place-items: center; max-width: 22ch; }
.reset__cue { color: var(--ink-soft); min-height: 1.6em; }
.reset__ring { position: relative; width: 64px; height: 64px; }
.reset__ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.reset__ring circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.reset__ring .track { stroke: rgba(127, 127, 160, 0.25); }
.reset__ring .fill { stroke: var(--mint); stroke-dasharray: 1; stroke-dashoffset: 1; }
.reset__secs { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.reset .text-btn { color: var(--ink-soft); }
.reset-page, .reset-guide { padding-block: clamp(var(--s-6), 5vw, var(--s-8)); }
.reset-page .screen { padding-block: 0; text-align: center; }
.reset-guide > * { margin-inline: auto; }

/* ---------- Sheets and contacts ---------- */

.sheet {
  --sheet-inset: clamp(var(--s-4), 5vw, var(--s-6));
  width: 100%; max-width: 560px; max-height: 92dvh;
  margin: auto auto 0; padding: 0;
  border: 0; border-radius: var(--r-l) var(--r-l) 0 0;
  background: var(--paper); color: var(--indigo);
  overscroll-behavior: contain;
}
html:has(.sheet[open]) { overflow: hidden; }
.sheet::backdrop { background: rgba(24, 8, 69, 0.55); }
.sheet[open] { animation: sheet-up var(--t-med) var(--ease) both; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__inner {
  display: grid; gap: var(--s-4); padding: var(--sheet-inset);
  padding-bottom: max(var(--sheet-inset), env(safe-area-inset-bottom));
}
.sheet__head { display: flex; justify-content: space-between; align-items: start; gap: var(--s-3); }
.sheet__head h2 { font-size: var(--step-2); }
.sheet__head .icon-btn { margin-block: calc(-1 * var(--s-2)); margin-inline-end: calc(-1 * var(--s-2)); }

.menu-nav ul { display: grid; gap: var(--s-2); }
.contacts { list-style: none; padding: 0 !important; display: grid; gap: var(--s-2); }
.contacts li + li { margin-top: 0 !important; }
.contact, .menu-nav .nav-link {
  padding: var(--s-4); border-radius: var(--r-m);
  background: var(--lilac); color: var(--indigo);
  transition: background-color var(--t-fast) var(--ease);
}
.menu-nav .nav-link { display: flex; justify-content: space-between; gap: var(--s-3); }
.contact {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--s-3);
  min-height: 68px; text-decoration: none;
}
.contact__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill); background: var(--paper); transition: transform var(--t-med) var(--ease-spring); }
.contact__name { display: block; font-family: var(--font-head); font-weight: 700; line-height: 1.25; }
.contact__detail { display: block; font-size: var(--step--1); color: var(--ink-soft); }
.contact--urgent { background: var(--coral); }
.contact--urgent .contact__detail { color: var(--indigo); }

/* ---------- Sections (home) ---------- */

.section { display: grid; gap: var(--s-6); padding-block: var(--section-y); }
.section + .section { padding-top: 0; }
.section__head { display: grid; gap: var(--s-3); max-width: var(--prose); }
.section__head h2 { font-size: var(--step-3); }
.section__head p { color: var(--ink-soft); font-size: var(--step-1); }

.split { display: grid; gap: var(--s-6); }

.steps { list-style: none; padding: 0; display: grid; gap: var(--s-5); counter-reset: step; }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: var(--s-4); align-items: start; counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: var(--r-pill); background: var(--lilac); color: var(--violet);
  font-family: var(--font-head); font-weight: 700; font-size: var(--step-1);
}
.steps h3 { font-size: var(--step-1); margin-bottom: var(--s-1); }
.steps p { color: var(--ink-soft); }

.type-grid { display: grid; gap: var(--s-4); }
.type-card {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s-4); align-items: center;
  padding: var(--s-4); border-radius: var(--r-m);
  text-decoration: none;
  transition: transform var(--t-med) var(--ease);
}
.type-card .character { width: 72px; transition: transform var(--t-med) var(--ease-spring); }
.type-card h3 { font-size: var(--step-1); }
.type-card p { font-size: 0.9375rem; margin-top: 2px; }

.tick-list { list-style: none; padding: 0 !important; display: grid; gap: var(--s-3); }
.tick-list li { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-3); }
.tick-list li + li { margin-top: 0 !important; }
.tick-list .icon { color: var(--violet); margin-top: 3px; }

.quote-band { background: var(--lilac); }
.quote { display: grid; gap: var(--s-5); max-width: 52rem; }
.quote blockquote p { font-family: var(--font-head); font-weight: 700; font-size: var(--step-4); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.quote__line { width: min(100%, 280px); height: auto; color: var(--violet); }
.quote figcaption { display: grid; gap: var(--s-1); color: var(--ink-soft); max-width: var(--prose); }
.quote figcaption strong { color: var(--indigo); font-family: var(--font-head); font-size: var(--step-1); }

.cta-band { background: var(--coral); color: var(--indigo); --focus: var(--indigo); }
.cta-band .section { gap: var(--s-4); }
.cta-band h2 { font-size: var(--step-3); }
.cta-band p { max-width: var(--prose); font-size: var(--step-1); }
.cta-band a:not([class]) { color: var(--indigo); }
.cta-band .help-pill { background: var(--indigo); color: var(--paper); justify-self: start; }
@media (hover: hover) { .cta-band .help-pill:hover { background: var(--violet); color: var(--paper); } }

/* ---------- Content pages ---------- */

.page-hero { padding-block: var(--s-6) var(--s-5); }
.page-hero__inner { max-width: 46rem; display: grid; gap: var(--s-4); }
.page-hero h1 { font-size: var(--step-4); letter-spacing: -0.02em; }
.page-hero .lede { font-size: var(--step-1); color: var(--ink-soft); }
.page-hero__line { width: min(100%, 320px); height: auto; color: var(--violet); margin-top: var(--s-2); }

.doc { display: grid; gap: var(--s-6); padding-block: var(--s-5) var(--section-y); }
.prose:not(.doc .prose, .reset-guide) { padding-block: var(--s-5) var(--section-y); }
.prose > * { max-width: var(--prose); }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { font-size: var(--step-3); margin-top: var(--s-8); }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-1); margin-top: var(--s-6); }
.prose h2 + *, .prose h3 + * { margin-top: var(--s-3); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: var(--s-2); }
.prose .panel { margin-top: var(--s-5); }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: var(--s-3) var(--s-3) var(--s-3) 0; border-bottom: 1px solid var(--rule); }
.prose .updated { color: var(--ink-soft); font-size: var(--step--1); margin-top: var(--s-7); }
.small-sources { font-size: 0.9375rem; }

.toc { display: none; }
.toc__title { font-family: var(--font-head); font-weight: 700; margin-bottom: var(--s-3); }
.toc ol { list-style: none; padding: 0; display: grid; gap: var(--s-1); border-left: 2px solid var(--rule); }
.toc a {
  display: block; padding: var(--s-1) var(--s-4); margin-left: -2px;
  border-left: 2px solid transparent; color: var(--ink-soft); text-decoration: none; font-size: 0.9375rem; line-height: 1.4;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.toc a[aria-current='true'] { color: var(--indigo); border-left-color: var(--violet); font-weight: 700; }
@media (hover: hover) { .toc a:hover { color: var(--indigo); border-left-color: var(--rule); } .toc a[aria-current='true']:hover { border-left-color: var(--violet); } }

.locks { display: grid; gap: var(--s-4); }
.lock { display: grid; align-content: start; gap: var(--s-2); padding: var(--s-5); border-radius: var(--r-l); background: var(--lilac); }
.lock .icon { color: var(--violet); }
.lock h3 { font-size: var(--step-1); margin: 0 !important; }

.findings { display: grid; gap: var(--s-7); margin-top: var(--s-6) !important; }
.finding { display: grid; gap: var(--s-4); }
.finding h2 { font-size: var(--step-1); margin: 0; }

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

.site-footer { background: var(--indigo); color: var(--on-dark-soft); --focus: var(--mint); }
.site-footer__top { display: grid; gap: var(--s-7) var(--s-6); padding-block: var(--s-8) var(--s-7); grid-template-columns: 1fr 1fr; }
.site-footer__brand { grid-column: 1 / -1; display: grid; gap: var(--s-4); align-content: start; }
.site-footer__brand img { width: 148px; height: auto; }
.site-footer__brand p { font-family: var(--font-head); font-weight: 700; font-size: var(--step-1); color: var(--paper); max-width: 18ch; }
.site-footer__col { display: grid; gap: var(--s-3); align-content: start; }
.site-footer__col h2 { font-family: var(--font-body); font-weight: 700; font-size: var(--step--1); color: var(--on-dark-soft); letter-spacing: 0; }
.site-footer__col ul { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.site-footer__col a { color: var(--paper); }
.site-footer__help { grid-column: 1 / -1; }
.site-footer__help p { color: var(--paper); }
.site-footer__help .help-pill {
  justify-self: start; margin-top: var(--s-1);
  background: var(--violet); color: var(--paper);
}
.site-footer__base {
  display: grid; gap: var(--s-2); padding-block: var(--s-5) max(var(--s-6), env(safe-area-inset-bottom));
  border-top: 1px solid var(--on-dark-rule); font-size: var(--step--1);
}
.site-footer__base p { max-width: 60rem; }

/* ---------- Expo ---------- */

.expo-qr { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s-4); align-items: center; padding: var(--s-4); border-radius: var(--r-l); background: var(--lilac); }
.expo-qr img { width: 112px; height: 112px; background: #fff; border-radius: var(--r-s); padding: 6px; }
.idle-note { text-align: center; font-size: var(--step--1); color: var(--ink-soft); }

noscript .noscript { display: block; margin-top: var(--s-4); padding: var(--s-4); border-radius: var(--r-m); background: var(--lilac); color: var(--indigo); }

/* ---------- 600px ---------- */

@media (min-width: 600px) {
  .brand img { width: 148px; }
  .topbar .help-pill { padding-inline: var(--s-3); }
  .topbar .help-pill span { display: inline; }
  .actions { grid-template-columns: 1fr 1fr; }
  .actions .btn--block-wide { grid-column: 1 / -1; }
  .screen { justify-content: center; padding-block: var(--s-7) var(--s-8); }
  .screen .answers, .screen__foot { margin-top: var(--s-3); }
  .type-grid { grid-template-columns: 1fr 1fr; }
  .type-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .locks { grid-template-columns: 1fr 1fr; }
  .sheet { margin: auto; border-radius: var(--r-l); }
  .site-footer__top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer__help { grid-column: auto; }
}

/* ---------- 900px ---------- */

@media (min-width: 900px) {
  .menu-btn { display: none; }
  .site-nav { display: block; }
  .site-nav ul { display: flex; gap: var(--s-1); }
  .site-header__inner { padding-block: var(--s-5); }

  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; column-gap: var(--s-8);
    padding-block: var(--s-6) var(--s-8); min-height: min(82vh, 760px);
  }
  .hero__ask { grid-column: 1; grid-row: 1; }
  .hero__visual { display: grid; gap: var(--s-4); grid-column: 2; grid-row: 1; justify-items: center; }
  .hero__caption { display: block; max-width: 28ch; text-align: center; color: var(--on-dark-soft); font-family: var(--font-head); font-weight: 700; font-size: var(--step-1); line-height: 1.3; }

  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; column-gap: var(--s-8); }
  .split .tick-list { grid-template-columns: 1fr 1fr; column-gap: var(--s-6); }

  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
  .steps li { grid-template-columns: 1fr; gap: var(--s-4); }

  .result__hero { padding-top: var(--s-5); }

  .site-footer__top { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: auto; }
}

/* ---------- 1100px ---------- */

@media (min-width: 1100px) {
  .type-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .type-grid > :last-child:nth-child(odd) { grid-column: span 2; }
  .type-grid > :nth-child(-n + 2) { grid-column: span 3; }
  .type-grid > :nth-child(n + 3) { grid-column: span 2; }
  .type-grid > :nth-child(-n + 2) { grid-template-columns: 96px minmax(0, 1fr); padding: var(--s-5); }
  .type-grid > :nth-child(-n + 2) .character { width: 96px; }

  .doc { grid-template-columns: 13rem minmax(0, 1fr); column-gap: var(--s-8); }
  .toc { display: block; position: sticky; top: var(--s-6); align-self: start; }
}

/* ---------- Motion and forced colours ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

@media (forced-colors: active) {
  .answer, .btn, .help-pill, .contact, .type-card { border: 2px solid ButtonText; }
  .answer[aria-pressed='true'] { outline: 3px solid Highlight; }
  .bar__fill { background: Highlight; }
}

@media print {
  .site-header, .site-footer, .stage, .sheet, .cta-band, .toc { display: none !important; }
  body { background: #fff; }
}
