/* documentation page: reading first, large type, high contrast in both themes */
@font-face { font-family: "Satoshi"; src: url("../fonts/satoshi-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("../fonts/satoshi-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("../fonts/satoshi-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("../fonts/satoshi-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --bg: #ffffff;
  --bg-alt: #f4f6f8;
  --surface: #ffffff;
  --text: #14171c;
  --muted: #454e5b;
  --line: #d8dde4;
  --link: #1b4f7f;
  --focus: #b3470f;
  --eric: #a8201a;
  --nico: #0a9396;
  --sanne: #c27a12;
  --font: "Satoshi", sans-serif;
  --measure: 40rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d131d;
    --bg-alt: #121a27;
    --surface: #182233;
    --text: #eef2f7;
    --muted: #b9c4d2;
    --line: #2c3a50;
    --link: #8fc3ff;
    --focus: #ffb37a;
    --sanne: #ec9a29;
  }
}

* { box-sizing: border-box; }
html { font-size: clamp(17px, .35vw + 15px, 20px); scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
code { font: 500 .9em/1 ui-monospace, "SF Mono", Menlo, monospace; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.015em; }
h2 { margin: 0 0 1.4rem; font-size: 1.9rem; font-weight: 700; }
h3 { margin: 0 0 .5rem; font-size: 1.2rem; font-weight: 700; }
p, ul, ol { margin: 0 0 1rem; }

.wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(var(--measure), 100% - 2.5rem); }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 20; padding: .7rem 1rem; background: var(--text); color: var(--bg); font-weight: 700; border-radius: .4rem; }
.skip:focus { top: 1rem; }

.site-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 1.5rem; min-height: 3.6rem; }
.back { flex: none; font-weight: 700; text-decoration: none; }
.toc { overflow-x: auto; scrollbar-width: none; }
.toc ul { display: flex; gap: .25rem; margin: 0; padding: 0; list-style: none; white-space: nowrap; }
.toc a { display: block; padding: .45rem .7rem; border-radius: 999px; color: var(--muted); font-size: .85rem; font-weight: 500; text-decoration: none; }
.toc a:hover { color: var(--text); background: var(--bg-alt); }
.toc a[aria-current="true"] { color: var(--text); background: var(--bg-alt); font-weight: 700; }

.hero { padding-block: 5rem 4rem; }
.eyebrow { color: var(--muted); font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { margin: .5rem 0 .5rem; max-width: 18ch; font-size: clamp(2.4rem, 4vw + 1rem, 3.6rem); font-weight: 900; }
.tagline { margin: 0 0 1.2rem; font-size: clamp(1.15rem, 1vw + .9rem, 1.45rem); font-weight: 500; font-style: italic; }
.lead { max-width: var(--measure); font-size: 1.2rem; color: var(--muted); }
.byline { color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem; max-width: 46rem; margin: 2rem 0 0; }
.facts div { padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: .7rem; }
.facts dt { color: var(--muted); font-size: .8rem; font-weight: 500; }
.facts dd { margin: .2rem 0 0; font-size: 1.15rem; font-weight: 700; }

.chapter { padding-block: 5rem; border-top: 1px solid var(--line); }
.chapter.alt { background: var(--bg-alt); }
.num { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; margin-right: .6rem; border-radius: 50%; background: var(--text); color: var(--bg); font-size: 1rem; vertical-align: .2em; }

.scrolly { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 3.5rem; align-items: start; }
.steps { max-width: var(--measure); }
.step { margin-block: .6rem 2.4rem; padding: .4rem 0 .4rem 1rem; border-left: 4px solid transparent; transition: border-color 300ms; }
.step.is-active { border-left-color: var(--link); }
.stage { position: sticky; top: 5.5rem; margin: 0; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; }
.stage figcaption { margin-top: .8rem; color: var(--muted); font-size: .85rem; }

.dot { display: inline-block; width: .8rem; height: .8rem; margin-right: .35rem; border-radius: 50%; vertical-align: .05em; }
.dot.eric { background: var(--eric); } .dot.nico { background: var(--nico); } .dot.sanne { background: var(--sanne); }

.route-map svg { display: block; width: 100%; height: auto; }
.route-map .land { fill: var(--bg-alt); stroke: var(--line); stroke-width: .6; }
.route-map .route { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: opacity 300ms, stroke-width 300ms; }
.route-map .place { fill: var(--text); font: 700 12px/1 var(--font); }
.route-map[data-focus]:not([data-focus="all"]) .route { opacity: .18; }
.route-map[data-focus="Eric"] .route.Eric, .route-map[data-focus="Nico"] .route.Nico, .route-map[data-focus="Sanne"] .route.Sanne { opacity: 1; stroke-width: 3.4; }

.table-scroll { overflow-x: auto; margin-top: 2rem; }
.data-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .9rem; }
.data-table caption { text-align: left; margin-bottom: .6rem; font-weight: 700; }
.data-table th, .data-table td { padding: .6rem .7rem; text-align: left; border-bottom: 1px solid var(--line); }
.data-table thead th { color: var(--muted); font-weight: 500; }

blockquote { margin: 0 0 1.6rem; padding: 1.2rem 1.4rem; border-left: 4px solid var(--link); background: var(--surface); border-radius: 0 .6rem .6rem 0; font-size: 1.1rem; }
blockquote p { margin: 0 0 .6rem; }
blockquote footer { color: var(--muted); font-size: .85rem; }

.frame-pair { display: grid; gap: .8rem; }
.frame-pair img { border-radius: .5rem; width: 100%; }

.pipeline { margin: 0; padding: 0; list-style: none; display: grid; gap: .6rem; }
.pipeline li { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; align-items: center; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: .6rem; transition: background 300ms, border-color 300ms; }
.pipeline li.is-on { border-color: var(--link); background: color-mix(in srgb, var(--link) 10%, transparent); }
.pi-label { font-weight: 700; }

.listen { display: grid; gap: 1.2rem; margin-top: 1.5rem; }
.clip { padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; }
.clip audio { width: 100%; margin: .4rem 0 .7rem; }
.clip p { margin: 0; color: var(--muted); }
.stems { margin-top: 1.5rem; }
.stems summary { cursor: pointer; font-weight: 700; }

.swatch-group { margin-bottom: .8rem; padding: .6rem .7rem; border: 2px solid transparent; border-radius: .6rem; transition: border-color 300ms; }
.swatch-group.is-on { border-color: var(--link); }
.sw-title { font-weight: 700; margin-bottom: .6rem; }
.ramp { display: flex; margin: 0; padding: 0; list-style: none; border-radius: .5rem; overflow: hidden; }
.ramp li { flex: 1; min-height: 3rem; background: var(--c); }
.ramp.labelled li { min-height: 4.5rem; }
.ramp.labelled li { display: flex; align-items: flex-end; justify-content: center; padding-bottom: .4rem; }
.ramp.labelled span { writing-mode: vertical-rl; transform: rotate(180deg); padding: .3rem .15rem; background: rgba(255, 255, 255, .85); color: #14171c; font: 500 .7rem/1 ui-monospace, Menlo, monospace; border-radius: .2rem; }
.sw-ends { display: flex; justify-content: space-between; margin-top: .4rem; color: var(--muted); font-size: .85rem; }
.chips { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.chips li { display: flex; align-items: center; gap: .7rem; font-weight: 700; }
.chips li::before { content: ""; width: 1.6rem; height: 1.6rem; border-radius: .35rem; background: var(--c); border: 1px solid var(--line); }
.chips code { margin-left: auto; color: var(--muted); }
.type-sample p { margin: 0 0 .3rem; font-size: 1.6rem; line-height: 1.2; }
.t900 { font-weight: 900; } .t700 { font-weight: 700; } .t500 { font-weight: 500; } .t400 { font-weight: 400; }

.checks { padding-left: 1.2rem; }
.checks li { margin-bottom: .7rem; }
.team-name { font-size: 1.3rem; font-weight: 700; }
.team { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.team li { padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: .7rem; }
.member { margin: 0; font-weight: 700; }
.role { margin: .25rem 0 0; color: var(--muted); font-size: .9rem; }
.sources li { margin-bottom: .6rem; }
.back-bottom { font-weight: 700; }
.site-foot { padding-block: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

@media (max-width: 860px) {
  .scrolly { grid-template-columns: 1fr; gap: 1.5rem; }
  .stage { position: static; order: -1; }
  .steps h2 { order: -2; }
  .step { margin-block: .4rem 1.4rem; }
  .pipeline li { grid-template-columns: 7rem 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
