/* The Two-Week Test · UI UX Pro Max variation
   Tokens follow design-system/the-two-week-test/MASTER.md, with the accent
   swapped for the AIDEA brand blue (see NOTES.md). */

:root {
  --bg: #f5fafe;
  --surface: #FFFFFF;
  --screen: #f5fafe;
  --ink: #1a1a1a;
  --fg: #1a1a1a;
  --text-2: #2d2d2d;
  --muted: #555555;
  --line: #ebe4d9;
  --line-strong: #c9c4bd;
  --accent: #1c6fa3;
  --accent-hover: #155a85;
  --glow: #5db4e8;

  /* sort states: each always shows a text label too */
  --on: #8a6a0e;
  --on-text: #8a6a0e;
  --stop: #555555;
  --decide: #1c6fa3;
  --play: #1c6fa3;

  --font-serif: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --font-sans: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 64px; --s8: 96px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --r-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(45,45,45, .06);
  --shadow-md: 0 4px 12px rgba(45,45,45, .08);
  --shadow-lg: 0 12px 32px -8px rgba(45,45,45, .14);
  --shadow-xl: 0 24px 60px -16px rgba(45,45,45, .22);
  --halo: 0 0 48px -8px rgba(93,180,232, .45);

  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  scroll-padding-top: 96px;
}
html.motion { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
p { margin: 0; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -.01em;
  text-wrap: balance;
}
a { color: var(--accent); text-underline-offset: 3px; transition: color .2s var(--ease); }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
main:focus { outline: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

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

.skip {
  position: fixed; left: 12px; top: -80px; z-index: 100;
  padding: 12px 18px; border-radius: var(--r-sm);
  background: var(--ink); color: #fff; font-weight: 700; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip:focus { top: 12px; color: #fff; }

.wrap { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }

.glass {
  background: rgba(255,255,255, .74);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255,255,255, .9);
  box-shadow: 0 18px 40px -18px rgba(45,45,45, .28), inset 0 0 0 1px rgba(45,45,45, .03);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 .8125rem/1.2 var(--font-sans);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 20px; height: 2px; border-radius: 2px; background: currentColor;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  border: 2px solid transparent; border-radius: var(--r-sm);
  font: 700 1rem/1.2 var(--font-sans);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn .i { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.btn:hover .i { transform: translateX(2px); }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 8px 22px -8px rgba(28,111,163, .6);
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 10px 30px -8px rgba(28,111,163, .7), var(--halo); }
.btn-secondary { background: rgba(255,255,255, .7); color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: #fff; color: var(--ink); }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: .9375rem; }
.btn-block { width: 100%; }

/* ---------- Nav ---------- */

.nav {
  position: fixed; left: 0; right: 0; top: max(12px, env(safe-area-inset-top));
  z-index: 50; display: flex; justify-content: center;
  padding-inline: 12px; pointer-events: none;
}
.nav-pill {
  position: relative; pointer-events: auto;
  display: flex; align-items: center; gap: 4px;
  width: min(100%, 960px); padding: 6px 6px 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255, .74);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255,255,255, .9);
  box-shadow: 0 10px 30px -12px rgba(45,45,45, .22), inset 0 0 0 1px rgba(45,45,45, .04);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; min-width: 44px; padding: 0 12px;
  border-radius: 999px; text-decoration: none; color: var(--ink);
  font: 700 .9375rem/1 var(--font-sans); letter-spacing: .16em;
}
.brand img { width: auto; height: 26px; }
.brand:hover { color: var(--ink); }
.nav-links { display: flex; gap: 2px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  color: var(--text-2); text-decoration: none;
  font-size: .9375rem; font-weight: 700;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.nav-links a:hover { background: rgba(45,45,45, .06); color: var(--ink); }
.nav-links a[aria-current="true"] { color: var(--ink); background: rgba(28,111,163, .1); }
.nav-cta { margin-left: 4px; border-radius: 999px; }
.nav-progress {
  position: absolute; left: 24px; right: 24px; bottom: -1px; height: 2px;
  border-radius: 2px; overflow: hidden; background: rgba(45,45,45, .06);
}
.nav-progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--glow));
  transform-origin: 0 50%; transform: scaleX(0);
}

@media (max-width: 560px) {
  .brand { padding: 0 13px; }
  .brand span { display: none; }
  .nav-links a { padding: 0 10px; font-size: .875rem; }
  .nav-cta { padding-inline: 14px; font-size: .875rem; }
}

/* ---------- 1. Hero and scene ---------- */

.scene { position: relative; }
.stage { position: relative; }

.hero {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(180px, 1fr);
  gap: 20px;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--nav-h) + 28px) var(--gutter) var(--gutter);
}
.hero-copy { position: relative; z-index: 1; max-width: 40rem; }
.hero h1 {
  margin-top: 16px;
  font-size: clamp(2.375rem, 1.5rem + 3.4vw, 4.5rem);
  line-height: 1.02; letter-spacing: -.02em;
}
.hero-lead {
  margin-top: 16px; max-width: 34rem;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
  color: var(--text-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.scroll-cue {
  display: none; align-items: center; gap: 8px; margin-top: 40px;
  font: 700 .75rem/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-2);
}
.scroll-cue .i { width: 16px; height: 16px; }

.hero-window { position: relative; min-height: 0; }

/* static (reduced motion, no JS): the photo sits in the slot */
.window {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden; border-radius: var(--r-xl);
  background: #c6e4f7;
  box-shadow: var(--shadow-xl), 0 0 80px -20px rgba(93,180,232, .55);
}
.plate { position: absolute; inset: 0; }
.plate img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.tint, .bloom, .screen, .frame { display: none; }

.floats { position: relative; z-index: 2; height: 100%; pointer-events: none; container-type: size; }
.float {
  position: absolute; display: grid; gap: 4px;
  max-width: 15rem; padding: 14px 18px; border-radius: 16px;
  box-shadow: 0 18px 40px -16px rgba(45,45,45, .3), 0 0 36px -10px rgba(93,180,232, .55);
}
.float b { font: 500 1.875rem/1 var(--font-serif); color: var(--ink); }
.float span { font-size: .8125rem; line-height: 1.35; color: var(--text-2); }
.float-1 { left: -28px; bottom: 10%; }
.float-2 { right: 24px; top: 24px; }
.float-3 { right: -16px; top: 46%; }

/* the story, read as normal content when motion is off */
.story {
  position: relative; z-index: 1;
  display: grid; justify-items: center; gap: 24px;
  padding: var(--s7) var(--gutter);
  background: linear-gradient(180deg, var(--bg), var(--screen));
  text-align: center;
}
.sky-line {
  font: 400 clamp(2.25rem, 1.2rem + 4.4vw, 5.5rem)/1.02 var(--font-serif);
  letter-spacing: -.02em; color: var(--ink);
  text-shadow: 0 0 24px rgba(255,255,255, .9), 0 0 64px rgba(255,255,255, .7);
}
.hud {
  width: min(100%, 320px); padding: 16px 18px; border-radius: 18px; text-align: left;
}
.hud-status {
  display: flex; align-items: center; gap: 10px;
  font: 700 .75rem/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-2);
}
.hud-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--on);
  box-shadow: 0 0 0 4px rgba(138,106,14, .16);
}
.hud-day { margin-top: 10px; font: 500 1.125rem/1 var(--font-serif); color: var(--text-2); }
.hud-num {
  font-size: 2.75rem; color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
}
.hud-bar {
  margin-top: 12px; height: 4px; border-radius: 4px; overflow: hidden;
  background: rgba(45,45,45, .1);
}
.hud-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--glow));
  transform-origin: 0 50%;
}
.hud-note { margin-top: 10px; font-size: .9375rem; color: var(--text-2); }

.away-log {
  display: grid; gap: 12px; width: min(100%, 760px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  margin: 0; padding: 0; list-style: none; text-align: left;
}
.log-item {
  display: grid; grid-template-columns: auto auto; justify-content: space-between;
  align-items: center; gap: 6px 12px;
  padding: 12px 14px; border-radius: 14px;
}
.log-day {
  font: 700 .75rem/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-2);
}
.log-item p { grid-column: 1 / -1; font-size: .9375rem; line-height: 1.4; color: var(--ink); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 999px;
  font: 700 .75rem/1.2 var(--font-sans);
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-on { color: var(--on-text); background: rgba(138,106,14, .1); border: 1px solid rgba(138,106,14, .28); }

/* split hero for landscape screens */
@media (min-aspect-ratio: 1/1) and (min-width: 640px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: minmax(0, 1fr);
    column-gap: clamp(24px, 4vw, 64px);
    padding-left: clamp(24px, 5vw, 80px);
  }
  .hero-copy { align-self: center; }
  .scroll-cue { display: inline-flex; }
}

/* sideways phones and short laptops */
@media (min-aspect-ratio: 1/1) and (max-height: 540px) {
  .hero {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    padding-top: calc(var(--nav-h) + 12px); padding-bottom: 12px; row-gap: 12px;
  }
  .hero h1 { margin-top: 8px; font-size: clamp(1.625rem, 1rem + 2.4vw, 2.25rem); }
  .hero-lead { margin-top: 8px; font-size: .9375rem; line-height: 1.45; }
  .hero-actions { margin-top: 14px; }
  .hero-actions .btn { min-height: 44px; padding: 8px 16px; font-size: .9375rem; }
  .scroll-cue { display: none; }
  .float-3 { display: none; }
}

/* portrait: copy above the window */
@media (max-aspect-ratio: 1/1), (max-width: 639px) {
  .float { max-width: 11.5rem; padding: 10px 12px; border-radius: 14px; }
  .float b { font-size: 1.375rem; }
  .float span { font-size: .75rem; }
  .float-1 { left: 10px; bottom: 10px; }
  .float-2 { right: 10px; top: 10px; }
  .float-3 { display: none; }
}
@container (max-height: 230px) {
  .float-1 { display: none; }
}
@container (max-height: 150px) {
  .float { display: none; }
}

/* ---------- Motion mode: pinned scene ---------- */

html.motion .scene { height: 660vh; height: 660svh; }
html.motion .stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
html.motion .hero { position: absolute; inset: 0; min-height: 0; }
html.motion .hero-window { position: static; }
html.motion .window {
  border-radius: 0; box-shadow: none; background: #c6e4f7;
  will-change: clip-path;
}
html.motion .plate {
  inset: auto; left: 0; top: 0; width: 1536px; height: 1024px;
  transform-origin: 0 0; will-change: transform;
}
html.motion .plate img { object-position: 50% 50%; }
html.motion:not(.scene-ready) .window,
html.motion:not(.scene-ready) .frame,
html.motion:not(.scene-ready) .story { visibility: hidden; }

html.motion .tint {
  display: block; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background:
    linear-gradient(180deg, rgba(245,250,254, .55) 0%, rgba(245,250,254, 0) 42%),
    linear-gradient(0deg, rgba(245,250,254, .35) 0%, rgba(245,250,254, 0) 30%);
}
html.motion .bloom {
  display: block; position: absolute; left: 0; top: 0; width: 100px; height: 100px;
  border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(93,180,232, .75), rgba(93,180,232, .22) 55%, rgba(93,180,232, 0));
  mix-blend-mode: screen; will-change: transform, opacity;
}
html.motion .screen {
  display: block; position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  background: var(--screen); transform-origin: 0 0; opacity: 0;
  will-change: transform, opacity, clip-path;
}
html.motion .frame {
  display: block; position: absolute; left: 0; top: 0; z-index: 1;
  width: 0; height: 0; border-radius: var(--r-xl); pointer-events: none;
  box-shadow: 0 30px 80px -24px rgba(45,45,45, .35), 0 0 90px -20px rgba(93,180,232, .6), inset 0 0 0 1px rgba(255,255,255, .55);
}

/* laptop screen UI, drawn at 1000 x 620 and scaled to fit by main.js */
.screen-ui {
  position: absolute; left: 50%; top: 50%;
  width: 1000px; height: 620px; margin: -310px 0 0 -500px;
  transform: scale(calc(var(--sui, .5) * var(--suk, 1))); transform-origin: 50% 50%;
  padding: 40px 48px; border-radius: 28px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(45,45,45, .25);
  font-family: var(--font-sans);
}
.sui-bar { display: flex; align-items: center; gap: 18px; font: 700 20px/1 var(--font-sans); color: var(--muted); letter-spacing: .04em; }
.sui-dots { display: flex; gap: 8px; }
.sui-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); }
.sui-title { margin-top: 26px; font: 500 62px/1 var(--font-serif); color: var(--ink); }
.sui-rows { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.sui-rows li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line);
  font: 700 22px/1.1 var(--font-sans); color: var(--ink);
}
.sui-rows em {
  font-style: normal; font-size: 17px; color: var(--on-text);
  padding: 6px 14px; border-radius: 999px;
  background: rgba(138,106,14, .1); border: 1px solid rgba(138,106,14, .28);
}

/* compact screen UI for phones and short landscapes: 600 x 372, rows in two columns */
.screen-ui.is-compact { width: 600px; height: 372px; margin: -186px 0 0 -300px; padding: 26px 24px; border-radius: 22px; }
.screen-ui.is-compact .sui-bar { font-size: 15px; gap: 12px; }
.screen-ui.is-compact .sui-dots i { width: 10px; height: 10px; }
.screen-ui.is-compact .sui-title { margin-top: 16px; font-size: 46px; }
.screen-ui.is-compact .sui-rows { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.screen-ui.is-compact .sui-rows li { gap: 8px; padding: 12px 12px; border-radius: 12px; font-size: 20px; }
.screen-ui.is-compact .sui-rows em { font-size: 15px; padding: 5px 10px; white-space: nowrap; }

/* tall screen UI for portrait phones: 400 x 560, one column, bigger rows */
.screen-ui.is-tall { width: 400px; height: 560px; margin: -280px 0 0 -200px; padding: 26px 22px; border-radius: 24px; }
.screen-ui.is-tall .sui-bar { font-size: 15px; }
.screen-ui.is-tall .sui-title { margin-top: 18px; font-size: 44px; line-height: 1.02; }
.screen-ui.is-tall .sui-rows { grid-template-columns: 1fr; gap: 9px; margin-top: 20px; }
.screen-ui.is-tall .sui-rows li { padding: 11px 16px; font-size: 22px; }
.screen-ui.is-tall .sui-rows em { font-size: 17px; padding: 5px 12px; }

/* story overlays */
html.motion .story {
  position: absolute; inset: 0; z-index: 3;
  display: block; padding: 0; background: none; pointer-events: none;
}
html.motion .sky-line {
  position: absolute; left: var(--gutter); right: var(--gutter); top: 15vh; top: 15svh;
  margin: 0; opacity: 0;
  font-size: clamp(2.25rem, min(1.2rem + 4.4vw, 11svh), 5.5rem);
}
html.motion .hud {
  position: absolute; left: var(--gutter); top: 50%; translate: 0 -50%;
  width: min(300px, 32vw); opacity: 0; visibility: hidden;
}
html.motion .away-log {
  position: absolute; right: var(--gutter); bottom: clamp(24px, 11svh, 120px);
  display: block; width: min(360px, 34vw); height: 0;
}
html.motion .log-item { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; visibility: hidden; }

@media (max-aspect-ratio: 1/1), (max-width: 639px) {
  html.motion .sky-line { top: 26svh; }
  html.motion .hud {
    left: 16px; right: 16px; top: calc(var(--nav-h) + 28px); translate: none;
    width: auto; padding: 12px 14px;
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px;
  }
  html.motion .hud-status { grid-column: 1; grid-row: 1; }
  html.motion .hud-day { grid-column: 2; grid-row: 1 / span 2; margin: 0; text-align: right; }
  html.motion .hud-num { font-size: 2.25rem; }
  html.motion .hud-bar { grid-column: 1 / -1; grid-row: 3; margin-top: 6px; }
  html.motion .hud-note { grid-column: 1; grid-row: 2; margin: 0; font-size: .875rem; }
  html.motion .away-log {
    left: 16px; right: 16px; width: auto;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}
@media (min-aspect-ratio: 1/1) and (max-height: 540px) {
  html.motion .sky-line { top: 22svh; }
  html.motion .hud { padding: 12px 14px; width: min(260px, 30vw); }
  html.motion .hud-num { font-size: 2rem; }
  html.motion .hud-note { font-size: .875rem; }
  html.motion .away-log { bottom: 16px; width: min(340px, 38vw); }
  html.motion .log-item { padding: 10px 12px; }
  html.motion .log-item p { font-size: .875rem; }
}

/* ---------- 2. The Two-Week Map ---------- */

.map {
  position: relative; overflow: clip;
  padding: var(--s8) 0;
  background: linear-gradient(180deg, var(--screen) 0%, var(--screen) 55%, var(--bg) 100%);
}
.map::before, .map::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(93,180,232, .32), rgba(93,180,232, 0));
}
.map::before { width: 760px; height: 760px; right: -280px; top: 22%; }
.map::after { width: 620px; height: 620px; left: -260px; top: 58%; opacity: .7; }
.map .wrap { position: relative; z-index: 1; }

.section-head { max-width: 46rem; }
.section-head h2 {
  margin-top: 16px;
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.75rem); line-height: 1.04; letter-spacing: -.02em;
}
.lead { margin-top: 16px; max-width: 42rem; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: var(--text-2); }

.verbs {
  display: grid; gap: 16px; margin: var(--s6) 0 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.verb { padding: 24px; border-radius: var(--r-lg); }
.verb-top { display: flex; align-items: center; justify-content: space-between; }
.verb-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line); color: var(--c);
  box-shadow: 0 0 0 6px rgba(93,180,232, .14);
}
.verb-icon .i { width: 22px; height: 22px; }
.verb-num { font: 500 1.375rem/1 var(--font-serif); color: var(--muted); font-variant-numeric: lining-nums; }
.verb h3 { margin-top: 20px; font-size: 1.75rem; line-height: 1.1; }
.verb p { margin-top: 8px; color: var(--text-2); }

.board-wrap { display: grid; gap: 24px; margin-top: var(--s7); }
.board { padding: clamp(16px, 3vw, 32px); border-radius: var(--r-xl); background: rgba(255,255,255, .8); }
.board-head h3 { font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem); line-height: 1.1; }
.board-head p { margin-top: 6px; color: var(--text-2); }
.jobs { display: grid; gap: 12px; margin-top: 24px; }

.job {
  --state: var(--on);
  position: relative; min-width: 0; margin: 0;
  padding: 16px 16px 16px 22px;
  border: 1px solid var(--line); border-radius: 16px; background: #fff;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.job::before {
  content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--state);
  transition: background-color .25s var(--ease);
}
.job[data-state="stop"] { --state: var(--stop); }
.job[data-state="decide"] { --state: var(--decide); }
.job[data-state="play"] { --state: var(--play); }
.job:focus-within { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.job legend {
  float: left; width: 100%; padding: 0;
  font: 500 1.4375rem/1.2 var(--font-serif); color: var(--ink);
}
.job-away { clear: both; padding-top: 4px; font-size: .9375rem; color: var(--text-2); }

.seg {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
  margin-top: 12px; padding: 4px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--line);
}
.seg input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.seg label {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 10px; border-radius: 9px;
  border: 1px solid transparent;
  font: 700 .875rem/1.15 var(--font-sans); color: var(--text-2); text-align: center;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.seg label .i { width: 16px; height: 16px; }
.seg label:hover { background: rgba(255,255,255, .9); color: var(--ink); }
.seg input:checked + label {
  background: #fff; color: var(--ct); border-color: var(--c);
  box-shadow: 0 2px 10px -3px rgba(45,45,45, .2), inset 0 0 0 1px var(--c);
}
.seg input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 2px; }
.opt-on { --c: var(--on); --ct: var(--on-text); }
.opt-stop { --c: var(--stop); --ct: #2d2d2d; }
.opt-decide { --c: var(--decide); --ct: var(--decide); }
.opt-play { --c: var(--play); --ct: var(--play); }

.board-note { margin-top: 16px; font-size: .875rem; color: var(--muted); }

.tally { padding: 24px; border-radius: var(--r-xl); background: rgba(255,255,255, .82); }
.tally h3 {
  font: 700 .8125rem/1.2 var(--font-sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-2);
}
.tally-count {
  margin-top: 8px; font: 500 3.5rem/1 var(--font-serif); color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
}
.tally-count small { font-size: 1.375rem; color: var(--text-2); }
.tally-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 16px; }
.tally-cells span {
  height: 8px; border-radius: 4px; background: var(--cell, var(--on));
  transition: background-color .25s var(--ease);
}
.tally-break { display: grid; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.tally-break li { display: flex; align-items: center; gap: 10px; font-size: .9375rem; color: var(--text-2); }
.tally-break b { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--c); }
.tally-done {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  background: rgba(28,111,163, .08); border: 1px solid rgba(28,111,163, .28);
  font-size: .9375rem; color: #155a85;
}
.tally-done a { color: #155a85; font-weight: 700; }
.btn-reset {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 44px; margin-top: 16px; padding: 8px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: rgba(255,255,255, .8); color: var(--ink);
  font: 700 .9375rem/1 var(--font-sans); cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.btn-reset:hover { background: #fff; border-color: var(--ink); }
.btn-reset .i { width: 18px; height: 18px; }

@media (min-width: 960px) {
  .board-wrap { grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
  .tally { position: sticky; top: 96px; }
}
@media (max-width: 959px) {
  html { scroll-padding-bottom: calc(var(--tally-h, 160px) + 28px); }
  /* radios sit at the top of their row group; the margin brings the whole label into view */
  .seg input { scroll-margin-bottom: 48px; }
  .board-wrap { display: block; }
  .tally {
    position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5;
    margin-top: 16px; padding: 12px 14px;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px;
    background: rgba(255,255,255, .9);
    box-shadow: 0 -6px 30px -12px rgba(45,45,45, .3), inset 0 0 0 1px rgba(45,45,45, .04);
  }
  .tally h3 { grid-column: 1; grid-row: 1; font-size: .75rem; }
  .tally-count { grid-column: 1; grid-row: 2; margin: 0; font-size: 1.875rem; }
  .tally-count small { font-size: 1rem; }
  .btn-reset { grid-column: 2; grid-row: 1 / span 2; width: auto; margin: 0; }
  .tally-cells { grid-column: 1 / -1; margin-top: 6px; }
  .tally-break {
    grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px;
  }
  .tally-break li { gap: 6px; font-size: .8125rem; }
  .tally-break b { margin-left: 0; }
  .tally-break .dot { width: 8px; height: 8px; }
  .tally-done { grid-column: 1 / -1; margin-top: 8px; padding: 8px 10px; font-size: .875rem; }
}
/* short landscapes: the tally keeps only the count and reset so the board has room */
@media (max-width: 959px) and (max-height: 500px) {
  .tally { padding: 8px 14px; }
  .tally-cells, .tally-break { display: none; }
}
@media (max-width: 560px) {
  .seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg input { scroll-margin-bottom: 100px; }
  .job { padding: 14px 12px 14px 18px; }
}

/* ---------- 3. The offer ---------- */

.test { position: relative; padding: var(--s8) 0; background: var(--bg); }
.test-grid { display: grid; gap: 32px; margin-top: var(--s6); }
.includes { display: grid; margin: 0; padding: 0; list-style: none; }
.includes li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.includes li:last-child { border-bottom: 1px solid var(--line); }
.inc-icon, .extra-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: rgba(28,111,163, .08); color: var(--accent);
}
.includes h3 { font-size: 1.5rem; line-height: 1.15; }
.includes p { margin-top: 4px; color: var(--text-2); }

.price-card {
  position: relative; padding: clamp(24px, 3vw, 36px); border-radius: var(--r-xl);
  background: rgba(255,255,255, .85);
  box-shadow: var(--shadow-xl), 0 0 90px -24px rgba(93,180,232, .6), inset 0 0 0 1px rgba(45,45,45, .04);
}
.price { margin-top: 10px; font: 500 clamp(3.5rem, 3rem + 2vw, 4.75rem)/1 var(--font-serif); color: var(--ink); font-variant-numeric: lining-nums; }
.price-terms { margin-top: 10px; color: var(--text-2); }
.price-card .btn { margin-top: 24px; }
.price-mail {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px; font-size: .9375rem; color: var(--text-2);
}
.price-mail .i { width: 16px; height: 16px; }
.price-mail a { display: inline-flex; align-items: center; min-height: 44px; }
.extras { display: grid; gap: 20px; margin-top: 20px; padding-top: 24px; border-top: 1px solid var(--line); }
.extra { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
.extra h3 { font-size: 1.25rem; line-height: 1.2; }
.extra p { margin-top: 4px; font-size: .9375rem; color: var(--text-2); }

.guarantee {
  display: grid; gap: 20px; margin-top: var(--s7);
  padding: clamp(24px, 4vw, 44px); border-radius: var(--r-xl);
  background: linear-gradient(135deg, #fff 0%, var(--screen) 100%);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.g-icon {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px;
  background: var(--accent); color: #fff;
  box-shadow: 0 0 0 8px rgba(93,180,232, .2), 0 12px 30px -10px rgba(28,111,163, .6);
}
.g-icon .i { width: 30px; height: 30px; }
.guarantee h3 { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.375rem); }
.guarantee p { margin-top: 12px; max-width: 46rem; font-size: 1.125rem; color: var(--text-2); }

.next { display: grid; gap: 24px; margin-top: var(--s7); }
.next-title { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1.05; margin-bottom: 20px; }
.steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  color: var(--ink);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: #fff; font: 500 1.25rem/1 var(--font-serif);
}

@media (min-width: 720px) {
  .guarantee { grid-template-columns: 64px minmax(0, 1fr); gap: 28px; }
}
@media (min-width: 960px) {
  .test-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: start; }
  .price-card { position: sticky; top: 96px; }
  .next { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 56px; }
}

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

.footer {
  padding: 48px 0 calc(48px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--bg);
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.sign { font: italic 400 1.5rem/1.3 var(--font-serif); color: var(--ink); }
.footer-meta { margin-top: 4px; color: var(--text-2); }
.footer-meta a { display: inline-block; padding-block: 10px; }
.credit { font-size: .875rem; color: var(--muted); }

/* ---------- Reveals ---------- */

html.reveal-on .reveal {
  opacity: 0; transform: translateY(60px);
  transition: opacity .9s ease-out, transform 1.1s cubic-bezier(.2,.7,.2,1);
}
html.reveal-on .includes .reveal:nth-child(2) { transition-delay: .12s; }
html.reveal-on .includes .reveal:nth-child(3) { transition-delay: .24s; }
html.reveal-on .includes .reveal:nth-child(4) { transition-delay: .36s; }
html.reveal-on .reveal.in { opacity: 1; transform: none; }
/* Replaying reveals (main.js): after leaving off the top, drop back in from above. */
html.reveal-on [data-reveal-repeat] .reveal.from-above:not(.in) { transform: translateY(-60px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
