/* Science4AI — site styles
   Three voices, one family: Plex Serif for human reasoning and headings,
   Plex Sans for explanation, Plex Mono only for literal record fields.
   All chroma on the page comes from data (the viridis colormap). */

@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/ibm-plex-serif-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-style: italic; font-weight: 300; font-display: swap; src: url("../fonts/ibm-plex-serif-latin-300-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-serif-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;

  --paper: #ffffff;
  --ink: #000000;
  --ink-2: #45454d;
  --ink-3: #696973;
  --rule: #dcdce1;
  --wash: #f4f4f6;

  /* viridis at 0, .25, .5, .75, 1 — used only where color encodes data */
  --v0: #440154;
  --v1: #3b528b;
  --v2: #21918c;
  --v3: #5ec962;
  --v4: #fde725;
  --viridis: #440154, #482878, #3e4a89, #31688e, #26828e, #1f9e89, #35b779, #6ece58, #b5de2b, #fde725;

  --serif: "IBM Plex Serif", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --page: 68rem;
  --gutter: clamp(1.25rem, 4.5vw, 3rem);
  --rail: 8.5rem;
  --margin: 16rem;
  --col-gap: 2.5rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
}

h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 { font-family: var(--serif); font-weight: 300; letter-spacing: -0.018em; }
h1 { font-size: clamp(2.375rem, 6.3vw, 4.625rem); line-height: 1.05; letter-spacing: -0.024em; }
h2 { font-size: clamp(1.875rem, 3.7vw, 2.75rem); line-height: 1.12; }
h3 { font-size: clamp(1.3125rem, 2.2vw, 1.5625rem); line-height: 1.22; font-weight: 400; letter-spacing: -0.01em; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.0625em;
  text-underline-offset: 0.2em;
  text-decoration-color: #9c9ca6;
  transition: text-decoration-color 0.15s;
}
a:hover { text-decoration-color: var(--ink); }

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

sup { font-size: 0.68em; line-height: 0; vertical-align: super; font-feature-settings: "tnum"; }
sup a { text-decoration: none; padding: 0 0.1em; color: var(--ink-2); }
sup a:hover { color: var(--ink); text-decoration: underline; }

.wrap { max-width: calc(var(--page) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; border-radius: 0.25rem;
  font-size: 1rem; text-decoration: none;
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ───────── header ───────── */

.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-head.is-stuck { border-bottom-color: var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4rem; }

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font: 600 1.0625rem/1 var(--sans); letter-spacing: -0.01em; text-decoration: none;
}
.brand svg { width: 1.25rem; height: 1.25rem; flex: none; }

.site-nav ul { display: flex; gap: clamp(1rem, 2.2vw, 1.9rem); }
.site-nav a {
  font-size: 0.9375rem; color: var(--ink-2); text-decoration: none;
  padding-block: 0.35rem; border-bottom: 1.5px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.nav-toggle { display: none; }

/* ───────── hero ───────── */

.hero { padding-block: clamp(2.25rem, 6vw, 4.75rem) clamp(3rem, 7vw, 5.5rem); }
.hero h1 span { display: block; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 23.5rem) minmax(0, 1fr);
  grid-template-areas:
    "lead   screen"
    "ctrl   screen"
    "record screen";
  column-gap: clamp(2rem, 5vw, 4.5rem);
  row-gap: 1.75rem;
  align-items: start;
  margin-top: clamp(2rem, 4.5vw, 3.5rem);
}
.hero-lead { grid-area: lead; font-size: clamp(1.1875rem, 1.6vw, 1.3125rem); line-height: 1.5; }
.hero-ctrl { grid-area: ctrl; }
.hero-record { grid-area: record; }
.hero-screen { grid-area: screen; justify-self: end; max-width: 100%; }

/* segmented control */
.seg { display: inline-flex; padding: 0.1875rem; border: 1px solid var(--ink); border-radius: 999px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span {
  display: block; padding: 0.5rem 1.05rem; border-radius: 999px;
  font: 500 0.9375rem/1.2 var(--sans); white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 3px solid var(--v0); outline-offset: 3px; }

.tally { margin-top: 0.9rem; font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); min-height: 2.9em; }
.tally b { font-weight: 600; color: var(--ink); }

/* the plate */
.screen { display: grid; grid-template-columns: auto auto; column-gap: 1.1rem; row-gap: 0.9rem; align-items: stretch; }

.plate {
  --well: clamp(1.02rem, 2.42vw, 2rem);
  --gap: clamp(0.25rem, 0.62vw, 0.5rem);
  position: relative;
  display: grid;
  grid-template-columns: 1.1rem repeat(12, var(--well));
  grid-template-rows: 1.1rem repeat(8, var(--well));
  gap: var(--gap);
  padding: 0.85rem 1.15rem 1.15rem 0.7rem;
  background: var(--wash);
  border-radius: 0.9rem;
}
/* the chamfered A1 corner every real microplate has */
.plate::before {
  content: ""; position: absolute; top: -1rem; left: -1rem; width: 2rem; height: 2rem;
  background: var(--paper); transform: rotate(45deg);
}
.plate-label {
  display: grid; place-items: center;
  font: 400 0.6875rem/1 var(--sans); color: var(--ink-3);
  font-feature-settings: "tnum"; user-select: none;
}

.well {
  appearance: none; -webkit-appearance: none;
  position: relative; width: var(--well); height: var(--well);
  padding: 0; margin: 0; border: 0; border-radius: 50%;
  background: var(--c, #ccc);
  box-shadow: inset 0 0 0 0 transparent;
  cursor: pointer;
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
  transition-delay: calc(var(--i, 0) * 26ms);
}
.well:focus-visible { outline-offset: 5px; border-radius: 50%; }

.plate[data-view="published"] .well:not([data-reported]) {
  background-color: transparent;
  box-shadow: inset 0 0 0 1.5px #c6c6cf;
}
.plate[data-view="learnable"] .well[data-kind="blank"],
.plate[data-view="learnable"] .well[data-kind="ref"] {
  box-shadow: 0 0 0 2px var(--wash), 0 0 0 3.25px var(--ink);
}
.plate[data-view="learnable"] .well[data-kind="fail"] {
  background-color: #e9e9ee;
  background-image: repeating-linear-gradient(135deg, #8d8d98 0 1.5px, transparent 1.5px 5px);
}
.well[aria-pressed="true"]::after {
  content: ""; position: absolute; inset: -0.4rem;
  border: 2px solid var(--ink); border-radius: 50%; pointer-events: none;
}

/* color bar */
.cbar { display: grid; grid-template-columns: 0.625rem auto; column-gap: 0.45rem; padding-block: 1.95rem 1.15rem; }
.cbar-ramp { border-radius: 999px; background: linear-gradient(to top, var(--viridis)); }
.cbar-ticks { position: relative; font: 400 0.6875rem/1 var(--sans); color: var(--ink-3); font-feature-settings: "tnum"; min-width: 1.6rem; }
.cbar-ticks span { position: absolute; left: 0; bottom: var(--t); transform: translateY(50%); white-space: nowrap; }

.screen-foot { grid-column: 1 / -1; max-width: 36rem; }
.keys { display: flex; flex-wrap: wrap; gap: 0.45rem 1.4rem; font-size: 0.8125rem; color: var(--ink-2); }
.keys li { display: inline-flex; align-items: center; gap: 0.5rem; }
.key-dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; flex: none; }
.key-dot.is-empty { box-shadow: inset 0 0 0 1.5px #c6c6cf; }
.key-dot.is-ctrl { background: var(--v1); box-shadow: 0 0 0 1.5px var(--paper), 0 0 0 2.75px var(--ink); margin-inline: 0.2rem; }
.key-dot.is-fail { background-color: #e9e9ee; background-image: repeating-linear-gradient(135deg, #8d8d98 0 1.5px, transparent 1.5px 4px); }

figcaption, .caption { font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }
.screen-foot .caption { margin-top: 0.7rem; }

/* the record readout */
.record { border-top: 1px solid var(--ink); }
.record-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-block: 0.7rem 0.55rem; }
.record-head h2 { font: 400 1.375rem/1.2 var(--serif); letter-spacing: -0.01em; }
.record-kind { font-size: 0.8125rem; color: var(--ink-2); text-align: right; }

.fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); font: 400 0.8125rem/1.45 var(--mono); }
.fields dt, .fields dd { padding-block: 0.34rem; border-top: 1px solid var(--rule); }
.fields dt { color: var(--ink-3); padding-right: 1.4rem; }
.fields dd { color: var(--ink); overflow-wrap: anywhere; }

.why { margin-top: 0.1rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); }
.why p { font: italic 400 1rem/1.45 var(--serif); }
.why p + p { margin-top: 0.4rem; font-style: normal; font-size: 0.9375rem; }
.record-empty { padding-block: 0.75rem 0; border-top: 1px solid var(--rule); font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }

/* ───────── sections ───────── */

.section { padding-block: clamp(3.25rem, 7.5vw, 6rem); border-top: 1px solid var(--rule); }
.section > .wrap > h2 { max-width: 20em; }
.section-intro { margin-top: 1.4rem; }

/* the page grid: rail | text | margin */
.row {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) var(--margin);
  column-gap: var(--col-gap);
  align-items: start;
}
.row > * { grid-column: 2; }
.row > .rail { grid-column: 1; }
.row > .note { grid-column: 3; }
.row > .span-2 { grid-column: 2 / -1; }
.row + .row { margin-top: 1.15rem; }
.rows { margin-top: clamp(1.75rem, 3.5vw, 2.75rem); }

.note { font-size: 0.8125rem; line-height: 1.5; color: var(--ink-2); padding-top: 0.3rem; }
.note + .note { margin-top: 0.75rem; }
.note p + p { margin-top: 0.5rem; }
.note-n { font-feature-settings: "tnum"; color: var(--ink); font-weight: 500; margin-right: 0.3em; }

.pull { font: 300 clamp(1.4rem, 2.5vw, 1.8125rem)/1.3 var(--serif); letter-spacing: -0.012em; }

/* the PDB growth figure: fluid HTML + SVG, readable without JavaScript */
.chart { margin-block: 0.9rem 0.6rem; }
.chart-title { font: 500 0.9375rem/1.3 var(--sans); }
.chart-sub { margin-top: 0.15rem; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-2); }
.chart-plot { --series: #3e4a89; position: relative; height: clamp(16.5rem, 30vw, 20rem); margin-top: 1.1rem; border-bottom: 1px solid #9c9ca6; cursor: crosshair; outline-offset: 8px; }
.chart-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--rule); }
.chart-grid span { position: absolute; left: 0; bottom: 0.25rem; font: 400 0.75rem/1 var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-area { fill: var(--series); fill-opacity: 0.1; }
.chart-line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot, .chart-cross-dot { position: absolute; width: 0.5625rem; height: 0.5625rem; margin: 0 0 -0.28125rem -0.28125rem; border-radius: 50%; background: var(--series); box-shadow: 0 0 0 2px var(--paper); }
.chart-leader { position: absolute; width: 0; border-left: 1px solid #9c9ca6; }
.chart-callout { position: absolute; font-size: 0.8125rem; line-height: 1.3; color: var(--ink-2); white-space: nowrap; pointer-events: none; }
.chart-callout b { display: block; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-callout.is-left { transform: translateX(-100%); text-align: right; padding-right: 0.55rem; }
.chart-callout.is-end { padding-right: 0; }
.chart-cross { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--ink-2); pointer-events: none; }
.chart-cross[hidden], .chart-tip[hidden] { display: none; }
.chart-cross-dot { left: 0; margin-left: calc(-0.28125rem - 0.5px); }
.chart-tip { position: absolute; top: 0.2rem; z-index: 2; padding: 0.4rem 0.65rem 0.45rem; border-radius: 0.35rem; background: var(--ink); color: var(--paper); font-size: 0.8125rem; line-height: 1.3; white-space: nowrap; pointer-events: none; }
.chart-tip b { display: block; font-weight: 600; font-size: 0.9375rem; }
.chart-tip span { color: #c9c9d1; }
.chart-x { position: relative; height: 1.5rem; }
.chart-x span { position: absolute; top: 0.4rem; transform: translateX(-50%); font: 400 0.75rem/1 var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart figcaption { margin-top: 0.5rem; }
.chart figcaption > p { max-width: 40rem; }
.chart-data { margin-top: 0.6rem; font-size: 0.875rem; }
.chart-data summary { display: inline-block; cursor: pointer; color: var(--ink-2); text-decoration: underline; text-decoration-color: #9c9ca6; text-underline-offset: 0.2em; list-style: none; }
.chart-data summary::-webkit-details-marker { display: none; }
.chart-data summary:hover { color: var(--ink); text-decoration-color: var(--ink); }
.chart-table-wrap { margin-top: 0.75rem; max-height: 16rem; max-width: 18rem; overflow: auto; border: 1px solid var(--rule); border-radius: 0.5rem; }
.chart-data table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.chart-data th, .chart-data td { padding: 0.3rem 0.9rem; text-align: right; font-weight: 400; border-top: 1px solid var(--rule); }
.chart-data thead th { position: sticky; top: 0; background: var(--wash); font-weight: 500; border-top: 0; }
.chart-data th:first-child { text-align: left; }

/* eight questions */
.questions { margin-top: clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--rule); }
.q {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) var(--margin);
  column-gap: var(--col-gap);
  align-items: start;
  padding-block: 1.9rem 2rem;
  border-top: 1px solid var(--rule);
}
.q-key { font: 500 0.875rem/1.3 var(--mono); padding-top: 0.5rem; }
.q-body p { margin-top: 0.7rem; }
.q-body .capture { font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.q-body .capture b { font-weight: 500; color: var(--ink); }
.q .note { padding-top: 0.55rem; }

/* two layers figure */
.layers { margin-top: clamp(2rem, 4vw, 3rem); }
.layers-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); background: var(--wash); border: 1px solid var(--rule); border-radius: 0.9rem; overflow: hidden; }
.layer { padding: clamp(1.25rem, 3vw, 2.25rem); }
.layer + .layer { border-left: 1px solid var(--rule); background: var(--paper); }
.layer-title { font: 400 1.375rem/1.2 var(--serif); letter-spacing: -0.01em; }
.layer-sub { margin-top: 0.3rem; font-size: 0.875rem; color: var(--ink-2); }
.layer { display: flex; flex-direction: column; }
.layer .fields { margin-top: 1.25rem; font-size: 0.8125rem; }
.layer-foot { margin-top: auto; padding-top: 1.75rem; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); max-width: 22rem; }
.layer .fields dt:first-of-type, .layer .fields dd:first-of-type { border-top-color: var(--ink); }

.steps { margin-top: 1.25rem; }
.phase { font: 500 0.8125rem/1.3 var(--sans); color: var(--ink-2); padding-block: 0.5rem; border-top: 1px solid var(--ink); }
.phase ~ .phase { margin-top: 1.1rem; }
.step { display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); column-gap: 1rem; padding-block: 0.5rem; border-top: 1px solid var(--rule); }
.step dt { font: 400 0.8125rem/1.5 var(--mono); color: var(--ink-3); padding-top: 0.12rem; }
.step dd { font: 400 1.0625rem/1.42 var(--serif); }
.layers figcaption { margin-top: 0.9rem; max-width: 46rem; }

/* readiness levels */
.levels { margin-top: clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--rule); }
.level {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) var(--margin);
  column-gap: var(--col-gap);
  align-items: start;
  padding-block: 1.5rem 1.6rem;
  border-top: 1px solid var(--rule);
}
.level-n { display: flex; align-items: center; gap: 0.7rem; font: 400 0.9375rem/1 var(--sans); color: var(--ink-2); padding-top: 0.5rem; font-feature-settings: "tnum"; }
.level-chip { width: 1.6rem; height: 0.55rem; border-radius: 999px; background: var(--chip); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14); flex: none; }
.level-body p { margin-top: 0.5rem; }
.level-for { font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); padding-top: 0.5rem; }
.level-for b { display: block; font-weight: 500; color: var(--ink); }
.level-open { display: inline-block; margin-left: 0.6rem; font: 500 0.75rem/1 var(--sans); letter-spacing: 0; padding: 0.3rem 0.55rem; border: 1px solid var(--ink); border-radius: 999px; vertical-align: 0.25em; }

/* checklist */
.section.is-tool { background: var(--wash); border-top-color: transparent; }
.section.is-tool + .section { border-top-color: transparent; }
.check-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.5rem; margin-top: 1.75rem; }
.progress { display: flex; align-items: center; gap: 0.8rem; font-size: 0.9375rem; color: var(--ink-2); font-feature-settings: "tnum"; }
.progress-track { width: 9rem; height: 0.55rem; border-radius: 999px; background: #dedee4; overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(to right, var(--viridis)); background-size: 9rem 100%; transition: width 0.3s ease; }
.btn {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font: 500 0.9375rem/1.2 var(--sans); color: var(--ink);
  padding: 0.6rem 1.1rem; border: 1px solid var(--ink); border-radius: 999px; background: transparent;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.is-quiet { border-color: transparent; padding-inline: 0.4rem; text-decoration: underline; text-decoration-color: #9c9ca6; text-underline-offset: 0.2em; }
.btn.is-quiet:hover { background: transparent; color: var(--ink); text-decoration-color: var(--ink); }

.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 4.5rem); margin-top: 2rem; }
.check-group { padding-block: 1.15rem 1.25rem; border-top: 1px solid #cfcfd6; }
.check-group h3 { font: 500 0.875rem/1.3 var(--mono); letter-spacing: 0; }
.check-group ul { margin-top: 0.55rem; }
.check { display: grid; grid-template-columns: 1.375rem minmax(0, 1fr); column-gap: 0.75rem; align-items: start; padding-block: 0.32rem; font-size: 1rem; line-height: 1.45; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none; margin: 0.1rem 0 0; width: 1.375rem; height: 1.375rem;
  border: 1.5px solid var(--ink); border-radius: 50%; background: var(--paper); cursor: pointer;
  display: grid; place-items: center; transition: background-color 0.15s;
}
.check input::after { content: ""; width: 0.36rem; height: 0.66rem; margin-top: -0.12rem; border: solid var(--paper); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform 0.15s; }
.check input:checked { background: var(--ink); }
.check input:checked::after { transform: rotate(45deg) scale(1); }
.check input:checked + span { color: var(--ink-2); }

/* standards table */
.table-wrap { margin-top: clamp(1.75rem, 3.5vw, 2.5rem); overflow-x: auto; }
.standards { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; }
.standards caption { text-align: left; font: 500 0.875rem/1.3 var(--sans); color: var(--ink-2); padding-block: 0 0.6rem; }
.standards th, .standards td { text-align: left; vertical-align: top; padding: 0.8rem 1.5rem 0.85rem 0; border-top: 1px solid var(--rule); }
.standards thead th { font: 500 0.8125rem/1.3 var(--sans); color: var(--ink-2); border-top: 1px solid var(--ink); padding-block: 0.55rem; }
.standards tbody th { font-weight: 500; width: 17rem; }
.standards td:last-child { padding-right: 0; width: 6.5rem; color: var(--ink-2); font-feature-settings: "tnum"; white-space: nowrap; }
.standards tbody tr:last-child th, .standards tbody tr:last-child td { border-bottom: 1px solid var(--rule); }
.standards + .standards { margin-top: 2.5rem; }

/* about + collaborators */
.partners { margin-top: clamp(2.25rem, 4.5vw, 3.25rem); padding-top: 1.4rem; border-top: 1px solid var(--ink); }
.partners h3 { font: 500 0.875rem/1.3 var(--sans); letter-spacing: 0; color: var(--ink-2); }
.partner-list { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem clamp(2rem, 5vw, 3.75rem); margin-top: 1.5rem; }
.partner-list a { display: block; text-decoration: none; }
.partner-list img { display: block; height: 2.75rem; width: auto; max-width: 13rem; object-fit: contain; }
.partner-name { font: 400 1.3125rem/1.2 var(--serif); letter-spacing: -0.01em; }
.partner-name small { display: block; margin-top: 0.2rem; font: 400 0.8125rem/1.3 var(--sans); letter-spacing: 0; color: var(--ink-2); }
.partners .caption { margin-top: 1.5rem; max-width: 44rem; }

/* references */
.refs { margin-top: clamp(1.75rem, 3.5vw, 2.5rem); columns: 2; column-gap: clamp(2rem, 5vw, 4.5rem); counter-reset: ref; font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }
.refs li { counter-increment: ref; position: relative; padding-left: 2rem; margin-bottom: 0.8rem; break-inside: avoid; overflow-wrap: anywhere; }
.refs li::before { content: counter(ref); position: absolute; left: 0; top: 0; color: var(--ink); font-weight: 500; font-feature-settings: "tnum"; }
.refs li:target { color: var(--ink); }
.refs cite { font-style: italic; }

/* footer */
.site-foot { border-top: 1px solid var(--ink); padding-block: 2rem 3rem; font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem 3rem; align-items: start; }
.site-foot .brand { color: var(--ink); }
.site-foot p { margin-top: 0.7rem; max-width: 34rem; }
.foot-links { display: grid; gap: 0.35rem; justify-items: start; }

/* ───────── responsive ───────── */

@media (max-width: 68rem) {
  .row, .q, .level { grid-template-columns: minmax(0, 1fr) var(--margin); }
  .row > * { grid-column: 1; }
  .row > .rail { grid-column: 1 / -1; }
  .row > .note { grid-column: 2; }
  .row > .span-2 { grid-column: 1 / -1; }
  .q-key, .level-n { grid-column: 1 / -1; padding-top: 0; margin-bottom: 0.5rem; }
}

@media (max-width: 60rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "lead" "ctrl" "screen" "record";
  }
  .hero-lead { max-width: 36rem; }
  .hero-screen { justify-self: start; }
  .hero-record { max-width: 30rem; }
}

@media (max-width: 52rem) {
  .row, .q, .level { grid-template-columns: minmax(0, 1fr); }
  .row > *, .row > .note, .row > .span-2 { grid-column: 1; }
  .row > .note, .q .note, .level-for { margin-top: 0.8rem; padding: 0 0 0 0.9rem; border-left: 2px solid var(--rule); }
  .row + .row { margin-top: 1.4rem; }
  .layers-grid { grid-template-columns: minmax(0, 1fr); }
  .layer + .layer { border-left: 0; border-top: 1px solid var(--rule); }
  .checks { grid-template-columns: minmax(0, 1fr); }
  .refs { columns: 1; }
  .site-foot .wrap { grid-template-columns: minmax(0, 1fr); }
  .standards thead { display: none; }
  .standards, .standards caption, .standards tbody, .standards tr, .standards th, .standards td { display: block; width: auto; }
  .standards tr { padding-block: 0.85rem; border-top: 1px solid var(--rule); }
  .standards tbody th, .standards td { border: 0; padding: 0; width: auto; white-space: normal; }
  .standards td { margin-top: 0.25rem; }
  .standards td:last-child { width: auto; font-size: 0.875rem; }
  .standards tbody tr:last-child th, .standards tbody tr:last-child td { border-bottom: 0; }
}

@media (max-width: 46rem) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer;
    appearance: none; -webkit-appearance: none; background: none; border: 1px solid var(--ink); border-radius: 999px;
    font: 500 0.875rem/1 var(--sans); color: var(--ink); padding: 0.5rem 0.9rem;
  }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--rule); display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.25rem var(--gutter) 0.9rem; }
  .site-nav a { display: block; padding-block: 0.65rem; font-size: 1.0625rem; border-bottom: 0; }
  .site-nav a[aria-current="true"] { text-decoration: underline; text-underline-offset: 0.25em; }
  .hero-grid { grid-template-areas: none; row-gap: 1.25rem; }
  .hero-lead, .hero-ctrl, .hero-record, .hero-screen { grid-area: auto; }
  .hero-screen, .screen { display: contents; }
  .hero-lead { order: 1; }
  .hero-ctrl { order: 2; }
  .plate { order: 3; }
  .cbar { order: 4; }
  .hero-record { order: 5; margin-top: 0.4rem; }
  .screen-foot { order: 6; }
  .plate { --gap: 0.3rem; padding: 0.7rem 0.75rem 0.75rem 0.4rem; width: 100%; grid-template-columns: 1.1rem repeat(12, minmax(0, 1fr)); grid-template-rows: 1.1rem; grid-auto-rows: auto; }
  .well { width: 100%; height: auto; aspect-ratio: 1; }
  .well[aria-pressed="true"]::after { inset: -0.2rem; border-width: 1.5px; }
  .plate[data-view="learnable"] .well[data-kind="blank"],
  .plate[data-view="learnable"] .well[data-kind="ref"] { box-shadow: 0 0 0 1.5px var(--wash), 0 0 0 2.5px var(--ink); }
  .cbar { grid-template-columns: minmax(0, 1fr); grid-template-rows: 0.5rem 0.9rem; row-gap: 0.35rem; padding: 0; margin-top: -0.4rem; }
  .cbar-ramp { background: linear-gradient(to right, var(--viridis)); }
  .cbar-ticks span { bottom: auto; top: 0; left: var(--t); transform: translateX(-50%); }
  .cbar-ticks span:last-child { transform: none; }
  .chart-long { display: none; }
  .chart-callout { font-size: 0.75rem; }
  .step { grid-template-columns: minmax(0, 1fr); }
  .step dt { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation: none !important; }
}

@media print {
  .site-head, .hero-ctrl, .check-bar .btn, .nav-toggle { display: none !important; }
  .section { padding-block: 1.5rem; }
  body { font-size: 11pt; }
}
