/* Design system — Molecular Tissue Fingerprints. Every token is defined once, here.
   Light and dark: prefers-color-scheme with a toggle (html[data-theme="light|dark"]). */

:root {
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* surfaces and ink (light) */
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;

  /* categorical palette, fixed order 1..8 (never cycled) */
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100;
  --c5: #e87ba4; --c6: #008300; --c7: #4a3aa7; --c8: #e34948;

  /* sequential (blue) 1..7 */
  --s1: #cde2fb; --s2: #9ec5f4; --s3: #6da7ec; --s4: #3987e5; --s5: #256abf; --s6: #184f95; --s7: #0d366b;

  /* diverging: blue ↔ red with a neutral midpoint */
  --div-neg: #2a78d6; --div-mid: #f0efec; --div-pos: #e34948;

  /* status — always icon + label, never colour alone */
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;

  --link: #2a78d6;
  --focus: #eda100;
  --radius: 6px;
  --measure: 72ch;
  --gutter: 16px;
  --maxw: 1120px;
  --shadow: none;
  --mark-ring: transparent;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0d0d0d; --surface: #1a1a19; --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781; --grid: #2c2c2a; --axis: #383835;
    --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #008300; --c7: #9085e9; --c8: #e66767;
    --div-mid: #383835; --link: #3987e5; --mark-ring: #c3c2b7;
  }
}
:root[data-theme="dark"] {
  --page: #0d0d0d; --surface: #1a1a19; --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781; --grid: #2c2c2a; --axis: #383835;
  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #008300; --c7: #9085e9; --c8: #e66767;
  --div-mid: #383835; --link: #3987e5; --mark-ring: #c3c2b7;
}

/* ---- base --------------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--page); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font); line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 650; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); font-weight: 600; margin-top: 2.5rem; }
h3 { font-size: 1.12rem; font-weight: 600; margin-top: 1.5rem; }
p, li { max-width: var(--measure); }
p { margin: 0 0 1rem; }
small, .small { font-size: 0.875rem; color: var(--ink-2); }
.muted { color: var(--muted); }
code { font-family: var(--mono); font-size: 0.9em; background: color-mix(in srgb, var(--grid) 55%, transparent); padding: 0.08em 0.3em; border-radius: 4px; }
pre { font-family: var(--mono); font-size: 0.85rem; overflow-x: auto; background: var(--surface); border: 1px solid var(--grid); border-radius: var(--radius); padding: 0.8rem 1rem; }
hr { border: 0; border-top: 1px solid var(--grid); margin: 2rem 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---- layout ------------------------------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
main.wrap { padding-top: 1.5rem; padding-bottom: 4rem; }
.prose { max-width: var(--measure); }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1.5rem; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 1.25rem; align-items: start; }
.grid-2 > *, .grid-3 > *, .tiles > *, .figure, .sample-card { min-width: 0; }
.sample-card { overflow-wrap: anywhere; }
.section { margin-top: 2.5rem; }
.section > p:first-of-type { margin-top: 0.25rem; }

/* ---- header / nav ------------------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--grid); background: var(--page); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 60px; flex-wrap: wrap; padding-top: 0.4rem; padding-bottom: 0.4rem; }
.brand { font-weight: 650; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.brand svg { width: 22px; height: 22px; }
.brand img.mark { width: 72px; height: 72px; border-radius: 50%; display: block; box-shadow: 0 0 0 1px var(--mark-ring); }
nav.primary { display: flex; flex-wrap: wrap; gap: 0.15rem 0.6rem; margin-left: auto; }
nav.primary a { color: var(--ink-2); text-decoration: none; padding: 0.35rem 0.1rem; border-bottom: 2px solid transparent; font-size: 0.9rem; }
nav.primary a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
nav.primary a:hover { color: var(--ink); }
nav.primary a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--axis); }
nav.primary a { font-size: 0.95rem; }
.site-header .wrap.subnav { min-height: 0; padding-top: 0; padding-bottom: 0.2rem; }
nav.secondary { display: flex; flex-wrap: wrap; gap: 0.1rem 0.9rem; }
nav.secondary a { color: var(--ink-2); text-decoration: none; padding: 0.2rem 0.05rem; border-bottom: 2px solid transparent; font-size: 0.82rem; }
nav.secondary a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
nav.secondary a:hover { color: var(--ink); }
.theme-toggle { border: 1px solid var(--axis); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 0.3rem 0.7rem; cursor: pointer; font: inherit; font-size: 0.85rem; }
.theme-toggle:hover { color: var(--ink); }
.site-footer { border-top: 1px solid var(--grid); margin-top: 3rem; padding: 1.5rem 0 2.5rem; color: var(--ink-2); font-size: 0.875rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }

/* ---- stat tiles --------------------------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
.tile { background: var(--surface); border: 1px solid var(--grid); border-radius: var(--radius); padding: 1rem 1.1rem 0.9rem; min-height: 132px; display: flex; flex-direction: column; }
.tile .value { font-family: var(--font); font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 600; line-height: 1.05; color: var(--ink); letter-spacing: -0.02em; }
.tile .value .of { font-size: 0.5em; font-weight: 500; color: var(--ink-2); margin-left: 0.2em; }
.tile .ci { margin-top: 0.15rem; font-size: 0.8rem; color: var(--ink-2); white-space: normal; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.tile .label { margin-top: 0.4rem; font-weight: 500; color: var(--ink); max-width: none; }
.tile > h3 { margin-top: 0; }
.tile .sub { margin-top: 0.25rem; color: var(--ink-2); font-size: 0.85rem; max-width: none; }
.tile .source { margin-top: auto; padding-top: 0.5rem; color: var(--muted); font-size: 0.75rem; word-break: break-word; max-width: none; }
.tile .tile-src { margin-top: auto; padding-top: 0.5rem; }

/* ---- figure block ------------------------------------------------------------------------- */
.figure { margin: 2rem 0; }
.figure .fig-head h3 { margin: 0 0 0.15rem; }
.figure .fig-sub { color: var(--ink-2); margin: 0 0 0.6rem; font-size: 0.95rem; max-width: none; }
.figure .fig-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin: 0 0 0.4rem; }
.figure .chart { background: var(--surface); border: 1px solid var(--grid); border-radius: var(--radius); min-height: 280px; width: 100%; }
.figure .chart.short { min-height: 200px; }
.figure .chart.tall { min-height: 420px; }
.figure .fig-caption { color: var(--ink-2); font-size: 0.85rem; margin: 0.55rem 0 0; max-width: none; overflow-wrap: anywhere; }
code, .source, .kv dd, p, li, .callout, .explain { overflow-wrap: anywhere; }
.figure .fig-caption b { color: var(--ink); font-weight: 600; }
.figure .fig-table { margin-top: 0.6rem; }
.figure .fig-table[hidden] { display: none; }
.btn { font: inherit; font-size: 0.85rem; border: 1px solid var(--axis); background: var(--surface); color: var(--ink-2); border-radius: var(--radius); padding: 0.3rem 0.65rem; cursor: pointer; }
.btn:hover { color: var(--ink); border-color: var(--ink-2); }
.btn[aria-pressed="true"] { background: color-mix(in srgb, var(--c1) 12%, var(--surface)); border-color: var(--c1); color: var(--ink); }
.btn.primary { background: var(--c1); border-color: var(--c1); color: #fff; }

/* ---- controls row ------------------------------------------------------------------------- */
.controls { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: flex-end; margin: 0.5rem 0 1rem; padding: 0.75rem 0; border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }
.control { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; color: var(--ink-2); min-width: 0; max-width: 100%; }
.control > span:first-child { font-weight: 500; }
.control select, .control input[type="range"], .control input[type="number"] { font: inherit; font-size: 0.9rem; color: var(--ink); background: var(--surface); border: 1px solid var(--axis); border-radius: var(--radius); padding: 0.3rem 0.5rem; min-width: 0; max-width: 100%; width: auto; }
.controls { max-width: 100%; }
.seg { max-width: 100%; flex-wrap: wrap; }
.control input[type="range"] { padding: 0; border: 0; background: transparent; accent-color: var(--c1); }
.control .val { color: var(--ink); font-variant-numeric: tabular-nums; }
.control.is-off { opacity: 0.5; }
.control.is-off .seg button, .control.is-off input[type="range"] { cursor: not-allowed; }
.seg { display: inline-flex; border: 1px solid var(--axis); border-radius: var(--radius); overflow: hidden; }
.seg button { font: inherit; font-size: 0.85rem; padding: 0.3rem 0.7rem; border: 0; background: var(--surface); color: var(--ink-2); cursor: pointer; border-right: 1px solid var(--axis); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: color-mix(in srgb, var(--c1) 14%, var(--surface)); color: var(--ink); font-weight: 600; }
.check { display: inline-flex; gap: 0.4rem; align-items: center; font-size: 0.9rem; color: var(--ink-2); }
.check input { accent-color: var(--c1); width: 16px; height: 16px; }

/* ---- callouts ----------------------------------------------------------------------------- */
.callout { border-left: 4px solid var(--axis); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; padding: 0.8rem 1rem; margin: 1.25rem 0; }
.callout p:last-child { margin-bottom: 0; }
.callout .kind { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); font-weight: 600; display: inline-flex; align-items: center; gap: 0.35rem; margin-bottom: 0.25rem; }
.callout.note { border-left-color: var(--c1); }
.callout.caveat { border-left-color: var(--serious); }
.callout.pending { border-left-color: var(--warning); border-style: dashed; border-width: 0 0 0 4px; }
.callout.pending .kind::before { content: "◔"; }
.callout.caveat .kind::before { content: "▲"; }
.callout.note .kind::before { content: "●"; }
.pending-block { border: 1px dashed var(--axis); border-radius: var(--radius); padding: 1rem 1.1rem; color: var(--ink-2); background: transparent; margin: 1rem 0; }
.pending-block .kind { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 0.25rem; }

/* ---- chips, badges, sample card ----------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0; min-height: 2rem; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--axis); border-radius: 999px; padding: 0.2rem 0.7rem; font-size: 0.9rem; background: var(--surface); color: var(--ink); }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chip.true { border-color: var(--ink); font-weight: 600; }
.chip.empty { border-style: dashed; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; padding: 0.3rem 0.8rem; border-radius: 999px; border: 1px solid var(--axis); background: var(--surface); }
.badge .icon { font-size: 1rem; line-height: 1; }
.badge.confident { border-color: var(--good); }
.badge.ambiguous { border-color: var(--warning); }
.badge.abstains { border-color: var(--serious); }
.badge.correct { border-color: var(--good); }
.badge.wrong { border-color: var(--critical); }
.badge.unmapped { border-color: var(--axis); }
.sample-card { background: var(--surface); border: 1px solid var(--grid); border-radius: var(--radius); padding: 1rem 1.1rem; }
.sample-card .who { font-size: 0.95rem; color: var(--ink-2); margin-bottom: 0.5rem; }
.sample-card .who b { color: var(--ink); }
.sample-card .answer { font-size: 1.05rem; margin: 0.4rem 0; }
.sample-card .answer.hidden-answer { filter: blur(6px); user-select: none; }
.sample-card .explain { color: var(--ink-2); font-size: 0.95rem; max-width: none; }

/* ---- tables ------------------------------------------------------------------------------- */
.table-wrap { overflow: auto; max-height: 520px; border: 1px solid var(--grid); border-radius: var(--radius); background: var(--surface); }
table.data { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.85rem; }
table.data th, table.data td { padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--grid); text-align: left; white-space: nowrap; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; color: var(--ink-2); font-weight: 600; border-bottom: 1px solid var(--axis); }
table.data tbody tr:hover td { background: color-mix(in srgb, var(--grid) 40%, transparent); }
table.data td .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.4rem; vertical-align: middle; }

/* ---- coverage strip (panel builder) ------------------------------------------------------- */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); gap: 4px; }
.strip .cell { border: 1px solid var(--axis); border-radius: 4px; padding: 0.25rem 0.2rem; text-align: center; font-size: 0.7rem; color: var(--muted); background: transparent; }
.strip .cell.on { color: var(--ink); border-color: var(--ink); background: color-mix(in srgb, var(--c1) 14%, var(--surface)); font-weight: 600; }

/* ---- misc --------------------------------------------------------------------------------- */
.kv { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 0.25rem 1rem; font-size: 0.9rem; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; }
.tour { counter-reset: tour; list-style: none; padding: 0; }
.tour li { counter-increment: tour; position: relative; padding-left: 2.4rem; margin: 0.6rem 0; max-width: var(--measure); }
.tour li::before { content: counter(tour); position: absolute; left: 0; top: 0.05rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--ink); color: var(--page); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.85rem; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.85rem; color: var(--ink-2); margin: 0.4rem 0; }
.legend-inline .key { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: 0.35rem; border-radius: 2px; }
.legend-inline .key.rect { height: 10px; border-radius: 2px; }
img.shot { max-width: 100%; height: auto; border: 1px solid var(--grid); border-radius: var(--radius); }
.svg-diagram { width: 100%; height: auto; }
.svg-diagram.wide { display: block; width: 100%; max-width: 960px; margin: 1rem 0; }
.svg-diagram text { font-family: var(--font); fill: var(--ink); }
.svg-diagram .box { fill: var(--surface); stroke: var(--axis); }
.svg-diagram .arrow { stroke: var(--ink-2); fill: none; }
.svg-diagram .fold { fill: none; stroke: var(--c1); stroke-dasharray: 6 4; }
.svg-diagram .num { font-weight: 600; }
.svg-diagram .verdict { stroke: var(--c2); stroke-width: 1.5; }
.svg-diagram .node { fill: var(--surface); stroke: var(--axis); }
.svg-diagram .caption, .svg-diagram .note { fill: var(--ink-2); font-size: 11px; }
.status { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; }
.status.good { color: var(--good); } .status.warning { color: var(--warning); } .status.serious { color: var(--serious); } .status.critical { color: var(--critical); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- team block (About) ------------------------------------------------------------------ */
.team-block { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 1.25rem 1.75rem; align-items: start; }
.team-block img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--grid); background: #f4efe6; }
.team-block p:last-child { margin-bottom: 0; }

/* ---- collapsible figure notes and tile sources -------------------------------------------- */
.fig-notes { margin: .4rem 0 0; font-size: .85rem; color: var(--ink-2); max-width: none; }
.fig-notes summary { cursor: pointer; font-weight: 500; }
.fig-notes p { margin: .3rem 0 0; max-width: none; overflow-wrap: anywhere; }
.tile-src { margin: .4rem 0 0; font-size: .8rem; color: var(--ink-2); max-width: none; }
.tile-src summary { cursor: pointer; font-weight: 500; }
.tile-src p, .tile-src div { margin: .3rem 0 0; max-width: none; overflow-wrap: anywhere; }

/* ---- overview (home) ---------------------------------------------------------------------- */
.overview { margin: 1.25rem 0 2rem; }
.overview .summary { font-size: 1.05rem; max-width: var(--measure); }
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: .5rem 2rem; }
.overview-grid ul { padding-left: 1.1rem; margin: .25rem 0 0; }
.overview-grid li { margin: .45rem 0; }

@media (max-width: 1100px) {
  nav.primary { gap: 0.15rem 0.7rem; }
  .theme-toggle { padding: 0.25rem 0.55rem; font-size: 0.8rem; }
  .site-header .wrap { gap: 0.6rem; }
}
@media (max-width: 640px) {
  .site-header .wrap { gap: 0.5rem; }
  .brand img.mark { width: 56px; height: 56px; }
  .team-block { grid-template-columns: 1fr; }
  .team-block img { max-width: 280px; }
  nav.primary { margin-left: 0; width: 100%; gap: 0.1rem 0.7rem; font-size: 0.9rem; }
  .figure .chart { min-height: 240px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .tile { padding: 0.75rem 0.8rem; min-height: 110px; }
  .tile .value { font-size: 1.7rem; }
  .controls { gap: 0.6rem 1rem; }
}
@media (max-width: 420px) {
  .tiles { grid-template-columns: 1fr; }
}
@media print {
  .site-header, .theme-toggle, .fig-toolbar { display: none; }
}

.answer-hidden select { filter: blur(5px); pointer-events: none; }

/* score your own samples */
.score-input textarea { width: 100%; box-sizing: border-box; font: 0.85rem var(--mono); color: var(--ink); background: var(--surface); border: 1px solid var(--axis); border-radius: var(--radius); padding: 0.5rem 0.6rem; resize: vertical; }
.score-input .control { max-width: none; }
.score-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 0.6rem; margin: 0.8rem 0; }
.score-cards .sample-card { padding: 0.7rem 0.8rem; font-size: 0.9rem; }
.score-cards .sample-card .who { margin-bottom: 0.3rem; }
#score-results .data td select { font: inherit; font-size: 0.8rem; }

/* ---- check samples (the product page) ---------------------------------------------------------- */
.hero { padding: 1.25rem 0 0.5rem; }
.hero h1 { max-width: 22ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.9rem 0; }
.hero-actions .btn { font-size: 0.95rem; padding: 0.5rem 1rem; }
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0.75rem; margin: 1.25rem 0 0.5rem; }
.trust-item { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.75rem 0.9rem; border: 1px solid var(--grid); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: 0.85rem; }
.trust-item:hover { border-color: var(--ink-2); }
.trust-value { font-size: 1.6rem; font-weight: 650; color: var(--ink); line-height: 1.1; }
.control.block { margin-top: 0.6rem; }
.control.inline { flex-direction: row; align-items: center; gap: 0.4rem; }
#in-text { width: 100%; font-family: var(--mono, ui-monospace, monospace); font-size: 0.8rem; border: 1px solid var(--axis); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 0.5rem; }
#table-controls { align-items: center; }
.tiles.compact .tile { min-height: 0; }
.table-wrap.wrap-head th { white-space: normal; vertical-align: bottom; min-width: 5.5rem; }
.table-wrap.wrap-head td { white-space: nowrap; }
.missing-mark { font-size: 0.8rem; color: var(--serious); white-space: nowrap; }
.tiles.compact .tile .value { font-size: clamp(1.4rem, 3vw, 1.9rem); }
table.results th button.sort { font: inherit; font-weight: 600; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; }
table.results tr.clickable { cursor: pointer; }
table.results tr.clickable:hover td, table.results tr.clickable:focus td { background: color-mix(in srgb, var(--c1) 8%, var(--surface)); }
table.results tr.clickable:focus { outline: 2px solid var(--c1); outline-offset: -2px; }
table.results tr.selected td { background: color-mix(in srgb, var(--c1) 14%, var(--surface)); }
table.results tr.flagged td:first-child { box-shadow: inset 3px 0 0 var(--serious); }
table.results .badge { padding: 0.1rem 0.5rem; font-size: 0.8rem; font-weight: 500; }
.drawer-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.drawer-head h2 { min-width: 0; overflow-wrap: anywhere; }
.drawer-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0; }
#drawer { border-top: 2px solid var(--c1); }
#drawer:focus { outline: none; }

/* multiomic: shared legend of the two PCA panels */
.pca-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; font-size: 0.82rem; color: var(--ink-2); align-self: end; }
.pca-legend .legend-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.pca-legend .swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* glossary (The science) */
dl.glossary { margin: 0.5rem 0 0; }
dl.glossary dt { font-weight: 650; margin-top: 0.8rem; color: var(--ink); }
dl.glossary dd { margin: 0.15rem 0 0; color: var(--ink-2); max-width: var(--measure); }

/* Check samples results table: wrap long cells so every column fits at 1024–1440 px */
table.results th, table.results td { white-space: nowrap; }
table.results td.wrap { white-space: normal; min-width: 4.5rem; }
table.results th button.sort { white-space: nowrap; }
@media (max-width: 1100px) { table.results th, table.results td { padding: 0.3rem 0.3rem; } table.results .badge { padding: 0.1rem 0.4rem; } }
.table-wrap.wrap-last td:last-child { white-space: normal; min-width: 14rem; }

/* phones: the header scrolls away instead of taking a quarter of the screen */
@media (max-width: 700px) {
  .site-header { position: static; }
}

/* ---- landing (Check samples) cards ------------------------------------------------------------------------ */
.eyebrow { font-size: 0.78rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c1); margin: 0 0 0.35rem; }
.card { background: var(--surface); border: 1px solid var(--grid); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 1.25rem 0; }
.card h2 { margin-top: 0; }
ol.steps { margin: 0.4rem 0 0.6rem; padding-left: 1.4rem; display: grid; gap: 0.35rem; }
section.accuracy { border-left: 4px solid var(--c1); padding: 0.4rem 0 0.4rem 1rem; margin: 1.5rem 0; }
section.accuracy h2 { margin: 0 0 0.3rem; font-size: 1.15rem; }
section.accuracy p { margin: 0; max-width: none; }
ul.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
ul.checklist li { padding-left: 1.5rem; position: relative; }
ul.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.optional { border: 1px dashed var(--axis); border-radius: var(--radius); padding: 0.8rem 1rem; }
.optional p { margin: 0.3rem 0; }
.optional .info { background: color-mix(in srgb, var(--c1) 8%, var(--surface)); border-radius: var(--radius); padding: 0.5rem 0.7rem; font-size: 0.9rem; }
.dropzone { border: 2px dashed var(--axis); border-radius: var(--radius); padding: 1.2rem; text-align: center; background: var(--page); transition: background 0.15s, border-color 0.15s; }
.dropzone p { margin: 0 0 0.6rem; max-width: none; }
.dropzone:focus { outline: 2px solid var(--c1); outline-offset: 2px; }
.dropzone.dragover { border-color: var(--c1); background: color-mix(in srgb, var(--c1) 10%, var(--surface)); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.input-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0.8rem 0 0.4rem; }
.input-row .control.inline select { width: auto; }
.local-note { color: var(--ink-2); }
#example-tables .table-wrap { max-height: none; }
#example-tables .grid-2 { grid-template-columns: 1fr; gap: 0.8rem; }
