/* EQ Research lab. Quiet and precise: a warm off-white page, white cards under long soft shadows, Inter, one blue
   accent for what you can press or what is chosen, soft tinted pills for state. No glows, no green. */
@font-face { font-family: "Inter"; src: url("inter-variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #fdfdfc;
  --surface: #ffffff;
  --ink: #111111;
  --ink-2: #55555b;
  --ink-3: #6b6b70;
  --line: rgba(17, 17, 17, 0.09);
  --line-2: rgba(17, 17, 17, 0.16);
  --hover: #f4f4f2;
  --accent: #3b82f6;
  --accent-ink: #2563eb;
  --accent-soft: #edf3fe;
  --danger: #c6342b;
  --danger-soft: #fdeeec;
  --warn: #8a5308;
  --warn-soft: #fcf3e3;
  --radius: 11px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(17, 17, 17, 0.05);
  --ring: 0 1px 3px rgba(17, 17, 17, 0.1);
  --lift: 0 1px 2px rgba(17, 17, 17, 0.07), 0 3px 10px -3px rgba(17, 17, 17, 0.14);
  --field: #f7f7f5;
  --line-soft: rgba(17, 17, 17, 0.06);
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 6px 18px -6px rgba(17, 17, 17, 0.12), 0 22px 44px -26px rgba(17, 17, 17, 0.2);
  --shadow-lg: 0 2px 6px rgba(17, 17, 17, 0.06), 0 12px 28px -10px rgba(17, 17, 17, 0.16), 0 32px 64px -30px rgba(17, 17, 17, 0.28);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Charter", Georgia, "Times New Roman", serif;
  --mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.55 var(--sans); -webkit-font-smoothing: antialiased; font-synthesis: none;
}
a { color: var(--ink); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
::selection { background: var(--accent-soft); color: var(--ink); }
input, textarea { caret-color: var(--accent-ink); }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
.prose, textarea.prose { font-family: var(--serif); font-size: 17px; line-height: 1.65; }
.prose p { margin: 0 0 0.9em; }
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.err { color: var(--danger); }
h1 { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 6px; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; margin: 0 0 12px; }
h3 { font-size: 13px; font-weight: 500; margin: 16px 0 6px; color: var(--ink-2); }

/* ---- frame: a quiet index on the left, the page beside it ---- */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.bar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px;
  padding: 28px 16px 22px 22px; z-index: 10;
}
.brand { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; padding: 0 10px; }
/* The first thing Tab reaches: out of sight until it has focus, then at the top left over the index. */
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 80; transform: translateY(-200%); background: var(--ink); color: var(--bg); font: 500 13.5px var(--sans); padding: 9px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); text-decoration: none; }
.skip-link:focus { transform: none; outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { text-decoration: none; color: var(--ink-2); white-space: nowrap; padding: 6px 10px; border-radius: 9px; font-size: 13.5px; transition: background 0.12s, color 0.12s; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a.on { background: var(--ink); color: #ffffff; font-weight: 500; box-shadow: none; }
.bar .who { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 4px; padding: 0 10px; font-size: 12.5px; color: var(--ink-3); }
.who .muted { color: var(--ink-3); }
.who .linkish { color: var(--ink-2); font-size: 12.5px; }

main { max-width: 1140px; width: 100%; margin: 0 auto; padding: 38px 40px 110px; }
.updated {
  position: fixed; top: 14px; right: 16px; z-index: 60; display: inline-flex; gap: 8px; align-items: center;
  font: 500 13px var(--sans); color: var(--ink); background: var(--surface); border: 0; border-radius: 999px; padding: 7px 13px;
  box-shadow: var(--shadow-lg); cursor: pointer;
}
.updated span { color: var(--accent-ink); }
/* The lab itself was updated: below the data's Updated, never on top of it. */
.lab-updated { top: auto; bottom: 18px; right: 50%; transform: translateX(50%); }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.head .muted { font-size: 13.5px; }
.panel { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 18px; }
.panel > h2:first-child { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.right { margin-left: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---- controls ---- */
.btn, .ghost {
  font: 500 13.5px/1.3 var(--sans); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border: 0; border-radius: 10px; transition: background 0.12s, box-shadow 0.12s, transform 0.06s;
}
/* A sign before a button's word (public/lab.js icon): the word's colour, on the word's line. */
.ic { display: inline-block; flex: none; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.ic svg { display: block; }
.btn > .ic, .ghost > .ic { margin-right: 0; }
.small-btn > .ic { width: 12px; height: 12px; }
.small-btn > .ic svg { width: 12px; height: 12px; }
.btn { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.btn:hover { background: #2f76ef; }
.btn:active, .ghost:active { transform: translateY(0.5px); }
.btn:disabled, .ghost:disabled { opacity: 0.45; cursor: default; transform: none; }
.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.16), 0 1px 1px rgba(17, 17, 17, 0.04); padding: 7px 12px; }
.ghost:hover { background: #f6f6f4; box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.26), 0 1px 1px rgba(17, 17, 17, 0.04); }
.ghost.on { background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--ink); text-decoration-color: currentColor; }
.btn:focus-visible, .ghost:focus-visible, .linkish:focus-visible, .nav a:focus-visible, .brand:focus-visible, .nav-menu:focus-visible, .hint:focus-visible, .scale button:focus-visible, .segs .seg:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

input[type=text], input[type=password], input[type=number], input[type=search], input[type=email], input[type=date], select, textarea {
  font: 14px/1.4 var(--sans); color: var(--ink); background: var(--field); border: 1px solid transparent; border-radius: 10px;
  padding: 8px 11px; width: 100%; box-shadow: none; transition: background 0.12s, box-shadow 0.12s;
}
/* A day (Jay, 2026-11-13: the browser's date box matched nothing): the same field as the others, its figures in the page's type, its
   calendar a quiet mark as a select's arrow is. A page that marks an empty one `blank` gets its mm/dd/yyyy as quiet as a placeholder. */
input[type=date] { -webkit-appearance: none; appearance: none; min-width: 0; min-height: 38px; font-variant-numeric: tabular-nums; }
input[type=date]::-webkit-datetime-edit, input[type=date]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
input[type=date].blank::-webkit-datetime-edit { color: var(--ink-3); }
input[type=date]::-webkit-calendar-picker-indicator { width: 14px; height: 14px; margin: 0 0 0 4px; padding: 2px; border-radius: 5px; opacity: 0.55; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none' stroke='%2355555b' stroke-width='1.3' stroke-linecap='round'%3E%3Crect x='1.75' y='2.75' width='10.5' height='9.5' rx='2'/%3E%3Cpath d='M1.75 5.75h10.5M4.5 1.5v2.5M9.5 1.5v2.5'/%3E%3C/svg%3E") no-repeat center / 14px 14px; }
input[type=date]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
/* A select clips its own label: the box is as wide as its row, but WebKit counts the clipped label (a script's or a prompt's
   full name) as the page's overflow, and Safari on an iPhone then zooms the whole page out to fit it. */
select {
  appearance: none; padding-right: 32px; cursor: pointer; overflow: hidden; text-overflow: ellipsis;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235f5f64' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
}
input:focus, select:focus, textarea:focus { outline: none; background-color: var(--surface); border-color: transparent; box-shadow: 0 0 0 1.5px rgba(59, 130, 246, 0.55), 0 0 0 4px rgba(59, 130, 246, 0.14); }
/* One focus rule for everything that is pressed (DESIGN-4 §2): a link, a button, a summary, a tab, a tick or a radio draws its ring on :focus-visible only (the keyboard's, 2px), and after a
   pointer press it has no outline and no shadow of the focus kind. Text fields and selects keep the ring above. A button's own look (its fill, its inset edge) is not touched: only what focus adds. */
a:focus:not(:focus-visible), button:focus:not(:focus-visible), summary:focus:not(:focus-visible), [role=tab]:focus:not(:focus-visible), [role=button]:focus:not(:focus-visible),
input[type=checkbox]:focus:not(:focus-visible), input[type=radio]:focus:not(:focus-visible) { outline: none; }
input[type=radio]:focus:not(:focus-visible) { box-shadow: none; background-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible, [role=tab]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=radio]:focus-visible { box-shadow: none; background-color: transparent; outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
textarea { resize: vertical; min-height: 90px; }
textarea.prose { min-height: 340px; padding: 16px 18px; }
textarea.code { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; min-height: 360px; tab-size: 4; background: #fbfbfa; }
label.field { display: block; }
label.field > span { display: block; color: var(--ink-2); font-size: 12.5px; font-weight: 500; margin-bottom: 5px; }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.check input { width: auto; margin: 0; }
input[type=radio] { accent-color: var(--ink); width: 15px; height: 15px; }
/* A tick box in the site's ink: a soft-edged square, black with a white tick when on; no tap flash, a ring for keys. */
input[type=checkbox] {
  appearance: none; -webkit-appearance: none; flex: none; width: 17px; height: 17px; margin: 0; border: 0; border-radius: 5px; cursor: pointer;
  background: var(--surface) no-repeat center / 12px 12px; box-shadow: inset 0 0 0 1.5px rgba(17, 17, 17, 0.28);
  transition: background-color 0.12s, box-shadow 0.12s; -webkit-tap-highlight-color: transparent; vertical-align: -3px;
}
input[type=checkbox]:hover { box-shadow: inset 0 0 0 1.5px rgba(17, 17, 17, 0.5); }
input[type=checkbox]:checked {
  background-color: var(--accent); box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3 5 8.6l4.6-5.2' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
input[type=checkbox]:indeterminate {
  background-color: var(--accent); box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6h6' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
input[type=checkbox]:disabled { opacity: 0.4; cursor: default; }
input[type=checkbox]:focus { outline: none; }
/* The keyboard's ring on a tick is the site's 2 px ring (the global focus rule above); a pointer press leaves none. */
input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: inset 0 0 0 1.5px rgba(17, 17, 17, 0.5); }
input[type=checkbox]:checked:focus-visible, input[type=checkbox]:indeterminate:focus-visible { box-shadow: none; }
td.check { -webkit-tap-highlight-color: transparent; vertical-align: middle; }
@media (max-width: 860px) { input[type=checkbox] { width: 20px; height: 20px; border-radius: 6px; background-size: 14px 14px; } }
/* A switch (a checkbox with role="switch"): gray when off, the accent when on, its white knob sliding across. */
input[type=checkbox].switch, input[type=checkbox].switch:checked {
  width: 34px; height: 20px; border-radius: 999px; box-shadow: none; vertical-align: middle;
  background: #d4d4cf radial-gradient(circle, #fff 0 7px, transparent 7.5px) no-repeat 2px 50% / 16px 16px;
  transition: background-color .15s, background-position .15s;
}
input[type=checkbox].switch:hover { background-color: #c6c6c0; box-shadow: none; }
input[type=checkbox].switch:checked { background-color: var(--accent); background-position: 16px 50%; }
input[type=checkbox].switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }

/* ---- lists ---- */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { color: var(--ink-3); font-size: 12px; font-weight: 500; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click td { transition: background 0.1s; }
/* Only a pointer that hovers marks the row under it: a tap on a phone would leave it marked, cell by cell. */
@media (hover: hover) { tr.click:hover td { background: var(--hover); } }
.scroll { overflow-x: auto; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: #f1f1ef; color: var(--ink-2); border: 0; }
.chip.ink { background: var(--accent-soft); color: var(--accent-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.err { background: var(--danger-soft); color: var(--danger); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #d9d9d6; margin-right: 6px; vertical-align: 1px; }
.dot.full { background: var(--accent); }

.stat { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 15px 16px; }
.stat b { display: block; font-size: 25px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-size: 12.5px; }
.flow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 18px; }

.scale { display: flex; gap: 5px; flex-wrap: wrap; }
.scale button { font: 500 13px var(--sans); min-width: 38px; padding: 6px 9px; border: 0; background: var(--field); border-radius: 9px; cursor: pointer; box-shadow: none; }
.scale button.on { background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }
.scale-ends { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 11.5px; margin-top: 4px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #151516; color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 70; max-width: 90vw; box-shadow: var(--shadow-lg); font-size: 13.5px; }
.toast.err { background: var(--danger); }
.box { background: var(--field); border-radius: var(--radius); box-shadow: none; padding: 16px 18px; max-height: 520px; overflow: auto; }
.box.tall { max-height: none; }
details > summary { cursor: pointer; color: var(--ink-2); }
details > summary:hover { color: var(--ink); }
pre.sheet { background: #141415; color: #e9e9ea; padding: 16px 18px; border-radius: var(--radius); overflow: auto; max-height: 520px; margin: 0; white-space: pre; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; }
.kv > span:nth-child(odd) { color: var(--ink-2); }
.empty { color: var(--ink-2); padding: 20px 0; }
.center { max-width: 420px; margin: 72px auto; }

/* version timeline: one draggable vertical bar, no slider */
.timeline { position: relative; height: 92px; background: var(--field); border-radius: var(--radius); box-shadow: none; touch-action: none; user-select: none; cursor: ew-resize; overflow: hidden; }
.timeline svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.timeline .playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); margin-left: -1px; pointer-events: none; }
.timeline-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; color: var(--ink-2); font-size: 12.5px; }
ins.added { background: var(--accent-soft); text-decoration: none; }

/* ---- shared additions ---- */
.row.nowrap { flex-wrap: nowrap; }
.row.nowrap input { flex: 1; min-width: 0; }
del { color: var(--ink-3); text-decoration: line-through; }
ins.added { display: block; }
.changes .change { padding: 8px 12px; border-radius: 8px; background: var(--hover); margin: 0 0 12px; font-family: var(--serif); font-size: 15px; line-height: 1.6; }
.changes .change del, .changes .change ins { display: block; white-space: pre-wrap; }
.changes .change del + ins { margin-top: 6px; }
.notice { background: var(--warn-soft); color: var(--warn); padding: 8px 20px; font-size: 12.5px; }
.counter { color: var(--ink-3); font-size: 12px; }
.counter.ok { color: var(--ink); }
.brief { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 18px; }
.brief b { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.brief p { margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.6; }
.section-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 20px 0 8px; }
.section-label span:first-child { font-size: 14px; font-weight: 500; }
.section-label .muted { font-size: 12.5px; }
p.hint { color: var(--ink-2); font-size: 12.5px; margin: -2px 0 8px; }
.pid { white-space: nowrap; color: var(--ink-3); }
.json { overflow-wrap: anywhere; white-space: normal; }

@media (max-width: 860px) {
  .shell { display: block; }
  .bar {
    height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px 10px;
    background: rgba(253, 253, 252, 0.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: 0 1px 0 var(--line);
  }
  .bar .who { margin-top: 0; margin-left: auto; flex-direction: row; align-items: center; gap: 10px; padding: 0; }
  .bar .who .muted { display: none; }
  .nav { order: 3; width: 100%; flex-direction: row; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 2px 4px 4px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 11px; font-size: 13.5px; }
  main { padding: 22px 16px 96px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .kv { grid-template-columns: 110px 1fr; }
  .panel { padding: 16px; border-radius: 14px; }
  textarea.prose { min-height: 260px; }
  .hide-phone { display: none; }
  /* wide lists become stacked rows */
  /* wide lists become compact rows: the box and the first column on one line, the rest wrapping beneath */
  table.cards, table.cards tbody { display: block; width: 100%; }
  table.cards thead { display: none; }
  table.cards tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; border-bottom: 1px solid var(--line-soft); padding: 12px 0; }
  table.cards tbody tr:last-child { border-bottom: 0; }
  table.cards td { border: 0; padding: 0; width: auto; }
  table.cards tr > td:first-child:not(.check), table.cards td.check + td { flex: 1 1 calc(100% - 44px); }
  table.cards td.check { width: 22px; }
  table.cards td:empty { display: none; }
}

/* ---- page structure ---- */
.head { align-items: center; }
.head > div:first-child { min-width: 0; }
.head p { margin: 2px 0 0; max-width: 68ch; }
th, td { vertical-align: middle; }

/* One row of controls above a list: segmented choice first, search last and widest. */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.toolbar select { width: auto; height: 36px; padding-top: 0; padding-bottom: 0; }
.toolbar .search { flex: 1 1 240px; width: auto; height: 36px; margin-left: 0; max-width: none; }
.toolbar .segs { height: 36px; align-items: center; }

/* A list in a card that runs edge to edge; rows show a primary line and a quiet second line. */
.panel.flush { padding: 6px 0; overflow-x: auto; }
.panel.flush > table th:first-child, .panel.flush > table td:first-child, .panel.flush > .scroll-box > table th:first-child, .panel.flush > .scroll-box > table td:first-child { padding-left: 20px; }
.panel.flush > table th:last-child, .panel.flush > table td:last-child, .panel.flush > .scroll-box > table th:last-child, .panel.flush > .scroll-box > table td:last-child { padding-right: 20px; }
.panel.flush > .empty { padding: 22px; }
table.list th { padding-top: 12px; padding-bottom: 10px; }
table.list td { padding-top: 12px; padding-bottom: 12px; }
table.list .primary { min-width: 260px; }
table.list .line { display: flex; align-items: center; gap: 8px; }
table.list .title { font-weight: 500; }
.sub { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
td.sub { color: var(--ink-2); margin: 0; }
.clip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.list .qa .chip + .sub { margin-top: 4px; }
th.date, td.date { text-align: right; white-space: nowrap; color: var(--ink-2); font-size: 13px; }
th.num, td.num { text-align: right; white-space: nowrap; }

/* What can be done with ticked items: a dark bar at the foot of the window, apart from the cards beneath it. */
.selectionbar {
  position: fixed; left: calc(50% + 110px); bottom: 22px; transform: translate(-50%, 16px); z-index: 40; opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 16px; border-radius: 14px;
  background: var(--surface); color: var(--ink); box-shadow: 0 2px 6px rgba(17, 17, 17, 0.08), 0 16px 40px -12px rgba(17, 17, 17, 0.28);
  transition: opacity 0.16s, transform 0.16s; white-space: nowrap; font-size: 13.5px;
}
.selectionbar.shown { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.selectionbar > span { margin-right: 8px; color: var(--ink-3); }
.selectionbar button, .selectionbar summary { font: 500 13.5px var(--sans); color: var(--ink); background: transparent; border: 0; border-radius: 9px; padding: 7px 11px; cursor: pointer; list-style: none; }
.selectionbar summary::-webkit-details-marker { display: none; }
.selectionbar button:hover, .selectionbar summary:hover { background: var(--hover); }
.selectionbar .sb-primary { background: var(--accent); color: #ffffff; }
.selectionbar .sb-primary:hover { background: #4b8df7; }
.selectionbar .sb-close { color: var(--ink-3); font-size: 17px; line-height: 1; padding: 7px 10px; }
details.menu { position: relative; }
details.menu .menu-list { position: absolute; left: 0; min-width: 160px; padding: 5px; border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); display: grid; z-index: 5; }
details.menu.up .menu-list { bottom: calc(100% + 8px); }
details.menu .menu-list button { color: var(--ink); text-align: left; padding: 7px 10px; border-radius: 8px; }
details.menu .menu-list button:hover { background: var(--hover); }
main:has(.selectionbar.shown) { padding-bottom: 120px; }

/* The score filter's thresholds, under the toolbar. */
.scorebox { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: -4px 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--surface); box-shadow: var(--ring), var(--shadow-sm); font-size: 13px; color: var(--ink-2); }
.scorebox:empty { display: none; }
.scorebox label { display: inline-flex; align-items: center; gap: 6px; }
.scorebox input[type=number] { height: 30px; padding: 0 8px; }

@media (max-width: 860px) {
  .toolbar .search { max-width: none; flex-basis: 100%; margin-left: 0; order: -1; }
  .toolbar .segs { overflow-x: auto; max-width: 100%; }
  /* On a phone the bar fits the window: how many are ticked and the close on one line, the actions under them. */
  .selectionbar { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: translate(0, 16px); max-width: none;
    overflow: visible; flex-wrap: wrap; row-gap: 6px; padding: 8px 8px 8px 14px; -webkit-mask-image: none; mask-image: none; }
  .selectionbar.shown { transform: translate(0, 0); }
  .selectionbar > span { flex: 1 1 calc(100% - 52px); }
  .selectionbar .sb-close { order: 1; }
  .selectionbar > :not(span):not(.sb-close) { order: 2; }
  .selectionbar .sb-primary { flex: 1 1 auto; }
  .toolbar .segs .seg { padding: 5px 9px; }
  /* Card rows carry their own padding; a plain table keeps its first column in line with its head. */
  .panel.flush > table.cards td:first-child, .panel.flush > .scroll-box > table.cards td:first-child { padding-left: 0; }
  table.cards.list tr { padding: 12px 16px; }
  table.cards.list td.check { width: auto; }
  td.date { text-align: left; }
}
.clip.wide { max-width: 440px; }

/* ---- reading a piece: the text at reading width, the writer's own notes beside it ---- */
.head .meta { margin-top: 6px; gap: 8px; }
.reading { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; margin-bottom: 18px; }
.reading .piece { padding: 30px 36px 18px; margin: 0; }
.reading .piece .prose { max-width: 66ch; margin-top: 12px; }
.side-notes { display: grid; gap: 12px; position: sticky; top: 24px; }
.side-notes .panel { margin: 0; padding: 16px 18px; }
.side-notes p { margin: 6px 0 0; white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.side-notes .brief-text { font-family: var(--serif); font-size: 15px; }
.side-notes .note-block + .note-block { margin-top: 20px; padding-top: 0; border-top: 0; }
ul.plain { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
@media (max-width: 1000px) {
  .reading { grid-template-columns: 1fr; }
  .side-notes { position: static; }
  .reading .piece { padding: 20px 18px 8px; }
}

/* ---- Overview: the research loop as one row of stages ---- */
.loop { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin-bottom: 18px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.stage { position: relative; display: block; padding: 18px 18px 18px; text-decoration: none; color: var(--ink); transition: background 0.12s; }
.stage + .stage { box-shadow: -1px 0 0 var(--line); }
.stage:hover { background: #fafaf8; }
.stage-step { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: var(--ink-3); background: rgba(17, 17, 17, 0.06); box-shadow: none; margin-bottom: 14px; }
.stage.done .stage-step { background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }
.stage.live .stage-step { background: var(--accent); color: #fff; box-shadow: none; }
.stage-title { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.stage-value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stage-label { font-size: 12.5px; color: var(--ink-2); }
.stage-detail { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
table.compact td, table.compact th { padding: 8px 0; }
table.compact td + td, table.compact th + th { padding-left: 12px; }
.split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.split b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.split span { font-size: 12.5px; color: var(--ink-2); }
ul.activity { list-style: none; margin: 0; padding: 0; }
ul.activity li { display: flex; align-items: baseline; gap: 4px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
ul.activity li:last-child { border-bottom: 0; }
ul.activity .who-did { font-weight: 500; }
ul.activity .date { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 1100px) { .loop { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stage:nth-child(4) { box-shadow: 0 -1px 0 var(--line); } .stage:nth-child(n+5) { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); } }
@media (max-width: 860px) { .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stage { box-shadow: 0 -1px 0 var(--line) !important; } .stage:nth-child(-n+2) { box-shadow: none !important; } .stage:nth-child(even) { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line) !important; } .stage:nth-child(2) { box-shadow: -1px 0 0 var(--line) !important; } }
th.date { color: var(--ink-3); font-size: 12px; font-weight: 500; }
td.check, th.check { display: table-cell; }
.reading .piece .prose { max-width: 70ch; }
main:has(.reading) { max-width: 1180px; }
@media (max-width: 860px) {
  /* Phone list rows on one grid: the box, the piece with its date on the right, then its state beneath. */
  table.cards.list tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 6px; align-items: start; }
  table.cards.list tr:has(td.check) { grid-template-columns: 34px minmax(0, 1fr) auto; }
  /* The tick column runs the card's whole height, from its left edge: a wide strip to tap, apart from the piece. */
  table.cards.list tr > td.check, .panel.flush > table.cards.list tr > td.check, .panel.flush > .scroll-box > table.cards.list tr > td.check { grid-row: 1 / span 3; align-self: stretch; display: flex; align-items: center; margin: -14px 0 -14px -16px; padding: 0 0 0 16px; cursor: pointer; }
  table.cards.list td.primary { grid-column: 1; grid-row: 1; min-width: 0; }
  table.cards.list tr:has(td.check) td.primary { grid-column: 2; }
  table.cards.list td.date { grid-column: -2; grid-row: 1; text-align: right; font-size: 12.5px; }
  table.cards.list td:not(.check):not(.primary):not(.date) { grid-column: 1 / -1; }
  table.cards.list tr:has(td.check) td:not(.check):not(.primary):not(.date) { grid-column: 2 / -1; }
  table.cards.list td.qa { display: flex; align-items: center; gap: 8px; }
  table.cards.list td.qa .sub { margin: 0; }
  table.cards.list td.num { text-align: left; }
}
@media (max-width: 860px) {
  table.cards.list td, .panel.flush > table.cards.list td:first-child, .panel.flush > table.cards.list td:last-child, .panel.flush > .scroll-box > table.cards.list td:first-child, .panel.flush > .scroll-box > table.cards.list td:last-child { padding: 0; }
  table.cards.list tr { padding: 14px 16px; }
}
.group + .group, .group + details { margin-top: 26px; }
.group-head { display: flex; align-items: baseline; gap: 12px; margin: 0 2px 10px; }
.group-head h2 { margin: 0; }
.group table { table-layout: fixed; }
.group th:nth-child(1) { width: 48%; } .group th:nth-child(2) { width: 28%; } .group th:nth-child(3) { width: 10%; } .group th:nth-child(4) { width: 14%; }
.group td.mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Disclosures: a thin chevron after the label that turns when open, instead of the browser's triangle. */
details > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; color: var(--ink-2); font-weight: 500; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
  content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform 0.15s; opacity: 0.55;
}
details[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
details > summary:hover { color: var(--ink); }
details.panel > summary { margin: -4px 0; padding: 4px 0; }
details.panel[open] > summary { margin-bottom: 12px; }
.selectionbar details > summary::after, details.menu > summary::after { display: none; }

/* ---- forms in a card: labelled fields on a grid, the sentence-like draw line, the action at the foot ---- */
.head-actions { display: flex; align-items: center; gap: 12px; }
.form-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.newlist .draw-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.newlist .draw-line input[type=number] { width: 72px; height: 36px; }
.newlist input[type=search] { margin-top: 14px; }
.inline-more { margin-left: 8px; display: inline-flex; align-items: center; gap: 8px; }
.inline-more > summary { font-weight: 400; font-size: 13px; }
.inline-more[open] { gap: 10px; }
.inline-more input { width: 160px; height: 32px; }
.form-foot { display: flex; justify-content: flex-end; margin-top: 22px; padding-top: 0; border-top: 0; }
.newlist table.pick { margin-top: 10px; }
.newlist .picklist, .newlist table.pick tbody { max-height: 360px; }
table.ranked td.rank, table.ranked th.rank { width: 44px; color: var(--ink-3); font-size: 12.5px; }
tr.faint td { color: var(--ink-3); }
@media (max-width: 860px) {
  .form-grid { grid-template-columns: 1fr; }
  .head-actions { width: 100%; justify-content: space-between; }
}

/* ---- loading: a page's outline while its data is on the way, built from the page's own elements with a grey bar
   where each line of text will be (sized to that line, so nothing moves when the data lands), and a small turning ring
   on a button at work ---- */
.sk { display: inline-block; height: 0.62em; max-width: 100%; vertical-align: middle; border-radius: 4px; background: #eeeeeb; }
main.outline .sk, .sk-lines .sk { animation: sk-breathe 1.6s ease-in-out infinite; }
@keyframes sk-breathe { 50% { opacity: 0.45; } }
.sk-line { display: block; margin: 0.465em 0; }
.prose .sk-line { margin: 0.515em 0; }
.sk-lines { padding: 1px 0; }
.sk-box { width: 15px; height: 15px; border-radius: 4px; vertical-align: -2px; }
.sk-button { display: block; width: 118px; height: 34px; border-radius: 10px; }
.sk-control { display: block; height: 36px; border-radius: 10px; }
.sk-segs { width: 310px; } .sk-select { width: 113px; } .sk-select.wide { width: 226px; }
.sk-search { flex: 1 1 220px; max-width: 340px; margin-left: auto; }
.sk-input { display: block; width: 100%; height: 38px; border-radius: 10px; }
main.outline .stage-step { box-shadow: inset 0 0 0 1px var(--line); }
main.outline .stage, main.outline tr { cursor: default; }
main.outline .stage:hover { background: none; }
/* index.html's own outline of the index, until the app has started. */
.sk-nav .sk { display: block; height: 9px; margin: 12px 10px; }
.sk-nav .sk:nth-child(3n+1) { width: 64px; } .sk-nav .sk:nth-child(3n+2) { width: 52px; } .sk-nav .sk:nth-child(3n) { width: 74px; }
@media (max-width: 860px) {
  .sk-segs { width: 100%; } .sk-select, .sk-select.wide { flex: 1 1 40%; }
  .sk-search { flex-basis: 100%; max-width: none; margin-left: 0; order: -1; }
  .sk-nav .sk { flex: none; margin: 10px 8px; }
}
.working { position: relative; color: transparent !important; cursor: progress; }
.working > * { visibility: hidden; }
.working:disabled { opacity: 1; }
.working::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; box-sizing: border-box;
  border-radius: 50%; border: 1.5px solid var(--line-2); border-top-color: var(--ink-2); animation: spin 0.7s linear infinite;
}
.btn.working::after { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none !important; } .working::after { animation-duration: 1.8s; } }


/* ---- sideways: something that scrolls sideways fades on the side where more is hidden (lab.js watchSideways) ---- */
.hscroll.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.hscroll.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.hscroll.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.nav-row { display: contents; }
.nav-more { display: none; }
@media (max-width: 860px) {
  /* The index row: the arrows span its height, so they sit on the middle of the page names, over a fade into the bar. */
  .nav-row { display: block; position: relative; order: 3; width: 100%; }
  .nav-row .nav { order: initial; width: auto; margin: 0 -4px; padding: 3px 4px; }
  /* The names fade out under the arrow (the bar shows through, nothing is painted over it). */
  .nav.hscroll.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 76px), transparent calc(100% - 32px)); mask-image: linear-gradient(to right, #000 calc(100% - 76px), transparent calc(100% - 32px)); }
  .nav.hscroll.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 76px), transparent calc(100% - 32px)); mask-image: linear-gradient(to left, #000 calc(100% - 76px), transparent calc(100% - 32px)); }
  .nav.hscroll.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent 32px, #000 76px, #000 calc(100% - 76px), transparent calc(100% - 32px)); mask-image: linear-gradient(to right, transparent 32px, #000 76px, #000 calc(100% - 76px), transparent calc(100% - 32px)); }
  .nav-more { position: absolute; top: 0; bottom: 0; width: 36px; padding: 0; border: 0; background: none; cursor: pointer; place-items: center; }
  .nav-more.right { right: -4px; justify-items: end; padding-right: 4px; }
  .nav-more.left { left: -4px; justify-items: start; padding-left: 14px; }
  .nav-more svg { width: 8px; height: 14px; fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .bar:has(.nav.more-right) .nav-more.right, .bar:has(.nav.more-left) .nav-more.left { display: grid; }
}

/* The index: the lab's two parts (Dashboard; Send for review), each a bold link with the pages beneath it indented on a
   thin line; the tutorial, settings and members at the foot. On a phone, one row with a hairline between the parts. */
.nav { flex: 1; min-height: 0; overflow-y: auto; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group + .nav-group { margin-top: 8px; }
/* The main items are words in the ink colour, a little heavier than the pages beneath them (Jay, 2026-11-05: no frames and no
   icons, nobody knows what that means); the one you are on is filled. The pages beneath sit indented, no line. */
.nav a.top { display: flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink); padding: 8px 10px; }
.nav a.top:hover { background: var(--hover); }
.nav a.top.on { color: #fff; background: var(--ink); }
.nav-subs { display: flex; flex-direction: column; gap: 1px; margin: 4px 0 0 14px; }
.nav-subs:empty { display: none; }
.nav-group.foot { margin-top: auto; padding-top: 18px; }
.nav-group.foot a { font-size: 13px; color: var(--ink-3); padding: 5px 10px; }
.nav-group.foot a.on { color: #fff; }
.nav-head { display: none; }
@media (max-width: 860px) {
  .nav { flex: none; overflow-y: visible; }
  .nav-group, .nav-subs { flex-direction: row; align-items: center; gap: 4px; flex: none; }
  .nav-subs { margin: 0; }
  .nav-group + .nav-group { margin-top: 0; margin-left: 6px; }
  .nav a.top { padding: 7px 11px; gap: 7px; }
  .nav-group.foot { margin-top: 0; padding-top: 0; }
  .nav-group.foot a { font-size: 13.5px; padding: 6px 11px; }
}

/* A page says what it is by its title; the sentence about it waits behind the question mark beside the title. */
.head h1 .hint { width: 17px; height: 17px; margin-left: 10px; font-size: 11px; vertical-align: middle; top: -0.12em; }

/* Back, at the top left of a page under a list: to where you came from, or up to the list. A wide target. */
a.back { display: inline-flex; align-items: center; gap: 7px; margin: -8px 0 8px -10px; padding: 9px 12px 9px 10px; min-height: 40px; border-radius: 10px;
  color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-decoration: none; }
a.back span { font-size: 15px; line-height: 1; }
a.back:hover { background: var(--hover); color: var(--ink); }
@media (max-width: 860px) { a.back { min-height: 44px; margin: -6px 0 6px -12px; } }

/* An iPhone zooms into any field whose text is under 16px when it is tapped, and the page then looks cut off at the left
   (Jay, 2026-11-03, a prompt's rubric page). On phones every field's text is 16px. */
@media (max-width: 860px) {
  input, select, textarea { font-size: 16px !important; }
}

/* Sign in with Google as Google's branding guidelines draw it (light theme, pill): white fill, 1px #747775 outline, Roboto Medium
   14/20 in #1F1F1F, the four-colour G at 20px, 12px padding and 12px between the G and the label, 40px tall; hover and press
   tint as Google's own button does. The G is never recoloured. Roboto here is only the label's letters (OFL-Roboto.txt). */
@font-face { font-family: "Roboto"; src: local("Roboto Medium"), local("Roboto-Medium"), url("roboto-500-signin.woff2") format("woff2");
  font-weight: 500; font-display: swap; unicode-range: U+20, U+47, U+53, U+65, U+67-69, U+6C, U+6E-6F, U+74, U+77; }
.gbtn { display: inline-flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; box-sizing: border-box; border: 1px solid #747775;
  border-radius: 20px; background: #fff; color: #1f1f1f; font: 500 14px/20px "Roboto", Arial, sans-serif; letter-spacing: .25px;
  text-decoration: none; white-space: nowrap; align-self: flex-start; transition: background-color .218s, box-shadow .218s; }
.gbtn:hover { background: #eeeeee; box-shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15); }
.gbtn:active, .gbtn:focus-visible { background: #e6e6e6; }
.gbtn:focus-visible { outline: 2px solid #4285f4; outline-offset: 2px; }
.gmark { display: inline-flex; width: 20px; height: 20px; flex: none; }
.gmark svg { display: block; width: 20px; height: 20px; }
/* Results: grades on another scale, each scale its own cards. */
.scale-group { margin-top: 18px; }
.scale-name { font-size: 14px; font-weight: 600; margin: 0 0 8px; color: var(--ink-2); }

/* ---- one contract for `hidden`: a component's own display rule never shows what is hidden (Jay, 2026-11-04: rubric source
   details stood open because .made-from set display: grid) ---- */
[hidden] { display: none !important; }

/* ---- the bar on a phone: two short rows. The brand and Menu; the three main entries side by side. Samples, the foot and the
   account open from Menu as a list; nothing scrolls sideways. ---- */
.nav-menu, .nav-panel { display: none; }
@media (max-width: 860px) {
  .bar { gap: 8px 10px; padding: 8px 12px 10px; }
  .bar .brand { flex: 1 1 auto; padding: 0 2px; }
  .bar > .who { display: none; }
  .nav-menu { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--hover); color: var(--ink); font: 500 13.5px var(--sans); cursor: pointer; }
  .bar.menu-open .nav-menu { background: var(--ink); color: #fff; }
  .nav-row .nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin: 0; padding: 0; overflow: visible; }
  .nav.hscroll, .nav.hscroll.more-left, .nav.hscroll.more-right { -webkit-mask-image: none; mask-image: none; }
  .nav-more { display: none !important; }
  .nav-subs, .nav-group.foot { display: none !important; }
  .nav-group + .nav-group { margin-left: 0; }
  .nav a.top { justify-content: center; min-height: 44px; padding: 6px 8px; font-size: 13px; white-space: nowrap; background: var(--hover); }
  .nav a.top.on { background: var(--ink); }
  .nav-panel:not([hidden]) { display: grid; order: 4; width: 100%; gap: 6px; padding: 8px 0 2px; border-top: 1px solid var(--line); }
  .nav-panel-group { display: flex; flex-wrap: wrap; gap: 2px 4px; }
  .nav-panel-group + .nav-panel-group { padding-top: 6px; border-top: 1px solid var(--line-soft); }
  .nav-panel a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
  .nav-panel a.on { background: var(--ink); color: #fff; }
  .nav-panel-who { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; }
}

/* Long lists, a page at a time (public/lab.js pager, autoPage): no list makes the page longer. The pager sits at the list's foot;
   a list that cannot be paged scrolls inside its own box, its head kept in view. Rows of other pages are hidden even where a
   phone draws rows as cards. */
table.cards tr[hidden] { display: none !important; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 10px 2px 0; }
.pager[hidden] { display: none; }
.pager-where { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 9em; text-align: center; }
.pager button:disabled { opacity: 0.4; cursor: default; }
.rta-card > .pager { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
/* A list's box holds all of it: something placed absolutely inside (a label only read aloud) stays in the box instead of growing the page,
   so the box can reach the window's bottom (Jay, 2026-11-05, Review records: why does this not extend to the bottom). */
.scroll-box { position: relative; max-height: min(62vh, 560px); overflow-y: auto; overscroll-behavior: contain; }
.scroll-box.tall { max-height: calc(100vh - 280px); min-height: 320px; }
.pager-top > .pager { margin: 0 2px 10px; }
.scroll-box > table > thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
@media (max-width: 860px) {
  .pager { justify-content: space-between; }
  .pager button { min-height: 44px; min-width: 88px; }
  .scroll-box, .scroll-box.tall { max-height: 65vh; min-height: 0; }
}
.with-icon { display: inline-flex; align-items: center; gap: 7px; }
.with-icon svg { flex: none; }

/* What opens in place (Preview, Read, Details, a prompt's rubric) is a fold toggle with a chevron that turns, never an underlined link;
   a link that leaves the page ends in ›. */
.disclose { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; margin: -3px -8px; border: 0; border-radius: 7px; background: none;
  color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background 0.15s, color 0.15s; }
/* It opens below, so it points down (closed) and up (open); a right-pointing › is kept for links to other pages (Jay, 2026-11-04). */
.disclose::after { content: ""; flex: none; width: 6px; height: 6px; margin: 0 1px 4px 1px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg); transition: transform 0.15s; }
.disclose[aria-expanded="true"]::after { transform: rotate(-135deg); margin-bottom: -2px; }
.disclose:hover { background: var(--hover); color: var(--ink); }
.disclose[aria-expanded="true"] { color: var(--ink); }
.disclose:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* A button that opens something under it says so with a chevron drawn here, centred on its words and turned when open (Jay, 2026-11-13: the arrows are not aligned: the ⌄ and ⌃ characters sit at
   different heights in the font). Its words are only the words: "Read", "Stages". */
.caret { display: inline-flex; align-items: center; gap: 6px; }
.caret::after { content: ""; flex: none; width: 6px; height: 6px; margin: 0 1px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.16s ease-out; }
.caret[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
@media (prefers-reduced-motion: reduce) { .caret::after { transition: none; } }
/* After a pointer press no ring, whatever key without movement follows it (app.js keeps data-input). */
:root[data-input="pointer"] :focus-visible { outline: none; }
.send-rubrics-empty { margin: 4px 2px 0; color: var(--ink-2); font-size: 13.5px; }

/* More below: the rows fade out at the box's foot (a mask, so it works over cards, tables and boards alike). */
.scroll-box.more-below, .approval-groups.more-below, .board-scroll.more-below {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), rgba(0, 0, 0, 0.12));
  mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), rgba(0, 0, 0, 0.12)); }

/* Something the lab is working through turns a small spinner beside its words; still when motion is reduced. */
.spin { display: inline-block; flex: none; width: 10px; height: 10px; margin: 0 6px 0 0; border: 1.6px solid currentColor; border-right-color: transparent; border-radius: 50%;
  vertical-align: -1px; opacity: 0.85; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; border-right-color: currentColor; opacity: 0.5; } }

/* A page whose list scrolls in its own tall box needs no room under it for what floats there: the box keeps clear itself (2026-11-05). */
@media (min-width: 861px) { main:has(.scroll-box.tall) { padding-bottom: 24px; } }

/* ---- motion (Jay, 2026-11-05: the whole UI can have a little animation) ------------------------------------------------------------
   Short and quiet, only opacity and position (each leaves nothing behind once done: a lasting animation would make the page its
   own layer, under the header, whatever it holds): a page fades in and its panels and cards rise into place; what opens in place
   drops in; menus, toasts, sheets and new chat messages arrive; a pressed button gives a little. A page only moves when it is
   new (a refresh of the same page stays still), never transforms the page itself (the selection bar is fixed inside it), and
   nothing moves for someone whose system asks for less motion. */
:root { --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-5px); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px) scale(0.97); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes pill-in { from { background: transparent; box-shadow: none; } }

main.page-enter { animation: fade-in 0.2s ease-out backwards; }
main.page-enter .panel, main.page-enter .rs-card, main.page-enter .dash-section, main.page-enter .stage, main.page-enter .dl-main { animation: rise-in 0.3s var(--ease-out) backwards; }
main.page-enter .rs-grid > .rs-card:nth-child(2), main.page-enter .dash-section:nth-of-type(2) { animation-delay: 0.04s; }
main.page-enter .rs-grid > .rs-card:nth-child(3), main.page-enter .dash-section:nth-of-type(3) { animation-delay: 0.08s; }
main.page-enter .rs-grid > .rs-card:nth-child(n+4), main.page-enter .dash-section:nth-of-type(n+4) { animation-delay: 0.12s; }
main.page-enter .subnav a[aria-current="page"] { animation: pill-in 0.26s var(--ease-out); }

tr.history-row > td > *, tr.rubric-row > td > * { animation: drop-in 0.22s var(--ease-out) backwards; }
tr.piece-under { animation: fade-in 0.2s ease-out backwards; }
details.menu[open] > .menu-list { animation: pop-in 0.14s var(--ease-out); transform-origin: top center; }
.toast { animation: toast-in 0.22s var(--ease-out); }
div.sheet { animation: fade-in 0.16s ease-out; }
div.sheet > .sheet-card { animation: rise-in 0.26s var(--ease-out); }
.workspace-chat-message { animation: rise-in 0.2s var(--ease-out); }
.btn:active, .ghost:active, .seg:active { transform: scale(0.97); }

@media (prefers-reduced-motion: reduce) {
  main.page-enter, main.page-enter .panel, main.page-enter .rs-card, main.page-enter .dash-section, main.page-enter .stage, main.page-enter .dl-main,
  main.page-enter .subnav a[aria-current="page"], tr.history-row > td > *, tr.rubric-row > td > *, tr.piece-under, details.menu[open] > .menu-list,
  .toast, div.sheet, div.sheet > .sheet-card, .workspace-chat-message { animation: none !important; }
  .btn:active, .ghost:active, .seg:active { transform: none; }
}

/* The mark at a long list's end: when it comes into sight the next rows come (lab.js whenSeen; Jay, 2026-11-05: "all scroll"). */
.scroll-more { height: 1px; list-style: none; }
.piece-pick.scroll-box, .ctl-rows.scroll-box { padding-right: 4px; }

/* A list's row is a card on a phone (table.cards): its tint, ticked or pointed at, is the card's, never each cell's, which left
   patches with gaps between them (Jay, 2026-11-15: what kind of style is this). */
@media (max-width: 860px) {
  table.cards tbody tr.on, table.cards tbody tr.on:hover { background: var(--accent-soft); }
  table.cards tbody tr.on > td, table.cards tbody tr.click:hover > td { background: transparent; }
}
@media (max-width: 860px) and (hover: hover) {
  table.cards tbody tr.click:not(.on):hover { background: var(--hover); }
}
