/* Stickler's website (SPEC.md "Website"): Figtree, Apricot on warm grey, light and dark from
   the browser's setting. Contrast measured 2026-11-18: body text >= 6.2:1, links >= 4.9:1,
   button text 8.4:1 (WCAG 2.2 AA). */

/* Figtree 2.0.3 (github.com/erikdkennedy/figtree, commit 032dfa7), SIL Open Font License 1.1
   (fonts/OFL.txt): the variable font cut to weights 400-700 and Latin with German. */
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fbf9f4;
  --card: #ffffff;
  --soft: #f4efe4;
  --fg: #241f1a;
  --muted: #5f564d;
  --line: #e6ddcd;
  --accent: #f4a26b;
  --accent-fg: #2b160a;
  --ink: #a14a16;
  --accent-soft: #fde4d2;
  --code: #2b2622;
  --code-fg: #f2ede7;
  --radius: 18px;
  --wide: 70rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1916;
    --card: #26221e;
    --soft: #2e2924;
    --fg: #f2ede7;
    --muted: #b9ada0;
    --line: #3d3630;
    --ink: #f6b083;
    --accent-soft: #3d2a1f;
    --code: #12100e;
  }
}

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

html {
  scroll-padding-top: 5rem; /* anchors land below the sticky header */
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Figtree", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ink);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--fg);
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

/* the first thing a keyboard reaches; visible once it has the focus */
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 3;
  background: var(--fg);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding-inline: 1.5rem;
}

/* header and navigation; it stays on top from tablet width up (on a phone it would take a
   quarter of the screen) */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 48rem) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 2;
  }
}


.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  padding-block: 0.875rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--fg);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}

.spacer {
  flex-grow: 1;
}

/* links in menus are 44 px tall targets (SPEC "Website") */
.nav-links a,
.site-nav > .quiet,
.footer-row a,
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.375rem;
  flex-grow: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
}

.quiet {
  color: var(--muted);
  text-decoration: none;
}

.quiet:hover {
  color: var(--fg);
  text-decoration: underline;
}

/* buttons are links: a download or an anchor */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 500;
  text-decoration: none;
}

.button:hover {
  color: var(--accent-fg);
  filter: brightness(1.05);
}

.button.secondary {
  background: var(--soft);
  color: var(--fg);
}

.button.small {
  padding: 0.5rem 1.125rem;
  font-size: 1rem;
}

/* the first view */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-block: 5.5rem 3.5rem;
  text-align: center;
}

.badge {
  margin: 0;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
}

h1 {
  margin: 0;
  max-width: 14em;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 1.3125rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-row ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* the hero's video */
.showcase {
  width: 100%;
  max-width: 60rem;
  margin: 2rem 0 0;
}

.showcase video {
  display: block;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgb(36 31 26 / 0.14);
  background: var(--card);
}

.showcase figcaption,
.note {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: 56rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
  text-align: center;
}

.facts li {
  padding: 0.875rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.facts strong {
  display: block;
}

.facts span,
.muted {
  color: var(--muted);
}

/* sections */
.band {
  padding-block: 5.5rem;
}

.band.alt {
  background: var(--soft);
}

.band > .wrap {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.band > .wrap.split,
.intro {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: 40em;
}

h2 {
  margin: 0;
  font-size: clamp(1.875rem, 4vw, 2.625rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.intro p,
.band p {
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--card);
}

.card.lined {
  border: 1px solid var(--line);
}

/* How it works: a story of four steps, each with its picture beside it (SPEC "Website",
   "Change 2026-11-22"); the pictures are drawn from Stickler's output, not screenshots. Without
   motion every picture shows its end state. */
.story {
  --kick: var(--accent);
  --snare: var(--ink);
  --cymbals: var(--muted);
  display: grid;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-step {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: center;
  gap: 1.5rem 3rem;
}

.story-text {
  display: grid;
  gap: 0.5rem;
  max-width: 26rem;
}

.step-number {
  color: var(--ink);
  font-size: 2.75rem;
  line-height: 1;
  font-weight: 700;
}

.story-picture {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

@media (max-width: 47.99rem) {
  /* one column below 48rem; the motion's two sticky columns start at 48rem */
  .story-step {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-picture {
    order: -1;
  }
}

/* 1: a song file over the drop area */
.story-drop {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 2rem 1rem;
  border: 2px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
}

.story-file,
.story-out {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--fg);
  font-weight: 500;
}

.story-file-icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--ink);
}

/* 2: the waveform, the hits by group and the three stages */
.story-wave {
  display: block;
  width: 100%;
  height: auto;
}

.story-loudness {
  stroke: var(--line);
  stroke-linecap: round;
  fill: none;
}

.story-lane {
  stroke: var(--line);
  stroke-dasharray: 2 6;
}

.story-hit.kick,
.story-key.kick::before {
  fill: var(--kick);
  background: var(--kick);
}

.story-hit.snare,
.story-key.snare::before {
  fill: var(--snare);
  background: var(--snare);
}

.story-hit.cymbals,
.story-key.cymbals::before {
  fill: var(--cymbals);
  background: var(--cymbals);
}

.story-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.story-key::before {
  content: "";
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  margin-right: 0.375rem;
  border-radius: 50%;
}

.story-stages {
  display: grid;
  gap: 0.375rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.story-stages li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.story-tick {
  display: flex;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--ink);
}

/* 3: the sheet music with the current bar marked, and a play bar */
.story-notes {
  position: relative;
}

.story-notes img {
  display: block;
  width: 100%;
  height: auto;
}

.story-marks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.story-bar {
  fill: var(--accent);
  opacity: 0;
  mix-blend-mode: multiply;
}

.story-bar:first-child {
  opacity: 0.35; /* without motion bar 1 is marked */
}

.story-play {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.story-play-button {
  display: flex;
  width: 2rem;
  height: 2rem;
  padding: 0.375rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
}

.story-track {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}

.story-track span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 2px;
  background: var(--ink);
}

.story-tick svg,
.story-play-button svg {
  width: 100%;
  height: 100%;
}

/* 4: the three files Stickler writes */
.story-files {
  display: grid;
  gap: 0.75rem;
}

.story-out {
  display: grid;
  grid-template-columns: auto auto 1fr;
}

.story-out span {
  color: var(--muted);
  font-weight: 400;
  justify-self: end;
}

@media (max-width: 30rem) {
  /* on a phone the first bars of each system, large enough to read */
  .story-sheet {
    overflow: hidden;
  }

  .story-notes {
    width: 170%;
  }
}

@media (prefers-color-scheme: dark) {
  .story {
    --snare: var(--fg);
  }

  .story-notes img {
    filter: invert(0.9);
  }

  .story-bar {
    mix-blend-mode: screen;
  }
}

.big-number {
  color: var(--ink);
  font-size: 2.75rem;
  line-height: 1;
  font-weight: 700;
}

/* the example: a song next to its sheet */
.split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem;
}

.split > div {
  display: flex;
  flex: 1 1 20rem;
  flex-direction: column;
  gap: 1rem;
}

.split > figure {
  flex: 2 1 30rem;
  margin: 0;
}

audio {
  width: 100%;
}

.shot {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
}

/* lists of names and values */
.pairs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.625rem 1rem;
  margin: 0;
  font-size: 1rem;
}

/* a label, then its value; on a phone the value goes under its label */
.pairs.labelled {
  grid-template-columns: auto minmax(0, 1fr);
}

@media (max-width: 30rem) {
  .pairs.labelled {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.125rem;
  }

  .pairs.labelled dd {
    margin-bottom: 0.5rem;
  }
}

.pairs dt {
  font-weight: 500;
}

.pairs dd {
  margin: 0;
}

.pairs .what {
  display: block;
  color: var(--muted);
  font-weight: 400;
}

/* a look around: a carousel without script. Scroll snapping lets it be swiped, scrolled
   sideways or moved with the arrow keys once it has the focus; the next picture peeks in. Where
   the browser knows scroll markers (Chrome 135+), dots show the position. */
.carousel {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1.5rem;
  scroll-marker-group: after;
  border-radius: 16px;
}

.slides {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0 0 1rem;
  list-style: none;
}

.slides li {
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.slides figure {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  width: min-content;
  margin: 0;
}

.slides img {
  width: auto;
  max-width: none;
  height: clamp(13rem, 52vw, 30rem);
}

.slides figcaption {
  color: var(--muted);
  font-size: 1rem;
}

.slides li::scroll-marker {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--line);
}

.slides li::scroll-marker:target-current {
  background: var(--ink);
}

.carousel::scroll-marker-group {
  display: flex;
  justify-content: center;
  gap: 1rem; /* 28 px from dot to dot: WCAG 2.5.8's 24 px target spacing */
  padding-top: 0.5rem;
}

/* one row of pictures per system (SPEC.md "Website", "Change 2026-11-25"): native radios drawn
   as a segmented control, so arrow keys and screen readers work without script; where the
   browser lacks :has(), the switch stays hidden and the rows show one after the other */
.systems {
  display: none;
  position: relative;
  align-self: flex-start; /* the section's column would stretch it */
  width: fit-content;
  gap: 0.25rem;
  margin: 0 0 1.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}

.systems label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.systems input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.systems label:has(input:checked) {
  background: var(--accent);
  color: var(--accent-fg);
}

.systems label:has(input:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.carousel + .carousel {
  margin-top: 1.5rem;
}

@supports selector(:has(*)) {
  .systems {
    display: inline-flex;
  }

  .band:has(.systems input[value="mac"]:checked) .carousel:not([data-system="mac"]),
  .band:has(.systems input[value="linux"]:checked) .carousel:not([data-system="linux"]),
  .band:has(.systems input[value="windows"]:checked) .carousel:not([data-system="windows"]) {
    display: none;
  }

  .carousel + .carousel {
    margin-top: 0;
  }
}

/* privacy */
.centred {
  align-items: center;
  text-align: center;
}

.centred svg {
  color: var(--ink);
}

/* downloads: one row per file, as a list (owner, 2026-11-22): what it is for, its terminal line
   and its download side by side; stacked on a phone */
.get-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.get-row {
  display: grid;
  grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.get-row.first {
  border: 2px solid var(--accent);
}

.get-what h3 {
  margin: 0;
}

.get-what p,
.get-how .note {
  margin: 0.125rem 0 0;
  font-size: 0.9375rem;
}

.get-row .button {
  white-space: nowrap;
}

.get-after {
  max-width: 48rem;
  margin-top: 1.25rem;
}

@media (max-width: 48rem) {
  .get-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .get-row .button {
    justify-self: start;
  }
}

.command {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.5rem 0.875rem;
  border-radius: 10px;
  background: var(--code);
  color: var(--code-fg);
  font-size: 0.875rem;
}

.command code {
  flex-grow: 1;
  min-width: 0;
  overflow-wrap: break-word; /* wraps on a phone, at spaces first: a scrolling box is out of a
                               keyboard's reach */
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", monospace;
}

.command button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid rgb(242 237 231 / 0.3);
  border-radius: 8px;
  background: transparent;
  color: var(--code-fg);
  cursor: pointer;
}

.command button:focus-visible {
  outline-color: var(--code-fg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* uninstalling, and the author: a section each (owner, 2026-11-27) */
.removal {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin: 0;
  font-size: 1rem;
}

.removal dt {
  margin-top: 0.75rem;
  font-weight: 700;
}

.removal dd {
  margin: 0;
  color: var(--muted);
}

.removal .command {
  margin-top: 0.5rem;
}

/* a section of running text (uninstalling, the author): its lines stay readable on a wide screen */
.band > .wrap.reading {
  gap: 0.625rem;
}

.reading > * {
  max-width: 46rem;
}

.author {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.author {
  flex-wrap: wrap;
}

.author .portrait {
  flex: 0 0 auto;
  width: 9rem;
  height: auto;
  border-radius: 14px;
}

.author p {
  flex: 1 1 14rem;
}

/* text pages: about, privacy, the legal notice, 404 */
.address {
  font-style: normal;
}

.prose {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 44rem;
}

.prose section {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.prose ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding-left: 1.25rem;
}

/* a guide in steps (install-mac): each step a heading, its text and its picture */
.prose ol.steps {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin: 0;
  padding-left: 1.5rem;
}

.steps li {
  padding-left: 0.25rem;
}

.steps li::marker {
  color: var(--ink);
  font-weight: 700;
}

.steps h3 {
  margin: 0 0 0.375rem;
}

.steps p {
  margin: 0 0 0.75rem;
}

.prose code {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", monospace;
  font-size: 0.9375em;
}

/* a picture that is still to be taken; the workflow publishes no page with one */
.placeholder {
  padding: 1.5rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

/* below laptop width the section links would wrap over several lines: the header keeps the
   name, the language and Download in one row; the page reads straight through without them.
   Last in the file, so it wins over the header's own rules. */
@media (max-width: 59.99rem) {
  .nav-links {
    display: none;
  }

  .site-nav {
    flex-wrap: nowrap;
    gap: 1rem;
  }

  .site-nav .brand {
    margin-right: auto;
  }

  .site-nav > * {
    flex-shrink: 0;
  }
}

/* the narrowest phones: the logo alone; screen readers still hear the name */
@media (max-width: 23.99rem) {
  .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* the footer's links on a phone: two even columns instead of wherever a line breaks */
@media (max-width: 39.99rem) {
  .footer-row ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1.5rem;
    width: 100%;
  }
}

/* the accuracy page: the diagram follows the colour scheme through the site's tokens */
.diagram {
  display: block;
  width: 100%;
  max-width: 26rem;
  height: auto;
  margin: 0 auto;
}

.diagram rect {
  fill: var(--card);
  stroke: var(--line);
  stroke-width: 1.5;
}

.diagram .accent rect {
  fill: var(--accent-soft);
  stroke: var(--accent);
}

.diagram text {
  fill: var(--fg);
  font-family: inherit;
  text-anchor: middle;
}

.diagram .main {
  font-size: 13px;
  font-weight: 700;
}

.diagram .sub {
  fill: var(--muted);
  font-size: 10.5px;
}

.diagram .note {
  fill: var(--muted);
  font-size: 12px;
  text-anchor: start;
}

.diagram .flow,
.diagram .divider {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
}

.diagram .divider {
  stroke: var(--line);
  stroke-dasharray: 4 4;
}

.diagram .head {
  fill: var(--muted);
}

.table-scroll {
  overflow-x: auto;
}

.numbers {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.numbers th,
.numbers td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.numbers td.n,
.numbers th.n {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.numbers caption {
  caption-side: bottom;
  padding-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: left;
}

/* on a phone each mode is a small card: the column's name before every value, no sideways
   scrolling (the label comes from data-label, CSS only) */
@media (max-width: 39.99rem) {
  .numbers thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .numbers,
  .numbers tbody,
  .numbers tr,
  .numbers th,
  .numbers td,
  .numbers caption {
    display: block;
  }

  .numbers tr {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
  }

  .numbers th,
  .numbers td {
    border: 0;
    padding: 0.25rem 0;
  }

  .numbers td.n {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    text-align: right;
  }

  .numbers td.n::before {
    content: attr(data-label);
    color: var(--muted);
    text-align: left;
  }
}

/* How it works, in motion (SPEC "Website", "Change 2026-11-22"): each picture moves on its own
   step's view timeline while the step scrolls by. Only where the browser has view timelines and
   the visitor has not asked for reduced motion; elsewhere the end states above stay. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .story-step {
      view-timeline: --story-step block;
    }

    @media (min-width: 48rem) {
      /* the step is a screen tall; its text and picture stay in view while it passes */
      .story-step {
        min-height: 90vh;
        align-items: start;
      }

      .story-text,
      .story-picture {
        position: sticky;
        top: 22vh;
      }
    }

    .story-file,
    .story-hit,
    .story-tick,
    .story-bar,
    .story-track span,
    .story-out {
      animation-timeline: --story-step;
      animation-fill-mode: both;
      animation-timing-function: ease-out;
    }

    /* 1: the file drops in */
    .story-file {
      animation-name: story-drop;
      animation-range: cover 15% cover 40%;
    }

    @keyframes story-drop {
      from {
        opacity: 0;
        transform: translateY(-4rem) rotate(-4deg);
      }

      to {
        opacity: 1;
        transform: none;
      }
    }

    /* 2: the hits appear from left to right, each in its own part of the scroll
       (site/story/story.css); the stages' ticks appear one after the other (their text stays
       readable) */
    .story-hit {
      transform-box: fill-box;
      transform-origin: center;
      animation-name: story-pop;
    }

    @keyframes story-pop {
      from {
        opacity: 0;
        transform: scale(0);
      }

      to {
        opacity: 1;
        transform: none;
      }
    }

    .story-tick {
      animation-name: story-stage;
    }

    .story-stage-1 .story-tick {
      animation-range: cover 25% cover 35%;
    }

    .story-stage-2 .story-tick {
      animation-range: cover 45% cover 55%;
    }

    .story-stage-3 .story-tick {
      animation-range: cover 65% cover 75%;
    }

    @keyframes story-stage {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    /* 3: the mark goes from bar to bar (site/story/story.css); the last one stays; the play
       bar fills */
    .story-bar {
      animation-name: story-bar;
    }

    .story-bar:last-child {
      animation-name: story-bar-last;
    }

    @keyframes story-bar {
      0%,
      100% {
        opacity: 0;
      }

      15%,
      85% {
        opacity: 0.35;
      }
    }

    @keyframes story-bar-last {
      from {
        opacity: 0;
      }

      to {
        opacity: 0.35;
      }
    }

    .story-track span {
      transform-origin: left;
      animation-name: story-track;
      animation-range: cover 20% cover 80%;
    }

    @keyframes story-track {
      from {
        transform: scaleX(0);
      }

      to {
        transform: scaleX(2.5); /* the bar's span is 40 % of the track; full at the end */
      }
    }

    /* 4: the three files fan out from the first */
    .story-out {
      animation-name: story-out;
    }

    .story-out-1 {
      animation-range: cover 20% cover 35%;
    }

    .story-out-2 {
      --from-y: -4.5rem;
      animation-range: cover 25% cover 42%;
    }

    .story-out-3 {
      --from-y: -9rem;
      animation-range: cover 30% cover 50%;
    }

    @keyframes story-out {
      from {
        opacity: 0;
        transform: translateY(var(--from-y, 0)) scale(0.95);
      }

      to {
        opacity: 1;
        transform: none;
      }
    }
  }
}
