/* =================================================================
   DDD. 5.0, "Built from the D"
   The logo's letterform, a straight edge and a half circle, is the
   whole visual language: buttons, crops, cards, the page wipe.
   The dot is the one thing that moves.
   Ultramarine + paper + navy, with a flare-orange dot.
   Unbounded (display) · Instrument Sans (text) · DM Mono (figures)
   ================================================================= */

@font-face { font-family: 'Unbounded'; src: url('fonts/Unbounded-normal-300-900.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('fonts/InstrumentSans-normal-400-700.woff2') format('woff2'); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('fonts/InstrumentSans-italic-400-700.woff2') format('woff2'); font-weight: 400 700; font-stretch: 75% 100%; font-style: italic; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('fonts/DMMono-normal-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('fonts/DMMono-normal-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  /* Palette from option C: deep green, bone, lime. */
  --green: #0D1A14;
  --green-2: #142519;
  --green-3: #1C3123;
  --deep: #09130E;
  --bone: #E9EBE1;
  --bone-2: #DCDFD2;
  --lime: #C8F25A;
  /* Light base */
  --light: #F4F5EF;
  --light-2: #E7EADF;
  --lime-deep: #86BC12; /* lime that still reads as a dot on light */
  /* Legacy names kept so components don't need renaming */
  --paper: var(--bone);
  --paper-2: var(--bone-2);
  --ink: var(--green);

  --display: 'Unbounded', 'Arial Black', sans-serif;
  --text: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'DM Mono', ui-monospace, Menlo, monospace;

  --t-hero: clamp(2.6rem, 6.6vw, 6.4rem);
  --t-1: clamp(2.3rem, 5.4vw, 5rem);
  --t-2: clamp(1.8rem, 3.8vw, 3.4rem);
  --t-3: clamp(1.15rem, 1.7vw, 1.45rem);
  --t-lede: clamp(1.1rem, 1.55vw, 1.32rem);

  --wrap: 1360px;
  --gutter: clamp(1rem, 4.2vw, 3rem);
  --sec: clamp(5rem, 11vw, 9rem);
  --hdr: 72px;

  /* The D: sharp left corners, a full half-circle on the right. */
  --D: 3px 999px 999px 3px;
  --D-card: 6px clamp(48px, 9vw, 140px) clamp(48px, 9vw, 140px) 6px;

  --out: cubic-bezier(.16, 1, .3, 1);
  --io: cubic-bezier(.7, 0, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- Themes: every section declares one; the header follows ---------- */
/* "paper" is the light base, "blue" is the lime room, "navy" is the dark green band. */
[data-theme="paper"], :root { --bg: var(--light); --fg: var(--green); --fg-2: rgba(13,26,20,.72); --fg-3: rgba(13,26,20,.52); --line: rgba(13,26,20,.12); --head: var(--green); --dot: var(--lime-deep); --accent: var(--lime-deep); --accent-fg: var(--green); --panel: var(--light-2); --btn: var(--green); --btn-fg: var(--bone); --btn-hover: var(--lime); --btn-hover-fg: var(--green); --logo: var(--green); --art: var(--green); --art-dot: var(--lime-deep); }
[data-theme="blue"] { --bg: var(--lime); --fg: var(--green); --fg-2: rgba(13,26,20,.76); --fg-3: rgba(13,26,20,.56); --line: rgba(13,26,20,.16); --head: var(--green); --dot: var(--green); --accent: var(--green); --accent-fg: var(--lime); --panel: rgba(13,26,20,.07); --btn: var(--green); --btn-fg: var(--bone); --btn-hover: var(--bone); --btn-hover-fg: var(--green); --logo: var(--green); --art: var(--green); --art-dot: var(--bone); }
[data-theme="navy"] { --bg: var(--deep); --fg: var(--bone); --fg-2: rgba(233,235,225,.72); --fg-3: rgba(233,235,225,.5); --line: rgba(233,235,225,.12); --head: var(--bone); --dot: var(--lime); --accent: var(--lime); --accent-fg: var(--green); --panel: var(--green-2); --btn: var(--lime); --btn-fg: var(--green); --btn-hover: var(--bone); --btn-hover-fg: var(--green); --logo: var(--bone); --art: var(--bone); --art-dot: var(--lime); }
[data-theme] { background: var(--bg); color: var(--fg); }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 24px); background: var(--light); }
html, body { overflow-x: clip; }
body { font-family: var(--text); font-size: 1.0625rem; line-height: 1.55; color: var(--green); background: var(--light); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, video, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: inherit; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--lime); color: var(--green); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 400; background: var(--lime); color: var(--green); font-weight: 700; padding: 10px 16px; border-radius: var(--D); }
.skip:focus { top: 12px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  /* Page change: the new page wipes in as a growing D. */
  ::view-transition-old(root) { animation: vt-out .55s var(--io) both; }
  ::view-transition-new(root) { animation: vt-in .75s var(--io) both; }
  @keyframes vt-out { to { opacity: .4; transform: translateX(-4%); } }
  @keyframes vt-in { from { clip-path: inset(0 100% 0 0 round 0 50vh 50vh 0); } to { clip-path: inset(0 0 0 0 round 0); } }
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sec { padding-block: var(--sec); position: relative; }
.sec-tight { padding-block: clamp(3.5rem, 7vw, 6rem); }

/* ---------- Type ---------- */
.h-hero, .h1, .h2, .h3 { font-family: var(--display); color: var(--head); }
.h-hero { font-size: var(--t-hero); font-weight: 700; line-height: .98; letter-spacing: -.05em; }
.h1 { font-size: var(--t-1); font-weight: 700; line-height: 1; letter-spacing: -.045em; }
.h2 { font-size: var(--t-2); font-weight: 650; line-height: 1.04; letter-spacing: -.04em; }
.h3 { font-size: var(--t-3); font-weight: 600; line-height: 1.18; letter-spacing: -.025em; color: var(--fg); }
.stop { color: var(--dot); }
.lede { font-size: var(--t-lede); line-height: 1.5; color: var(--fg-2); max-width: 46ch; }
.mono { font-family: var(--mono); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kicker { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: .82rem; color: var(--fg-2); }
.kicker::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }
.measure { max-width: 62ch; }
.big-num { font-family: var(--display); font-weight: 700; letter-spacing: -.06em; line-height: .9; color: var(--head); font-variant-numeric: tabular-nums; }

/* Lines rise into place; JS wraps each line in a mask. */
.lines .ln { display: block; overflow-x: visible; overflow-y: clip; overflow-clip-margin: .12em; padding-bottom: .04em; }
.lines .ln > span { display: block; transform: translateY(115%); transition: transform 1s var(--out); transition-delay: calc(var(--i, 0) * 80ms + var(--base, 0ms)); }
.lines.in .ln > span { transform: none; }

/* ---------- The logo, recoloured through a mask so its shape never changes ---------- */
.logo { position: relative; display: block; aspect-ratio: 1033 / 279; overflow: hidden; --c: var(--logo); --c-dot: var(--dot); }
.logo i { position: absolute; left: -2.3233%; top: -14.695%; width: 104.5499%; height: 123.6559%; -webkit-mask: url('/assets/logo-ddd.png') 0 0 / 100% 100% no-repeat; mask: url('/assets/logo-ddd.png') 0 0 / 100% 100% no-repeat; }
.logo i:first-child { background: var(--c); clip-path: inset(0 11.2% 0 0); }
.logo i:last-child { background: var(--c-dot); clip-path: inset(0 0 0 88.9%); }

/* ---------- Buttons: D-shaped. The round end holds a dot that floods the button on hover. ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: .9rem;
  height: 58px; padding: 0 1.1rem 0 1.4rem; border-radius: var(--D);
  background: var(--btn); color: var(--btn-fg);
  font-weight: 600; font-size: 1.02rem; letter-spacing: -.005em; white-space: nowrap;
  transition: color .45s var(--out), transform .45s var(--out);
}
.btn .pip { position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.btn .pip::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--btn-hover); z-index: -1; transition: transform .7s var(--out); }
.btn .pip svg { width: 14px; height: 14px; color: var(--btn-hover-fg); transition: transform .5s var(--out); }
.btn:hover { color: var(--btn-hover-fg); }
.btn:hover .pip::before { transform: scale(28); }
.btn:hover .pip svg { transform: translateX(2px); }
.btn:active { transform: scale(.975); }
.btn-ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost .pip::before { background: var(--fg); }
.btn-ghost .pip svg { color: var(--bg); }
.btn-ghost:hover { color: var(--bg); }
.btn-sm { height: 46px; font-size: .95rem; padding: 0 .55rem 0 1.1rem; gap: .7rem; }
.btn-sm .pip { width: 32px; height: 32px; }
.btn-block { width: 100%; justify-content: space-between; }

.link { position: relative; display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; color: var(--fg); padding-block: .2rem; }
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: currentColor; transform-origin: 100% 50%; transition: transform .6s var(--out); }
.link:hover::after { transform: scaleX(0); }
.link .arw { width: 18px; height: 18px; border-radius: 50%; background: var(--dot); display: grid; place-items: center; transition: transform .5s var(--out); }
.link .arw svg { width: 10px; height: 10px; color: var(--bg); }
.link:hover .arw { transform: translateX(4px); }

/* ---------- Header: takes the theme of whatever is under it ---------- */
.hdr { position: fixed; inset: 0 0 auto; z-index: 200; height: var(--hdr); color: var(--fg); transition: background-color .4s ease, color .4s ease, transform .5s var(--out); background: transparent; }
.hdr::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--line); opacity: 0; transition: opacity .3s; }
.hdr.is-stuck { background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%); }
.hdr.is-stuck::after { opacity: 1; }
.hdr.is-away { transform: translateY(-100%); }
.nav { height: 100%; display: flex; align-items: center; gap: 2rem; }
.nav .logo { width: 104px; }
.nav-links { display: none; margin-left: auto; gap: .3rem; }
.nav-links a { position: relative; padding: .5rem .85rem; font-weight: 600; font-size: .98rem; border-radius: var(--D); transition: background .3s ease; }
.nav-links a:hover { background: var(--panel); }
.nav-links a[aria-current="page"]::before { content: ""; position: absolute; left: 50%; bottom: -2px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--dot); }
.hdr .btn { display: none; }
.burger { margin-left: auto; height: 46px; padding: 0 .55rem 0 1.1rem; display: inline-flex; align-items: center; gap: .7rem; border-radius: var(--D); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; font-size: .95rem; }
.burger i { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--fg); }
.burger i::before, .burger i::after { content: ""; position: absolute; left: 9px; right: 9px; height: 2px; background: var(--bg); transition: transform .5s var(--out); }
.burger i::before { top: 12px; } .burger i::after { top: 18px; }
.burger[aria-expanded="true"] i::before { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] i::after { transform: translateY(-3px) rotate(-45deg); }
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .hdr .btn { display: inline-flex; }
  .burger { display: none; }
}

/* Menu: grows out of the button as a circle */
.menu { position: fixed; inset: 0; z-index: 190; padding: calc(var(--hdr) + 1.5rem) var(--gutter) 2rem; display: flex; flex-direction: column; justify-content: space-between; clip-path: circle(0 at calc(100% - 3rem) 2.25rem); visibility: hidden; transition: clip-path .8s var(--io), visibility 0s .8s; }
.menu.open { clip-path: circle(150% at calc(100% - 3rem) 2.25rem); visibility: visible; transition: clip-path .8s var(--io); }
.menu a.big { display: flex; align-items: baseline; justify-content: space-between; font-family: var(--display); font-weight: 700; letter-spacing: -.05em; font-size: clamp(2.2rem, 11vw, 3.4rem); line-height: 1.12; padding-block: .25rem; opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .7s var(--out); }
.menu.open a.big { opacity: 1; transform: none; transition-delay: calc(var(--i) * 60ms + 250ms); }
.menu a.big .mono { font-size: .85rem; letter-spacing: 0; font-weight: 400; color: var(--fg-3); }
.menu-foot { display: grid; gap: 1.25rem; }
.menu-foot p { font-family: var(--mono); font-size: .82rem; color: var(--fg-2); }
@media (min-width: 960px) { .menu { display: none; } }

/* ---------- Home hero ---------- */
.hero { min-height: 100svh; min-height: 100dvh; display: grid; align-items: center; padding-top: calc(var(--hdr) + 2rem); padding-bottom: clamp(2.5rem, 6vh, 4rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero .h-hero { margin-top: 1.5rem; }
.hero .lede { margin-top: clamp(1.25rem, 3vh, 2rem); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; margin-top: clamp(1.75rem, 4vh, 2.75rem); }
.portrait { position: relative; justify-self: end; width: min(100%, 520px); }
.portrait .D { position: relative; aspect-ratio: 270 / 279; border-radius: 0 50% 50% 0; overflow: hidden; background: var(--lime); }
.portrait .D img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 30%; filter: grayscale(1) contrast(1.15) brightness(1.08); mix-blend-mode: multiply; }
.portrait .D::after { content: ""; position: absolute; inset: 0; background: none; }
.portrait .pt { position: absolute; right: -2%; bottom: 0; width: 16%; aspect-ratio: 1; border-radius: 50%; background: var(--dot); transform: translate(70%, 0); }
.capacity { margin-top: 1.25rem; display: flex; align-items: center; gap: .9rem; font-family: var(--mono); font-size: .82rem; color: var(--fg-2); }
.capacity .slots { display: flex; gap: 5px; }
.capacity .slots b { width: 12px; height: 12px; border-radius: 50%; background: var(--fg); }
.capacity .slots b.open { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fg); }
.js .hero .portrait .D { clip-path: inset(0 100% 0 0 round 0 50% 50% 0); transition: clip-path 1.3s var(--io) .15s; }
.js .hero .portrait .D img { transform: scale(1.15); transition: transform 1.8s var(--out) .15s; }
.js .hero .portrait .pt { transform: translate(70%, -60vh); opacity: 0; }
.hero.in .portrait .D { clip-path: inset(0 0 0 0 round 0 50% 50% 0); }
.hero.in .portrait .D img { transform: none; }
@media (max-width: 860px) {
  .hero { min-height: 0; align-items: start; }
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { order: -1; justify-self: start; width: 56%; max-width: 280px; }
}

/* ---------- Inner page hero ---------- */
.phero { padding-top: calc(var(--hdr) + clamp(3rem, 9vw, 7rem)); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.phero .kicker { margin-bottom: 1.5rem; }
.phero .lede { margin-top: 1.5rem; }
.phero-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: end; }
@media (max-width: 860px) { .phero-row { grid-template-columns: 1fr; } }

/* ---------- Marquee (one per page, at most) ---------- */
.marquee { overflow: hidden; padding-block: clamp(1.25rem, 2.5vw, 2rem); border-block: 1px solid var(--line); }
.marquee-track { display: flex; width: max-content; animation: marq 55s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { display: inline-flex; align-items: center; gap: clamp(1.5rem, 4vw, 3rem); padding-right: clamp(1.5rem, 4vw, 3rem); font-family: var(--display); font-weight: 600; letter-spacing: -.04em; font-size: clamp(1.4rem, 3vw, 2.5rem); white-space: nowrap; }
.marquee-track span::after { content: ""; width: .32em; height: .32em; border-radius: 50%; background: var(--dot); }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- Section head ---------- */
.shead { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); max-width: 60rem; }
.shead-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem 3rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.shead-row .h1, .shead-row .h2 { max-width: 16ch; }

/* ---------- "Sound familiar?" checker ---------- */
.checker { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 5vw, 5rem); align-items: start; }
.symptoms { display: grid; gap: .6rem; }
.symptom { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: center; width: 100%; text-align: left; padding: 1.25rem 1.5rem 1.25rem 1.25rem; border-radius: var(--D-card); background: var(--panel); transition: background .4s ease, color .4s ease, transform .5s var(--out); }
.symptom:hover { transform: translateX(6px); }
.symptom .tick { position: relative; width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 2px currentColor; flex: none; }
.symptom .tick::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .5s var(--spring); }
.symptom b { display: block; font-family: var(--display); font-weight: 600; letter-spacing: -.03em; font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.2; }
.symptom span { display: block; margin-top: .35rem; font-size: .97rem; color: var(--fg-2); }
.symptom[aria-pressed="true"] { background: var(--green); color: var(--bone); --fg-2: rgba(233,235,225,.72); }
.symptom[aria-pressed="true"] .tick::after { background: var(--lime); }
.symptom[aria-pressed="true"] .tick::after { transform: scale(1); }
.verdict { position: sticky; top: calc(var(--hdr) + 2rem); padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--D-card); box-shadow: inset 0 0 0 1.5px var(--line); min-height: 280px; display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; }
.verdict .score { display: flex; align-items: baseline; gap: .5rem; }
.verdict .score b { font-family: var(--display); font-weight: 700; font-size: clamp(3.5rem, 7vw, 5.5rem); line-height: .85; letter-spacing: -.06em; }
.verdict .score span { font-family: var(--mono); color: var(--fg-2); }
.verdict p { font-size: 1.12rem; line-height: 1.45; min-height: 3em; }
.verdict .btn { align-self: flex-start; }
@media (max-width: 900px) { .checker { grid-template-columns: 1fr; } .verdict { position: static; min-height: 0; } }

/* ---------- Direction / Execution switch ---------- */
.switch { display: inline-grid; grid-auto-flow: column; position: relative; padding: 5px; border-radius: var(--D); background: var(--panel); }
.switch button { position: relative; z-index: 1; padding: .8rem 1.3rem; font-weight: 600; border-radius: var(--D); transition: color .4s; }
.switch button[aria-selected="true"] { color: var(--btn-fg); }
.switch .ind { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; border-radius: var(--D); background: var(--btn); transition: transform .6s var(--out), width .6s var(--out); }
.modes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2rem clamp(2rem, 6vw, 6rem); margin-top: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.mode-stage { display: grid; }
.mode { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(16px); transition: opacity .4s ease, transform .6s var(--out), visibility 0s .4s; }
.mode.on { opacity: 1; visibility: visible; transform: none; transition: opacity .5s ease .1s, transform .7s var(--out) .1s; }
.mode h3 { margin-bottom: 1rem; }
.mode > p { color: var(--fg-2); max-width: 44ch; }
.dlist { margin-top: 1.5rem; display: grid; }
.dlist li { display: grid; grid-template-columns: 1.5rem 1fr; gap: .5rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.dlist li::before { content: ""; width: 8px; height: 8px; margin-top: .55em; border-radius: 50%; background: var(--dot); }
.mode-art { position: relative; aspect-ratio: 1 / .78; }
.mode-art span { position: absolute; border-radius: 0 999px 999px 0; background: var(--art); transition: all 1s var(--out); }
.mode-art .dt { border-radius: 50%; background: var(--art-dot); }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr; } .mode-art { display: none; } }

/* ---------- Receipts: horizontal case cards ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(82vw, 560px); gap: clamp(1rem, 2vw, 1.5rem); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding-inline: var(--gutter); padding-bottom: 1.5rem; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; }
.rail::-webkit-scrollbar { display: none; }
.rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.rail.dragging a { pointer-events: none; }
@media (min-width: 1360px) { .rail { padding-inline: calc((100vw - var(--wrap)) / 2 + var(--gutter)); scroll-padding-inline: calc((100vw - var(--wrap)) / 2 + var(--gutter)); } }
.receipt { scroll-snap-align: start; display: flex; flex-direction: column; border-radius: 6px; background: var(--panel); overflow: hidden; }
.receipt .ph { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 0 0 999px 0 / 0 0 60% 0; }
.receipt .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--out); }
.receipt:hover .ph img { transform: scale(1.05); }
.receipt .bd { padding: clamp(1.25rem, 2.6vw, 2rem); display: grid; gap: .6rem; flex: 1; align-content: start; }
.receipt .who { font-family: var(--mono); font-size: .82rem; color: var(--fg-2); }
.receipt .big-num { font-size: clamp(3rem, 6vw, 5rem); margin-top: .5rem; }
.receipt .what { font-weight: 600; }
.receipt p { color: var(--fg-2); }
.rail-ctrl { display: flex; gap: .5rem; }
.rail-ctrl button { width: 52px; height: 52px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-items: center; transition: background .3s, color .3s; }
.rail-ctrl button:hover { background: var(--fg); color: var(--bg); }
.rail-ctrl button:disabled { opacity: .35; pointer-events: none; }
.rail-ctrl svg { width: 18px; height: 18px; }

/* ---------- The maths ---------- */
.maths { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2.5rem clamp(2rem, 6vw, 6rem); align-items: center; }
.tiers-pick { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.tiers-pick button { padding: .75rem 1.1rem .75rem 1rem; border-radius: var(--D); box-shadow: inset 0 0 0 1.5px var(--line); text-align: left; transition: background .35s, color .35s, box-shadow .35s; }
.tiers-pick button b { display: block; font-weight: 600; }
.tiers-pick button small { font-family: var(--mono); font-size: .78rem; color: var(--fg-3); }
.tiers-pick button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); box-shadow: none; }
.tiers-pick button[aria-pressed="true"] small { color: inherit; opacity: .7; }
.cmp { display: grid; gap: 1.75rem; }
.cmp-row header { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; margin-bottom: .75rem; }
.cmp-row header span { color: var(--fg-2); font-weight: 600; }
.cmp-row header b { font-family: var(--mono); font-weight: 500; font-size: clamp(1.2rem, 2.2vw, 1.75rem); }
.cmp-bar { position: relative; height: clamp(52px, 6vw, 76px); }
.cmp-bar i { position: absolute; inset: 0 auto 0 0; border-radius: var(--D); transition: width 1.1s var(--out); width: 0; }
.cmp-bar .ft { background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--line); }
.cmp-bar .ft2 { background: repeating-linear-gradient(-45deg, rgba(233,235,225,.12) 0 7px, transparent 7px 14px); border-radius: 0 999px 999px 0; }
.cmp-bar .fr { background: var(--accent); }
.cmp-note { margin-top: .6rem; font-size: .92rem; color: var(--fg-3); }
.keep { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.keep span { color: var(--fg-2); max-width: 30ch; }
.keep b { font-family: var(--display); font-weight: 700; letter-spacing: -.05em; font-size: clamp(2rem, 4vw, 3.2rem); color: var(--accent); }
.honest { margin-top: 2rem; padding: 1.25rem 1.5rem; border-radius: var(--D-card); background: var(--panel); color: var(--fg-2); }
.honest b { color: var(--fg); }
@media (max-width: 900px) { .maths { grid-template-columns: 1fr; } }

/* ---------- Quotes: a deck you flick through ---------- */
.deck-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 2.5rem clamp(2rem, 6vw, 6rem); align-items: center; }
.deck { position: relative; display: grid; min-height: clamp(360px, 40vw, 440px); }
.qcard { grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: clamp(1.75rem, 3.5vw, 3rem) clamp(1.75rem, 5vw, 4.5rem) clamp(1.75rem, 3.5vw, 3rem) clamp(1.75rem, 3.5vw, 3rem); border-radius: var(--D-card); background: var(--lime); color: var(--green); transform-origin: 30% 120%; transition: transform .8s var(--out), opacity .5s ease; will-change: transform; }
.qcard:nth-child(2n) { background: var(--green); color: var(--bone); }
.qcard:nth-child(3n) { background: var(--light-2); color: var(--green); }
.qcard blockquote { font-family: var(--display); font-weight: 500; letter-spacing: -.035em; font-size: clamp(1.15rem, 2vw, 1.65rem); line-height: 1.3; }
.qcard figcaption b { display: block; font-weight: 700; }
.qcard figcaption span { opacity: .75; font-size: .95rem; }
.qcard[data-pos="0"] { z-index: 5; transform: none; }
.qcard[data-pos="1"] { z-index: 4; transform: rotate(-3deg) translate(-2%, 2%); }
.qcard[data-pos="2"] { z-index: 3; transform: rotate(-6deg) translate(-4%, 4%); }
.qcard[data-pos="3"], .qcard[data-pos="4"] { z-index: 2; transform: rotate(-8deg) translate(-5%, 5%); opacity: 0; }
.qcard[data-pos="1"] *, .qcard[data-pos="2"] *, .qcard[data-pos="3"] *, .qcard[data-pos="4"] * { visibility: hidden; }
.qcard.fly { transform: translate(120%, -10%) rotate(14deg) !important; opacity: 0; transition: transform .6s var(--io), opacity .6s ease; }
.deck-ctrl { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; }
.deck-ctrl .count { font-family: var(--mono); color: var(--fg-2); }
@media (max-width: 860px) { .deck-wrap { grid-template-columns: 1fr; } }

/* ---------- Steps: the dot travels the line as you scroll ---------- */
.route { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem clamp(1rem, 2.5vw, 2rem); padding-top: 3.5rem; }
.route::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 2px; background: var(--line); }
.route .runner { position: absolute; top: 0; left: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); transform: translateX(calc(var(--p, 1) * (var(--w, 0px) - 28px))); }
.route li .mono { display: block; font-size: .8rem; color: var(--fg-3); margin-bottom: .75rem; }
.route li h3 { margin-bottom: .5rem; }
.route li p { color: var(--fg-2); font-size: .98rem; max-width: 30ch; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .route { --p: 0; animation: run linear both; animation-timeline: view(); animation-range: entry 60% cover 55%; }
    @property --p { syntax: '<number>'; inherits: true; initial-value: 1; }
    @keyframes run { from { --p: 0; } to { --p: 1; } }
  }
}
@media (max-width: 860px) {
  .route { grid-template-columns: 1fr; padding-top: 0; padding-left: 3rem; }
  .route::before { left: 13px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .route .runner { transform: translateY(calc(var(--p, 1) * (var(--h, 0px) - 28px))); }
}

/* ---------- Mad-libs form ---------- */
.madlib { font-family: var(--display); font-weight: 500; letter-spacing: -.035em; font-size: clamp(1.45rem, 3.2vw, 2.7rem); line-height: 1.6; color: var(--fg); }
.madlib .slot { position: relative; display: inline-block; vertical-align: baseline; }
.madlib input, .madlib select { font: inherit; letter-spacing: inherit; color: var(--fg); background: transparent; border: 0; border-bottom: 3px solid var(--fg-3); padding: 0 .1em; border-radius: 0; min-width: 4ch; field-sizing: content; transition: border-color .3s ease; }
.madlib input { width: var(--w, 9ch); }
@supports (field-sizing: content) { .madlib input { width: auto; } }
.madlib select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: .9em; background-image: radial-gradient(circle at 50% 50%, var(--dot) 46%, transparent 50%); background-size: .42em .42em; background-repeat: no-repeat; background-position: right .1em center; }
.madlib select option { font-family: var(--text); font-size: 1rem; color: var(--ink); background: var(--paper); }
.madlib ::placeholder { color: var(--fg-3); opacity: 1; }
.madlib input:focus, .madlib select:focus { outline: none; border-color: var(--dot); }
.madlib input:user-invalid, .madlib select:user-invalid { border-color: var(--accent); border-bottom-style: dashed; }
.madlib-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: clamp(1.75rem, 4vw, 2.75rem); }
.madlib-foot p { font-size: .95rem; color: var(--fg-2); max-width: 44ch; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status:empty { display: none; }
.form-status { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: var(--D-card); background: var(--panel); font-size: .95rem; }

/* ---------- Footer ---------- */
.foot { padding-top: var(--sec); overflow: hidden; }
.foot-cta { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: end; padding-bottom: clamp(3rem, 7vw, 6rem); }
.foot-cta p { color: var(--fg-2); font-size: 1.1rem; max-width: 40ch; margin-bottom: 1.5rem; }
.foot-cta .acts { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; padding-block: 2.5rem; border-top: 1px solid var(--line); }
.foot-grid h4 { font-family: var(--mono); font-size: .8rem; font-weight: 400; color: var(--fg-3); margin-bottom: 1rem; }
.foot-grid ul { display: grid; gap: .5rem; }
.foot-grid a { font-weight: 600; transition: color .25s; }
.foot-grid a:hover { color: var(--accent); }
.foot-grid .about p { color: var(--fg-2); max-width: 32ch; }
.foot-grid .about p + p { margin-top: 1rem; font-family: var(--mono); font-size: .82rem; color: var(--fg-3); }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.5rem 2rem; font-size: .88rem; color: var(--fg-3); }
@media (max-width: 860px) { .foot-cta { grid-template-columns: 1fr; } .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid .about { grid-column: 1 / -1; } }

/* ---------- Mobile dock ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); transform: translateY(120%); transition: transform .5s var(--out); pointer-events: none; }
.dock.on { transform: none; pointer-events: auto; }
.dock .btn { width: 100%; justify-content: space-between; --btn: var(--lime); --btn-fg: var(--green); --btn-hover: var(--bone); --btn-hover-fg: var(--green); box-shadow: 0 10px 30px -8px rgba(0,0,0,.5); }
@media (min-width: 960px) { .dock { display: none; } }
@media (max-width: 959px) { .foot-legal { padding-bottom: 6rem; } }

/* =================================================================
   Inner pages
   ================================================================= */

/* Services: tiers + the month grid */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 1.5vw, 1.25rem); }
.tier { position: relative; display: flex; flex-direction: column; padding: clamp(1.5rem, 2.8vw, 2.25rem); padding-right: clamp(2rem, 4.5vw, 3.75rem); border-radius: var(--D-card); background: var(--panel); }
.tier.is-pick { background: var(--lime); color: var(--green); --fg: var(--green); --fg-2: rgba(13,26,20,.76); --fg-3: rgba(13,26,20,.56); --line: rgba(13,26,20,.16); --head: var(--green); --dot: var(--green); --accent: var(--green); --accent-fg: var(--lime); --btn: var(--green); --btn-fg: var(--bone); --btn-hover: var(--bone); --btn-hover-fg: var(--green); }
.tier .flag { position: absolute; top: -12px; left: clamp(1.5rem, 2.8vw, 2.25rem); padding: .3rem .8rem .3rem .6rem; border-radius: var(--D); background: var(--green); color: var(--lime); font-family: var(--mono); font-size: .76rem; }
.tier .mono.n { color: var(--fg-3); font-size: .82rem; }
.tier h3 { margin-top: .75rem; }
.tier > p { color: var(--fg-2); margin-top: .5rem; min-height: 4.6em; }
.price { display: flex; align-items: baseline; gap: .5rem; margin-block: 1.5rem; padding-block: 1.25rem; border-block: 1px solid var(--line); }
.price .big-num { font-size: clamp(2.4rem, 4vw, 3.4rem); color: var(--fg); }
.price small { font-family: var(--mono); color: var(--fg-3); font-size: .8rem; }
.month { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin-bottom: 1rem; }
.month i { aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); transition: background .4s ease, box-shadow .4s ease; transition-delay: calc(var(--k) * 35ms); }
.month i.on { background: var(--accent); box-shadow: none; }
.month-cap { font-family: var(--mono); font-size: .8rem; color: var(--fg-3); margin-bottom: 1.25rem; }
.tier ul { display: grid; flex: 1; align-content: start; margin-bottom: 1.75rem; }
.tier li { display: grid; grid-template-columns: 1.25rem 1fr; gap: .4rem; padding: .6rem 0; border-top: 1px solid var(--line); font-size: .97rem; }
.tier li::before { content: ""; width: 7px; height: 7px; margin-top: .55em; border-radius: 50%; background: var(--dot); }
.tiers-foot { margin-top: 1.5rem; font-family: var(--mono); font-size: .82rem; color: var(--fg-3); }
@media (max-width: 960px) { .tiers { grid-template-columns: 1fr; } .tier > p { min-height: 0; } }

.sprint { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 2.5rem clamp(2rem, 6vw, 6rem); align-items: start; }
.quad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.75rem, 1.5vw, 1rem); }
.quad > div { padding: clamp(1.25rem, 2.5vw, 1.9rem); border-radius: var(--D-card); background: var(--panel); }
.quad .mono { color: var(--dot); font-size: .85rem; }
.quad h3 { margin-block: .75rem .4rem; }
.quad p { color: var(--fg-2); font-size: .97rem; }
@media (max-width: 860px) { .sprint { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .quad { grid-template-columns: 1fr; } }

.fit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.fit > div { padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--D-card); }
.fit .yes { background: var(--lime); color: var(--green); }
.fit .no { box-shadow: inset 0 0 0 1.5px var(--line); }
.fit h3 { color: inherit; margin-bottom: 1rem; }
.fit li { display: grid; grid-template-columns: 1.5rem 1fr; gap: .4rem; padding: .85rem 0; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 20%, transparent); }
.fit .yes li::before { content: ""; width: 9px; height: 9px; margin-top: .5em; border-radius: 50%; background: var(--green); }
.fit .no li { color: var(--fg-2); }
.fit .no li::before { content: ""; width: 10px; height: 2px; margin-top: .75em; background: currentColor; }
@media (max-width: 760px) { .fit { grid-template-columns: 1fr; } }

.faq { display: grid; gap: .5rem; }
.faq details { border-radius: var(--D-card); background: var(--panel); overflow: hidden; }
.faq summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 1.25rem 1.25rem 1.25rem 1.5rem; cursor: pointer; font-family: var(--display); font-weight: 600; letter-spacing: -.03em; font-size: clamp(1rem, 1.6vw, 1.2rem); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--fg); transition: transform .5s var(--out), background .3s; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 11px; right: 11px; top: 17px; height: 2px; background: var(--bg); }
.faq summary i::after { transform: rotate(90deg); transition: transform .5s var(--out); }
.faq details[open] summary i { background: var(--accent); }
.faq details[open] summary i::after { transform: rotate(0); }
.faq .ans { padding: 0 1.5rem 1.5rem; color: var(--fg-2); max-width: 68ch; }
.faq .ans p + p { margin-top: .8rem; }
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content { height: 0; overflow: clip; transition: height .5s var(--out), content-visibility .5s allow-discrete; }
  .faq details[open]::details-content { height: auto; }
}

/* Work */
.names { display: flex; flex-wrap: wrap; gap: .25rem .4rem; font-family: var(--display); font-weight: 600; letter-spacing: -.045em; font-size: clamp(1.4rem, 3.6vw, 3rem); line-height: 1.2; }
.names span { color: var(--fg-3); transition: color .3s ease; }
.names span::after { content: ","; color: var(--fg-3); }
.names span:last-child::after { content: "."; color: var(--dot); }
.names span.hl { color: var(--fg); }
.names:hover span { color: var(--fg-3); }
.names span:hover { color: var(--fg); }
.case-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); }
.case-nav { position: sticky; top: calc(var(--hdr) + 2rem); align-self: start; display: grid; gap: .25rem; }
.case-nav a { display: grid; grid-template-columns: 1.5rem 1fr; gap: .5rem; align-items: center; padding: .55rem 0; color: var(--fg-3); font-weight: 600; transition: color .3s; }
.case-nav a::before { content: ""; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; transition: background .3s, box-shadow .3s; }
.case-nav a.on { color: var(--fg); }
.case-nav a.on::before { background: var(--accent); box-shadow: none; }
.case { padding-block: 0 clamp(4rem, 9vw, 7rem); }
.case + .case { padding-top: clamp(4rem, 9vw, 7rem); border-top: 1px solid var(--line); }
.case .kicker { margin-bottom: 1.25rem; }
.case .h2 { max-width: 18ch; }
.case-img { margin-block: clamp(2rem, 4vw, 3rem); aspect-ratio: 16 / 8; overflow: hidden; border-radius: 6px 9999px 9999px 6px; }
.case-img img { width: 100%; height: 115%; object-fit: cover; }
.case-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.case-figs div { padding: clamp(1.25rem, 2.5vw, 2rem); border-radius: var(--D-card); background: var(--panel); }
.case-figs .big-num { font-size: clamp(2.8rem, 6vw, 5rem); }
.case-figs div:first-child { background: var(--lime); color: var(--green); }
.case-figs div:first-child .big-num { color: var(--green); }
.case-figs p { margin-top: .75rem; color: inherit; opacity: .8; max-width: 26ch; }
.bwr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); }
.bwr h3 { font-family: var(--mono); font-size: .85rem; font-weight: 400; color: var(--dot); margin-bottom: .75rem; letter-spacing: 0; }
.bwr p { color: var(--fg-2); }
.case blockquote { margin-top: clamp(2rem, 4vw, 3rem); padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--D-card); box-shadow: inset 0 0 0 1.5px var(--line); }
.case blockquote p { font-family: var(--display); font-weight: 500; letter-spacing: -.03em; font-size: clamp(1.05rem, 1.7vw, 1.35rem); line-height: 1.35; max-width: 52ch; }
.case blockquote footer { margin-top: 1rem; font-size: .95rem; color: var(--fg-2); }
.case blockquote footer b { color: var(--fg); }
@media (max-width: 960px) { .case-wrap { grid-template-columns: 1fr; } .case-nav { display: none; } .bwr { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .case-figs { grid-template-columns: 1fr; } .case-img { aspect-ratio: 4 / 3; } }

/* About */
.about-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: end; }
.about-hero .portrait { justify-self: end; }
.bio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 2rem clamp(2rem, 6vw, 6rem); }
.bio .pull { position: sticky; top: calc(var(--hdr) + 2rem); align-self: start; font-family: var(--display); font-weight: 600; letter-spacing: -.04em; font-size: clamp(1.4rem, 2.6vw, 2.2rem); line-height: 1.15; color: var(--head); }
.bio .prose p { font-size: clamp(1.05rem, 1.35vw, 1.2rem); line-height: 1.65; color: var(--fg-2); }
.bio .prose p + p { margin-top: 1.4rem; }
.bio .prose p:first-child { color: var(--fg); font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.5; }
.holds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.75rem, 1.5vw, 1rem); }
.holds > div { padding: clamp(1.5rem, 2.6vw, 2rem); padding-right: clamp(1.75rem, 3.5vw, 3rem); border-radius: var(--D-card); background: var(--panel); min-height: 300px; display: flex; flex-direction: column; }
.holds .big-num { font-size: 3.2rem; color: var(--dot); margin-bottom: auto; padding-bottom: 2rem; }
.holds h3 { margin-bottom: .5rem; }
.holds p { color: var(--fg-2); font-size: .97rem; }
@media (max-width: 1000px) { .holds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .holds { grid-template-columns: 1fr; } .holds > div { min-height: 0; } }
.career { display: grid; }
.career li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 1rem clamp(2rem, 5vw, 5rem); padding-block: clamp(1.5rem, 3vw, 2.25rem); border-top: 1px solid var(--line); }
.career li:last-child { border-bottom: 1px solid var(--line); }
.career .era { font-family: var(--mono); font-size: .85rem; color: var(--dot); padding-top: .3rem; }
.career h3 { margin-bottom: .5rem; }
.career p { color: var(--fg-2); max-width: 60ch; }
@media (max-width: 700px) { .career li { grid-template-columns: 1fr; } }
.tools { display: flex; flex-wrap: wrap; gap: .5rem; }
.tools span { padding: .65rem 1.2rem .65rem 1rem; border-radius: var(--D); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; transition: background .3s, color .3s, box-shadow .3s; }
.tools span:hover { background: var(--accent); color: var(--accent-fg); box-shadow: none; }

/* Audit + contact */
.form-hero { padding-top: calc(var(--hdr) + clamp(2.5rem, 7vw, 5rem)); padding-bottom: clamp(3rem, 7vw, 5rem); }
.form-hero .h1 { max-width: 14ch; }
.form-hero .lede { margin-top: 1.25rem; }
.form-card { margin-top: clamp(2rem, 5vw, 3.5rem); padding: clamp(1.75rem, 4.5vw, 3.75rem); padding-right: clamp(2rem, 7vw, 6rem); border-radius: var(--D-card); background: var(--panel); }
.gets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 1.5vw, 1rem); }
.gets > div { padding: clamp(1.5rem, 2.6vw, 2rem); border-radius: var(--D-card); box-shadow: inset 0 0 0 1.5px var(--line); }
.gets .big-num { font-size: 2.6rem; color: var(--dot); margin-bottom: 2rem; }
.gets h3 { margin-bottom: .5rem; }
.gets p { color: var(--fg-2); font-size: .97rem; }
@media (max-width: 860px) { .gets { grid-template-columns: 1fr; } }
.why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 2.5rem clamp(2rem, 6vw, 6rem); align-items: center; }
.why .ph { aspect-ratio: 270 / 279; border-radius: 0 50% 50% 0; overflow: hidden; }
.why .ph img { width: 100%; height: 100%; object-fit: cover; }
.why .prose p { color: var(--fg-2); font-size: 1.1rem; }
.why .prose p + p { margin-top: 1.1rem; }
.why .prose p:last-child { color: var(--fg); font-weight: 600; }
@media (max-width: 860px) { .why { grid-template-columns: 1fr; } .why .ph { max-width: 340px; } }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.facts > * { padding: 1.25rem 1.5rem; border-radius: var(--D-card); box-shadow: inset 0 0 0 1.5px var(--line); }
.facts .mono { display: block; font-size: .8rem; color: var(--fg-3); margin-bottom: .35rem; }
.facts b { font-weight: 600; }
a.facts-link:hover { background: var(--panel); }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }

/* Docs (privacy) */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem clamp(2rem, 6vw, 6rem); }
.doc nav { position: sticky; top: calc(var(--hdr) + 2rem); align-self: start; display: grid; gap: .4rem; font-size: .95rem; }
.doc nav a { color: var(--fg-3); font-weight: 600; transition: color .25s; }
.doc nav a:hover { color: var(--fg); }
.doc article { max-width: 68ch; }
.doc section { padding-block: 1.75rem; border-top: 1px solid var(--line); }
.doc section h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.03em; font-size: 1.35rem; margin-bottom: .9rem; color: var(--head); }
.doc section p, .doc section li { color: var(--fg-2); }
.doc section p + p { margin-top: .9rem; }
.doc section li { display: grid; grid-template-columns: 1.25rem 1fr; padding: .3rem 0; }
.doc section li::before { content: ""; width: 7px; height: 7px; margin-top: .6em; border-radius: 50%; background: var(--dot); }
.doc a { text-decoration: underline; text-decoration-color: var(--dot); text-underline-offset: 3px; }
@media (max-width: 860px) { .doc { grid-template-columns: 1fr; } .doc nav { display: none; } }

/* Insights + 404 */
.solo { min-height: 100svh; display: grid; align-items: center; padding-top: var(--hdr); }
.solo .h-hero { max-width: 14ch; }
.solo .lede { margin-top: 1.5rem; }
.solo .acts { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; margin-top: 2.25rem; }
.code404 { display: flex; align-items: center; font-family: var(--display); font-weight: 800; letter-spacing: -.06em; font-size: clamp(7rem, 26vw, 20rem); line-height: .8; color: var(--head); margin-bottom: 2rem; }
.code404 .o { display: inline-block; width: .62em; height: .62em; margin-inline: .04em; border-radius: 50%; background: var(--accent); animation: roll 6s var(--io) infinite; }
@keyframes roll { 0%, 55%, 100% { transform: none; } 70% { transform: translateX(.35em) rotate(180deg); } 85% { transform: translateX(-.1em); } }
.typing::after { content: ""; display: inline-block; width: .5em; height: .5em; margin-left: .08em; border-radius: 50%; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--out), transform 1s var(--out); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .lines .ln > span { opacity: 1; transform: none; }
  .js .hero .portrait .D { clip-path: none; }
  .js .hero .portrait .D img { transform: none; }
  .js .hero .portrait .pt { transform: translate(70%, 0); opacity: 1; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
}
@media print { .hdr, .dock, .menu { display: none; } .js [data-reveal] { opacity: 1; transform: none; } }

body { position: relative; }
.madlib-foot, .madlib .form-status { font-family: var(--text); letter-spacing: normal; line-height: 1.5; font-weight: 400; }
.madlib-foot .btn { font-weight: 600; }
.receipt .big-num { color: var(--head); }
.receipt .what { color: var(--fg); }

.portrait .pt { transform: translate(70%, 0); }
.about-hero .portrait { width: min(100%, 440px); }
@media (max-width: 860px) { .about-hero { grid-template-columns: 1fr; } .about-hero .portrait { order: -1; justify-self: start; width: 56%; max-width: 280px; } .story { grid-template-columns: 1fr; } .bio .pull { position: static; } }

/* =================================================================
   The story. site.js drives each line, the dot and the noise straight
   from the scroll position, so there's no snapping and no CSS transitions here.
*/
/* On lime, the portrait becomes a green and bone duotone */
[data-theme="blue"] .portrait .D { background: var(--green); }
[data-theme="blue"] .portrait .D img { mix-blend-mode: screen; filter: grayscale(1) contrast(1.2) brightness(.92); }

.story-track { position: relative; height: 600svh; }
/* The hero overlaps the story's last screen, so the stage stays pinned
   behind it while it slides in: the dot blooms behind the incoming text. */
.after-story { position: relative; margin-top: -100svh; }
.after-story > .hero[data-theme] { background: linear-gradient(to bottom, transparent 0, transparent 100svh, var(--lime) 100svh); }
html:not(.js) .story-track { display: none; }

.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.story-lines, .stage .noise, .story-foot { position: absolute; inset: 0; }
.story-lines { display: grid; place-items: center; z-index: 2; pointer-events: none; }
.sline { grid-area: 1 / 1; max-width: 15ch; padding-inline: var(--gutter); text-align: center; font-family: var(--display); font-weight: 650; font-size: clamp(2.1rem, 6.4vw, 6rem); line-height: 1.02; letter-spacing: -.05em; color: var(--bone); opacity: 0; transform: translate3d(0, 48px, 0); will-change: transform, opacity; }
.sline:first-child { opacity: 1; transform: none; }
.sdot { display: inline-block; width: .2em; height: .2em; margin-left: .04em; border-radius: 50%; background: var(--lime); vertical-align: baseline; }
.stage .noise { z-index: 1; pointer-events: none; }
.sbloom { position: absolute; z-index: 2; border-radius: 50%; background: var(--lime); pointer-events: none; visibility: hidden; transform-origin: 50% 50%; will-change: transform; }
.stage .noise span { position: absolute; font-family: var(--mono); font-size: clamp(.72rem, 1vw, .9rem); color: rgba(233,235,225,.36); white-space: nowrap; animation: drift var(--t, 18s) ease-in-out infinite alternate; }
.stage .noise span:nth-child(3n) { font-family: var(--display); font-weight: 500; letter-spacing: -.03em; font-size: clamp(.95rem, 1.6vw, 1.35rem); color: rgba(233,235,225,.2); }
.stage .noise span:nth-child(5n) { color: rgba(233,235,225,.55); }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(var(--dx, 30px), var(--dy, -20px)); } }
.story-foot { z-index: 3; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: 0 var(--gutter) clamp(1.1rem, 3.5vh, 1.75rem); color: var(--fg-2); pointer-events: none; }
.story-foot > * { pointer-events: auto; }
.story-foot .pips { display: flex; gap: 6px; }
.story-foot .pips i { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; transition: background .3s, transform .4s var(--spring); }
.story-foot .pips i.on { background: var(--lime); box-shadow: none; transform: scale(1.15); }
.story-skip { font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; color: inherit; }
.story-hint { font-size: .8rem; }
@media (max-width: 700px) { .story-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .story-track { display: none; } }
.hero > .wrap { width: 100%; }

/* Footer, laid out like the live site: CTA band, then brand + columns, then copyright */
.foot-cta { display: block; padding-bottom: clamp(3rem, 6vw, 5rem); }
.foot-cta .h1 { max-width: 16ch; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.foot-cta-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 2rem 3rem; }
.foot-cta-row p { color: var(--fg-2); font-size: var(--t-lede); line-height: 1.55; max-width: 48ch; flex: 1 1 360px; margin: 0; }
.foot-cta-row .acts { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }
.foot-brand .logo { width: 104px; margin-bottom: 1.25rem; }
.foot-brand p { color: var(--fg-2); max-width: 32ch; font-size: .95rem; }
.foot-brand .loc { margin-top: 1rem; font-family: var(--mono); font-size: .82rem; color: var(--fg-3); }
.foot-brand .loc span { color: var(--dot); }
.foot-grid .foot-brand { grid-column: auto; }
@media (max-width: 860px) { .foot-grid .foot-brand { grid-column: 1 / -1; } }
.foot-legal { border-top: 1px solid var(--line); padding-top: 1.5rem; }

/* "Sound familiar?" on dark: a ticked statement lights up lime */
[data-theme="navy"] .symptom[aria-pressed="true"] { background: var(--lime); color: var(--green); --fg-2: rgba(13,26,20,.72); }
[data-theme="navy"] .symptom[aria-pressed="true"] .tick::after { background: var(--green); }

/* =================================================================
   Booking (contact page + manage page)
   ================================================================= */
.bk { margin-top: clamp(2rem, 5vw, 3.5rem); padding: clamp(1.5rem, 4vw, 3rem); padding-right: clamp(1.75rem, 6vw, 5rem); border-radius: var(--D-card); background: var(--panel); }
.bk-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 2rem; margin-bottom: 1.5rem; }
.bk-head .h3 { display: flex; align-items: center; gap: .75rem; }
.bk-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--fg); color: var(--bg); font-family: var(--mono); font-size: .85rem; }
.bk-tz { font-family: var(--mono); font-size: .82rem; color: var(--fg-2); display: inline-flex; align-items: center; gap: .5rem; }
.bk-tz select { font: inherit; color: var(--fg); background: transparent; border: 0; border-bottom: 1.5px solid var(--line); padding: .2rem 1.2rem .2rem .1rem; appearance: none; -webkit-appearance: none; cursor: pointer; background-image: radial-gradient(circle, var(--dot) 40%, transparent 46%); background-size: 9px 9px; background-repeat: no-repeat; background-position: right 2px center; }
.bk-days { display: grid; grid-auto-flow: column; grid-auto-columns: 92px; gap: .5rem; overflow-x: auto; padding-bottom: .75rem; scroll-snap-type: x proximity; scrollbar-width: thin; }
.bk-day { scroll-snap-align: start; display: grid; justify-items: start; gap: .05rem; padding: .8rem 1rem .8rem .9rem; border-radius: 4px 999px 999px 4px / 4px 40px 40px 4px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); text-align: left; transition: background .25s, color .25s, box-shadow .25s; }
.bk-day span { font-family: var(--mono); font-size: .72rem; color: var(--fg-2); }
.bk-day b { font-family: var(--display); font-weight: 700; font-size: 1.6rem; letter-spacing: -.04em; line-height: 1.05; }
.bk-day small { margin-top: .25rem; font-size: .72rem; color: var(--fg-3); }
.bk-day:hover { box-shadow: inset 0 0 0 1.5px var(--fg); }
.bk-day[aria-selected="true"] { background: var(--green); color: var(--bone); box-shadow: none; }
.bk-day[aria-selected="true"] span, .bk-day[aria-selected="true"] small { color: rgba(233,235,225,.7); }
.bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .5rem; margin-top: 1rem; min-height: 52px; }
.bk-time { height: 48px; border-radius: var(--D); background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; font-variant-numeric: tabular-nums; transition: background .2s, box-shadow .2s, transform .2s var(--out); }
.bk-time:hover { box-shadow: inset 0 0 0 1.5px var(--fg); transform: translateY(-1px); }
.bk-time[aria-pressed="true"] { background: var(--lime); box-shadow: none; color: var(--green); }
.bk-note { margin-top: 1rem; color: var(--fg-2); font-size: .95rem; }
.bk-note:empty { display: none; }
.bk-skel { height: 92px; border-radius: 4px 40px 40px 4px; background: linear-gradient(90deg, var(--bg) 0%, var(--panel) 50%, var(--bg) 100%) 0 0 / 200% 100%; animation: skel 1.2s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }

.bk-chosen { font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; }
.bk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.5rem; }
.fld { display: grid; gap: .4rem; min-width: 0; border: 0; }
.fld > span, .fld legend { font-weight: 600; font-size: .92rem; }
.fld em { font-style: normal; font-weight: 400; color: var(--fg-3); }
.fld input, .fld select { height: 52px; width: 100%; padding: 0 14px; border-radius: 4px; border: 1.5px solid var(--line); background: var(--bg); color: var(--fg); font-size: 16px; transition: border-color .2s; }
.fld select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: radial-gradient(circle, var(--dot) 40%, transparent 46%); background-size: 10px 10px; background-repeat: no-repeat; background-position: right 14px center; }
.fld select:invalid { color: var(--fg-3); }
.fld input:focus, .fld select:focus { outline: none; border-color: var(--fg); }
.fld input:user-invalid, .fld select:user-invalid { border-color: #C2410C; }
.fld legend { margin-bottom: .4rem; }
.switch-r { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--D); background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); }
.switch-r label { position: relative; cursor: pointer; }
.switch-r input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.switch-r span { display: inline-flex; align-items: center; height: 42px; padding: 0 1.1rem; border-radius: var(--D); font-weight: 600; transition: background .25s, color .25s; }
.switch-r input:checked + span { background: var(--green); color: var(--bone); }
.switch-r input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ts-box:not(:empty) { margin-top: 1rem; }
.bk-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 1.75rem; }
.bk-foot p { font-size: .92rem; color: var(--fg-2); max-width: 52ch; }
.bk .form-status:empty { display: none; }
.bk .form-status { margin-top: 1rem; padding: .8rem 1rem; border-radius: 4px; background: var(--bg); color: var(--fg); }
.bk-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.bk-summary > div { padding: 1.1rem 1.25rem; border-radius: var(--D-card); background: var(--bg); }
.bk-summary .mono { display: block; font-size: .78rem; color: var(--fg-3); margin-bottom: .3rem; }
.bk-summary b { font-weight: 600; }
.bk-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.bk-actions[hidden] { display: none; }
[data-manage] [data-step="time"] { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
@media (max-width: 700px) { .bk-grid, .bk-summary { grid-template-columns: 1fr; } .bk { padding-right: clamp(1.5rem, 4vw, 3rem); } }
@media (prefers-reduced-motion: reduce) { .bk-skel { animation: none; } }

.bk-step[hidden], .bk [hidden] { display: none !important; }

