/* Open Music Collection site. Neutral surfaces, one accent, type does the work. */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f8;
  --bg-sunk: #eef0f2;
  --ink: #15181d;
  --ink-2: #464c55;
  --ink-3: #626873;
  --line: #e2e5e9;
  --line-strong: #cdd2d8;
  --accent: #2a55c4;
  --accent-ink: #1f46a8;
  --accent-soft: #eaf0fc;
  --on-accent: #ffffff;
  --code-bg: #f6f7f8;
  --code-ink: #1f2329;
  --code-key: #1f46a8;
  --code-str: #1d6b4f;
  --code-num: #9a4d0f;
  --code-dim: #6b717b;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 8px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 60px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --bg-soft: #161920;
    --bg-sunk: #1c2028;
    --ink: #e9ebef;
    --ink-2: #b4bac4;
    --ink-3: #9198a3;
    --line: #262b34;
    --line-strong: #353b46;
    --accent: #8eaaff;
    --accent-ink: #a9bfff;
    --accent-soft: #1a2340;
    --on-accent: #0f1115;
    --code-bg: #14171d;
    --code-ink: #dfe3ea;
    --code-key: #a9bfff;
    --code-str: #8fd1b0;
    --code-num: #f0b47a;
    --code-dim: #8a919c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115;
  --bg-soft: #161920;
  --bg-sunk: #1c2028;
  --ink: #e9ebef;
  --ink-2: #b4bac4;
  --ink-3: #9198a3;
  --line: #262b34;
  --line-strong: #353b46;
  --accent: #8eaaff;
  --accent-ink: #a9bfff;
  --accent-soft: #1a2340;
  --on-accent: #0f1115;
  --code-bg: #14171d;
  --code-ink: #dfe3ea;
  --code-key: #a9bfff;
  --code-str: #8fd1b0;
  --code-num: #f0b47a;
  --code-dim: #8a919c;
  color-scheme: dark;
}

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: .88em; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 600; letter-spacing: -0.012em; line-height: 1.2; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: 6px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.mark { width: 24px; height: 24px; flex: none; color: var(--ink); }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { padding: 6px 10px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); background: var(--bg-soft); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-sunk); }

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; gap: 0; padding-top: 10px; }
  .site-nav {
    order: 2; width: 100%; margin: 6px 0 0; padding-bottom: 6px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin-left: -10px; width: calc(100% + 10px);
  }
  .site-nav::-webkit-scrollbar { display: none; }
  html { scroll-padding-top: 120px; }
}

/* ---------- Buttons, labels ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--bg); color: var(--ink);
  font: 500 15px/1 var(--sans); text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--on-accent); }
.btn-small { min-height: 32px; padding: 0 12px; font-size: 14px; }

.eyebrow { margin: 0 0 12px; color: var(--ink-3); font: 500 13px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.status-line { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; color: var(--ink-2); font-size: 14px; }
.status-line .dot, .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.pill { display: inline-block; padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-2); font: 500 12px/1.5 var(--sans); }
.fine { color: var(--ink-3); font-size: 14px; }
.lede { color: var(--ink-2); font-size: 19px; line-height: 1.6; max-width: 40em; }

/* ---------- Code ---------- */

pre.code {
  margin: 0 0 1.5em; padding: 16px 18px;
  background: var(--code-bg); color: var(--code-ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13.5px; line-height: 1.65;
  overflow-x: auto; white-space: pre; tab-size: 2;
}
pre.code code { font-size: inherit; background: none; padding: 0; border: 0; }
:is(.code, .file-body) .k { color: var(--code-key); }
:is(.code, .file-body) .s { color: var(--code-str); }
:is(.code, .file-body) :is(.n, .l) { color: var(--code-num); }
:is(.code, .file-body) .c { color: var(--code-dim); }

/* ---------- Home ---------- */

.home section { padding: 88px 0; border-top: 1px solid var(--line); }
.home section.hero { border-top: 0; padding: 28px 0 64px; }
.home h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 16px; }
.home h3 { font-size: 18px; margin-bottom: 8px; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p { color: var(--ink-2); }
.prose-block { max-width: 660px; }
.prose-block p { color: var(--ink-2); }
.prose-block p strong { color: var(--ink); font-weight: 600; }

.hero-inner { display: flex; flex-direction: column; }
.hero-head { display: grid; gap: 8px; margin-bottom: 20px; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; }
.hero h1 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.025em; margin: 0; }
.hero .lede { margin: 0; font-size: 18px; line-height: 1.45; max-width: none; }
.hero .status-line { margin: 0; }
.hero .actions { margin-top: 0; }

/* Problem */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 56px; }
.two-col h2 { max-width: 12em; }

/* Records */
.records { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 48px; border: 1px solid var(--line); border-radius: var(--radius); }
.records > div { padding: 22px 22px 18px; border-left: 1px solid var(--line); }
.records > div:first-child { border-left: 0; }
.records dt { font-weight: 600; margin-bottom: 6px; }
.records dd { margin: 0; color: var(--ink-2); font-size: 15px; }

.file { margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--code-bg); overflow: hidden; }
.file-head { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.file-head code { color: var(--ink-2); }
.file-body { overflow-x: auto; }
.file-body table { border-collapse: collapse; font: 13px/1.6 var(--mono); color: var(--code-ink); }
.file-body th { position: sticky; left: 0; background: var(--code-bg); padding: 8px 14px 8px 16px; text-align: left; vertical-align: top; color: var(--ink-3); font-weight: 400; font-size: 12px; white-space: nowrap; border-right: 1px solid var(--line); }
.file-body td { padding: 8px 20px 8px 16px; white-space: pre; vertical-align: top; }
.file-body tr + tr th, .file-body tr + tr td { border-top: 1px solid var(--line); }
.file-note { color: var(--ink-3); font-size: 14px; margin: 0 0 56px; }

.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; }
.points p { color: var(--ink-2); margin: 0 0 1em; }
.points pre.code { margin: 0; }

/* Modules */
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.module-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.module-card:hover { border-color: var(--accent); color: var(--ink); }
.module-card h3 { font-size: 17px; margin: 0; }
.module-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.module-card .pill { align-self: flex-start; margin-bottom: 6px; }
.module-card code { margin-top: auto; padding-top: 10px; color: var(--ink-3); font-size: 12px; overflow-wrap: anywhere; }
.module-card.featured { grid-column: span 2; background: var(--bg-soft); }

/* Audiences */
.audiences { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.audiences p { color: var(--ink-2); }
.levels { margin: 48px 0 0; width: 100%; border-collapse: collapse; font-size: 15px; }
.levels-wrap { overflow-x: auto; }
.levels caption { text-align: left; font-weight: 600; margin-bottom: 12px; font-size: 16px; }
.levels th, .levels td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.levels thead th { color: var(--ink-3); font-weight: 500; font-size: 13px; }
.levels td:first-child { white-space: nowrap; font-weight: 500; }
.levels td { color: var(--ink-2); }

/* Status */
.faq { margin: 0; }
.faq dt { font-weight: 600; margin-top: 24px; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 6px 0 0; color: var(--ink-2); }

.closing { background: var(--bg-soft); }

/* ---------- Page heads (modules, examples) ---------- */

.page-head { padding-top: 64px; padding-bottom: 40px; }
.page-head h1 { font-size: clamp(30px, 4vw, 42px); letter-spacing: -0.02em; margin-bottom: 14px; }
.module-grid.wrap, .examples.wrap { padding-bottom: 96px; }

/* Examples */
.examples { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.example { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.example-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 10px; }
.example-head h3 { font-size: 16px; overflow-wrap: anywhere; }
.example-head h3 code { font-size: 15px; }
.example p { color: var(--ink-2); }
.example pre.code { margin-bottom: 8px; }
.example .fine { margin: 0; }

/* ---------- Docs ---------- */

.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr) 220px; gap: 48px; padding-top: 48px; padding-bottom: 96px; align-items: start; }
.doc-nav, .doc-toc { position: sticky; top: calc(var(--header-h) + 32px); max-height: calc(100vh - var(--header-h) - 56px); overflow-y: auto; font-size: 14px; }
.doc-nav h2, .doc-toc h2 { margin: 0 0 10px; color: var(--ink-3); font: 500 12px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.doc-nav ul, .doc-toc ol { list-style: none; margin: 0 0 24px; padding: 0; }
.doc-nav a, .doc-toc a { display: block; padding: 4px 10px; color: var(--ink-2); text-decoration: none; line-height: 1.4; border-left: 2px solid transparent; }
.doc-nav a:hover, .doc-toc a:hover { color: var(--ink); }
.doc-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; border-left-color: var(--accent); }
.doc-toc { border-left: 1px solid var(--line); padding-left: 4px; }
.doc-toc .d3 a { padding-left: 22px; font-size: 13px; color: var(--ink-3); }
.doc-toc .d3 a:hover { color: var(--ink); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.doc-toc-mobile { display: none; }

.prose { max-width: 740px; min-width: 0; font-size: 16.5px; }
.prose h1 { font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.02em; margin: 0 0 20px; line-height: 1.15; }
.prose h2 { font-size: 24px; margin: 56px 0 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 18px; margin: 36px 0 12px; }
.prose h4 { font-size: 16px; margin: 28px 0 10px; }
.prose h2, .prose h3, .prose h4 { position: relative; }
.prose .anchor { position: absolute; left: -1.1em; width: 1em; color: var(--ink-3); text-decoration: none; opacity: 0; font-weight: 400; }
.prose h2 .anchor { top: 24px; }
.prose :is(h2, h3, h4):hover .anchor, .prose .anchor:focus-visible { opacity: 1; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose li { margin: 4px 0; }
.prose li > p { margin: 0; }
.prose :not(pre) > code { padding: 1px 5px; border-radius: 4px; background: var(--bg-sunk); color: var(--ink); overflow-wrap: anywhere; }
.prose a code { color: inherit; }
.prose blockquote { margin: 0 0 1.2em; padding: 2px 0 2px 18px; border-left: 3px solid var(--line-strong); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose pre.code { font-size: 13px; }

.table { margin: 0 0 1.6em; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.table th, .table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table th { background: var(--bg-soft); color: var(--ink); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td { color: var(--ink-2); }
.table td:first-child { white-space: nowrap; }
.table td code { white-space: nowrap; }
.table td:first-child code { color: var(--ink); }

/* ---------- Explainer (the flow diagram at the top of the home page) ---------- */

.explainer figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); overflow: hidden; }
.ex-svg { width: 100%; height: auto; max-height: min(66vh, 480px); padding: 16px 16px 0; overflow: visible; }
.ex-narrow { display: none; }

.explainer-modules { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 0 20px 16px; font-size: 15px; color: var(--ink-2); }
.explainer-modules > span { display: inline-flex; align-items: center; gap: 6px; }
.explainer-modules strong { color: var(--ink); font-weight: 600; }
.ex-badge-html { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 600 12px/1 var(--sans); }
.explainer-modules ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.explainer-modules a { display: block; padding: 3px 10px; border: 1px dashed var(--line-strong); border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; }
.explainer-modules a:hover { border: 1px solid var(--accent); color: var(--accent-ink); }

.explainer figcaption { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg); }
.explainer figcaption p { margin: 0; max-width: 52em; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.explainer figcaption strong { color: var(--ink); font-weight: 600; }
.explainer-toggle { flex: none; display: none; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--bg); color: var(--ink); cursor: pointer; }
.is-armed .explainer-toggle { display: grid; }
.explainer-toggle:hover { border-color: var(--ink-3); }
.explainer-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.explainer-toggle path { display: none; }
.explainer-toggle[data-state="pause"] .i-pause, .explainer-toggle[data-state="play"] .i-play { display: block; }

/* The drawing. Sizes are in its own units, which scale with it. */
.ex-card { fill: var(--bg); stroke: var(--line-strong); }
.ex-card-home { fill: var(--accent-soft); stroke: var(--accent); }
.ex-card-list { fill: var(--bg-sunk); stroke: var(--line-strong); }
.ex-card-code { fill: var(--code-bg); }
.ex-chip { fill: var(--bg-soft); stroke: var(--line); }
.ex-tile { fill: var(--bg-sunk); }
.ex-eq { fill: var(--accent); }
.ex-glyph { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; }
.ex-disc { fill: var(--ink-2); }
.ex-groove { fill: none; stroke: var(--bg-sunk); stroke-width: 1.2; stroke-linecap: round; opacity: .7; }
.ex-disc-label { fill: var(--accent); }
.ex-line { fill: none; stroke: var(--ink-3); stroke-width: 1.25; }
.ex-head { fill: var(--ink-3); }
/* A dot: a dash of no length with round ends, one per length of the path. */
.ex-flow { fill: none; stroke: var(--c); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 0 1; opacity: 0; }
.ex-badge { fill: var(--accent); }
.ex-svg text { fill: var(--ink-2); font-family: var(--sans); }
.ex-svg .ex-badge-n { fill: var(--on-accent); font-size: 12px; font-weight: 600; }
.ex-svg .ex-t1 { fill: var(--ink); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.ex-svg .ex-t2 { font-size: 13px; }
.ex-svg .ex-t2-small { font-size: 12px; }
.ex-svg .ex-t3 { fill: var(--ink); font-size: 15px; font-weight: 500; }
.ex-svg .ex-t4 { fill: var(--ink); font-size: 12.5px; font-weight: 500; }
.ex-svg .ex-m { font-family: var(--mono); font-size: 13px; }
.ex-svg .ex-m-small { font-size: 11px; }
.ex-svg .ex-m-strong { fill: var(--ink); font-weight: 500; }
.ex-svg .ex-code { fill: var(--code-key); font-family: var(--mono); font-size: 12px; }
.ex-svg .ex-lab { fill: var(--ink-3); font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .04em; }

/* The build, then the flow. Armed before the first paint, and only when motion is welcome. */
.is-armed .ex-in { animation: ex-in .5s ease var(--d) both paused; }
.is-armed .ex-draw { stroke-dasharray: 1; animation: ex-draw .6s ease var(--d) both paused; }
.is-armed .ex-flow { animation: ex-flow 2.2s linear var(--p) infinite paused; }
.is-armed .ex-flow-back { animation-direction: reverse; }
.is-armed .ex-eq { transform-box: fill-box; transform-origin: 50% 100%; animation: ex-eq .5s ease-in-out calc(4.8s + var(--e)) infinite alternate paused; }
.is-armed .ex-spin { transform-box: fill-box; transform-origin: center; animation: ex-spin 2.4s linear 4.8s infinite paused; }
.is-armed.is-running :is(.ex-in, .ex-draw, .ex-flow, .ex-eq, .ex-spin) { animation-play-state: running; }
@keyframes ex-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ex-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ex-flow {
  0% { stroke-dashoffset: 0; opacity: 0; }
  12% { opacity: 1; }
  80% { opacity: 1; }
  100% { stroke-dashoffset: -1; opacity: 0; }
}
@keyframes ex-eq { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@keyframes ex-spin { to { transform: rotate(1turn); } }

@media (max-width: 780px) {
  .ex-wide { display: none; }
  .ex-narrow { display: block; max-width: 520px; max-height: none; margin: 0 auto; padding: 12px 8px 0; }
  .explainer-modules { padding: 12px 16px 14px; }
  .explainer figcaption { padding: 12px 16px; }
  .explainer figcaption p { font-size: 15px; }
}

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

.site-footer { border-top: 1px solid var(--line); padding: 48px 0 56px; color: var(--ink-2); font-size: 14px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr); gap: 40px; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.footer-brand p { margin: 0; max-width: 30em; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-cols h4 { margin: 0 0 10px; color: var(--ink); font-size: 13px; font-weight: 600; }
.footer-cols a { display: block; padding: 3px 0; color: var(--ink-2); text-decoration: none; }
.footer-cols a:hover { color: var(--ink); text-decoration: underline; }
.footer-cols p { margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .doc { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
  .doc-toc { display: none; }
  .doc-toc-mobile { display: block; }
}

@media (max-width: 960px) {
  .two-col { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  /* The diagram straight after the words, and the buttons after it. */
  .hero-head, .hero-row { display: contents; }
  .hero h1 { margin-bottom: 8px; }
  .hero .lede { margin-bottom: 16px; }
  .explainer { order: 1; }
  .hero .status-line { order: 2; margin-top: 20px; }
  .hero .actions { order: 3; margin-top: 12px; }
  .records { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .records > div:nth-child(3) { border-left: 0; }
  .records > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audiences { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 32px; }
  .doc-nav { position: static; max-height: none; overflow: visible; margin-bottom: 8px; }
  .doc-nav ul { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
  .doc-nav h2 { display: none; }
  .doc-nav a { padding: 4px 10px; border: 1px solid var(--line); border-left-width: 1px; border-radius: 999px; font-size: 13px; }
  .doc-nav a[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); }
}

.doc-toc-mobile { margin: 0 0 28px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.doc-toc-mobile summary { cursor: pointer; padding: 10px 14px; font-weight: 500; color: var(--ink); }
.doc-toc-mobile ol { list-style: none; margin: 0; padding: 4px 14px 12px; border-top: 1px solid var(--line); }
.doc-toc-mobile li { margin: 0; }
.doc-toc-mobile a { display: block; padding: 4px 0; color: var(--ink-2); text-decoration: none; }
.doc-toc-mobile .d3 a { padding-left: 16px; color: var(--ink-3); font-size: 13px; }
@media (min-width: 1181px) { .doc-toc-mobile { display: none; } }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .home section { padding: 64px 0; }
  .home section.hero { padding: 20px 0 48px; }
  .lede { font-size: 17.5px; }
  .records { grid-template-columns: minmax(0, 1fr); }
  .records > div { border-left: 0; }
  .records > div + div { border-top: 1px solid var(--line); }
  .points { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .module-grid { grid-template-columns: minmax(0, 1fr); }
  .module-card.featured { grid-column: auto; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols > div:last-child { grid-column: 1 / -1; }
  .prose { font-size: 16px; }
  .prose .anchor { display: none; }
  .example { padding: 16px; }
  .example-head { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* What it covers */
.uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 48px; }
.uses h3 { font-size: 17px; margin: 0 0 8px; }
.uses p { color: var(--ink-2); margin: 0 0 10px; }
.uses > div > a { font-size: 14px; }
.section-head p a { white-space: nowrap; }
@media (max-width: 960px) { .uses { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .uses { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
