/* Bliksem apps. Host Grotesk. Colours: sky blue and magenta (raw --c-* values), everything else is derived. */
:root {
  --c-bg: #cbe4f2; --c-ink: #0a0a0a; --c-acc: #b0298f; --c-acc-ink: #ffffff; --c-inv: #0a0a0a; --c-acc2: #f08ad6; --c-dbg: #10222f;

  --bg: var(--c-bg);
  --ink: var(--c-ink);
  --accent: var(--c-acc);
  --accent-ink: var(--c-acc-ink);
  --inv-bg: var(--c-inv);
  --inv-ink: var(--c-bg);
  --inv-accent: var(--c-acc2);
  --inv-accent-ink: #111111;
  --paper: color-mix(in oklab, var(--bg) 30%, #ffffff);
  --win-shadow: 0 40px 80px -40px color-mix(in oklab, var(--ink) 40%, transparent), 0 12px 24px -12px color-mix(in oklab, var(--ink) 20%, transparent);

  --surface: color-mix(in oklab, var(--bg) 93%, var(--ink));
  --paper-2: color-mix(in oklab, var(--paper) 94%, var(--ink));
  --muted: color-mix(in oklab, var(--ink) 90%, var(--bg));
  --line: color-mix(in oklab, var(--ink) 13%, transparent);
  --line-strong: color-mix(in oklab, var(--ink) 22%, transparent);
  --tone: color-mix(in oklab, var(--accent) 14%, transparent);
  --tone-ink: color-mix(in oklab, var(--accent) 70%, var(--ink));
  --inv-surface: color-mix(in oklab, var(--inv-bg) 90%, var(--inv-ink));
  --inv-muted: color-mix(in oklab, var(--inv-ink) 88%, var(--inv-bg));

  --r-sm: 10px; --r-md: 12px; --r-lg: 18px; --r-xl: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-enter: cubic-bezier(.22, 1, .36, 1);
  --font: "Host Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
    --bg: var(--c-dbg);
    --ink: #ecebe8;
    --accent: var(--c-acc2);
    --accent-ink: #111111;
    --inv-bg: var(--c-bg);
    --inv-ink: var(--c-ink);
    --inv-accent: var(--c-acc);
    --inv-accent-ink: var(--c-acc-ink);
    --paper: color-mix(in oklab, var(--c-dbg) 86%, #ffffff);
    --win-shadow: 0 40px 80px -40px #000000b3, 0 12px 24px -12px #00000066;
    color-scheme: dark;
  }
}

:root[data-scheme="dark"] {
    --bg: var(--c-dbg);
    --ink: #ecebe8;
    --accent: var(--c-acc2);
    --accent-ink: #111111;
    --inv-bg: var(--c-bg);
    --inv-ink: var(--c-ink);
    --inv-accent: var(--c-acc);
    --inv-accent-ink: var(--c-acc-ink);
    --paper: color-mix(in oklab, var(--c-dbg) 86%, #ffffff);
    --win-shadow: 0 40px 80px -40px #000000b3, 0 12px 24px -12px #00000066;
    color-scheme: dark;
  }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
::selection { background: color-mix(in oklab, var(--accent) 35%, transparent); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 500; margin: 0; text-wrap: balance; }
.muted { color: var(--muted); }
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: min(100% - 32px, 1280px); margin-inline: auto; }
@media (min-width: 48rem) { .wrap { width: min(100% - 80px, 1280px); } }
@media (min-width: 90rem) { .wrap { width: min(100% - 160px, 1280px); } }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.ground-inverse :focus-visible { outline-color: var(--inv-ink); }
.skip-link {
  position: absolute; left: 0; top: 12px; z-index: 50;
  transform: translateY(-200%);
  background: var(--ink); color: var(--bg); padding: .55rem .9rem; border-radius: var(--r-sm);
  font-weight: 500; text-decoration: none;
}
.skip-link:focus { transform: none; }

/* Nav: centred links */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: color-mix(in oklab, var(--world) 88%, transparent);
  transition: background-color 700ms var(--ease), border-color 200ms var(--ease);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__bar { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; }
.nav__links { display: flex; gap: .25rem; }

.nav__logo { display: inline-flex; align-items: center; gap: .6rem; font-weight: 650; font-size: 1.1875rem; letter-spacing: -.03em; text-decoration: none; min-height: 44px; justify-self: start; }
.mark { width: 26px; height: 26px; flex: none; color: var(--ink); }
.nav__links a, .nav__gh {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 .85rem;
  text-decoration: none; font-size: .9375rem; font-weight: 500; color: var(--muted);
  transition: color 150ms var(--ease);
}

.nav__links a::after, .nav__gh::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: 10px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 150ms var(--ease);
}
.nav__links a:hover, .nav__gh:hover { color: var(--ink); }
.nav__links a:hover::after, .nav__gh:hover::after { transform: scaleX(1); transform-origin: left; }

/* Buttons: tonal */
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: 0 1.3rem; border-radius: var(--r-md);
  font: 500 1rem/1 var(--font); letter-spacing: -.005em; text-decoration: none; white-space: nowrap;
  transition: transform 150ms var(--ease), background-color 150ms var(--ease);
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--secondary { background: var(--tone); color: var(--tone-ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn--primary:hover { background: color-mix(in oklab, var(--accent) 86%, var(--ink)); }
  .btn--secondary:hover { background: color-mix(in oklab, var(--accent) 22%, transparent); }
}
.btn:active { transform: translateY(1px) scale(.985); transition-duration: 90ms; }

/* Worlds: the page takes on each app's colours as you scroll into its chapter */
:root { --world: var(--bg); --toolbox: #F5A524; --tug: #E5421B; }
body { background: var(--world); transition: background-color 700ms var(--ease); }
body[data-world="toolbox"] { --world: #f8ecd2; }
body[data-world="tugboat"] { --world: #f7e1d9; }
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) body[data-world="toolbox"] { --world: #17130b; }
  :root:not([data-scheme="light"]) body[data-world="tugboat"] { --world: #180f0c; }
}
:root[data-scheme="dark"] body[data-world="toolbox"] { --world: #17130b; }
:root[data-scheme="dark"] body[data-world="tugboat"] { --world: #180f0c; }
.soft { color: var(--muted); }

/* 1. Intro */
.intro { min-height: 100svh; display: flex; align-items: center; padding: calc(64px + 3rem) 0 4rem; overflow: hidden; }
.intro__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.intro h1 { font-size: clamp(2.6rem, 5.4vw, 4.75rem); line-height: 1.02; letter-spacing: -.045em; max-width: 12ch; }
.intro__lead { margin: 1.5rem 0 0; max-width: 34ch; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.5; color: var(--muted); }
.chapters { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; border-top: 1px solid var(--line-strong); max-width: 30rem; }
.chapters a {
  display: grid; grid-template-columns: 2.5rem 1fr auto; align-items: baseline; gap: .75rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line-strong); text-decoration: none;
  transition: padding 0ms;
}
.chapters__n { font-family: var(--mono); font-size: .8125rem; color: var(--muted); }
.chapters__name { font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; position: relative; }
.chapters__name::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 200ms var(--ease); }
.chapters a:hover .chapters__name::after { transform: scaleX(1); transform-origin: left; }
.chapters__where { color: var(--muted); font-size: .9375rem; }

.stack { position: relative; height: clamp(320px, 42vw, 520px); }
.stack__item {
  position: absolute; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--paper);
  box-shadow: 0 40px 80px -40px color-mix(in oklab, var(--ink) 45%, transparent), 0 10px 24px -14px color-mix(in oklab, var(--ink) 25%, transparent);
  will-change: transform;
}
.stack__item img { width: 100%; height: auto; }
.stack__item--browser { width: 92%; right: -6%; top: 0; }
.stack__item--window { width: 74%; left: 0; bottom: 0; }
.chrome-bar { display: flex; align-items: center; gap: .8rem; height: 30px; padding: 0 10px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.url { flex: 1; max-width: 220px; margin-inline: auto; text-align: center; font-size: 11px; color: var(--muted); background: var(--paper); border-radius: 6px; padding: 3px 12px; }

/* 2-3. Chapters */
.chapter { min-height: 100svh; display: flex; align-items: center; padding: calc(64px + 3rem) 0 4rem; }
.chapter__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.chapter--flip .chapter__text { order: 2; }
.chapter--flip .chapter__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.chapter__n { margin: 0 0 1.5rem; font-family: var(--mono); font-size: .875rem; color: var(--muted); }
.chapter__icon { width: 56px; height: 56px; margin-bottom: 1.5rem; }
.chapter h2 { font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.06; letter-spacing: -.035em; }
.chapter__lead { margin: 1.25rem 0 0; color: var(--muted); max-width: 40ch; font-size: 1.125rem; }
.chapter__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 2rem; }
.chapter__meta { color: var(--muted); font-size: .9375rem; }
#toolbox { --accent-here: var(--toolbox); }
#tugboat { --accent-here: var(--tug); }
.btn--sm { min-height: 40px; padding: 0 1rem; font-size: .9375rem; }

/* Toolbox: the drop zone */
.drop { position: relative; }
.drop__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop__zone {
  display: grid; place-items: center; align-content: center; gap: .4rem; text-align: center;
  min-height: clamp(300px, 34vw, 420px); padding: 2rem;
  border-radius: var(--r-xl); cursor: pointer;
  background: color-mix(in oklab, var(--paper) 70%, transparent);
  border: 2px dashed color-mix(in oklab, var(--toolbox) 70%, var(--ink));
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), transform 200ms var(--ease);
}
.drop__zone:hover, .drop.is-over .drop__zone { background: color-mix(in oklab, var(--toolbox) 18%, var(--paper)); }
.drop.is-over .drop__zone { transform: scale(1.01); border-style: solid; }
.drop__input:focus-visible + .drop__zone { outline: 2px solid var(--ink); outline-offset: 4px; }
.drop__icon { width: 44px; height: 44px; fill: none; stroke: color-mix(in oklab, var(--toolbox) 75%, var(--ink)); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .5rem; }
.drop.is-over .drop__icon { animation: nudge 600ms var(--ease) infinite alternate; }
@keyframes nudge { to { transform: translateY(-5px); } }
.drop__title { font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em; }
.drop__sub { color: var(--muted); }
.drop__try { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
.drop__try-label { width: 100%; font-size: .8125rem; color: var(--muted); margin-bottom: .1rem; }
.drop__chip {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 36px; padding: 0 .8rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper); font: 500 .875rem/1 var(--mono); color: var(--ink); cursor: pointer;
  transition: transform 150ms var(--ease), border-color 150ms var(--ease);
}
.drop__chip i { width: 10px; height: 12px; border-radius: 2px; background: var(--c); }
.drop__chip:hover { transform: translateY(-1px); border-color: var(--ink); }
.drop__result {
  min-height: clamp(300px, 34vw, 420px); padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--r-xl); background: var(--paper); border: 1px solid var(--line);
  display: grid; align-content: start; gap: 1.25rem;
  animation: rise 420ms var(--ease-enter);
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.drop__file { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; font-weight: 500; font-size: 1.125rem; word-break: break-all; }
.drop__kind { font-family: var(--mono); font-size: .75rem; font-weight: 400; color: var(--muted); padding: .2rem .5rem; border-radius: 6px; background: var(--paper-2); word-break: normal; }
.drop__tools { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.drop__tools li {
  display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-radius: 12px;
  background: color-mix(in oklab, var(--toolbox) 12%, var(--paper)); animation: rise 420ms var(--ease-enter) backwards;
}
.drop__tools li b { font-weight: 500; }
.drop__tools li span { color: var(--muted); font-size: .9375rem; text-align: right; }
.drop__row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: .25rem; }
.drop__again { background: none; border: 0; padding: 0 .25rem; min-height: 40px; font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: .25em; cursor: pointer; }
.drop__again:hover { color: var(--ink); }
.drop__hint { margin: .5rem 0 0; font-size: .875rem; color: var(--ink); text-align: center; }
.drop__note { margin: .9rem 0 0; font-size: .875rem; color: var(--muted); text-align: center; }

/* Tugboat: the race */
.race {
  padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--r-xl);
  background: var(--paper); border: 1px solid var(--line);
  display: grid; gap: 1.5rem;
}
.race { min-height: clamp(320px, 34vw, 420px); align-content: center; gap: 2rem; }
.race__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.race__file { display: grid; font-weight: 500; font-size: 1.0625rem; }
.race__file small { font-family: var(--mono); font-size: .75rem; color: var(--muted); font-weight: 400; }
.race__lane { display: grid; gap: .6rem; }
.race__label { display: flex; justify-content: space-between; font-size: 1rem; }
.race__label b { font-weight: 500; }
.race__pct { font-family: var(--mono); font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.race__bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; height: 56px; }
.race__bars i { display: block; position: relative; overflow: hidden; border-radius: 6px; background: color-mix(in oklab, var(--ink) 8%, var(--paper)); }
.race__bars i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: color-mix(in oklab, var(--ink) 55%, var(--paper)); transform-origin: left; transform: scaleX(var(--p, 0)); }
.race__lane--tug .race__bars i::after { background: var(--tug); }
.race.is-done .race__lane--tug .race__pct { color: var(--tug); font-weight: 500; }
.race__note { margin: 0; font-size: .8125rem; color: var(--muted); }
.chapter .btn--primary { background: var(--ink); color: var(--bg); }
.chapter .btn--primary:hover { background: color-mix(in oklab, var(--ink) 85%, var(--bg)); }

/* 4. On the bench */
.bench { padding: clamp(6rem, 14vh, 9rem) 0; }
.bench__head { max-width: 40rem; }
.bench h2 { font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.06; letter-spacing: -.035em; }
.bench__head p { margin: 1rem 0 0; color: var(--muted); font-size: 1.125rem; max-width: 44ch; }
.feed { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1rem, 2vw, 1.5rem); margin-top: clamp(2rem, 4vw, 3rem); }
.feed__repo { min-width: 0; grid-template-columns: minmax(0, 1fr); padding: clamp(1.25rem, 2.5vw, 2rem); border-radius: var(--r-xl); background: var(--paper); border: 1px solid var(--line); display: grid; gap: 1rem; align-content: start; }
.feed__top { display: flex; align-items: center; gap: .75rem; }
.feed__top img { width: 32px; height: 32px; }
.feed__name { font-family: var(--mono); font-size: .9375rem; text-decoration: none; }
.feed__name:hover { text-decoration: underline; text-underline-offset: .2em; }
.feed__stars { margin-left: auto; font-family: var(--mono); font-size: .8125rem; color: var(--muted); }
.feed__release { margin: 0; color: var(--muted); }
.feed__release a { color: var(--ink); font-weight: 500; text-underline-offset: .2em; }
.feed__when { font-size: .875rem; }
.feed__commits { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.feed__commits li { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.feed__commits li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed__commits time { flex: none; font-family: var(--mono); font-size: .8125rem; color: var(--muted); }
.feed__follow {
  position: relative; display: grid; align-content: end; gap: .5rem; min-height: 220px;
  padding: clamp(1.25rem, 2.5vw, 2rem); border-radius: var(--r-xl); text-decoration: none;
  background: var(--ink); color: var(--bg);
  transition: transform 180ms var(--ease);
}
.feed__follow:hover { transform: translateY(-2px); }
.feed__follow-title { font-size: clamp(1.375rem, 2vw, 1.75rem); font-weight: 500; letter-spacing: -.025em; }
.feed__follow-sub { color: color-mix(in oklab, var(--bg) 75%, var(--ink)); max-width: 30ch; }
.feed__arrow { position: absolute; top: clamp(1.25rem, 2.5vw, 2rem); right: clamp(1.25rem, 2.5vw, 2rem); width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 150ms var(--ease); }
.feed__follow:hover .feed__arrow { transform: translateX(3px); }

/* Footer */
.footer { padding: 2rem 0 1.5rem; overflow: hidden; }
.footer__word-old { margin: 0; font-size: clamp(4.5rem, 24vw, 20rem); line-height: .8; font-weight: 650; letter-spacing: -.06em; white-space: nowrap; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.footer__legal a { color: inherit; text-underline-offset: .25em; }
.footer__legal a:hover { color: var(--ink); }
.footer__links { display: flex; gap: 1.25rem; }
.footer__links a { text-decoration: none; }

/* Entrance, once; reveal chapters as they arrive (content is visible without script) */
.m-enter:not(.m-enter-done) .intro h1, .m-enter:not(.m-enter-done) [data-enter-item] { opacity: 0; }
.is-entering .intro h1 { opacity: 1; }
.is-entering .intro h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.is-entering .intro h1 .w > span { display: inline-block; transform: translateY(110%); transition: transform 760ms var(--ease-enter); transition-delay: var(--d, 0ms); }
.is-entering.is-go .intro h1 .w > span { transform: none; }
.is-entering [data-enter-item] { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease-enter) var(--d, 0ms), transform 600ms var(--ease-enter) var(--d, 0ms); }
.is-entering.is-go [data-enter-item] { opacity: 1; transform: none; }
.is-entering .stack__item--browser { transform: translate(40px, 20px); opacity: 0; transition: transform 1000ms var(--ease-enter) 200ms, opacity 600ms var(--ease-enter) 200ms; }
.is-entering .stack__item--window { transform: translate(-30px, 40px); opacity: 0; transition: transform 1000ms var(--ease-enter) 380ms, opacity 600ms var(--ease-enter) 380ms; }
.is-entering.is-go .stack__item { transform: none; opacity: 1; }

.js .chapter .chapter__text > *, .js .chapter .chapter__play { transition: opacity 700ms var(--ease-enter), transform 700ms var(--ease-enter); }
.js .chapter:not(.is-in) .chapter__text > *, .js .chapter:not(.is-in) .chapter__play { opacity: 0; transform: translateY(24px); }
.js .chapter.is-in .chapter__text > :nth-child(2) { transition-delay: 60ms; }
.js .chapter.is-in .chapter__text > :nth-child(3) { transition-delay: 120ms; }
.js .chapter.is-in .chapter__text > :nth-child(4) { transition-delay: 180ms; }
.js .chapter.is-in .chapter__text > :nth-child(5) { transition-delay: 240ms; }
.js .chapter.is-in .chapter__play { transition-delay: 160ms; }
@media (prefers-reduced-motion: reduce) {
  .js .chapter:not(.is-in) .chapter__text > *, .js .chapter:not(.is-in) .chapter__play { opacity: 1; transform: none; }
  body, .nav { transition: none; }
}

/* Smaller screens */
@media (max-width: 60rem) {
  .intro__grid, .chapter__grid, .chapter--flip .chapter__grid, .feed { grid-template-columns: minmax(0, 1fr); }
  .chapter--flip .chapter__text { order: 0; }
  .stack { height: clamp(260px, 70vw, 440px); }
  .intro h1 { max-width: 14ch; }
}
@media (max-width: 48rem) {
  .nav__links { display: none; }
  .nav__bar { display: flex; justify-content: space-between; }
  .chapter { min-height: 0; padding: 5rem 0; }
}
@media (max-width: 30rem) {
  .chapter__actions .btn, .drop__row .btn { width: 100%; }
  .race__head .btn { width: 100%; }
  .footer__legal { flex-direction: column; }
}

/* Logo: the quarter-turn mark with the wordmark */
.logo { display: block; fill: currentColor; }
.nav__logo .logo { height: 21px; width: auto; }
.footer__mark { margin: 0; }
.footer__mark .logo { width: 100%; height: auto; }

/* Light/dark switch */
.nav__end { justify-self: end; display: flex; align-items: center; gap: .25rem; }
.theme-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
.theme-btn:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 8%, transparent); }
.theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 300ms var(--ease-enter); }
.theme-btn:active svg { transform: rotate(-30deg) scale(.9); }
.theme-btn .moon { display: none; }
.is-dark .theme-btn .sun { display: none; }
.is-dark .theme-btn .moon { display: block; }
