/* ==========================================================================
   Datanemics design system
   Dark is the default; light is a selected theme, not an inverted one.
   Chart series colours are the validated categorical palette and are kept
   deliberately separate from UI chrome so a brand colour never impersonates
   a data series.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* surfaces & ink */
  --plane: #0a0e13;
  --surface: #121820;
  --surface-2: #18202b;
  --surface-3: #1f2937;
  --line: #232e3d;
  --line-soft: #1a2330;
  --ink: #eef3f9;
  --ink-2: #b3c1d1;
  --ink-3: #7d8ea3;

  /* brand */
  --brand: #4ce0b3;
  --brand-deep: #1a9d78;
  --brand-glow: rgb(76 224 179 / 14%);
  --accent: #ffb454;
  --danger: #e66767;

  /* categorical series — validated for the dark surface */
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;
  --s5: #d55181;
  --s6: #008300;
  --s7: #9085e9;
  --s8: #e66767;
  --grid-line: #202a36;
  --axis: #35414f;
  --muted-axis: #8b98a8;

  /* status */
  --good: #0ca30c;
  --warn: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;

  /* type */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* spacing & shape */
  --shell: 1220px;
  --prose: 70ch;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px -18px rgb(0 0 0 / 70%);
  --ring: inset 0 0 0 1px var(--line);
}

:root[data-theme="light"] {
  color-scheme: light;
  --plane: #f4f6f9;
  --surface: #fbfcfd;
  --surface-2: #f1f4f8;
  --surface-3: #e7ecf2;
  --line: #dde3ea;
  --line-soft: #e9edf2;
  --ink: #0c1319;
  --ink-2: #44525f;
  --ink-3: #6c7c8c;

  --brand: #0b8f63;
  --brand-deep: #0b8f63;
  --brand-glow: rgb(11 143 99 / 10%);
  --accent: #b26a00;
  --danger: #c8302f;

  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --s5: #e87ba4;
  --s6: #008300;
  --s7: #4a3aa7;
  --s8: #e34948;
  --grid-line: #e4e9ef;
  --axis: #c3cbd5;
  --muted-axis: #6c7c8c;

  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 12px 28px -20px rgb(16 24 40 / 35%);
}

/* --------------------------------------------------------------- reset -- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--plane);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.024em; font-weight: 680; }
h1 { font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.5rem); letter-spacing: -0.036em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.15rem); letter-spacing: -0.03em; }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1.05em; }
a { color: var(--brand); text-decoration-color: color-mix(in srgb, var(--brand) 38%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentcolor; }
img, svg, canvas { max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
::selection { background: color-mix(in srgb, var(--brand) 30%, transparent); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--brand); color: #04120d; padding: .6rem 1rem; border-radius: var(--r-sm); font-weight: 600;
}
.skip:focus { left: 12px; }

/* ------------------------------------------------------------- layout --- */

.shell { width: min(100% - 2.6rem, var(--shell)); margin-inline: auto; }
@media (max-width: 560px) { .shell { width: min(100% - 1.6rem, var(--shell)); } }

main { display: block; min-height: 50vh; }

.eyebrow {
  font: 600 .74rem/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 1rem;
}

.lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.24rem); color: var(--ink-2); max-width: 62ch; }

.eyebrow--num { display: flex; align-items: center; gap: .7rem; color: var(--ink-3); margin-bottom: 1.1rem; }
.eyebrow--num span {
  display: inline-grid; place-items: center; min-width: 26px; height: 20px;
  border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--line));
  border-radius: 5px; color: var(--brand); font-size: .68rem; letter-spacing: .06em;
}
.eyebrow--num::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ------------------------------------------------------------- header --- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--plane) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner { display: flex; align-items: center; gap: 1.4rem; height: 62px; }

.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-weight: 680; letter-spacing: -0.03em; font-size: 1.08rem; }
.logo__mark { width: 27px; height: 27px; flex: none; }
.logo__plate { fill: none; stroke: var(--line); stroke-width: 1.4; }
.logo__line { fill: none; stroke: var(--brand); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.logo__dot { fill: var(--brand); }
.logo__dot--alt { fill: var(--accent); }

.nav { display: flex; gap: .15rem; margin-left: .6rem; flex: 1; }
.nav__link {
  color: var(--ink-2); text-decoration: none; font-size: .93rem; font-weight: 520;
  padding: .42rem .68rem; border-radius: var(--r-sm); white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav__link:hover { color: var(--ink); background: var(--surface-2); }
.nav__link.is-active { color: var(--ink); background: var(--surface-2); box-shadow: var(--ring); }

.site-header__actions { display: flex; gap: .4rem; align-items: center; }

.iconbtn {
  display: inline-flex; align-items: center; gap: .35rem; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 .5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--ink-2); cursor: pointer; transition: color .15s, border-color .15s;
}
.iconbtn:hover { color: var(--ink); border-color: var(--brand); }
.iconbtn svg { width: 16px; height: 16px; fill: none; stroke: currentcolor; stroke-width: 1.7; stroke-linecap: round; }
.iconbtn__hint { font: 600 .7rem var(--mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 .25rem; }
.iconbtn--menu { display: none; }
[data-theme="dark"] .icon-sun, [data-theme="light"] .icon-moon { display: none; }

.mobile-nav { display: none; }

@media (max-width: 940px) {
  .nav { display: none; }
  .iconbtn--menu { display: inline-flex; }
  .iconbtn__hint { display: none; }
  .mobile-nav { display: grid; border-top: 1px solid var(--line); padding: .5rem 1.3rem 1rem; background: var(--surface); }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav a { padding: .6rem .2rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-soft); }
}

/* ---------------------------------------------------------------- hero -- */

.hero { position: relative; padding: clamp(2.4rem, 1.6rem + 4vw, 4.4rem) 0 clamp(2.4rem, 1.8rem + 2.4vw, 3.6rem); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__bg::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 820px;
  background:
    radial-gradient(42% 58% at 18% 26%, var(--brand-glow), transparent 68%),
    radial-gradient(38% 52% at 82% 12%, rgb(144 133 233 / 14%), transparent 70%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px),
                    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(80% 68% at 50% 34%, #000 12%, transparent 76%);
  opacity: .55;
}
.hero > .shell { position: relative; z-index: 1; }

/* --- the wordmark: live data clipped to the letterforms --- */

.wordmark { position: relative; aspect-ratio: 1100 / 190; margin-bottom: clamp(1.6rem, 1rem + 2vw, 2.6rem); }
.wordmark canvas { display: block; width: 100%; height: 100%; }
.wordmark__fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 800 clamp(2rem, 11.2vw, 8.6rem)/1 var(--mono);
  letter-spacing: .06em; color: var(--brand); white-space: nowrap;
}
/* Once the canvas is painting, the text fallback steps aside. */
.wordmark.is-live .wordmark__fallback { display: none; }

.hero__body { max-width: 62ch; }
.hero h1 {
  font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.9rem);
  letter-spacing: -0.033em; max-width: 20ch;
}
.hero__sub { font-size: clamp(1rem, .96rem + .4vw, 1.16rem); color: var(--ink-2); max-width: 58ch; margin-top: 1.1rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; }

.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 .78rem/1 var(--mono); letter-spacing: .04em;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  padding: .42rem .75rem; border-radius: 999px;
}

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 640; font-size: .96rem; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #04150f; box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--brand) 90%, transparent); }
.btn--primary:hover { background: color-mix(in srgb, var(--brand) 88%, #fff); box-shadow: 0 12px 34px -12px color-mix(in srgb, var(--brand) 90%, transparent); }
:root[data-theme="light"] .btn--primary { color: #fff; }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--brand); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentcolor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 640px) {
  .wordmark { aspect-ratio: 1100 / 230; }
}

/* --------------------------------------------------------------- stats -- */

.statstrip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--surface); margin-top: clamp(2.4rem, 4vw, 3.6rem);
}
.statstrip > div { padding: 1.2rem 1.3rem; border-right: 1px solid var(--line); position: relative; }
.statstrip > div::before {
  content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 0;
  background: var(--brand); transition: height .35s ease;
}
.statstrip > div:hover::before { height: 100%; }
.statstrip > div:last-child { border-right: 0; }
.statstrip dt { font: 500 .76rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .5rem; }
.statstrip dd { margin: 0; font-size: 1.9rem; font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .statstrip > div { border-right: 0; border-bottom: 1px solid var(--line); } }

/* -------------------------------------------------------------- blocks -- */

.band { padding: clamp(2.6rem, 1.8rem + 3.6vw, 4.4rem) 0; }
.hero + .band, .pagehead + .band { padding-top: clamp(2.2rem, 1.4rem + 2.6vw, 3.4rem); }
.band--alt { background: var(--surface); border-block: 1px solid var(--line-soft); }

.band__head { max-width: 66ch; margin-bottom: 2.4rem; }
.band__head p { color: var(--ink-2); margin-top: .9rem; }

.section-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .93rem; text-decoration: none; }
.section-link::after { content: "→"; transition: transform .16s; }
.section-link:hover::after { transform: translateX(3px); }

.grid { display: grid; gap: 1.1rem; }
.grid > * { min-width: 0; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* --------------------------------------------------------------- cards -- */

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.35rem; transition: border-color .18s, transform .18s, box-shadow .18s;
}
.card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 .5rem; letter-spacing: -0.02em; }
.card p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.card__link { text-decoration: none; color: inherit; display: block; }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__top { display: flex; align-items: center; gap: .55rem; font: 500 .78rem/1 var(--mono); color: var(--ink-3); margin-bottom: .8rem; }
.card__foot { display: flex; align-items: center; gap: .45rem; margin-top: auto; padding-top: 1rem; flex-wrap: wrap; }
.card__author { margin-left: auto; font-size: .8rem; color: var(--ink-3); }
.dot { width: 3px; height: 3px; border-radius: 50%; background: currentcolor; opacity: .6; }

.card--feature { padding: 1.7rem; }
.card--feature .card__icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 1.1rem;
}
.card--feature .card__icon svg { width: 20px; height: 20px; fill: none; stroke: var(--brand); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card__meta { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line-soft); font: 500 .78rem/1.5 var(--mono); color: var(--ink-3); position: relative; z-index: 1; }

.tag {
  font: 500 .74rem/1 var(--mono); color: var(--ink-3); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: .28rem .6rem;
  position: relative; z-index: 1; background: var(--plane);
}
.tag:hover { color: var(--brand); border-color: var(--brand); }

/* ------------------------------------------------------------ pagehead -- */

.pagehead { padding: clamp(2.4rem, 1.8rem + 3vw, 3.8rem) 0 clamp(1.6rem, 1rem + 2vw, 2.4rem); border-bottom: 1px solid var(--line-soft); position: relative; }
.pagehead::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 340px;
  background: radial-gradient(48% 100% at 15% 0%, var(--brand-glow), transparent 72%);
  pointer-events: none;
}
.pagehead > .shell { position: relative; }
.pagehead .lead { margin-top: 1.1rem; }
.pagehead__meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.pagehead__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }

/* --------------------------------------------------------------- prose -- */

.prose { max-width: var(--prose); font-size: 1.06rem; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.4em; margin-bottom: .1em; scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.9em; margin-bottom: .1em; scroll-margin-top: 90px; font-size: 1.12rem; }
.prose h2 + p, .prose h3 + p { margin-top: .75em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--ink-3); }
.prose strong { font-weight: 640; color: var(--ink); }
.prose blockquote {
  margin: 1.8em 0; padding: .1em 0 .1em 1.3em; border-left: 2px solid var(--brand);
  color: var(--ink-2); font-style: italic;
}
.prose :not(pre) > code {
  font: 500 .87em var(--mono); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 5px; padding: .1em .35em;
  overflow-wrap: break-word;
}
.anchor {
  margin-left: .4em; color: var(--ink-3); text-decoration: none;
  opacity: 0; transition: opacity .15s; font-weight: 400;
}
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }

/* ---------------------------------------------------------------- code -- */

.code {
  margin: 1.6em 0; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); overflow: hidden;
}
.code__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .4rem .5rem .4rem .9rem; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.code__lang { font: 600 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.code__copy {
  margin-left: auto; background: transparent; border: 1px solid var(--line);
  color: var(--ink-3); border-radius: 6px; padding: .22rem .55rem;
  font: 500 .74rem var(--mono); cursor: pointer;
}
.code__copy:hover { color: var(--brand); border-color: var(--brand); }
.code { max-width: 100%; }
.code pre { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; overscroll-behavior-x: contain; }
.card .code pre { padding: .8rem .9rem; overflow-x: visible; white-space: pre-wrap; }
.card .code code { font-size: .78rem; overflow-wrap: anywhere; }
.code code { font: 400 .855rem/1.72 var(--mono); }

.tok-comment { color: var(--ink-3); font-style: italic; }
.tok-string { color: var(--s3); }
.tok-keyword { color: var(--s7); font-weight: 600; }
.tok-number { color: var(--s2); }
.tok-builtin { color: var(--s1); }
.tok-fn { color: var(--s4); }
:root[data-theme="light"] .tok-string { color: #0d7a55; }
:root[data-theme="light"] .tok-keyword { color: #4a3aa7; }
:root[data-theme="light"] .tok-fn { color: #a06a00; }

/* ------------------------------------------------------------ callouts -- */

.callout {
  margin: 1.7em 0; padding: 1.05rem 1.2rem; border-radius: var(--r);
  border: 1px solid var(--line); border-left: 3px solid var(--ink-3);
  background: var(--surface);
}
.callout > :last-child { margin-bottom: 0; }
.callout__label {
  font: 600 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  margin: 0 0 .6rem; color: var(--ink-3);
}
.callout p { font-size: .97rem; }
.callout--note { border-left-color: var(--s1); }
.callout--note .callout__label { color: var(--s1); }
.callout--tip { border-left-color: var(--brand); }
.callout--tip .callout__label { color: var(--brand); }
.callout--warn { border-left-color: var(--warn); }
.callout--warn .callout__label { color: var(--warn); }
.callout--key { border-left-color: var(--s7); background: color-mix(in srgb, var(--s7) 7%, var(--surface)); }
.callout--key .callout__label { color: var(--s7); }
.callout--exercise { border-left-color: var(--accent); }
.callout--exercise .callout__label { color: var(--accent); }

/* -------------------------------------------------------------- tables -- */

.table-scroll { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .85rem; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
thead th { background: var(--surface-2); font: 600 .76rem/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- course -- */

/* `min-width: 0` on the children is load-bearing: a grid item defaults to
   min-width:auto, so any wide descendant (a code block, a table) grows the
   track and scrolls the whole page sideways on a phone. */
.course-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 210px; gap: 2.6rem; align-items: start; padding: 2.6rem 0 4rem; }
.course-layout > * { min-width: 0; }
@media (max-width: 1180px) { .course-layout { grid-template-columns: 230px minmax(0, 1fr); } .course-layout .toc { display: none; } }
@media (max-width: 900px) { .course-layout { grid-template-columns: 1fr; gap: 1.6rem; } .course-layout .sidebar { position: static; max-height: none; } }

/* The disclosure is chrome for narrow screens only; on desktop the summary is
   removed and the nav behaves exactly as it always did. */
.course-nav { min-width: 0; }
.course-nav > summary { display: none; }
.course-nav[open] > summary { display: none; }

@media (max-width: 900px) {
  .course-nav {
    border: 1px solid var(--line); border-radius: var(--r);
    background: var(--surface); margin-bottom: 1.4rem;
  }
  .course-nav > summary,
  .course-nav[open] > summary {
    display: flex; align-items: center; gap: .6rem; cursor: pointer;
    padding: .85rem 1.1rem; list-style: none; font-weight: 600; font-size: .95rem;
  }
  .course-nav > summary::-webkit-details-marker { display: none; }
  .course-nav > summary::after {
    content: "▾"; margin-left: auto; color: var(--ink-3); transition: transform .18s;
  }
  .course-nav[open] > summary::after { transform: rotate(180deg); }
  .course-nav > summary em { font-style: normal; font: 500 .8rem var(--mono); color: var(--ink-3); }
  .course-nav[open] .sidebar { border-top: 1px solid var(--line); padding: .7rem 1.1rem 1rem; }
}

.sidebar { position: sticky; top: 82px; max-height: calc(100vh - 100px); overflow-y: auto; font-size: .9rem; padding-right: .4rem; }
.sidebar h2 { font: 600 .74rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 1.6rem 0 .6rem; }
.sidebar h2:first-child { margin-top: 0; }
.sidebar a { display: block; color: var(--ink-2); text-decoration: none; padding: .34rem .6rem; border-radius: 6px; border-left: 2px solid transparent; }
.sidebar a:hover { color: var(--ink); background: var(--surface-2); }
.sidebar a.is-current { color: var(--brand); border-left-color: var(--brand); background: var(--surface-2); font-weight: 600; }
.sidebar a.is-done::after { content: " ✓"; color: var(--good); }

.toc { position: sticky; top: 82px; font-size: .86rem; border-left: 1px solid var(--line); padding-left: 1rem; }
.toc p { font: 600 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .7rem; }
.toc a { display: block; color: var(--ink-3); text-decoration: none; padding: .2rem 0; }
.toc a:hover, .toc a.is-active { color: var(--brand); }
.toc a[data-depth="3"] { padding-left: .8rem; font-size: .82rem; }

.lesson__crumb { font: 500 .8rem/1 var(--mono); color: var(--ink-3); margin-bottom: 1rem; }
.lesson__crumb a { color: var(--ink-3); text-decoration: none; }
.lesson__crumb a:hover { color: var(--brand); }
.lesson__head { border-bottom: 1px solid var(--line); padding-bottom: 1.6rem; margin-bottom: 2rem; }
.lesson__head h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
.lesson__meta { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-top: 1.1rem; font: 500 .8rem var(--mono); color: var(--ink-3); }

.lesson__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3.5rem; }
@media (max-width: 620px) { .lesson__nav { grid-template-columns: 1fr; } }
.lesson__nav a {
  display: block; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; color: var(--ink); background: var(--surface);
}
.lesson__nav a:hover { border-color: var(--brand); }
.lesson__nav span { display: block; font: 500 .74rem/1 var(--mono); color: var(--ink-3); margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .1em; }
.lesson__nav a:last-child { text-align: right; }
.lesson__nav a:only-child { grid-column: 2; }

.progress { display: flex; align-items: center; gap: .8rem; margin-top: 1.2rem; }
.progress__track { flex: 1; height: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress__fill { height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s; }
.progress__label { font: 500 .78rem var(--mono); color: var(--ink-3); white-space: nowrap; }

.done-toggle {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 2rem;
  padding: .6rem 1.1rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); cursor: pointer; font-weight: 600; font-size: .9rem;
}
.done-toggle[aria-pressed="true"] { border-color: var(--good); color: var(--good); }

.module {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  padding: 1.5rem 1.6rem; margin-bottom: 1.1rem;
}
.module__head { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.module__no { font: 700 .8rem/1 var(--mono); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--line)); border-radius: 999px; padding: .3rem .6rem; }
.module h3 { font-size: 1.28rem; }
.module__goal { color: var(--ink-2); font-size: .96rem; margin: .8rem 0 1.1rem; max-width: 72ch; }
.module ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.module li { border-top: 1px solid var(--line-soft); }
.module li a {
  display: flex; gap: .9rem; align-items: baseline; padding: .62rem .3rem;
  text-decoration: none; color: var(--ink); font-size: .96rem;
}
.module li a:hover { color: var(--brand); }
.module li a span:first-child { font: 500 .8rem var(--mono); color: var(--ink-3); min-width: 2.2rem; }
.module li a em { margin-left: auto; font-style: normal; font: 500 .78rem var(--mono); color: var(--ink-3); white-space: nowrap; }

/* ------------------------------------------------------------ datasets -- */

.filterbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1.4rem; }
.filter-count { color: var(--ink-3); font-size: .88rem; margin-bottom: 1.4rem; }
.filter-count[hidden] { display: none; }
.filterbar input[type="search"] {
  flex: 1; min-width: 220px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: .55rem 1rem; color: var(--ink);
}
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: .4rem .8rem; font-size: .84rem; cursor: pointer;
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #04150f; font-weight: 600; }
:root[data-theme="light"] .chip[aria-pressed="true"] { color: #fff; }

.dataset-card__stats { display: flex; gap: 1.2rem; margin-top: 1rem; font: 500 .8rem var(--mono); color: var(--ink-3); }

.schema td:first-child { font-family: var(--mono); font-size: .84rem; color: var(--brand); }
.schema td:nth-child(2) { font-family: var(--mono); font-size: .78rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.schema td:nth-child(3) { white-space: normal; min-width: 30ch; }

.filesize { font: 500 .78rem var(--mono); color: var(--ink-3); }

/* --------------------------------------------------------------- tools -- */

.tool-layout { padding: 2rem 0 4.5rem; }
.tool-panel {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  overflow: hidden; box-shadow: var(--shadow);
}
.tool-controls {
  display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: flex-end;
  padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.field { display: grid; gap: .35rem; min-width: 130px; }
.field > label { font: 600 .7rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.field select, .field input {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .48rem .6rem; color: var(--ink); font-size: .9rem; min-width: 130px;
}
.field--wide { flex: 1; min-width: 220px; }
.field--wide input { width: 100%; }

.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.segmented button { background: var(--surface); border: 0; padding: .48rem .8rem; color: var(--ink-2); cursor: pointer; font-size: .86rem; border-right: 1px solid var(--line); }
.segmented button:last-child { border-right: 0; }
.segmented button[aria-pressed="true"] { background: var(--brand); color: #04150f; font-weight: 600; }
:root[data-theme="light"] .segmented button[aria-pressed="true"] { color: #fff; }

.viz-surface { padding: 1.3rem; background: var(--surface); min-height: 300px; position: relative; }
.viz-surface svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz-status { padding: .75rem 1.3rem; border-top: 1px solid var(--line); font: 500 .8rem var(--mono); color: var(--ink-3); background: var(--surface-2); display: flex; gap: 1.2rem; flex-wrap: wrap; }

.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; padding: 0 1.3rem 1.1rem; }
.legend__item { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--ink-2); }
.legend__swatch { width: 11px; height: 11px; border-radius: 3px; flex: none; }

.tooltip {
  position: absolute; pointer-events: none; z-index: 5; opacity: 0;
  background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .5rem .7rem; font-size: .82rem; box-shadow: var(--shadow);
  transition: opacity .1s; min-width: 110px; line-height: 1.5;
}
.tooltip strong { display: block; font-size: .78rem; color: var(--ink-3); font-weight: 600; margin-bottom: .25rem; }
.tooltip__row { display: flex; align-items: center; gap: .4rem; white-space: nowrap; }
.tooltip__row b { margin-left: auto; font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }

.axis-label { font: 500 .72rem var(--mono); fill: var(--muted-axis); }
.axis-title { font: 600 .74rem var(--mono); fill: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.gridline { stroke: var(--grid-line); stroke-width: 1; }
.axis-line { stroke: var(--axis); stroke-width: 1; }

.data-table-wrap { max-height: 420px; overflow: auto; border-top: 1px solid var(--line); }
.data-table-wrap table { font-size: .82rem; }
.data-table-wrap th { cursor: pointer; user-select: none; }
.data-table-wrap th::after { content: ""; }
.data-table-wrap th[data-sort="asc"]::after { content: " ↑"; color: var(--brand); }
.data-table-wrap th[data-sort="desc"]::after { content: " ↓"; color: var(--brand); }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kpi { background: var(--surface); padding: 1rem 1.15rem; }
.kpi dt { font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .45rem; }
.kpi dd { margin: 0; font-size: 1.45rem; font-weight: 660; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi dd small { font-size: .8rem; font-weight: 500; color: var(--ink-3); }

/* -------------------------------------------------------------- search -- */

.searchbox { position: fixed; inset: 0; z-index: 60; background: rgb(4 8 12 / 62%); backdrop-filter: blur(4px); padding: 10vh 1rem 1rem; }
.searchbox[hidden] { display: none; }
.searchbox__panel { width: min(100%, 660px); margin-inline: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.searchbox__field { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.searchbox__field svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 1.7; stroke-linecap: round; flex: none; }
.searchbox__field input { flex: 1; background: transparent; border: 0; outline: 0; font-size: 1.02rem; }
.searchbox__field kbd { font: 500 .72rem var(--mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: .12rem .35rem; }
.searchbox__results { max-height: min(56vh, 460px); overflow-y: auto; }
.searchbox__results a { display: block; padding: .75rem 1.1rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
.searchbox__results a:hover, .searchbox__results a.is-active { background: var(--surface-2); }
.searchbox__results mark { background: color-mix(in srgb, var(--brand) 28%, transparent); color: inherit; border-radius: 3px; }
.searchbox__kind { font: 600 .68rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.searchbox__results p { margin: .25rem 0 0; font-size: .87rem; color: var(--ink-3); }
.searchbox__empty { padding: 1.6rem 1.1rem; color: var(--ink-3); font-size: .92rem; }

/* ---------------------------------------------------------------- team -- */

.person { display: grid; grid-template-columns: 64px 1fr; gap: 1.1rem; align-items: start; }
.person__avatar { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font: 700 1.2rem var(--mono); border: 1px solid var(--line); background: var(--surface-2); letter-spacing: -0.02em; }
.person h3 { margin-bottom: .15rem; }
/* `.card p` is (0,1,1) and would otherwise win on colour and margin here. */
.person .person__role { font: 500 .92rem/1.5 var(--sans); color: var(--brand); margin: 0 0 .7rem; }
.person .person__bio { font-size: .93rem; color: var(--ink-2); margin: 0; }
.person__teaches { margin-top: .9rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.person__quote { margin: auto 0 0; padding: 1.2rem 0 0 1rem; border-left: 2px solid var(--brand);
  color: var(--ink-2); font-style: italic; font-size: .94rem; }

/* -------------------------------------------------------------- footer -- */

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 3rem 0 1.8rem; margin-top: 0; font-size: .92rem; }
.site-footer__grid { display: grid; grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(120px, 1fr)); gap: 2.2rem; }
@media (max-width: 820px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
.site-footer__brand p { color: var(--ink-3); max-width: 46ch; margin-top: 1rem; font-size: .9rem; }
/* Link columns only. Scoping this to the columns matters: an unscoped
   `.site-footer a` turns the inline licence links into block elements and
   breaks that line onto four rows. */
.site-footer__col a { display: block; color: var(--ink-2); text-decoration: none; padding: .26rem 0; }
.site-footer__col a:hover { color: var(--brand); }

.site-footer__licence {
  list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem;
  margin: 1.1rem 0 0; padding: 0;
  font: 500 .78rem/1.6 var(--mono); color: var(--ink-3);
}
.site-footer__licence li { display: inline-flex; align-items: center; gap: .4rem; }
.site-footer__licence li + li::before { content: "·"; color: var(--line); margin-right: .7rem; }
.site-footer__licence a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line); }
.site-footer__licence a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.site-footer h2 { font: 600 .74rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .9rem; }
.site-footer__base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line-soft); margin-top: 2.6rem; padding-top: 1.4rem; color: var(--ink-3); font-size: .84rem; }
.site-footer__base p { margin: 0; }

/* ---------------------------------------------------------- utilities -- */

@media (pointer: coarse), (max-width: 640px) {
  /* WCAG 2.2 AA wants 24px minimum; these sit comfortably above it without
     turning inline tag pills into buttons. */
  .tag { padding: .45rem .8rem; font-size: .78rem; min-height: 32px; display: inline-flex; align-items: center; }
  .chip { padding: .55rem .95rem; font-size: .88rem; min-height: 38px; }
  .sidebar a { padding: .55rem .6rem; }
  .toc a { padding: .4rem 0; }
  .site-footer__col a { padding: .45rem 0; }
  .site-footer__licence a { min-height: 26px; display: inline-flex; align-items: center; }
  /* List navigation in the sidebar cards. Inline links inside running prose
     are exempt from the target-size rule and are deliberately left alone. */
  aside .card li a, .stack .card li a { display: inline-block; padding: .3rem 0; min-height: 28px; }
  aside .card li, .stack .card li { margin-bottom: .2rem; }
  .searchbox__results a { padding: .9rem 1.1rem; }
  .module li a { padding: .8rem .3rem; }
  .card__foot .tag { margin-bottom: .2rem; }
}

.center { text-align: center; margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stack > * + * { margin-top: 1rem; }
.notice { border: 1px dashed var(--line); border-radius: var(--r); padding: 1rem 1.2rem; color: var(--ink-2); font-size: .93rem; background: var(--surface); }

.bignum { font-size: clamp(2.6rem, 2rem + 4vw, 4.2rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }

@media print {
  .site-header, .site-footer, .searchbox, .sidebar, .toc, .lesson__nav, .done-toggle { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .prose { max-width: none; }
}

/* ------------------------------------------------------------ patterns -- */

.pattern-group { margin-bottom: 3.2rem; }
.pattern-group:last-of-type { margin-bottom: 0; }
.pattern-group__head { margin-bottom: 1.3rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.pattern-group__head h2 { font-size: 1.32rem; }
.pattern-group__head p { margin: .45rem 0 0; color: var(--ink-3); font-size: .92rem; max-width: 70ch; }

.pattern-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pattern-card { background: var(--surface); transition: background .16s; }
.pattern-card[hidden] { display: none; }
.pattern-card > a { display: block; padding: 1.2rem 1.3rem; text-decoration: none; color: inherit; height: 100%; }
.pattern-card:hover { background: var(--surface-2); }
.pattern-card__head { display: flex; align-items: baseline; gap: .8rem; }
.pattern-card h3 { font-size: 1.04rem; letter-spacing: -0.015em; }
.pattern-card__level { margin-left: auto; font-size: .6rem; color: var(--brand); letter-spacing: .12em; white-space: nowrap; }
.pattern-card__level-rest { color: var(--line); }
.pattern-card__shape {
  margin: .6rem 0 .6rem; font: 500 .82rem/1.55 var(--mono); color: var(--ink-2);
  padding-left: .7rem; border-left: 2px solid color-mix(in srgb, var(--brand) 45%, var(--line));
}
.pattern-card p:last-child { margin: 0; color: var(--ink-3); font-size: .9rem; }

.lesson-patterns { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.lesson-patterns h2 { font: 600 .74rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1rem; }
.lesson-patterns__list { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.lesson-patterns__list a {
  display: block; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); text-decoration: none; color: var(--ink);
}
.lesson-patterns__list a:hover { border-color: var(--brand); }
.lesson-patterns__list strong { display: block; font-size: .95rem; font-weight: 620; }
.lesson-patterns__list span { display: block; margin-top: .25rem; font: 500 .78rem/1.5 var(--mono); color: var(--ink-3); }

.pattern-body h2 { font-size: 1.28rem; letter-spacing: -0.018em; margin-top: 2.1em; }
.pattern-body > h2:first-child { margin-top: 0; }
.pattern-body h3 { font-size: 1.04rem; }

/* --------------------------------------------------------------- brand -- */

:root { --wordmark-edge: rgb(238 243 249 / 20%); }
:root[data-theme="light"] { --wordmark-edge: rgb(12 19 25 / 18%); }

.logo__word { font: 700 1.02rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.site-footer__brand .logo__word { font-size: 1.02rem; }

/* A faint grain over the whole page: stops the large flat surfaces reading
   as flat, and costs one repeating gradient rather than an image. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .035;
  background-image:
    repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 3px);
}
:root[data-theme="light"] body::after { opacity: .02; background-image: repeating-linear-gradient(0deg, #000 0 1px, transparent 1px 3px); }
@media (prefers-reduced-motion: reduce) { body::after { display: none; } }

/* Cards get a corner accent that draws on hover. */
.card { position: relative; }
.card::after {
  content: ""; position: absolute; right: -1px; top: -1px; width: 22px; height: 22px;
  border-top: 2px solid var(--brand); border-right: 2px solid var(--brand);
  border-top-right-radius: var(--r);
  opacity: 0; transform: scale(.4); transform-origin: top right;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.card:hover::after { opacity: 1; transform: scale(1); }

/* ------------------------------------------------------------- archive -- */

/* A dated list rather than a grid of cards. Once a page carries more than a
   couple of dozen posts, the summaries stop being read and the date column is
   what people actually navigate by. */
.archive { list-style: none; margin: 0; padding: 0; }
.archive li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  gap: 1rem; align-items: baseline;
  padding: .62rem 0;
  border-bottom: 1px solid var(--line);
}
.archive li:first-child { border-top: 1px solid var(--line); }
.archive time {
  font: 500 .78rem/1.5 var(--mono); color: var(--ink-3);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.archive a {
  color: var(--ink); text-decoration: none; font-weight: 520;
  /* min-width:0 on the grid child so a long title wraps instead of pushing
     the practice column off the row. */
  min-width: 0;
}
.archive a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.archive li > span {
  font: 500 .74rem/1.5 var(--mono); color: var(--ink-3);
  white-space: nowrap; text-align: right;
}

@media (max-width: 640px) {
  .archive li { grid-template-columns: 4.2rem minmax(0, 1fr); }
  /* The practice label is the first thing to go: it is context, not
     navigation, and the title needs the width more. */
  .archive li > span { display: none; }
}

.archive-month { margin-bottom: 2.6rem; }
.archive-month h2 {
  display: flex; align-items: baseline; gap: .7rem;
  font-size: 1.05rem; margin-bottom: .5rem;
}
.archive-month h2 em {
  font-style: normal; font: 500 .76rem var(--mono); color: var(--ink-3);
}

.pill.is-active { background: var(--brand); border-color: var(--brand); color: #04150f; }
:root[data-theme="light"] .pill.is-active { color: #fff; }

/* ---------------------------------------------------------- pagination -- */

.pagination {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-top: 3rem;
  padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.pagination__pages { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.pagination__page,
.pagination__step {
  display: inline-flex; align-items: center; justify-content: center;
  /* 40px keeps every control past the 24px WCAG 2.2 target-size minimum with
     room to spare, which matters most on the numbered pages. */
  min-width: 40px; min-height: 40px; padding: 0 .6rem;
  border-radius: 10px; text-decoration: none;
  font: 500 .86rem var(--mono); color: var(--ink-2);
  border: 1px solid transparent;
}
.pagination__page:hover, .pagination__step:hover { color: var(--ink); border-color: var(--line); }
.pagination__page.is-current {
  background: var(--brand); border-color: var(--brand); color: #04150f; font-weight: 700;
}
:root[data-theme="light"] .pagination__page.is-current { color: #fff; }
.pagination__step { padding: 0 1rem; border-color: var(--line); background: var(--surface); }
.pagination__step.is-off { opacity: .35; pointer-events: none; }
.pagination__gap { color: var(--ink-3); padding: 0 .2rem; }

@media (max-width: 560px) {
  .pagination { justify-content: center; }
  .pagination__pages { order: -1; width: 100%; justify-content: center; }
}

/* A prose line where the filter bar would be, on collections too large for a
   client-side filter to be honest about. */
.filterbar--note { display: block; color: var(--ink-2); font-size: .94rem; margin-bottom: 1.6rem; }
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--brand); font: inherit; text-decoration: underline; text-underline-offset: 3px;
}
.linkish:hover { color: var(--ink); }
