/* Research lab pages. Tokens come from style.css. */

.flow .stat { position: relative; }
.flow .stat small { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select, .filters input[type=text] { width: auto; }
.filters input[type=text] { min-width: 220px; }
/* Actions on what is ticked float at the foot of the list. */
.actionbar {
  position: sticky; bottom: 16px; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px 12px; margin-top: 14px;
}
td.check, th.check { width: 30px; }
td.check input, th.check input { margin: 0; }
.scores { display: grid; grid-template-columns: 170px 40px 1fr; gap: 6px 12px; align-items: baseline; }
.scores .n { text-align: right; font-variant-numeric: tabular-nums; }
.calls td, .calls th { font-size: 12.5px; }
.lineage { font-size: 12.5px; color: var(--ink-2); }
.meter { display: inline-block; width: 120px; height: 6px; border-radius: 999px; background: #ececea; vertical-align: middle; position: relative; overflow: hidden; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 999px; }
.code-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kind { font-size: 11px; font-weight: 500; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 860px) {
  .scores { grid-template-columns: 120px 30px 1fr; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters select { width: 100%; }
  .filters input[type=text] { min-width: 0; grid-column: 1 / -1; }
  .actionbar { flex-wrap: nowrap; overflow-x: auto; bottom: 10px; scrollbar-width: none; }
  .actionbar::-webkit-scrollbar { display: none; }
  .actionbar > * { flex: none; white-space: nowrap; }
  /* Stacked rows lose their column headings, so numbers carry their own label. */
  table.cards td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-3); }
}
.readonly-field { background: var(--field); border-radius: var(--radius); box-shadow: none; padding: 12px 14px; white-space: pre-wrap; font-family: var(--serif); font-size: 15px; line-height: 1.6; }

/* Send for review: one grid of pieces by people. */
.grid-wrap { overflow: auto; max-height: calc(100vh - 190px); background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 14px 16px; }

/* Segmented control: one choice of a few, the chosen one tinted. */
.segs { display: inline-flex; gap: 2px; padding: 3px; background: #f1f1ef; border-radius: 12px; box-shadow: none; }
.segs .seg { font: 500 13px var(--sans); padding: 5px 12px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; border-radius: 9px; transition: background 0.12s, color 0.12s; }
.segs .seg:hover { color: var(--ink); }
.segs .seg[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--lift); }
table.pick .tick { width: 30px; }
table.pick .tick input { width: 15px; margin: 0; }
table.pick tr.on td { background: var(--accent-soft); }
@media (max-width: 860px) {
  /* One line for the box and the name, one for the counts. */
  table.pick tr { display: grid; grid-template-columns: 28px auto 1fr; gap: 2px 14px; align-items: baseline; padding: 8px 0; }
  table.pick td { padding: 0; width: auto; }
  table.pick td:nth-child(2) { grid-column: 2 / -1; }
  table.pick td:nth-child(3) { grid-column: 2; }
  table.pick td:nth-child(4) { grid-column: 3; }
  table.pick tr.on { background: var(--accent-soft); }
}

/* A writer's editorial answer, read in place. */
details.answer { margin-top: 6px; }
details.answer summary { cursor: pointer; color: var(--ink-2); }
details.answer dl { margin: 10px 0; display: grid; gap: 8px; }
details.answer dt { color: var(--ink-3); font-size: 11.5px; font-weight: 500; }
details.answer dd { margin: 0; white-space: pre-wrap; }
details.answer .note { margin-top: 10px; }
details.answer blockquote { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--hover); font-family: var(--serif); white-space: pre-wrap; }
details.answer .note p { margin: 4px 0 0; }

/* Generated: one card per way of writing. */
.way .kv { grid-template-columns: 64px 1fr; }
.way .kv .mono { overflow-wrap: anywhere; }

/* ---- code: CodeMirror (vendor/editor.js) in a quiet frame like a text field; a read-only file sits flush in its card */
.codebox { position: relative; background: var(--surface); border-radius: 10px; box-shadow: var(--lift); overflow: clip; transition: box-shadow 0.12s; }
.codebox:not(.readonly):focus-within { box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px rgba(59, 130, 246, 0.14); }
.codebox:not(.readonly) .cm-content, .codebox:not(.readonly) .cm-gutter { min-height: 240px; }
.codebox.tall:not(.readonly) .cm-content, .codebox.tall:not(.readonly) .cm-gutter { min-height: 420px; }
.codebox.json:not(.readonly) .cm-content, .codebox.json:not(.readonly) .cm-gutter { min-height: 150px; }
.codebox > textarea.code { display: block; border: 0; border-radius: 0; box-shadow: none; }
.codefile, .panel.figures { padding: 0; overflow: clip; }
.codefile .codebox { border-radius: 0; box-shadow: none; }
.codefile-head, .card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 20px 13px; border-bottom: 1px solid var(--line); }
.codefile-head h2, .card-head h3, .compare h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.title-line h1 { margin: 0; }
.head .meta + p { margin-top: 8px; }
.field-label { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; min-width: 0; }
.field-label > span:first-child { color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.field-label > .muted { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-hint { color: var(--ink-3); font-size: 12px; margin-top: 5px; }
.form-foot { align-items: center; gap: 10px; }
.form-foot.spread { justify-content: space-between; gap: 16px; }
.form-foot .foot-note { margin-right: auto; }

/* A script: new script or version as one form; the script beside a run, shown or edited in place. */
.script-form .script-fields { grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1.5fr); margin-bottom: 20px; }
.script-form .code-field + .code-field { margin-top: 20px; }
.script-panel > summary .summary-note { font-weight: 400; font-size: 13px; color: var(--ink-3); }
.script-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 14px; }
.script-body .form-foot { margin-top: 0; }
.script-line { display: flex; align-items: center; gap: 10px; min-height: 34px; min-width: 0; }
.script-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 14px; flex: none; }
.empty-state { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.empty-state p { margin: 0; color: var(--ink-2); }
.plan { color: var(--ink-2); font-size: 13px; min-width: 0; }
.plan b { color: var(--ink); font-weight: 500; }
.run-form .form-grid { align-items: start; }

/* Lists of batches, tasks, history and people, and sections that hold one. */
.block { margin-top: 26px; }
.head + .block { margin-top: 0; }
.block > .panel:last-child { margin-bottom: 0; }
.block-note { margin: -4px 2px 10px; }
details.retired { margin-top: 26px; }
details.retired > summary { margin: 0 2px 10px; font-size: 13.5px; }

/* Send for review: the task and who does it, then the grid of who reviews which piece, then Send. */
.send-form .send-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field.span2 { grid-column: span 2; }
.affix { position: relative; }
.affix > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.affix input { padding-left: 25px; }
/* Which pieces and who reviews them: a label, the ways to choose, and the chosen way's controls, one row each. */
.choose { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); gap: 12px 14px; align-items: center;
  margin-top: 26px; padding-top: 0; border-top: 0; }
.choose-label { font-size: 13px; color: var(--ink-2); }
.choose-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; min-height: 36px; font-size: 13.5px; }
.choose-line input[type=number] { width: 72px; height: 36px; }
.choose-line select { width: auto; min-width: 0; max-width: min(100%, 380px); height: 36px; padding-top: 0; padding-bottom: 0; }
.choose-line .inline-more { margin-left: 2px; }
.choose .segs { justify-self: start; }
@media (max-width: 860px) {
  .choose { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .choose-label:not(:first-child) { margin-top: 10px; }
  .send-fields .name-field { grid-column: 1 / -1; }
}
.legend { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.legend { column-gap: 14px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { font: 500 11px var(--mono); color: var(--ink-2); }
.foot-notes { display: grid; gap: 2px; min-width: 0; font-size: 12.5px; color: var(--ink-2); }
.foot-notes > span:first-child { color: var(--ink); font-size: 13px; }

/* A batch at a glance: facts under small labels, then what writers chose, what is owed, and the tasks. */
.batch-status .section-head { align-items: center; margin-bottom: 14px; }
.batch-status .section-head .row { gap: 10px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px 24px; margin: 0; }
.facts dt { font-size: 12px; color: var(--ink-3); margin: 0 0 2px; }
.facts dd { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.facts-note { margin: 20px 0 0; padding-top: 0; border-top: 0; display: grid; gap: 8px; }
.facts-note p { margin: 0; }
table.tasks td { vertical-align: top; }
table.tasks td.primary { min-width: 200px; }
table.tasks td.who { max-width: 170px; }
table.tasks td.texts { white-space: nowrap; }
table.tasks td.answer { min-width: 240px; max-width: 420px; }
table.tasks .sub.clip { max-width: 220px; font-size: 11.5px; }
table.tasks td.who .clip { display: inline-block; max-width: 150px; vertical-align: bottom; }
table.owed-list tfoot td { border-top: 1px solid var(--line-2); font-weight: 500; padding-top: 12px; padding-bottom: 12px; }

/* Dashboard: what is on it now and how to replace it, then the pushed scores. */
.feed-now .facts { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.feed-empty { margin: 0; }
.inline-field { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink-2); font-size: 13px; }
.inline-field > span { white-space: nowrap; }
.inline-field select { width: auto; min-width: 0; max-width: 380px; height: 36px; padding-top: 0; padding-bottom: 0; }
table.feed th.num.dim { white-space: normal; line-height: 1.3; min-width: 62px; max-width: 96px; }
table.feed td.overall { font-weight: 500; }
.phone-only { display: none; }
@media (max-width: 520px) { .wide-only { display: none; } }

/* Results: one card per comparison, small tables of figures side by side. */
.notice.rounded { border-radius: 10px; margin: 0 0 16px; padding: 10px 14px; }
.compare .section-head { align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.compare-export > .row { margin: 0 !important; flex-wrap: nowrap; }
.compare-export select { width: auto; height: 34px; padding-top: 0; padding-bottom: 0; font-size: 13px; }
.compare-export .ghost { white-space: nowrap; }
.split.figures4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 20px; }
.figures4 > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.figures4 small { color: var(--ink-3); font-size: 12px; line-height: 1.4; margin-top: 2px; }
table.stats th, table.stats td { padding-top: 9px; padding-bottom: 9px; }
table.dims { margin-top: 18px; }
table.dims th:first-child, table.dims td:first-child { padding-left: 0; }
table.dims th:last-child, table.dims td:last-child { padding-right: 0; }
.cards-grid { align-items: start; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.figures .scroll > table th:first-child, .figures .scroll > table td:first-child { padding-left: 20px; }
.figures .scroll > table th:last-child, .figures .scroll > table td:last-child { padding-right: 20px; }
.cards-grid > .panel { margin-bottom: 0; }

/* Settings: the gate's scripts as a list to tick, the thresholds on one row, the save at the foot. */
.settings-form > h2 { margin-bottom: 4px; }
.settings-form > .hint { margin: 0 0 14px; }
.checklist { border-radius: 10px; background: var(--field); box-shadow: none; max-height: 300px; overflow: auto; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.check-row:last-child { border-bottom: 0; }
.check-row:hover { background: var(--hover); }
.check-row .name { font-weight: 500; flex: none; white-space: nowrap; }
.check-row .mono { margin-left: auto; min-width: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-form .settings-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); align-items: end; margin-top: 18px; }
.field-check { min-height: 38px; }
table.history td.primary { min-width: 0; width: 24%; }

/* Members: people with their role, what they can see and how their invitation stands; Edit opens the person editor (below); rarer
   actions in a menu. */
.form-grid.halves { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.panel.flush.people { overflow: visible; }
.people td.scope { font-size: 13px; color: var(--ink-2); }
.people td.scope .sub { margin-top: 1px; }
.people td.seen { white-space: nowrap; }
.people td.actions { width: 1%; }
.invite-line { margin-top: 1px; }
.invite-line.err { color: var(--danger); }
.row-actions .ghost { white-space: nowrap; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.row-actions .ghost { padding: 6px 11px; font-size: 13px; }
.row-menu > summary.ghost { padding: 6px 9px; font-size: 9px; letter-spacing: 1.5px; color: var(--ink-2); }
details.menu.row-menu .menu-list { left: auto; right: 0; top: calc(100% + 6px); min-width: 184px; z-index: 20; }
.row-menu .menu-list button { font: 500 13.5px/1.3 var(--sans); width: 100%; background: none; border: 0; cursor: pointer; color: var(--ink); text-align: left; padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.row-menu .menu-list button:hover { background: var(--hover); }
.row-menu .menu-list button.danger { color: var(--danger); }

@media (max-width: 860px) {
  .script-form .script-fields, .send-form .send-fields, .settings-form .settings-fields, .form-grid.halves, .feed-now .facts, .split.figures4 { grid-template-columns: 1fr 1fr; }
  .script-form .script-fields, .settings-form .settings-fields, .form-grid.halves { grid-template-columns: 1fr; }
  .field.span2 { grid-column: 1 / -1; }
  .codefile-head, .card-head { padding: 12px 16px 11px; }
  .phone-only { display: block; }
  .script-line { flex-wrap: wrap; }
  .script-actions { margin-left: 0; }
  .form-foot.spread { flex-wrap: wrap; }
  .form-foot.spread > .btn { margin-left: auto; }
  .inline-field { flex: 1 1 100%; }
  .inline-field select { flex: 1; max-width: none; }
  table.cards tfoot { display: block; }
  .panel.flush.people table.cards.list tr { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .panel.flush.people table.cards.list td.primary { grid-column: 1 / -1; }
  .panel.flush.people table.cards.list td.scope { grid-column: 1; align-self: center; }
  .panel.flush.people table.cards.list td.seen { grid-column: 2; align-self: center; text-align: right; }
  .panel.flush.people table.cards.list td.actions { grid-column: 1 / -1; width: auto; }
  .people .row-actions { justify-content: flex-start; flex-wrap: wrap; }
  .people details.menu.row-menu .menu-list { left: 0; right: auto; }
  .head-actions { flex-wrap: wrap; }
  .head-actions > .btn, .head-actions > .ghost { white-space: nowrap; }
  .head-actions.buttons { justify-content: flex-start; gap: 8px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
  /* A task on a phone, under its piece: who has it with the time, then where it stands and the texts, then the answer. */
  .panel.flush table.cards.list.tasks tr { grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: 10px; row-gap: 8px; align-items: center; }
  .panel.flush table.cards.list.tasks tr.piece-row { display: block; }
  .panel.flush table.cards.list.tasks td.num { grid-column: 4; grid-row: 1; align-self: start; text-align: right; }
  .panel.flush table.cards.list.tasks td.who { grid-column: 1 / 4; grid-row: 1; max-width: none; font-weight: 500; }
  .panel.flush table.cards.list.tasks td.state { grid-column: 1; grid-row: 2; display: flex; align-items: center; gap: 8px; }
  .panel.flush table.cards.list.tasks td.state .sub { margin: 0; white-space: nowrap; }
  .panel.flush table.cards.list.tasks td.texts { grid-column: 2 / 4; grid-row: 2; }
  .panel.flush table.cards.list.tasks td.answer { grid-column: 1 / -1; grid-row: 3; min-width: 0; max-width: none; }
  table.tasks td.texts:has(> .concealed), table.tasks td.answer:has(> .none:only-child) { display: none; }
  /* What is owed on a phone: one line per writer. */
  .panel.flush table.cards.list.owed-list tr { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 18px; align-items: baseline; }
  .panel.flush table.cards.list.owed-list td.num { grid-column: auto; grid-row: 1; text-align: right; }
  table.owed-list tfoot td { border-top: 0; }
  table.owed-list tfoot tr { border-top: 1px solid var(--line-2); }
  .panel.flush table.cards.list.name-figure tr { grid-template-columns: minmax(0, 1fr) auto; }
  .panel.flush table.cards.list.name-figure td.num { grid-column: 2; grid-row: 1; text-align: right; }
  .cards-grid { grid-template-columns: minmax(0, 1fr); }
  .figures .scroll > table th:first-child, .figures .scroll > table td:first-child { padding-left: 16px; }
  .figures .scroll > table th:last-child, .figures .scroll > table td:last-child { padding-right: 16px; }
  .compare-export > .row { flex-wrap: wrap; }
  .compare-export select { flex: 1 1 100%; }
  .block > .group-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .form-foot:has(.foot-note) { flex-wrap: wrap; }
  .form-foot .foot-note { flex: 1 1 100%; margin: 0 0 2px; }
  .form-foot:has(.foot-note) > .btn { flex: 1 1 0; }
}

/* Ways of writing, grouped by the model that writes (Generated). */
.group table.ways { table-layout: auto; }
table.ways td.num { width: 76px; }
table.ways td.actions { width: 180px; white-space: nowrap; }
table.ways td.actions .row { justify-content: flex-end; }
table.ways .line .muted { font-family: var(--mono); font-size: 12px; }
@media (max-width: 860px) {
  table.ways td.actions .row { justify-content: flex-start; }
}

/* Long segment labels stay on one line (a phone scrolls the row instead); group heads wrap under their title. */
.segs .seg { white-space: nowrap; flex: none; }
.group-head { flex-wrap: wrap; row-gap: 2px; }
.group-head h2 { white-space: nowrap; }
@media (max-width: 860px) {
  /* A run on a phone: what it is, then its progress and its cost on one line. */
  table.cards.list.runs-list td:nth-child(2) { grid-column: 1; grid-row: 2; }
  table.cards.list.runs-list td.num { grid-column: 2; grid-row: 2; text-align: right; }
  table.ways .line .muted { display: none; }
  table.ways td.num .sub { display: inline; margin-left: 4px; }
}

.check-field { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13.5px; }
.check-field .muted { margin-left: 4px; }
@media (max-width: 860px) { .check-field { flex-wrap: wrap; } }

/* Send for review: the choice to add each prompt's own criteria is a line of its own under the fields. */
.send-fields .check-field.own-rubric { grid-column: 1 / -1; margin-top: 2px; flex-wrap: wrap; row-gap: 2px; }

.check-field input[type=checkbox] { margin: 0; }

/* Results: the eval on the held-out prompts. The writers' row is the reference the others are read against. */
.figures.eval table.stats tr.reference td { color: var(--ink-2); }
.figures.eval table.stats td.strong { font-weight: 600; color: var(--ink); }
.eval-score { margin-top: 12px; gap: 10px; flex-wrap: wrap; }
.eval-score select { width: auto; max-width: min(440px, 100%); }
.eval-score .budget { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; }
.eval-score .budget input { width: 4.5em; }
.group-head select { margin-left: auto; }

/* A question mark beside a label; its note floats above it (lab.js hint). */
/* It sits on the middle of the words it explains, wherever it is: in a line of text (vertical-align) or in a flex row
   (align-self). */
span.hint { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin: 0 0 0 6px; border-radius: 50%;
  background: rgba(17, 17, 17, 0.07); box-shadow: none; color: var(--ink-2); font: 600 10px/1 var(--sans); cursor: help; vertical-align: middle;
  position: relative; top: -0.05em; align-self: center; flex: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.hint:hover, .hint:focus-visible { color: var(--ink); background: rgba(17, 17, 17, 0.14); }
.hint:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.tip { position: fixed; z-index: 65; display: none; max-width: min(280px, calc(100vw - 16px)); padding: 8px 10px; background: var(--surface);
  color: var(--ink); font: 400 12.5px/1.45 var(--sans); border-radius: 8px; box-shadow: 0 1px 3px rgba(17, 17, 17, 0.1), 0 10px 26px -8px rgba(17, 17, 17, 0.26); pointer-events: none; }
h2 .hint, h3 .hint { vertical-align: middle; }
/* Writers to tick by name, under the Reviewers row of Send for review. */
.choose > .pick-wrap { grid-column: 1 / -1; max-height: 340px; overflow-y: auto; border-radius: 12px; background: var(--field); box-shadow: none; padding: 0 8px; }
.choose > .pick-wrap > p { margin: 10px 2px; }
.pick-wrap table.pick { margin: 0; }
.choose-line input[type=search] { width: 220px; height: 36px; }
.row.tight { display: inline-flex; align-items: center; gap: 0; }
@media (max-width: 860px) { .choose-line input[type=search] { width: 100%; flex: 1 1 100%; } }
.send-fields .field > span { display: flex; align-items: center; min-height: 18px; }

/* Edit: each piece's notes or one request, then the request itself. */
.edit-field { display: grid; gap: 6px; }
.edit-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.edit-line input { flex: 1 1 260px; min-width: 0; }
.send-fields .edit-field > span:first-child { display: flex; align-items: center; min-height: 18px; font-size: 13px; color: var(--ink-2); }

/* On a phone a question mark stays on the line of what it explains: the choices shrink and scroll sideways instead. */
@media (max-width: 860px) {
  .toolbar .row.tight { display: flex; width: 100%; min-width: 0; flex-wrap: nowrap; }
  .toolbar .row.tight > .segs, .toolbar .row.tight > select { flex: 1 1 auto; min-width: 0; }
  .toolbar .row.tight > .hint { margin-left: 8px; }
}

/* Samples (Impeccable, 2026-11-18): the long "Score by ..." filter keeps a select's width instead of stretching to the
   whole bar; the search takes the room left over and stays first and full on a phone. Only the Samples toolbar. */
.samples-toolbar select { max-width: 15rem; }
.samples-toolbar .search { flex: 1 1 20rem; min-width: 14rem; }
.samples-toolbar .row.tight { gap: 0; }
@media (max-width: 860px) {
  /* A select takes the room it needs and never more than the bar: Generate's "Pieces by the traces they have" is as wide as its longest option, 447 px, and widened the whole page at 390 (audit 2026-11-19). */
  .samples-toolbar select { max-width: 100%; }
  .samples-toolbar .search { flex-basis: 100%; }
}

/* Run a script: what the chosen script does, in a line under the fields. */
.run-about { margin: 12px 2px 0; color: var(--ink-2); font-size: 13.5px; }
.run-about:empty { display: none; }

/* ---- the Dashboard (2026-11-02): four figures, then cards that each open the page behind them ---- */
.loop.tiles4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.loop.tiles4 .stage-value { margin-top: 6px; }
.loop.tiles5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.loop.tiles5 .stage-value { margin-top: 6px; }
.stage.ask .stage-detail { color: #7a5200; }
@media (max-width: 1100px) { .loop.tiles5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .loop.tiles5 .stage { box-shadow: 0 -1px 0 var(--line); } .loop.tiles5 .stage:nth-child(-n+2) { box-shadow: none; } .loop.tiles5 .stage:nth-child(even) { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); } .loop.tiles5 .stage:nth-child(2) { box-shadow: -1px 0 0 var(--line); } .loop.tiles5 .stage:last-child:nth-child(odd) { grid-column: span 2; } }
@media (max-width: 1100px) { .loop.tiles4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .loop.tiles4 .stage:nth-child(n+3) { box-shadow: 0 -1px 0 var(--line); } .loop.tiles4 .stage:nth-child(4) { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); } }

.dash-card { display: flex; flex-direction: column; min-width: 0; }
.dash-card .section-head { margin-bottom: 10px; }
.dash-card .section-head a { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.dash-card .section-head a:hover { color: var(--ink); }
.card-actions { margin-top: auto; padding-top: 14px; gap: 8px; flex-wrap: wrap; }
.card-note { margin: 12px 0 0; }
ul.mini { list-style: none; margin: 0 -10px; padding: 0; }
ul.mini li a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
@media (hover: hover) { ul.mini li a:hover { background: var(--hover); } }
.mini-main { display: grid; min-width: 0; flex: 1; }
.mini-title { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-side { display: flex; align-items: center; gap: 8px; flex: none; color: var(--ink-2); }
.mini-side .meter { width: 64px; }
.mini-side b { font-size: 15px; font-weight: 600; color: var(--ink); }

/* ---- Send for review: four numbered steps in one card, each linking to the page where its part is kept ---- */
.send-form .step + .step { margin-top: 26px; padding-top: 22px; box-shadow: 0 -1px 0 var(--line-soft); }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-width: 0; }
.step-head h2 { margin: 0; font-size: 14.5px; font-weight: 600; display: flex; align-items: center; }
.step-n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent-ink); }
.step-head > .step-link, .step-head > .legend { margin-left: auto; }
.step-link { font-size: 13px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.step-link:hover { color: var(--ink); }
.choose.one { grid-template-columns: max-content minmax(0, 1fr); }
.choose.one > .pick-wrap { grid-column: 1 / -1; }
@media (max-width: 860px) { .choose.one { grid-template-columns: minmax(0, 1fr); } }
.select-open { display: flex; align-items: center; gap: 10px; min-width: 0; }
.select-open select { flex: 1; min-width: 0; }
.open-link { white-space: nowrap; color: var(--ink-2); }
.send-fields .span-all { grid-column: 1 / -1; }
.texts-box:empty { display: none; }
.texts-box p { margin: 0; font-size: 13.5px; }
.texts-choice { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 10px; }
.pieces-preview:empty { display: none; }
.pieces-preview { margin-top: 12px; }
ul.piece-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 18px; }
ul.piece-list li { display: flex; align-items: baseline; gap: 8px; min-width: 0; padding: 4px 0; font-size: 13.5px; }
ul.piece-list li a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.piece-list li .muted { flex: none; }
.pieces-preview > .linkish { margin-top: 6px; }

/* ---- a brief: its text, the writers' pieces and every generated text ---- */
.brief p + p { margin-top: 0.8em; }
.brief-parts { align-items: start; }
.brief-parts .block { margin-top: 0; }
.gen-group + .gen-group { margin-top: 14px; }
.gen-group .card-head h3 { margin: 0; }
.versions-line a { color: var(--ink-2); }
.gen-made { align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---- a script's scores: one column chart per score, one blue, 4 px rounded tops on one baseline, 2 px apart ---- */
.score-dist .group-head { margin-bottom: 12px; }
.dist-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; align-items: stretch; margin-bottom: 14px; }
.dist-figures { grid-template-columns: 1fr; align-content: center; gap: 14px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px 20px; }
.dist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 14px; }
.dist-grid.two { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.hist { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 14px 16px 12px; min-width: 0; }
.hist-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.hist-head h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); text-transform: capitalize; }
.hist-plot { height: 112px; padding-top: 18px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; align-items: end; box-shadow: inset 0 -1px 0 var(--line-2); }
.hist.tall .hist-plot { height: 172px; }
.hbar { position: relative; height: 100%; outline: none; cursor: default; }
.hbar i { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 24px); background: var(--accent); border-radius: 4px 4px 0 0; }
.hbar .peak { position: absolute; left: -8px; right: -8px; text-align: center; font-size: 11px; line-height: 1; color: var(--ink-2); font-variant-numeric: tabular-nums; pointer-events: none; }
.hbar:hover i, .hbar:focus-visible i { background: var(--accent-ink); }
.hbar:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-soft); border-radius: 4px; }
.hist-axis { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; margin-top: 6px; font-size: 11px; color: var(--ink-3); text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
ul.ranked-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
ul.ranked-list li { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 12.5px; outline: none; }
.ranked-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranked-track { height: 12px; display: block; }
.ranked-track i { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 2px; }
ul.ranked-list li:hover .ranked-track i, ul.ranked-list li:focus-visible .ranked-track i { background: var(--accent-ink); }
.ranked-n { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
details.as-table { margin-top: 2px; }
details.as-table summary { font-size: 13px; color: var(--ink-2); cursor: pointer; margin-bottom: 10px; }
@media (max-width: 860px) {
  .dist-top { grid-template-columns: 1fr; }
  .dist-figures { grid-template-columns: repeat(3, 1fr); }
  .hist.tall .hist-plot { height: 140px; }
}

/* ---- Rubrics: the four steps a prompt goes through, the next one marked ---- */
.rubric-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-bottom: 18px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.rubric-step { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rubric-step + .rubric-step { box-shadow: -1px 0 0 var(--line); }
.rubric-step-head { display: flex; align-items: center; gap: 8px; }
.rubric-step-title { font-size: 13.5px; font-weight: 600; }
.rubric-step .step-n { background: rgba(17, 17, 17, 0.06); color: var(--ink-2); }
.rubric-step.next .step-n { background: var(--accent); color: #fff; }
.rubric-step-now { font-size: 13px; color: var(--ink-2); }
.rubric-step-do { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.affix-after { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.affix-after input { width: 78px; height: 34px; }
@media (max-width: 1100px) { .rubric-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rubric-step:nth-child(n+3) { box-shadow: 0 -1px 0 var(--line); } .rubric-step:nth-child(4) { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); } }
@media (max-width: 560px) { .rubric-steps { grid-template-columns: 1fr; } .rubric-step + .rubric-step { box-shadow: 0 -1px 0 var(--line) !important; } }

@media (max-width: 860px) {
  .step-head { flex-wrap: wrap; row-gap: 6px; }
  .step-head > .legend { margin-left: 32px; flex-basis: 100%; }
}
.grid2 > .dash-card { margin-bottom: 0; }
.grid2:has(> .dash-card) { margin-bottom: 18px; }

/* The grid by prompt: a prompt's title once over its rows, each row named by its pieces' short ids. */

/* Scripts: the QA gate named over the QA checks, with the way to change it. */
.group-head .gate-line { margin-left: auto; display: inline-flex; gap: 6px; align-items: baseline; white-space: nowrap; }
.group-head .gate-line a { color: var(--ink-2); }
a.chip { text-decoration: none; }

/* Send for review, editing briefs from the library: the same for every piece, by prompt or by piece; each can be changed
   for the batch. The brief's words and what to keep show under its choice. */
.step-edit .choose { margin-bottom: 4px; }
.step-edit .edit-list { padding-left: 0; max-height: 560px; }
.step-edit .edit-info { margin-left: 0; }
.brief-pick { display: grid; gap: 6px; min-width: 0; }
.brief-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.brief-line { flex-wrap: nowrap; }
.brief-line select { flex: 0 1 360px; min-width: 0; }
.brief-pick .brief-toggle { flex: none; font-size: 13px; color: var(--accent-ink); text-decoration: none; }
.step-edit .edit-list { gap: 14px; }
/* What the chosen brief says, two lines at most each, so a long list stays readable. */
.brief-preview { display: grid; gap: 2px; max-width: 780px; color: var(--ink-2); line-height: 1.5; }
.brief-preview p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.brief-keep span { font-weight: 600; color: var(--ink); margin-right: 6px; }
/* Changing a brief for the batch: its fields together on one quiet panel, the brief beside what to keep. */
.brief-form { display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--hover); max-width: 900px; }
.brief-form .field { gap: 5px; }
.brief-form input, .brief-form textarea { background: var(--surface); }
.brief-form textarea { min-height: 92px; resize: vertical; font: inherit; font-size: 13.5px; line-height: 1.5; }
.brief-form-two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; }
.brief-form p { margin: 0; }
@media (max-width: 860px) { .brief-form-two { grid-template-columns: minmax(0, 1fr); } }
.pay-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pay-pick .affix { width: 110px; }
/* Reviewers per piece or pieces per reviewer (Yusuf, 2026-11-12): the choice and its number on one line, as Pay; what it gives under it. */
.count-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.count-pick .segs { flex: none; }
.count-pick input[type=number] { width: 72px; flex: none; }
.count-field .count-line { margin: 2px 0 0; line-height: 1.4; }
.count-field .count-line:empty { display: none; }
@media (max-width: 640px) { .send-form .count-field .count-pick input[type=number] { width: 88px; } }
/* A reviewer short of their number of pieces: their initials over the grid in red, how many on hover. */
table.assign thead th.short { color: #b42318; }
/* The editing brief library: one card per brief; a brief switched off reads quieter. */
.brief-card { padding: 18px 20px; margin-top: 14px; }
.brief-card.off { opacity: .62; }
.brief-card .group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.brief-card textarea { min-height: 64px; resize: vertical; font: inherit; font-size: 13.5px; }
.brief-card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.brief-card .chip { cursor: pointer; }
.brief-card .form-grid.one { grid-template-columns: minmax(0, 1fr); }

/* Send for review, editing: a request for every piece, then each prompt's or piece's own. */
.edit-rows { display: grid; gap: 10px; }
.edit-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 12px; }
.edit-label { font-size: 13px; color: var(--ink-2); }
.edit-by { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.edit-list:empty { display: none; }
.edit-list { margin-top: 12px; max-height: 440px; overflow-y: auto; display: grid; gap: 8px; padding: 2px 2px 2px 142px; }
.edit-group { font-size: 13px; font-weight: 500; margin-top: 6px; }
.edit-group a { color: var(--ink); text-decoration-color: var(--line-2); }
.edit-item { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 12px; align-items: start; }
.edit-what { display: flex; align-items: baseline; gap: 8px; min-width: 0; padding-top: 8px; font-size: 13px; }
.edit-what a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-item textarea { min-height: 58px; resize: vertical; font: inherit; font-size: 13.5px; }
.edit-info { margin: 10px 0 0 142px; }
@media (max-width: 860px) {
  .edit-row, .edit-item { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .edit-list { padding-left: 0; }
  .edit-info { margin-left: 0; }
}
.edit-what .muted { white-space: nowrap; flex: none; }
.edit-row textarea.edit-all { min-height: 44px; resize: vertical; font: inherit; font-size: 13.5px; }
.edit-row:first-child { align-items: start; }
.edit-row:first-child .edit-label { padding-top: 10px; }

/* Generated texts by what they were written from: the writer's trace, AI alone, the finished piece (control). */
.gen-field .src-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 8px; }
.gen-field .select-open { max-width: 640px; }
.chip.src-trace { background: var(--accent-soft); color: var(--accent-ink); }

/* The rubric step: the general criteria, or also each prompt's rubric from the workshop or generated by AI. */
.own-rubric .own-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
/* A choice for what has no text or no rubric yet: its question over its answers, then what it means for these pieces. */
.choice-row { display: grid; justify-items: start; gap: 6px; margin-top: 14px; min-width: 0; max-width: 100%; }
.texts-box > .choice-row:first-child { margin-top: 0; }
.choice-lead { color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.own-info:empty { display: none; }
.own-info { margin-top: 10px; }
.own-info p { margin: 0; font-size: 13.5px; color: var(--ink-2); max-width: 780px; }
/* Each prompt's rubric in the list of pieces: its version (opening it), or AI generates it first. */
.rubric-mark { flex: none; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
a.rubric-mark { text-decoration-color: var(--line-2); }
.rubric-mark.new { color: var(--accent-ink); }
.prompt-goes .rubric-mark { margin-left: 8px; }

/* A model's maker's logo beside its name. */
.model-logo { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; flex: none; }
h1 .model-logo { width: 22px; height: 22px; vertical-align: -3px; margin-right: 10px; }
h2 .model-logo, h3 .model-logo { width: 16px; height: 16px; vertical-align: -2px; margin-right: 8px; }
.chip .model-logo { width: 12px; height: 12px; vertical-align: -1px; margin-right: 5px; }
.select-logo:empty { display: none; }
.select-logo { flex: none; display: grid; place-items: center; width: 20px; }
.select-logo .model-logo { width: 18px; height: 18px; margin: 0; }

/* A batch's tasks by piece: the piece once, then one row per reviewer. */
table.tasks tr.piece-row td { padding-top: 16px; padding-bottom: 6px; font-size: 13.5px; font-weight: 500; background: none; cursor: default; }
table.tasks tr.piece-row td a { color: var(--ink); text-decoration-color: var(--line-2); margin-right: 10px; }
table.tasks tr.piece-row td .muted { font-weight: 400; }
table.tasks tbody tr.piece-row:first-child td { padding-top: 10px; }
table.run-items tr.prompt-head td { padding-top: 14px; font-weight: 500; font-size: 13.5px; cursor: default; }

/* Choices never push the page sideways: a row of them scrolls within its line instead. */
.segs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segs::-webkit-scrollbar { display: none; }
.own-line > .segs, .src-line > .segs, .edit-by > .segs, .choose-line .segs, .choose > .segs, .texts-choice > .segs { min-width: 0; }
/* Closed menus and folds take no room, and an open one stays inside a phone's screen. */
.inline-more:not([open]) > :not(summary), details.menu:not([open]) > .menu-list { display: none; }
.inline-more input { width: min(160px, 46vw); }
@media (max-width: 860px) { .selectionbar details.menu .menu-list { left: auto; right: 0; } }

/* A checkbox with its words, as on a prompt's page (switching a brief on or off, your score first). */
.check-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check-label input[type=checkbox] { margin: 0; }

/* A Revise a story batch: send its revisions to other writers to assess. */
.assess-row { gap: 10px 14px; flex-wrap: wrap; align-items: center; padding: 12px 0 2px; }
.assess-row .muted { flex: 1 1 320px; }
.assess-row input { width: 64px; height: 34px; }

/* A waiting batch, step by step (Jay, 2026-11-03): each prompt's AI checklist to read and approve right on the batch. */
.chip.ask { background: #fff4d6; color: #7a5200; }
.waiting-panel .section-head h2 { font-size: 15px; }
.wait-lead { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); max-width: 70ch; }
ul.wait-prompts { display: grid; gap: 12px; margin: 0; padding: 0; }
.wait-prompt { padding: 14px 16px; border-radius: 12px; background: var(--field, #f6f6f4); }
.wait-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.wait-title { font-weight: 600; font-size: 14.5px; color: var(--ink); text-decoration-color: var(--line-2); min-width: 0; overflow-wrap: anywhere; flex: 1 1 260px; }
.wait-actions { display: flex; gap: 8px; flex: none; }
.wait-prompt > p { margin: 6px 0 0; }
ul.wait-items { margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.45; }
ul.wait-items li { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; overflow-wrap: anywhere; }
.wait-kind { color: var(--ink-3); font-size: 12px; padding-top: 1px; }
@media (max-width: 640px) {
  .wait-prompt { padding: 12px; }
  .wait-actions { width: 100%; }
  .wait-actions > .btn, .wait-actions > .ghost { flex: 1 1 auto; }
  ul.wait-items li { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
.src-letter { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 6px; border-radius: 4px; background: rgba(17, 17, 17, 0.06); font: 600 10.5px var(--sans); color: var(--ink-2); vertical-align: 1px; }
.wait-actions { margin-top: 12px; }

/* ---- Send for review (Jay, 2026-11-03: "the phone layout is bad") ------------------------------------------------- */
/* A count inside its sentence: "10 pairs at random from the 11 that pass QA. Again". */
.sentence { display: block; margin: 0; line-height: 2.6; font-size: 14px; color: var(--ink-2); }
.sentence input[type=number] { display: inline-block; width: 66px; height: 34px; padding: 0 8px; vertical-align: middle; margin: 0 2px; }
.sentence > .ghost, .sentence > .linkish, .sentence > .hint { vertical-align: middle; }
.linkish.again { margin-left: 2px; }
.choose-line.by-prompt { display: grid; gap: 6px; }
.choose-line.by-prompt .select-open { max-width: 560px; }

/* Reviewers: one list to pick from, the draw beneath it, then who it is and whether they are enough. */
.who-choose { display: grid; gap: 12px; margin-top: 12px; }
/* The group and the name search share one row, on a phone too (Jay, 2026-11-15: some places take up too many rows). */
.who-find { display: flex; gap: 8px; flex-wrap: nowrap; min-width: 0; }
.who-find select { flex: 0 0 auto; width: auto; max-width: 50%; height: 38px; }
.who-find input[type=search] { flex: 1 1 auto; min-width: 0; width: 0; height: 38px; }
.who-choose .pick-wrap { max-height: 300px; overflow-y: auto; border-radius: 12px; background: var(--field); padding: 0; }
.who-choose .pick-wrap > p { margin: 12px 14px; }
ul.pick-list { list-style: none; margin: 0; padding: 4px 0; }
.pick-row { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; column-gap: 12px; min-height: 44px; padding: 6px 14px; cursor: pointer; }
.pick-row:hover { background: rgba(17, 17, 17, 0.03); }
.pick-row.on { background: var(--accent-soft); }
.pick-row input { margin: 0; width: 18px; height: 18px; }
.pick-who { display: flex; align-items: baseline; justify-content: space-between; gap: 2px 14px; flex-wrap: wrap; min-width: 0; }
.pick-name { font-size: 14px; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.pick-meta { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.pick-tag { margin-left: 8px; font-size: 11.5px; color: var(--accent-ink); }
/* A drawn writer unticked: left out of the draw (Yusuf, 2026-11-06), quieter until ticked again. */
.pick-tag.out { color: var(--ink-3); }
.pick-row.out .pick-name { color: var(--ink-3); }
.chosen-line { display: grid; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.chosen-line p { margin: 0; }
.chosen-head { font-weight: 600; color: var(--ink); }
.chosen-label { display: inline-block; min-width: 54px; margin-right: 6px; color: var(--ink-3); font-size: 12px; }
.who-flag:empty { display: none; }
.who-flag { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #fff4d6; color: #5c3d00; font-size: 13.5px; line-height: 1.45; }
.who-flag p { margin: 0; }
.who-flag .flag-head { font-weight: 600; margin-bottom: 4px; }
.who-flag .flag-list { margin: 0 0 6px; padding: 0; display: grid; gap: 2px; }
.who-flag .muted { color: #7a5a1a; }

/* Who reviews what: on a phone, each piece's title on its own line and who reviews it in words. */

/* The foot: what goes, what is short, what the batch waits for; Send. */
.foot-flag:empty, .foot-wait:empty { display: none; }
.foot-flag { font-size: 13px; }
.foot-wait { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-2); max-width: 64ch; }
.send-buttons { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 640px) {
  .send-form .send-fields { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .send-form .field select, .send-form .field input[type=text], .send-form .field input[type=number] { width: 100%; }
  .send-form .choose.one { grid-template-columns: minmax(0, 1fr); }
  .send-form .form-foot.spread { flex-direction: column; align-items: stretch; gap: 14px; }
  .send-buttons { flex-direction: column-reverse; align-items: stretch; }
  .send-buttons > button { width: 100%; min-height: 44px; }
  .send-form ul.piece-list { grid-template-columns: minmax(0, 1fr); }
  .send-form ul.piece-list li { flex-wrap: wrap; }
  .send-form ul.piece-list li a { white-space: normal; }
  main:has(.send-form) { padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }
}
.newlist .draw-line .seed-input { width: 150px; height: 34px; }
.newlist .pick-more-line { margin-top: 10px; }
.picked-by-hand { margin: 6px 0 10px; font-size: 14px; }
/* Approve sits on the title's row (Jay, 2026-11-03); on a phone it is right under the title, full width. */
.wait-head > .wait-actions { margin-top: 0; }
.waiting-panel .section-head { flex-wrap: wrap; gap: 10px 14px; }
@media (max-width: 640px) {
  .wait-head > .wait-actions { margin-top: 10px; }
  .waiting-panel .section-head > .btn { width: 100%; min-height: 44px; }
}

/* ---- Fewer words (Jay, 2026-11-03: the layout explains) ------------------------------------------------------------ */
/* A step to finish before Send is marked; at most a word or two at Send. */
.send-form .step.needs .step-n { background: #b42318; color: #fff; }
.send-form .step.needs .step-head h2 { color: #b42318; }
.needs-word { color: #b42318; font-weight: 500; font-size: 13px; }
/* Writers to pick: the name, then quiet numbers under one header; on a phone, the name alone. */
.pick-row { grid-template-columns: 20px minmax(0, 1fr) 64px 96px; }
.pick-cols { display: grid; grid-template-columns: 20px minmax(0, 1fr) 64px 96px; column-gap: 12px; padding: 8px 14px 2px; font-size: 11.5px; color: var(--ink-3); }
.pick-cols > span:nth-child(n+2), .pick-num { text-align: right; }
.pick-num { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.newlist .pick-wrap { max-height: 360px; overflow-y: auto; margin-top: 12px; border-radius: 12px; background: var(--field); }
@media (max-width: 640px) {
  .pick-cols, .pick-num { display: none; }
  .pick-row { grid-template-columns: 20px minmax(0, 1fr); }
}
/* A checklist on a waiting batch: its items under one small heading per kind. */
.wait-items { display: grid; gap: 10px; margin-top: 12px; }
.wait-kind-group .wait-kind { margin: 0 0 3px; font-size: 11.5px; color: var(--ink-3); padding: 0; }
.wait-kind-group ul { margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.45; }
.wait-kind-group li { overflow-wrap: anywhere; }
/* Who reviews what on a desk: a prompt's title wraps over its rows, so the cells stay beside the row names. */

/* Who reviews what, filled before anyone clicks (Jay, 2026-11-03): light = given automatically, solid = given by hand. */

/* Who reviews what: the same grid on a phone (Jay, 2026-11-03: the grid can be kept); the cells scroll sideways in their own
   box, the row names stay, and every cell is big enough to tap. */


/* Who reviews what (Jay, 2026-11-03: only blue and grey, and built for many reviewers): one row a piece, its title in a column that
   stays while only the cells scroll sideways; a cell is blue (this reviewer gets this piece) or gray; a red number at the
   row's end is how many reviewers it is short. */
.send-form .grid-wrap { overflow: auto; max-height: min(62vh, 640px); padding: 0 0 4px; background: none; box-shadow: none; border-radius: 0; container-type: inline-size; }
table.assign { border-collapse: collapse; width: auto; }
table.assign th, table.assign td { border: 0; padding: 1.5px; background: var(--surface); }
table.assign thead th { position: sticky; top: 0; z-index: 2; padding-bottom: 4px; font: 500 10px/14px var(--mono); color: var(--ink-3); text-align: center; white-space: nowrap; }
table.assign .who-col { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 400; }
/* Writers and staff in one table (a flow's review): each kind's name over its columns. */
table.assign thead tr.kind-row th { position: static; padding-bottom: 0; text-align: left; font: 500 10px/14px var(--sans, inherit); letter-spacing: 0.02em; color: var(--ink-3); overflow: visible; max-width: 0; }
table.assign .grp { padding-left: 11px; }
table.assign thead tr.kind-row ~ tr th[data-pid], table.assign tbody td { }
table.assign thead .who-col { z-index: 3; }
/* The titles take what the cells leave (--n reviewers), between a minimum and a cap; past the minimum the cells scroll. */
.row-title { display: flex; align-items: center; gap: 6px; width: clamp(160px, calc(100cqw - var(--n, 0) * 25px - 30px), 320px); padding-right: 10px; box-sizing: border-box; font-size: 12.5px; line-height: 18px; }
.row-title a { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; }
.row-title a:hover { text-decoration: underline; text-decoration-color: var(--line-2); }
.row-title .k { flex: none; font: 10.5px var(--mono); color: var(--ink-3); }
table.assign .cell { display: block; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: #e9e9e6; cursor: pointer; }
table.assign .cell.on { background: var(--accent); }
/* Not known yet: the check of who can take it is still under way. */
table.assign .cell.pending, table.assign .cell.pending:hover { background: transparent; box-shadow: inset 0 0 0 1.5px #dcdcd7; cursor: progress; }
table.assign .cell.on.pending, table.assign .cell.on.pending:hover { background: var(--accent); opacity: 0.45; box-shadow: none; }
.assign-status { margin: 2px 0 8px; font-size: 12.5px; min-height: 18px; }
/* Places kept while their contents are read, so nothing under them jumps when they come. */
.who-choose .pick-wrap > .pick-loading { display: flex; align-items: center; justify-content: center; height: 300px; margin: 0; }
.send-form.flow-early .mail-step { min-height: 120px; }
table.assign .cell[aria-disabled="true"] { cursor: default; }
@media (hover: hover) {
  table.assign .cell:hover { background: #dcdcd8; }
  table.assign .cell.on:hover { background: var(--accent-ink); }
  table.assign .cell[aria-disabled="true"]:hover { background: #e9e9e6; }
}
table.assign .cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
/* A reviewer who can't take the piece (wrote it, wrote on or reviewed its prompt): a pale cell struck through, the reason
   in words under the piece (Yusuf, 2026-11-04). */
table.assign .cell.blocked, table.assign .cell.blocked:hover { background: #f4f4f2 linear-gradient(to top right, transparent calc(50% - 0.75px), #c9c9c4 calc(50% - 0.75px), #c9c9c4 calc(50% + 0.75px), transparent calc(50% + 0.75px)); cursor: not-allowed; }
/* Wrote on the piece's prompt, and may still take it: a W in the cell, the researcher's call (Yusuf, 2026-11-04). */
table.assign .cell.wrote { font: 600 9px/22px var(--mono); text-align: center; color: var(--ink-2); }
@media (max-width: 640px) { table.assign .cell.wrote { line-height: 28px; } }
table.assign .cell.on.wrote { color: #fff; }
/* What the cells mean (Yusuf, 2026-11-06), one quiet line above the grid, each in the cells' own look; the words on hover. */
.assign-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin: 0 0 12px; font-size: 12px; line-height: 18px; color: var(--ink-2); }
.assign-legend .legend-item { display: inline-flex; align-items: center; gap: 7px; cursor: help; }
.assign-legend .cell { display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 4px; background: #e9e9e6; }
.assign-legend .cell.on { background: var(--accent); }
.assign-legend .cell.wrote { font: 600 8px/16px var(--mono); text-align: center; color: var(--ink-2); }
.assign-legend .cell.blocked { background: #f4f4f2 linear-gradient(to top right, transparent calc(50% - 0.75px), #c9c9c4 calc(50% - 0.75px), #c9c9c4 calc(50% + 0.75px), transparent calc(50% + 0.75px)); }
.assign-legend .legend-short { font: 600 11px var(--mono); color: #b42318; }
/* Why a cell can't be given (Jay, 2026-11-06: Can't take it says why), quieter than the words it follows. */
.assign-legend .legend-why { color: var(--ink-3); }
/* What a click does, said once under the legend for someone new to the grid. */
.assign-legend:has(+ .assign-note) { margin-bottom: 4px; }
.assign-note { margin: 0 0 12px; font-size: 12px; color: var(--ink-3); }
/* How to leave a drawn writer out, under the drawn list until someone has been. */
.chosen-tip { color: var(--ink-3); font-size: 12px; }
/* Names that wrap line up under the first name, not under the label (Picked, Drawn, Left out). */
.chosen-part { padding-left: 60px; text-indent: -60px; }
.chosen-part > * { text-indent: 0; }
.assign-legend:not(.has-short) .legend-short-item { display: none; }
/* On a phone the items wrap side by side, the why of Can't take it left to the line under each piece (Jay, 2026-11-15: it takes up too many rows). */
@media (max-width: 640px) { .assign-legend { gap: 6px 14px; } .assign-legend .legend-why { display: none; } }
table.assign .row-why { display: block; width: 0; min-width: 100%; box-sizing: border-box; padding: 0 10px 2px; font-size: 11.5px; line-height: 15px; color: var(--ink-2); white-space: normal; }
table.assign .row-why:empty { display: none; }
table.assign .short-n { position: sticky; right: 0; z-index: 1; min-width: 20px; padding-left: 6px; font: 600 11px var(--mono); color: #b42318; text-align: left; white-space: nowrap; }
table.assign thead .short-n { z-index: 3; }
table.assign:not(.has-short) .short-n { display: none; }
.step-head .grid-reset { margin-left: auto; font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 640px) {
  .send-form .grid-wrap { max-height: none; overflow-x: auto; overflow-y: visible; margin: 0 -4px; padding: 0 4px 6px; }
  table.assign .cell { width: 28px; height: 28px; border-radius: 6px; }
  .row-title { width: clamp(112px, calc(100cqw - var(--n, 0) * 31px - 30px), 240px); padding-right: 8px; }
}

/* Writers by name (Yusuf and Jay, 2026-11-03): the id stays on hover. */
.who-name { color: inherit; }
.head .meta .byline { font-size: 13.5px; color: var(--ink); font-weight: 500; }
table.tasks tr.piece-row td .piece-by { margin-right: 10px; font-weight: 400; color: var(--ink-2); }
.row-title .k.by { flex: 0 1 auto; min-width: 0; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 11.5px var(--sans); color: var(--ink-3); }

/* Everything done on a piece (Yusuf, 2026-11-03): one list, newest first; each card says what it is, who, when, how long. */
.piece-results { margin-top: 28px; }
.result-list { display: grid; gap: 14px; }
.result-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--ring); padding: 16px 18px; display: grid; gap: 12px; min-width: 0; }
.result-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 13px; }
.result-kind { font-weight: 600; color: var(--ink); }
.result-who { font-weight: 500; color: var(--ink); }
.result-head .result-batch { color: var(--ink-2); text-decoration-color: var(--line-2); }
.result-head .chip { margin-left: auto; }
.result-card > p { margin: 0; font-size: 14px; line-height: 1.55; }
.result-card blockquote { margin: 0 0 6px; padding: 0; font-family: var(--serif); font-size: 14.5px; line-height: 1.55; color: var(--ink-2); font-style: italic; }
.score-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.score-tile { display: grid; gap: 2px; min-width: 76px; padding: 8px 10px; border-radius: 10px; background: var(--field); }
.score-tile b { font-size: 19px; font-weight: 600; line-height: 1.1; color: var(--ink); }
.score-tile.main { background: var(--accent-soft); }
.score-label { font-size: 11.5px; color: var(--ink-2); text-transform: capitalize; }
.score-sub { font-size: 11px; color: var(--ink-3); }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.req-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: baseline; font-size: 13.5px; }
.req-finding { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--field); color: var(--ink-2); white-space: nowrap; }
.req-finding.f-met { background: var(--accent-soft); color: var(--accent-ink); }
.req-finding.f-partly_met { background: var(--warn-soft); color: var(--warn); }
.req-finding.f-unmet { background: var(--danger-soft); color: var(--danger); }
.req-note { grid-column: 2; color: var(--ink-2); font-size: 13px; }
.answer-block h4 { margin: 0 0 3px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.answer-block p { margin: 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.passages { display: grid; gap: 10px; }
.passage-note p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.cmp-verdict { margin: 0; font-size: 15px; }
.cmp-verdict b { font-weight: 600; }
.cmp-scales { display: grid; gap: 5px; max-width: 520px; }
.cmp-row { display: grid; grid-template-columns: minmax(0, 1fr) 210px; align-items: center; gap: 12px; font-size: 13px; }
.cmp-label { text-transform: capitalize; color: var(--ink-2); }
.cmp-end { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.cmp-end span:last-child { overflow: hidden; text-overflow: ellipsis; }
.cmp-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.cmp-scale i { height: 14px; border-radius: 4px; background: #e9e9e6; }
.cmp-scale i:nth-child(3) { background: #f3f3f1; }
.cmp-scale i.on { background: var(--accent); }
.rev-brief { padding: 10px 12px; border-radius: 10px; background: var(--field); }
.rev-brief h4 { margin: 0 0 3px; font-size: 13px; font-weight: 600; }
.rev-brief p { margin: 0 0 4px; font-size: 13.5px; line-height: 1.5; }
.rev-sides { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 22px; }
.rev-col-head { font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 6px; }
.rev-cell, .rev-inline p { margin: 0 0 10px; font-family: var(--serif); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.rev-text del { background: var(--danger-soft); color: #8f2a20; text-decoration: line-through; text-decoration-color: rgba(143, 42, 32, 0.6); }
.rev-text ins, .rev-patch ins { background: #dbe8fd; color: var(--ink); text-decoration: none; }
.rev-patch del { background: var(--danger-soft); color: #8f2a20; }
.rev-inline { display: none; }
.rev-changes { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; }
.rev-patch { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-right: 8px; font-family: var(--serif); }
@media (max-width: 640px) {
  .result-card { padding: 14px; }
  .result-head .chip { margin-left: 0; }
  .rev-sides { display: none; }
  .rev-inline { display: block; }
  .cmp-row { grid-template-columns: minmax(0, 1fr) 130px; }
}

/* A piece is its writer and its title or first line; its prompt groups it (Greg, 2026-11-03). */
.piece-label { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; max-width: 100%; }
.piece-writer { font-weight: 500; color: var(--ink); white-space: nowrap; }
.piece-opening { color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Pick: a list to tick from, by prompt, the pieces indented under it. */
.choose-line.pick-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pick-line .pick-search { flex: 1 1 260px; min-width: 0; }
.pick-count { font-size: 13px; font-weight: 500; color: var(--ink); }
/* Reviewers: a comparison, a number and how many pieces fit, kept together on one line. */
.pick-reviewers-box { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pick-reviewers-hits { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.piece-pick { display: grid; gap: 1px; margin-top: 10px; padding: 4px 6px 8px; border-radius: 12px; background: var(--field); }
.pick-prompt { display: flex; align-items: baseline; gap: 8px; padding: 10px 6px 4px; font-size: 12.5px; font-weight: 600; min-width: 0; }
.pick-prompt a { color: var(--ink); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-prompt > span { flex: none; white-space: nowrap; }
.pick-piece { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 14px; align-items: center; gap: 8px; padding: 6px 6px 6px 20px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.pick-piece:hover { background: rgba(255, 255, 255, 0.7); }
.pick-piece.on { background: var(--surface); box-shadow: var(--ring); }
/* A writer picked by name who can't review these pieces, and why (Yusuf, 2026-11-04). */
.pick-body { display: grid; min-width: 0; }
.pick-blocked { font-size: 11.5px; font-weight: 400; line-height: 15px; color: #9b2c1f; }
/* Under the prompt's line, on a line of its own. */
.pick-prompt:has(> .pick-blocked, > .pick-note) { flex-wrap: wrap; row-gap: 1px; }
.pick-prompt:has(> .pick-blocked, > .pick-note) > a { flex: 1 1 0; }
.pick-prompt > .pick-blocked, .pick-prompt > .pick-note { order: 10; flex: 1 0 100%; min-width: 0; white-space: normal; }
.pick-note { font-size: 11.5px; font-weight: 400; line-height: 15px; color: var(--ink-2); }
.reviewable-only[aria-pressed="true"] { color: var(--ink); font-weight: 600; text-decoration: none; }
/* A piece already sent for review (Yusuf, 2026-11-09: see which stories were sent, so none is doubled): a chip under its
 * writer and opening, a count on its prompt's line, and a switch that hides them. */
.hide-sent[aria-pressed="true"] { color: var(--ink); font-weight: 600; text-decoration: none; }
.sent-chip { justify-self: start; display: inline-block; max-width: 100%; margin-top: 2px; padding: 1px 7px; border-radius: 999px; background: #fdf1d8; color: #7a4b00;
  font-size: 11.5px; font-weight: 500; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goes-pieces .sent-chip { margin-top: 0; }
.pick-prompt-sent { flex: none; font-size: 12px; font-weight: 500; color: #7a4b00; white-space: nowrap; }
/* What a prompt has, on its line (Jay, 2026-11-15): its AI texts, and its rubric on the button that opens it: approved in the accent, drafts in amber, none muted. */
.pick-prompt-ai { flex: none; font-size: 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.disclose.pick-rubric { font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.disclose.pick-rubric.approved { color: var(--accent-ink); }
.disclose.pick-rubric.draft { color: var(--warn); }
.disclose.pick-rubric.none { color: var(--ink-3); }
.pick-piece-ai { color: var(--ink-2); }
.pick-piece.sent:not(.on) .piece-label { opacity: .8; }
.pick-meta { display: flex; justify-content: flex-end; gap: 10px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.pick-open { color: var(--ink-3); text-decoration: none; font-size: 15px; line-height: 1; }
.pick-more { margin: 8px 6px 0; justify-self: start; }
/* The pieces that go (At random, By prompt): each prompt, its pieces under it. */
.piece-list { display: grid; gap: 10px; margin-top: 10px; }
.goes-prompt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; font-weight: 600; }
.goes-prompt a { color: var(--ink); text-decoration-color: var(--line-2); }
.goes-pieces { list-style: none; margin: 4px 0 0; padding: 0 0 0 16px; display: grid; gap: 3px; font-size: 13.5px; }
.goes-pieces li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
/* Step 5: a prompt's row over its pieces; a piece row is its writer and opening, indented. */
table.assign tr.prompt-row th, table.assign tr.prompt-row td { padding-top: 8px; }
table.assign .row-prompt { display: block; width: clamp(160px, calc(100cqw - var(--n, 0) * 25px - 30px), 320px); padding-right: 10px; box-sizing: border-box;
  font-size: 11.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.assign tr.piece-row .row-title { padding-left: 10px; color: var(--ink); text-decoration: none; overflow: hidden; }
table.assign tr.piece-row .row-title .piece-label { display: flex; }
table.assign .short-n { font: 600 11px var(--sans); }
/* A batch's tasks by piece: each piece by writer and opening, then its prompt. */
table.tasks tr.piece-row td .piece-link { color: var(--ink); text-decoration: none; margin-right: 6px; }
table.tasks tr.piece-row td .piece-prompt { margin-left: 6px; margin-right: 10px; font-weight: 400; }
@media (max-width: 640px) {
  .pick-piece { grid-template-columns: 18px minmax(0, 1fr) auto; padding-left: 12px; }
  .pick-piece .pick-open { display: none; }
  .pick-meta span:last-child { display: none; }
  table.assign .row-prompt { width: clamp(150px, calc(100cqw - var(--n, 0) * 31px - 30px), 240px); }
  /* On a phone a piece row is two short lines, its writer over its opening, in the height of a cell. */
  table.assign tr.piece-row .row-title { width: clamp(150px, calc(100cqw - var(--n, 0) * 31px - 30px), 240px); }
  table.assign tr.piece-row .row-title .piece-label { flex-direction: column; align-items: stretch; gap: 0; line-height: 14px; }
  table.assign tr.piece-row .piece-writer { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
  table.assign tr.piece-row .piece-opening { font-size: 11.5px; }
}

/* A rubric written out: the expert rubric and each prompt's own, one block each, a plain text toggle (no triangles). */
.rubric-view { display: grid; gap: 10px; margin-top: 14px; }
.rv-block { padding: 12px 14px; border-radius: 12px; background: var(--surface); box-shadow: var(--ring); min-width: 0; }
.rv-block.draft { box-shadow: var(--ring), inset 0 0 0 1px rgba(168, 100, 10, 0.25); }
.rv-head { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.rv-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; flex: 1 1 auto; }
.rv-title { font-weight: 600; font-size: 13.5px; color: var(--ink); text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.rv-version { font-size: 12.5px; color: var(--ink-2); }
.rv-version.draft { color: var(--warn); font-weight: 500; }
.rv-version.missing { color: var(--danger); }
.rv-toggle { flex: none; margin-left: auto; }
.rv-body { margin-top: 10px; display: grid; gap: 10px; }
.rv-part h4 { margin: 0 0 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.rv-items { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.45; }
.rv-items li b { font-weight: 600; margin-right: 8px; }
.rv-scale { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; color: var(--ink-2); font-size: 12.5px; }
.rv-lenses { margin: 0; font-size: 13px; color: var(--ink-2); }
.rv-checklist { list-style: none; padding: 0; }
.rv-checklist li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.rv-kind { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.rv-kind.k-requirement, .rv-kind.k-essential { color: var(--accent-ink); }
.rv-kind.k-common_failure { color: var(--danger); }
.rv-from { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.rv-from a { color: var(--ink); text-decoration-color: var(--line-2); }
.small-btn { padding: 4px 10px; font-size: 12.5px; min-height: 0; }
.rv-editor { display: grid; gap: 14px; margin-top: 10px; }
.rv-edit-group { display: grid; gap: 8px; }
.rv-edit-group h4 { margin: 0; font-size: 12.5px; font-weight: 600; }
.rv-edit-point { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; }
.rv-edit-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rv-edit-foot input { flex: 1 1 220px; }
/* A page opened in place, over the one it was opened from. */
body.sheet-open { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(17, 17, 17, 0.28); display: flex; justify-content: center; align-items: flex-start; padding: 24px 16px; overflow: auto; }
.sheet-card { width: min(1100px, 100%); background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 14px 18px 24px; }
.sheet-bar { display: flex; justify-content: flex-end; position: sticky; top: 0; z-index: 2; padding-bottom: 8px; background: var(--bg); }
@media (max-width: 640px) {
  .rv-checklist li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rv-edit-point { grid-template-columns: minmax(0, 1fr); }
  .sheet { padding: 0; }
  .sheet-card { border-radius: 0; min-height: 100%; padding: 10px 14px 24px; }
}

/* Samples by prompt (Jay, 2026-11-03): a prompt's row, its rubrics in place, its pieces indented under it. */
table.list tr.prompt-group td { background: var(--field); padding-top: 10px; padding-bottom: 10px; cursor: default; }
table.list tr.prompt-group:hover td { background: var(--field); }
.pg-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.pg-title { font-weight: 600; font-size: 13.5px; color: var(--ink); text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.pg-title:hover { text-decoration: underline; text-decoration-color: var(--line-2); }
.pg-rubrics { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.rchip { font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--ink-2); box-shadow: var(--ring); white-space: nowrap; }
.rchip.ok { color: var(--accent-ink); }
.rchip.draft { color: var(--warn); }
.rchip.none { color: var(--ink-3); box-shadow: none; background: transparent; }
table.list tr.piece-under td.primary { padding-left: 28px; }
table.list tr.rubric-row td { padding: 4px 20px 16px 78px !important; background: var(--field); cursor: default; white-space: normal; max-width: 0; }
table.list tr.rubric-row td * { white-space: normal; }
.rv-actions .linkish { margin-left: 4px; }
table.list tr.rubric-row:hover td { background: var(--field); }
.prompt-rubrics { margin-top: 0; }
.rv-actions { gap: 10px; }
table.list tr.more-row td { text-align: center; padding: 12px; cursor: default; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--ink); }
th.sortable.on { color: var(--ink); }
th.sortable.on::after { content: " \2193"; color: var(--ink-3); }
td.scan { font-variant-numeric: tabular-nums; }
td.reviews { white-space: nowrap; }
@media (max-width: 860px) {
  table.cards.list tr.prompt-group, table.cards.list tr.prompt-group:has(td.check) { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px 10px; background: var(--field); }
  .panel.flush > table.cards.list tr.prompt-group > td.check, table.cards.list tr.prompt-group > td.check { margin: 0 !important; padding: 1px 0 0 !important; grid-row: auto; display: flex; align-items: flex-start; align-self: flex-start; }
  table.cards.list tr.prompt-group td:not(.check) { flex: 1 1 auto; }
  table.cards.list tr.rubric-row { display: block; padding: 0 12px 12px; background: var(--field); }
  table.cards.list tr.rubric-row td { display: block; padding: 0; max-width: none; }
  table.cards.list tr.more-row { display: block; }
  table.list tr.piece-under td.primary { padding-left: 0; }
  table.cards.list td.scan::before { content: "Scan "; color: var(--ink-3); font-size: 12px; }
  table.cards.list td.scan, table.cards.list td.reviews { font-size: 12.5px; }
}

/* The piece column takes what the others leave, and a long opening ends in an ellipsis instead of widening the table. */
table.list.by-prompt td.primary { width: 100%; max-width: 0; }
table.list.by-prompt td.primary .line { min-width: 0; }
table.list.by-prompt td.primary .piece-label { display: flex; min-width: 0; }
@media (max-width: 860px) {
  table.list.by-prompt td.primary { width: auto; max-width: none; }
}

/* Writers to pick, with their standing: name, then six small columns; a column's name sorts by it. On a phone, the name
   with their pieces approved and reviews done. */
.pick-list.writers .pick-row, .pick-list.writers .pick-cols { grid-template-columns: 20px minmax(0, 1fr) repeat(6, 64px); }
.pick-list.writers .pick-cols > :first-child { grid-column: 1 / span 2; }
.pick-sort { border: 0; background: none; padding: 0; font: inherit; font-size: 11.5px; color: var(--ink-3); text-align: right; cursor: pointer; white-space: nowrap; }
.pick-sort:hover, .pick-sort.on { color: var(--ink); }
.pick-sort.on::after { content: " \2193"; }
@media (max-width: 900px) {
  .pick-list.writers .pick-row, .pick-list.writers .pick-cols { grid-template-columns: 20px minmax(0, 1fr) repeat(3, 54px); }
  .pick-list.writers .c-scan, .pick-list.writers .c-recent, .pick-list.writers .c-active,
  .pick-list.writers .pick-cols > :nth-child(2), .pick-list.writers .pick-cols > :nth-child(6), .pick-list.writers .pick-cols > :nth-child(7) { display: none; }
}
@media (max-width: 640px) {
  .pick-list.writers .pick-cols { display: grid; }
  .pick-list.writers .pick-num.c-submitted, .pick-list.writers .pick-num.c-approved, .pick-list.writers .pick-num.c-reviews { display: block; }
  .pick-list.writers .pick-row, .pick-list.writers .pick-cols { grid-template-columns: 20px minmax(0, 1fr) 46px 70px 56px; column-gap: 6px; }
  .pick-sort { font-size: 11px; }
}

/* The pipeline (Greg, 2026-11-03): four columns, things move across; each column by prompt, its pieces indented. */
.pipeline { margin-top: 22px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.board-col { background: var(--field); border-radius: 14px; padding: 10px; display: grid; gap: 6px; min-width: 0; }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 2px 4px 4px; }
.board-head h3 { margin: 0; font-size: 13px; font-weight: 600; }
.board-n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-group { background: var(--surface); border-radius: 10px; box-shadow: var(--ring); padding: 8px 10px; min-width: 0; }
.bg-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.bg-title { flex: 1 1 auto; min-width: 0; border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink); text-align: left; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bg-pieces { list-style: none; margin: 6px 0 0; padding: 0 0 0 10px; display: grid; gap: 4px; font-size: 12.5px; }
.bg-pieces li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bg-pieces li > a { flex: 1 1 auto; min-width: 0; color: inherit; text-decoration: none; overflow: hidden; }
.bg-pieces .piece-label { display: flex; min-width: 0; }
.bg-move { flex: none; border: 0; background: var(--field); border-radius: 6px; width: 26px; height: 22px; cursor: pointer; color: var(--ink-2); font-size: 13px; }
.bg-move:hover { background: var(--accent-soft); color: var(--accent-ink); }
.board-more { justify-self: start; padding-left: 4px; }
.board-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; background: var(--surface); border-radius: 10px; box-shadow: var(--ring); padding: 8px 10px; color: inherit; text-decoration: none; min-width: 0; }
.board-card:hover { box-shadow: var(--lift); }
.bc-title { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-sub { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bc-side .meter { flex: 1 1 auto; min-width: 40px; }
.bc-side .chip { max-width: 100%; white-space: normal; }
.bg-head .linkish, .bg-head .small-btn { flex: none; white-space: nowrap; }
.bg-head { align-items: center; }
@media (max-width: 980px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .board { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px 8px; padding: 0 16px 8px;
    scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
  .board::-webkit-scrollbar { display: none; }
  .board-col { flex: 0 0 min(84%, 20rem); scroll-snap-align: start; }
}

.board-card a.bc-title { color: var(--ink); text-decoration: none; }
.board-card a.bc-title:hover { text-decoration: underline; text-decoration-color: var(--line-2); }
.bc-prompts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; }
.bc-prompts li { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.bc-prompt { flex: 1 1 auto; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--ink-2); }
.bc-prompts li { flex-direction: column; align-items: flex-start; gap: 5px; }
.bc-prompts .small-btn { white-space: nowrap; }
.board-more { margin-top: 6px; justify-self: start; }
.bc-checklists:empty { display: none; }
.bc-checklists .rubric-view { margin-top: 6px; }
.bc-eta { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Phone (Jay, 2026-11-03: not everything could be reached): the index wraps instead of scrolling sideways under its
   arrows, so every page is in sight and none sits under an arrow; a whole board card opens its batch, its buttons still
   their own; the board's prompt names take a finger. */
.board-card { position: relative; }
.board-card a.bc-title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.board-card button, .board-card .bc-checklists, .board-card a:not(.bc-title) { position: relative; z-index: 1; }
@media (max-width: 860px) {
  .nav-row .nav, .nav.hscroll { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none !important; mask-image: none !important; }
  .nav-row .nav .nav-group { display: contents; }
  /* Three kinds, three looks (Jay, 2026-11-03): the two main buttons; the pages under Send for review (Samples, Rubrics)
     as plain links; tutorial, settings and members smaller and quieter, at the end of the same row. */
  .nav-row .nav .nav-subs { display: flex; flex: 0 1 auto; flex-wrap: wrap; min-width: 0; max-width: 100%; gap: 2px; margin: 0; }
  .nav-row .nav .nav-group.foot { display: flex; gap: 0; margin-left: auto; padding: 0; }
  .nav-row .nav .nav-group.foot a { font-size: 12px; color: var(--ink-3); padding: 6px 6px; }
  .nav-row .nav .nav-group.foot a.on { color: var(--ink); background: none; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
  .nav-row .nav { gap: 6px 4px; align-items: center; }
  .nav-row .nav .nav-subs a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 10px; }
  .nav-row .nav .nav-subs:empty { display: none; }
  .toolbar .segs { flex-wrap: nowrap !important; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .toolbar .segs::-webkit-scrollbar { display: none; }
  .toolbar .segs .seg { flex: none; white-space: nowrap; }
  .nav-more { display: none !important; }
  .bg-title { padding: 6px 0; }
  .bar .who .linkish { padding: 6px 0; }
}

/* The pages under Send for review (Samples, Rubrics) light up quietly; only the two main buttons fill dark. */
.nav-subs a.on { background: var(--hover); color: var(--ink); font-weight: 500; }
.rubric-steps-after { margin-top: 22px; }

/* Rubrics to approve, on the Dashboard: one row a prompt, read in place, approved from the row. */
.approve-list { display: grid; gap: 6px; }
.approve-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; background: var(--surface); border-radius: 10px; box-shadow: var(--ring); padding: 10px 12px; }
.approve-main { display: grid; gap: 2px; min-width: 0; }
.approve-title { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.approve-title:hover { text-decoration: underline; text-decoration-color: var(--line-2); }
.approve-actions { display: flex; gap: 6px; align-items: center; }
.approve-actions .btn.small { white-space: nowrap; }
.approve-panel { grid-column: 1 / -1; }
.approve-panel:empty { display: none; }
#rubrics-to-approve .group-head { display: flex; align-items: center; gap: 8px; margin: 0; }
#rubrics-to-approve .group-head h2 { margin: 0; }
.rta-head-side { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.rta-card .approve-list:not(:empty) { margin-top: 12px; }
.rta-card .approve-row { box-shadow: none; background: var(--field); }
@media (max-width: 640px) { .approve-row { grid-template-columns: minmax(0, 1fr); } }
.rta-holds { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; }
.rta-holds .chip { text-decoration: none; }
.rta-card .board-more { width: auto; align-self: flex-start; justify-self: start; margin-top: 10px; }
.board-more[hidden], .rta-card [hidden] { display: none !important; }

/* ---- Research (Jay, 2026-11-04): everything that makes or runs research material, each with its own button ---- */
.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; align-items: start; margin-bottom: 18px; }
.cards-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cards-row.three { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); } }
.cards-row > .dash-card, .research-last > .dash-card { margin-bottom: 0; }
.stack-cards { display: grid; gap: 18px; align-content: start; min-width: 0; }
.research-last { align-items: start; }
.block > .group-head { align-items: baseline; }
.group-head a.more { margin-left: auto; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.group-head a.more:hover { color: var(--ink); }
/* A thing to run: its name (a link to it) with the script beneath, how much it has made, and its button. */
.do-list { list-style: none; margin: 0 -10px; padding: 0; }
.do-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; min-width: 0; }
.do-main { display: grid; min-width: 0; flex: 1; text-decoration: none; color: var(--ink); }
@media (hover: hover) { .do-row:hover { background: var(--hover); } }
.do-main .mini-title .chip { margin-left: 8px; vertical-align: 1px; }
.do-main:hover .mini-title { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.do-n { flex: none; text-align: right; font-size: 13.5px; font-weight: 500; line-height: 1.25; font-variant-numeric: tabular-nums; color: var(--ink); }
.do-n span { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.do-row .small-btn { flex: none; }
.split.two { grid-template-columns: repeat(2, 1fr); }
.dash-card .section-head .muted { white-space: nowrap; }

/* Three main buttons on a phone (Dashboard, Send for review, Research) share the first row of the index, then the pages
   under them, then the tutorial, settings and members; they fit at 360 wide by shrinking a little. */
@media (max-width: 860px) {
  .nav-row .nav a.top { order: 1; }
  .nav-row .nav .nav-subs { order: 2; }
  .nav-row .nav .nav-group.foot { order: 3; }
}
@media (max-width: 420px) {
  .nav-row .nav a.top { padding: 7px 9px; gap: 6px; font-size: 13.5px; }
  .nav-row .nav { gap: 6px 4px; }
}
@media (max-width: 375px) {
  .nav-row .nav { gap: 6px 3px; }
  .nav-row .nav a.top { padding: 7px 6px; gap: 4px; font-size: 13px; }
  .nav a.top svg { width: 14px; height: 14px; }
  .nav-row .nav .nav-subs a { padding: 6px 7px; }
  .nav-row .nav .nav-group.foot a { padding: 6px 4px; }
}
/* Narrower than any phone sold now (a 320 px screen): the icons give way, the names stay. */
@media (max-width: 345px) {
  .nav-row .nav a.top { padding: 7px 8px; }
  .nav a.top svg { display: none; }
}
@media (max-width: 860px) { .block > .group-head:has(a.more) { flex-direction: row; align-items: baseline; gap: 12px; } }
.split.figure-links a { display: block; color: var(--ink); text-decoration: none; border-radius: 10px; padding: 4px 8px; margin: -4px -8px; }
@media (hover: hover) { .split.figure-links a:hover { background: var(--hover); } }
.grid2.whole > .dash-card { grid-column: 1 / -1; }
/* On a phone the small links at a card's head ("Generation ›", "All experiments ›") take a finger: the tap area reaches past the words. */
@media (max-width: 860px) {
  .dash-card .section-head a, .group-head a.more { position: relative; }
  .dash-card .section-head a::after, .group-head a.more::after { content: ""; position: absolute; inset: -12px -8px; }
}
.group-head .group-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.group-head .group-actions a.more { margin-left: 0; }

/* A pair's two lengths (E4): written beside it, and in plain words when one text is 25% or more longer. */
.length { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.length > span { white-space: nowrap; }
.length-note { margin: 10px 0 0; color: var(--ink-2); }
.length-note .hint { margin-left: 6px; vertical-align: 1px; }
table.assign .row-length { padding-top: 0; font-variant-numeric: tabular-nums; }
table.assign .row-length .length { font-size: inherit; white-space: normal; }
.length-figures { margin-top: 18px; }
@media (max-width: 640px) {
  .goes-pieces li .length { flex-basis: 100%; white-space: normal; }
}
.test-pick { width: auto; max-width: 100%; margin-left: auto; }
@media (max-width: 640px) { .group-head .test-pick { width: 100%; margin-left: 0; } }
/* The benchmark Results cite, whole, however long its name: it wraps rather than run past a phone's width. */
a.chip.cite { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: left; line-height: 1.35; padding-top: 3px; padding-bottom: 3px; }
/* A comparison's export, with a long script's name in its select, stays inside its card. */
.compare-export { min-width: 0; max-width: 100%; }
.compare-export select { max-width: 100%; min-width: 0; }

/* Benchmarks (V15): the freeze form and what would be frozen, and a frozen record's own page. */
.bench-fields { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); }
.bench-preview { display: grid; gap: 14px; margin-top: 18px; }
.bench-preview > * { min-width: 0; }
.bench-preview > button.linkish { justify-self: start; }
.bench-will { margin: 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
p.bench-problem { margin: 0 0 4px; }
p.bench-problem:last-child { margin-bottom: 0; }
.bench-lines { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
dl.facts.panel { padding: 18px 20px; margin: 0 0 14px; }
@media (max-width: 860px) {
  .bench-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bench-fields > :first-child, .bench-fields > :last-child { grid-column: 1 / -1; }
  /* A prompt on a phone: its title, then its rubric version and how many pieces are scored on one line. */
  .panel.flush table.cards.list.bench-prompts tr { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .panel.flush table.cards.list.bench-prompts td.primary { grid-column: 1 / -1; }
  .panel.flush table.cards.list.bench-prompts td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .panel.flush table.cards.list.bench-prompts td.num { grid-column: 2; grid-row: 2; text-align: right; }
}

/* ---- Members: the person editor (2026-11-04). A sheet whose foot stays in view: a role fills in the switches (View and Do), each
   can be moved after; whether their requests wait for the team's OK; how many pieces; which datasets. White page, ink, soft
   shadows; the blue accent only on what is switched on. ---- */
.sheet.person { align-items: center; }
.sheet.person .sheet-card { width: min(780px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; padding: 0; background: var(--surface); overflow: hidden; }
.person-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 6px; }
.person-head h2 { margin: 0; font-size: 17px; }
.person-head .sub { margin-top: 2px; }
.icon-btn { padding: 1px 11px 3px; font-size: 20px; line-height: 1.2; color: var(--ink-2); }
.person-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 22px 16px; }
.person-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 22px 16px; background: var(--surface); box-shadow: 0 -12px 16px -14px rgba(17, 17, 17, 0.2); }
.person-form { display: grid; gap: 18px; }
.person-form .field-title { display: flex; align-items: center; color: var(--ink-2); font-size: 12.5px; font-weight: 500; margin-bottom: 7px; }
.person-form .form-grid.halves { gap: 12px; }
.role-pick { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.role-opt { display: inline-flex; align-items: center; }
.role-btn { font: 500 13.5px var(--sans); padding: 7px 15px; border: 0; border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: var(--ring), 0 0 0 1px var(--line-soft); transition: background 0.12s, box-shadow 0.12s; }
.role-btn:hover { box-shadow: var(--lift), 0 0 0 1px var(--line); }
.role-btn[aria-checked="true"] { background: var(--ink); color: #fff; box-shadow: var(--ring); }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 32px; padding: 12px 18px 10px; border-radius: 12px; background: var(--field); }
.perm-col { display: grid; gap: 1px; align-content: start; }
.perm-col .kind { margin-bottom: 6px; }
.perm-row { display: flex; align-items: center; gap: 10px; min-height: 27px; font-size: 13.5px; cursor: pointer; }
.person-more { gap: 16px 28px; align-items: start; }
.person-col { display: grid; gap: 14px; align-content: start; }
.perm-row .hint { margin-left: 0; }
.perm-name { min-width: 0; }
.perm-row.own-row { padding: 0 2px; }
.perm-row.own-row[hidden] { display: none; }
.access-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.access-line .limit-input { width: 120px; height: 34px; }
.access-line [hidden] { display: none; }
.chip-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-pick { font: 500 13px var(--sans); padding: 6px 13px; border: 0; border-radius: 999px; background: #f1f1ef; color: var(--ink-2); cursor: pointer; transition: background 0.12s, color 0.12s; }
.chip-pick:hover { color: var(--ink); }
.chip-pick[aria-pressed="true"] { background: var(--ink); color: #fff; }
@media (max-width: 860px) {
  .sheet.person { padding: 0; align-items: stretch; }
  .sheet.person .sheet-card { width: 100%; max-height: none; height: 100%; border-radius: 0; }
  .person-head { padding: 14px 16px 4px; }
  .person-body { padding: 6px 16px 14px; }
  .person-foot { padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 600px) { .perm-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 12px 14px; } }

/* ---- What waits for someone's OK (the Dashboard) and the note beside a button whose action is waiting (2026-11-04). ---- */
.approvals:empty { display: none; }
.req-list { display: grid; gap: 6px; }
.req-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; background: var(--field); border-radius: 10px; padding: 10px 12px; }
.req-main { display: grid; gap: 2px; min-width: 0; }
.req-summary { font-weight: 500; font-size: 13.5px; overflow-wrap: anywhere; }
.req-meta, .req-facts { font-size: 12px; color: var(--ink-3); }
.req-facts { color: var(--ink-2); }
.req-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; min-width: 0; }
.req-actions input[type=text] { width: 230px; height: 32px; background: var(--surface); box-shadow: var(--ring), 0 0 0 1px var(--line-soft); }
@media (max-width: 640px) {
  .req-row { grid-template-columns: minmax(0, 1fr); }
  .req-actions { justify-content: flex-start; }
  .req-actions input[type=text] { flex: 1 1 100%; width: 100%; }
}
.req-more { justify-self: start; padding: 4px 2px; }
.waiting-note { color: var(--ink-2); font-size: 12.5px; margin-left: 8px; }

/* ---- Rubric from reviews (Research): each prompt with writers' answers and a button that drafts its rubric from them. ---- */
#rubric-from-reviews { margin-bottom: 26px; scroll-margin-top: 24px; }
.rfr-list { padding: 4px 0; }
.rfr-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; }
.rfr-row + .rfr-row { box-shadow: 0 -1px 0 var(--line-soft); }
.rfr-main { display: grid; gap: 2px; min-width: 0; }
.rfr-title { font-weight: 500; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.rfr-title:hover { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.rfr-side { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; flex: none; max-width: 100%; }
.rfr-side .chip { text-decoration: none; }
.rfr-empty .row { gap: 4px; }
@media (max-width: 640px) {
  .rfr-row { flex-direction: column; align-items: flex-start; padding: 12px 16px; }
  .rfr-side { justify-content: flex-start; flex: 1 1 auto; }
}

/* ---- Pages that show less to someone who may see less (2026-11-04). ---- */
.grid2.single, .grid2.whole { grid-template-columns: minmax(0, 1fr); }
.reading.no-text { grid-template-columns: minmax(0, 1fr); }
.reading.no-text .side-notes { position: static; }
.stage.still { cursor: default; }
.stage.still:hover { background: none; }
.loop.tiles1 { grid-template-columns: minmax(0, 1fr); }
.loop.tiles2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.loop.tiles3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .loop.tiles3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loop.tiles3 .stage:last-child:nth-child(odd) { grid-column: span 2; }
}
@media (min-width: 861px) { .run-form .form-grid.no-money { grid-template-columns: 2fr 1fr; } }

/* Prompt disclosure and the compact evaluation-count action. */
.pg-expand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; max-width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-weight: 600; text-align: left; overflow-wrap: anywhere; }
.pg-expand:hover { background: var(--paper); }
.pg-expand:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.pg-expand > span:first-child { flex: 0 0 12px; }
.evaluation-count { position: relative; display: inline-flex; vertical-align: middle; }
.evaluation-count > button { min-width: 44px; min-height: 44px; }
.evaluation-count-hint { position: absolute; z-index: 4; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 200px; padding: 7px 10px; border-radius: 6px; background: var(--ink); color: var(--paper, #fff); font-size: 12px; line-height: 1.4; opacity: 0; visibility: hidden; pointer-events: none; }
.evaluation-count:hover .evaluation-count-hint, .evaluation-count:focus-within .evaluation-count-hint { opacity: 1; visibility: visible; }

/* ---- Research (Jay, 2026-11-04): a few workspaces, one row each (its page, what it is for, the links that belong beside it), then
   Tools, closed: the inventories and one-step drafts. No cards around either. ---- */
.research-spaces { display: grid; margin: 4px 0 26px; border-top: 1px solid var(--line); }
.rs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rs-main { flex: 1 1 340px; display: grid; gap: 2px; min-width: 0; color: var(--ink); text-decoration: none; }
.rs-title { font-size: 15px; font-weight: 600; }
.rs-main:hover .rs-title { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.rs-about { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.rs-more { display: inline-flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13.5px; }
.rs-more a { display: inline-flex; align-items: center; min-height: 36px; color: var(--accent-ink); text-decoration: none; }
.rs-more a:hover { text-decoration: underline; }
.research-tools > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-height: 44px; padding: 10px 0; cursor: pointer; list-style: none; }
.research-tools > summary::-webkit-details-marker { display: none; }
.rt-title { color: var(--ink); }
.rt-title { font-size: 15px; font-weight: 600; }
.rt-about { font-size: 13px; color: var(--ink-2); }
/* The fold's line stays one line: what is in it is cut short before its arrow drops under it. */
.research-tools > summary { flex-wrap: nowrap; }
.rt-about { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.research-tools > summary::after { flex: none; }
.research-tools[open] > summary { margin-bottom: 8px; }
.tools-actions { gap: 4px 26px; margin: 0 0 12px; }
.tools-actions .do-act { margin: 0 0 0 -8px; }
.research-page .dash-card, .research-page .rfr-list { background: transparent; box-shadow: none; border-radius: 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.research-page .cards-row, .research-page .research-last { gap: 8px 32px; }
.research-page .stack-cards { gap: 8px; }
@media (max-width: 860px) {
  .rs-row { padding: 10px 0; }
  .rs-more a { min-height: 44px; }
}

/* Research's workspaces look pressable at rest (Jay, 2026-11-04: it must also look pressable): the title in the link style with an
   arrow after it, the links beside it underlined, a focus ring; nothing waits for a hover. No frame around them. */
.rs-main { padding: 4px 0; border-radius: 8px; }
.rs-title { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.rs-title::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 9px; vertical-align: 2px; border-top: 1.8px solid var(--accent-ink); border-right: 1.8px solid var(--accent-ink); transform: rotate(45deg); transition: transform 0.15s; }
.rs-main:hover .rs-title { text-decoration-color: currentColor; }
.rs-main:hover .rs-title::after { transform: translateX(3px) rotate(45deg); }
.rs-main:focus-visible, .rs-more a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.rs-more a { text-decoration: underline; text-decoration-color: rgba(37, 99, 235, 0.35); text-underline-offset: 3px; }
.rs-more a:hover { text-decoration-color: currentColor; }
@media (max-width: 860px) {
  .rs-main { min-height: 44px; align-content: center; }
  /* A prompt's own links in Samples are full touch targets too. */
  .pg-side > a, .pg-side > .linkish { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---- Samples by prompt (Jay, 2026-11-04: folded lists read poorly): a prompt's header is one top-aligned line, folded by
   default. Its box sits in a 44 px cell of its own; the chevron and name fold it; then its counts, what is selected (still
   readable folded), Prompt details and rubrics on the right. Column headings appear inside an open prompt only. ---- */
table.list tr.prompt-group td { background: transparent; border-top: 1px solid var(--line); padding-top: 4px; padding-bottom: 4px; vertical-align: top; }
table.list tr.prompt-group:hover td { background: var(--hover); }
table.list tr.prompt-group.open td { background: var(--field); }
table.list tr.prompt-group td.pg-check { width: 44px; cursor: pointer; }
table.list tr.prompt-group td.pg-check input { margin-top: 13px; }
.pg-line { align-items: center; gap: 2px 12px; }
.pg-expand { min-height: 44px; padding: 4px 6px 4px 2px; gap: 8px; }
.pg-chevron { flex: 0 0 16px; height: 16px; display: inline-grid; place-items: center; }
.pg-chevron::before { content: ""; width: 7px; height: 7px; border-right: 1.6px solid var(--ink-2); border-bottom: 1.6px solid var(--ink-2); transform: rotate(-45deg); transition: transform 0.15s; }
.pg-expand[aria-expanded="true"] .pg-chevron::before { transform: rotate(45deg); margin-top: -3px; }
.pg-name { min-width: 0; overflow-wrap: anywhere; }
.pg-facts { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pg-selected { font-size: 12.5px; font-weight: 600; color: var(--accent-ink); }
.pg-side { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-left: auto; }
table.list tr.pg-columns th { padding-top: 6px; padding-bottom: 6px; font-size: 12px; background: var(--field); border-top: 0; }
table.list tr.pg-columns th.sortable { cursor: default; }
.sort-btn { padding: 4px 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.sort-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.pg-head-info { font-weight: 400; color: var(--ink-2); }
@media (max-width: 860px) {
  table.cards.list tr.pg-columns { display: none; }
  table.cards.list tr.prompt-group, table.cards.list tr.prompt-group:has(td.check) { background: transparent; padding: 4px 0; border-top: 1px solid var(--line); border-bottom: 0; }
  table.cards.list tr.prompt-group.open { background: var(--field); }
  table.cards.list tr.prompt-group > td.pg-check { width: 44px; min-height: 44px; justify-content: center; }
  .pg-side { margin-left: 0; }
}
/* On a phone the cards layout hides table heads; Samples' head is only the select-all and its count, so it stays, as one flat row. */
@media (max-width: 860px) {
  table.cards thead.pg-thead { display: block; }
  table.cards tr.pg-head { display: flex; align-items: center; gap: 4px; padding: 0; border-bottom: 1px solid var(--line); }
  table.cards tr.pg-head th { display: block; border: 0; padding: 0; font-size: 12.5px; white-space: normal; text-transform: none; letter-spacing: 0; }
  table.cards tr.pg-head th.pg-all { display: flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; flex: none; cursor: pointer; }
}
@media (max-width: 860px) {
  /* The phone's card rows wrap; these two rows stay on one line: the 44 px box cell, then the text beside it. */
  table.cards.list tr.prompt-group, table.cards.list tr.prompt-group:has(td.check), table.cards tr.pg-head { flex-wrap: nowrap; align-items: flex-start; }
  table.cards.list tr.prompt-group > td:not(.check), table.cards tr.pg-head > th:not(.pg-all) { flex: 1 1 0; min-width: 0; }
  table.cards tr.pg-head > th:not(.pg-all) { padding: 12px 0 10px; }
}

/* Dashboard sections (Jay, 2026-11-04: the sections ran into each other): each set apart by space and a line, with its title, a
   "?" saying more and one line on what it shows. Board columns and long queues scroll inside themselves. */
.dash-section { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); }
.dash-section-head { margin: 0 2px 14px; }
.dash-section-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.01em; display: flex; align-items: center; }
.dash-section-about { margin: 3px 0 0; color: var(--ink-2); font-size: 13px; max-width: 72ch; }
.dash-section .grid2:last-child { margin-bottom: 0; }
.board-head h3 { display: inline-flex; align-items: center; }
.board-head .hint { margin-left: 5px; }
.board-scroll { display: grid; gap: 6px; align-content: start; max-height: 440px; margin: 0 -4px; padding: 2px 4px; }
.rta-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.rta-count { color: var(--ink-2); }
.req-scroll { max-height: 380px; padding-right: 4px; }
@media (max-width: 860px) {
  .dash-section { margin-top: 26px; padding-top: 16px; }
  .board-scroll { max-height: 360px; }
}

/* Research's parts as one floating bar (Jay, 2026-11-04: like a pill of tabs that stays put): the page's own parts switch here; the
   main pages stay in the index on the left. A thumb marks where you are; each part lifts on hover. */
.subnav { position: sticky; top: 12px; z-index: 30; display: flex; justify-content: center; margin: -4px 0 26px; pointer-events: none; }
.subnav-pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; background: rgba(245, 245, 243, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); border: 1px solid rgba(17, 17, 17, 0.07);
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 10px 30px -14px rgba(17, 17, 17, 0.28); }
.subnav a { position: relative; padding: 8px 16px; border-radius: 999px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease; }
.subnav a:hover { color: var(--ink); background: rgba(17, 17, 17, 0.055); }
.subnav a:active { transform: scale(0.97); }
.subnav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px rgba(17, 17, 17, 0.1), 0 0 0 1px rgba(17, 17, 17, 0.05); }
.subnav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 860px) {
  /* On a phone the bar is the width of the screen, its five parts sharing it, and solid so nothing shows through it. */
  .subnav { top: 6px; margin: 0 0 18px; }
  .subnav-pill { display: flex; width: 100%; gap: 0; padding: 4px; background: rgba(244, 244, 242, 0.97); }
  .subnav-pill { overflow-x: auto; scrollbar-width: none; }
  .subnav-pill::-webkit-scrollbar { display: none; }
  /* A part's width follows its name ("Selected pieces" is longer than "Ballots"), the rest shared out. */
  .subnav a { flex: 1 1 auto; min-width: max-content; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 7px; font-size: 12.5px; letter-spacing: -0.01em; }
  /* More parts than the phone fits: a fade at the pill's right edge says it scrolls on, gone once the last part is reached
     (lab.js toggles .more-right while there is more to the right). */
  .subnav.more-right::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 22px; border-radius: 0 999px 999px 0;
    background: linear-gradient(to right, rgba(244, 244, 242, 0), rgba(244, 244, 242, 0.97)); pointer-events: none; }
}

/* ---- Research's pages, drawn as one (Jay, 2026-11-13: too scattered, naive): the overview, Traces, Writing ----
   Two things only. A card with a name, one line under it and at most one button beside them (.rs-card): a part of Research on the
   overview, a way to start on Generate pieces. And a part of a page (.part): a card with a head (its name, a count or its state)
   over two-line rows (.do-row) that light under the pointer and end in an unframed link (.do-act). What a thing is waits behind
   its question mark; an empty part is one quiet line with no card. */
.rs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
/* An odd card out takes the whole row, so the grid ends on a straight edge whoever is looking. */
.rs-grid > .rs-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.rs-card { position: relative; min-width: 0; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); transition: box-shadow 0.18s ease; }
.rs-card-head { display: flex; align-items: center; gap: 10px 16px; min-height: 78px; padding: 14px 20px; }
.rs-card-title { flex: 1 1 0; min-width: 0; }
.rs-card-title h2 { display: flex; align-items: center; margin: 0; font-size: 15px; line-height: 1.4; }
.rs-card-title h2 a { color: inherit; text-decoration: none; }
.rs-line { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.rs-card-head > .btn, .rs-card-head > .ghost, .rs-card-head .wg-go > .btn { flex: none; padding: 7px 13px; font-size: 13px; }
.rs-card-body { padding: 6px 20px 10px; border-top: 1px solid var(--line-soft); }
/* On the overview the whole card opens its part: the name's link reaches the card's edges, a mark after the name says it can be
   pressed, and the card lifts under the pointer. The button, the question mark and the runs stay their own targets above it. */
.rs-grid .rs-card-title h2 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.rs-go { flex: none; display: inline-block; position: relative; top: -1px; width: 6px; height: 6px; margin: 0 2px 0 8px; border-top: 1.6px solid var(--accent-ink); border-right: 1.6px solid var(--accent-ink);
  transform: rotate(45deg); transition: transform 0.15s; }
.rs-grid .rs-card .btn, .rs-grid .rs-card .hint, .rs-grid .rs-card-body { position: relative; z-index: 1; }
.rs-grid .rs-card-title h2 a:focus-visible { outline: none; }
.rs-grid .rs-card-title h2 a:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) {
  .rs-grid .rs-card:has(h2 a:hover) { box-shadow: var(--shadow-lg); }
  .rs-grid .rs-card:has(h2 a:hover) .rs-go { transform: translateX(3px) rotate(45deg); }
}
@media (max-width: 960px) { .rs-grid { grid-template-columns: minmax(0, 1fr); } }

.part { min-width: 0; margin: 0 0 14px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.part-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; min-height: 54px; padding: 12px 20px; }
.part-head h2 { margin: 0; }
.part-count { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.part-side { margin-left: auto; }
.part > .do-list { margin: 0; padding: 0 10px 10px; }
.part .do-row { gap: 20px; min-height: 54px; padding: 8px 10px; }
.part .do-main { gap: 1px; }
.part .mini-title { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.part .mini-title .chip { flex: none; }
.part-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0 0 14px; color: var(--ink-2); font-size: 13.5px; }
.part-empty p { margin: 0; }
/* What a row does: an unframed link with a mark after it, in the accent for the row's own action and in ink for the others. The
   links of a list end on one edge, and a row with none keeps the place. */
.do-act { flex: none; display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; min-height: 32px; margin: -4px -8px -4px 0; padding: 0 8px; border-radius: 8px;
  color: var(--accent-ink); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background 0.12s, color 0.12s; }
.do-act::after { content: ""; flex: none; width: 5px; height: 5px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0.8; }
.do-act.none::after { display: none; }
.do-act.quiet { color: var(--ink-2); }
.do-act:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (hover: hover) {
  .do-act:hover { background: var(--accent-soft); }
  .do-act.quiet:hover { background: rgba(17, 17, 17, 0.06); color: var(--ink); }
}
.do-act.part-side { margin-left: auto; }
.do-row > .do-act { min-width: 62px; }
.do-row > .do-n { min-width: 56px; }
.do-acts { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.part .do-row:has(> .do-meta) > .do-main { flex: 5 1 0; }
.do-meta { flex: 3 1 0; max-width: 300px; display: grid; gap: 1px; min-width: 0; }
.do-meta-top { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .do-act { min-height: 44px; }
  .rs-card-head > .btn, .rs-card-head > .ghost, .rs-card-head .wg-go > .btn { min-height: 40px; }
}
/* A phone: a row's name and its line take the row's width (the line may run to two), its number and its link sit beneath. */
@media (max-width: 640px) {
  .rs-card-head { padding: 12px 16px; }
  .rs-card-body { padding: 6px 16px 8px; }
  .part-head { padding: 12px 16px; }
  .part > .do-list { padding: 0 6px 6px; }
  .part .do-row { flex-wrap: wrap; gap: 0 14px; }
  .part .do-main { flex: 1 1 100%; }
  .part .mini-sub { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .part .do-row > .do-n { min-width: 0; margin-right: auto; display: flex; align-items: baseline; min-height: 44px; align-items: center; }
  .part .do-row > .do-n span { display: inline; margin-left: 4px; font-size: 12.5px; }
  .do-meta { flex: 1 1 100%; }
  .do-acts { flex: 1 1 100%; justify-content: flex-start; gap: 22px; }
  .do-acts > .do-act { margin: 0 0 0 -8px; }
}

/* Prompt rubrics, one page: the list, and beside it one prompt or Generate rubrics; the list narrows while the panel is open. */
.rubrics-page .head { align-items: flex-start; }
.rw-waiting { margin: 0 0 22px; }
.rw-section-head { display: flex; align-items: center; gap: 10px; margin: 0 2px 10px; }
.rw-section-head h2 { margin: 0; font-size: 17px; display: inline-flex; align-items: center; }
.approval-groups { display: grid; gap: 6px; }
.approval-groups.scroll-box { max-height: 360px; padding-right: 4px; }
.ag-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 10px 14px 10px 16px; background: var(--surface);
  border-radius: 12px; box-shadow: var(--ring); transition: box-shadow 0.15s ease; }
.ag-row:hover { box-shadow: 0 1px 3px rgba(17, 17, 17, 0.12), 0 6px 16px -10px rgba(17, 17, 17, 0.3); }
.ag-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.ag-title { font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; }
a.ag-title:hover { text-decoration: underline; text-decoration-color: var(--line-2); }
.ag-sub { flex-basis: 100%; font-size: 12.5px; color: var(--ink-2); }
.ag-batch { border-left: 3px solid #f2b84b; }
.ag-live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: ag-pulse 1.4s ease-in-out infinite; }
@keyframes ag-pulse { 50% { opacity: 0.3; } }
.ag-actions { display: flex; gap: 8px; align-items: center; }
.rw-others { margin: 10px 2px 0; }
.rta-card .approval-groups .ag-row { box-shadow: none; background: var(--field); }
.rw { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.rw.split { grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr); }
.rw-list { min-width: 0; }
.rw.split .rubric-list td.rubric-state .rubric-provenance { display: none; }
.rw .rubric-list tr.on > td { background: var(--accent-soft); }
.only-chip { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; }
.only-chip[hidden] { display: none; }
.rw-panel { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); animation: rw-in 0.18s ease-out; }
.rw-panel[hidden] { display: none; }
@keyframes rw-in { from { opacity: 0; transform: translateX(12px); } }
.rw-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.rw-head h2 { margin: 0; font-size: 16.5px; line-height: 1.3; }
.rw-head p { margin: 4px 0 0; }
.rw-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 13px; }
.rw-links a { color: var(--ink-2); }
.rw-head-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.rw-close { font-size: 20px; line-height: 1; }
.rw-body { padding: 14px 18px 20px; }
.rw-ticks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.rw-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-radius: 10px; background: var(--field); cursor: pointer; }
.rw-opt:hover { background: var(--hover); }
.rw-opt input { margin-top: 3px; }
.rw-rules { width: 100%; min-height: 110px; resize: vertical; font: inherit; font-size: 14px; line-height: 1.5; }
.rubric-how { margin: 0 0 20px; }
.rubric-how[hidden] { display: none; }
@media (max-width: 1100px) {
  /* Generate rubrics sits above the list (the prompts are ticked below it); one prompt opens over the page. */
  .rw.split { grid-template-columns: minmax(0, 1fr); }
  .rw-panel { position: static; max-height: none; order: -1; }
  .rw-panel.as-sheet { position: fixed; inset: 0; z-index: 60; border-radius: 0; overflow-y: auto; }
}
.rw-opt b { font-size: 14px; font-weight: 600; }
.rw-opt .muted { display: block; margin-top: 1px; font-size: 12.5px; }

/* Samples (Jay, 2026-11-04: links dropped to a second line): a prompt's line never wraps on a wide screen; its name ends in "…". */
@media (min-width: 861px) {
  /* The line never widens the table (2026-11-05: a prompt's history made it longer): name, then facts, end in "…", its links stay. */
  .pg-line { flex-wrap: nowrap; contain: inline-size; }
  .pg-expand { flex: 0 4 auto; min-width: 160px; }
  .pg-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
  .pg-facts { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pg-selected { flex: none; white-space: nowrap; }
  .pg-side { flex: none; flex-wrap: nowrap; white-space: nowrap; }
}

/* Samples' training file: one labelled field a line, the splits side by side, each declaration a whole row. */
.training-file > summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; }
.training-file .tf-title { font-weight: 600; }
.tf-form { display: grid; gap: 16px; margin-top: 16px; }
.tf-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; }
.tf-row.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tf-row.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tf-field, .tf-pct { display: grid; gap: 6px; min-width: 0; }
.tf-label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.tf-pct input { width: 5.5em; }
.tf-hint { margin: 0 0 9px; }
.tf-checks { display: grid; gap: 8px; }
.tf-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-radius: 10px; background: var(--field); cursor: pointer; }
.tf-check input { margin-top: 3px; }
.tf-check .muted { display: block; }
.tf-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.tf-foot p { margin: 0; flex: 1 1 320px; }
@media (max-width: 700px) { .tf-row.two, .tf-row.three { grid-template-columns: minmax(0, 1fr); } }
.size-note:empty { display: none; }

/* Samples: an open prompt's pieces sit under it, indented on a guide line (Jay, 2026-11-04: no indentation read as rough). */
@media (min-width: 861px) {
  /* The whole piece row sits in, its box under the prompt's name (no guide line: Jay, 2026-11-04). */
  table.list tr.piece-under td.check input { position: relative; left: 56px; }
  table.list tr.piece-under td.check + td.primary, table.list tr.pg-columns th.check + th[data-sort="writer"] { padding-left: 74px; }
  /* Without boxes (someone with nothing to do with ticked pieces) the indent is in the piece's own cell. */
  table.list tr.piece-under td.primary:first-child, table.list tr.pg-columns th[data-sort="writer"]:first-child { padding-left: 56px; }
  table.list tr.piece-under td { background: var(--surface); }
  table.list tr.pg-columns th { color: var(--ink-3); font-weight: 500; }
}
@media (max-width: 860px) {
  table.cards.list tr.piece-under { margin-left: 18px; }
}

/* Send for review's rubric chooser (Jay, 2026-11-04: one dropdown, few words): the prompt, then its one dropdown with Read and Open
   beside it; a note only when there is something to know; the chosen rubric's items open in place. */
.send-rubrics-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.send-rubric { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 6px 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.send-rubric-title { font-weight: 500; font-size: 14px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.send-rubric-pick { display: flex; align-items: center; gap: 12px; min-width: 0; }
.send-rubric-pick select { flex: 1; min-width: 0; }
.send-rubric-pick a, .send-rubric-pick .linkish { flex: none; white-space: nowrap; }
.send-rubric-note { grid-column: 2; }
.send-rubric-items { grid-column: 1 / -1; padding: 10px 12px; border-radius: 10px; background: var(--field); }
.send-rubric-items[hidden] { display: none; }
.send-rubric-criteria { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13.5px; }
.send-rubric-criteria .small { color: var(--ink-2); margin-top: 2px; }
.send-rubric-groups { display: grid; gap: 14px; }
.send-rubric-group { display: grid; gap: 6px; }
.send-rubric-group-title { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.send-rubric-kind { display: flex; align-items: center; gap: 5px; margin: 0 0 4px; font-weight: 600; }
@media (max-width: 760px) { .send-rubric { grid-template-columns: minmax(0, 1fr); } .send-rubric-note { grid-column: 1; } }

/* Send for review's writers (Jay, 2026-11-04: keep the column names, and divide the rows): the names stay at the top of the list while
   it scrolls, and a hairline sits between writers. */
.pick-wrap .pick-list.writers { padding-top: 0; }
.pick-wrap .pick-list.writers > .pick-cols { position: sticky; top: 0; z-index: 2; padding-top: 10px; padding-bottom: 8px; background: var(--field);
  border-bottom: 1px solid var(--line-2); font-weight: 500; }
.pick-list.writers > li + li:not(.pick-cols) .pick-row { border-top: 1px solid var(--line); }
.pick-list.writers > .pick-cols + li .pick-row { border-top: 0; }

/* Rubrics: the general rubrics first, then the prompt rubrics, each its own section. */
.rw-general { margin: 0 0 30px; scroll-margin-top: 80px; }
.general-rubrics { display: grid; gap: 10px; }
.rw-prompts-head { margin-top: 6px; padding-top: 22px; border-top: 1px solid var(--line); }
.rw-section-head h3 { margin: 0; font-size: 14.5px; display: inline-flex; align-items: center; }

/* Send for review's pieces by prompt (Jay, 2026-11-04): a prompt's line has a box for all its pieces and folds them; the pieces sit
   indented under it on a guide line. */
.piece-pick .pick-prompt { display: flex; align-items: center; gap: 10px; padding: 6px 6px; margin-top: 4px; border-radius: 8px; font-size: 13.5px; font-weight: 600; }
.piece-pick .pick-prompt:hover { background: rgba(255, 255, 255, 0.6); }
.piece-pick .pick-prompt.some { background: var(--surface); box-shadow: var(--ring); }
.pick-all { flex: none; width: 18px; height: 18px; margin: 0; }
.pick-fold { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; padding: 4px 4px; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.pick-fold:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.pick-fold[aria-expanded="true"] .pg-chevron::before { transform: rotate(45deg); margin-top: -3px; }
.pick-prompt-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-prompt-count { flex: none; font-size: 12.5px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.pick-prompt.some .pick-prompt-count { color: var(--accent-ink); }
.piece-pick .pick-prompt > .linkish { margin-left: auto; flex: none; }
/* A prompt's facts (pieces, sent, AI texts, its rubric) sit in its line on a wide screen and wrap as one under its title on a phone. */
.pick-prompt-facts { display: contents; }
.piece-pick .pick-prompt.open ~ .pick-piece { margin-left: 28px; }
/* On a phone a prompt's title takes its own line beside its box; its counts and Rubric go under it, in line with the title. */
@media (max-width: 640px) {
  .piece-pick .pick-prompt { flex-wrap: wrap; row-gap: 0; }
  .piece-pick .pick-prompt > .pick-fold { flex: 1 1 calc(100% - 40px); }
  .piece-pick .pick-prompt > .pick-prompt-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; flex: 1 1 100%; min-width: 0; padding-left: 58px; }
  .piece-pick .pick-prompt-facts > .disclose.pick-rubric { margin: 0; padding: 2px 0; }
}

/* Send's review form: the general rubric (always), then a switch that adds each prompt's own rubric, its dropdowns right under it. */
.rv-add-prompt { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; margin: 10px 0 0; padding: 12px 16px; border-radius: 12px;
  background: var(--surface); box-shadow: var(--ring); cursor: pointer; }
.rv-add-prompt:hover { box-shadow: 0 1px 3px rgba(17, 17, 17, 0.12), 0 6px 16px -10px rgba(17, 17, 17, 0.3); }
.rv-add-text { display: grid; gap: 1px; }
.rv-add-text b { font-size: 14px; font-weight: 600; }
.rv-add-prompt + .send-rubrics .send-rubrics-list { margin-top: 8px; }

.promptsets .scroll-box { max-height: min(62vh, 620px); }
.promptsets .scroll-box > table > thead th { background: var(--surface); }

/* Approval rows: the two buttons keep their widths, so they line up from row to row (Jay, 2026-11-04). */
.ag-actions { display: grid; grid-template-columns: 104px 132px; gap: 8px; align-items: center; }
.ag-actions .ag-read, .ag-actions .ag-approve { width: 100%; justify-content: center; text-align: center; }
.ag-actions .ag-read:only-child { grid-column: 1; }
@media (max-width: 640px) { .ag-row { grid-template-columns: minmax(0, 1fr); } .ag-actions { grid-template-columns: 1fr 1fr; } }

.send-rubric-made { display: grid; gap: 3px; margin: 0 0 10px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.send-rubric-made p { margin: 0; }
.send-rubric-made a { color: var(--ink); }
/* The chosen version, read under its prompt on Send for review: how it was made with Edit at its right; editing it there (Jay, 2026-11-14) keeps Save in sight at the box's foot. */
.send-rubric-lead { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 12px; }
.send-rubric-lead > :first-child { flex: 1 1 240px; min-width: 0; }
.send-rubric-lead .send-rubric-made { margin: 0; padding: 0; border-bottom: 0; }
.send-rubric-lead > p { margin: 4px 0 0; }
.send-rubric-acts { display: inline-flex; align-items: center; gap: 2px; margin-right: -9px; }
.send-rubric-lead .rb-quiet { color: var(--accent-ink); }
.send-rubric-lead .rb-quiet:hover { background: var(--accent-soft); }
.send-rubric-edit { margin-right: -9px; }
.send-rubric-items .rb-foot { margin: 6px -12px -10px; padding: 10px 12px; background: var(--field); border-top: 0; box-shadow: 0 -1px 0 var(--line-soft); }
.send-rubric-items .rb-foot input { background: var(--surface); }
.send-rubric-items select.criterion-kind { width: auto; min-width: 0; }

.rv-kind { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.rv-kind + .rv-block, .rv-kind + .send-rubrics { margin-top: 0; }

/* Research cards on a phone: a batch's or run's state goes under its name, so the name is never cut short. */
@media (max-width: 860px) {
  .rs-card ul.mini li a { flex-wrap: wrap; row-gap: 4px; }
  .rs-card .mini-main { flex-basis: 100%; }
  .rs-card .mini-title { white-space: normal; }
  .rs-card .mini-side { flex-basis: 100%; }
}
/* Samples on a phone: a prompt's line has one rule above it (the row's), not the cells' too. */
@media (max-width: 860px) { table.list tr.prompt-group td { border-top: 0; } }
/* Send for review on a phone: its buttons stack, each one normal height (a width of 180px set for a row became a 180px height in the
   column: Send was a huge block; Jay, 2026-11-04). The reason Send is off reads as a sentence above it. */
@media (max-width: 860px) {
  .send-form > .form-foot .send-buttons > button { flex: 0 0 auto; min-height: 46px; }
}

/* Downloads: a tab a kind of file (Jay, 2026-11-05: every download in one place, none on Samples). */
.downloads .dl-main { display: grid; gap: 14px; }
.dl-main > p { margin: 0; }
.dl-line { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.dl-line h2 { margin: 0 0 4px; }
.dl-line p { margin: 0; }
.dl-fields { display: grid; gap: 12px; }
.dl-field { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); align-items: center; gap: 12px; }
.dl-field select { max-width: 440px; }
.dl-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.dl-ballots { display: grid; }
.dl-ballot { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.dl-ballot:first-child { border-top: 0; padding-top: 4px; }
.dl-ballot .row { margin-top: 0 !important; flex-wrap: nowrap; align-items: center; gap: 8px; }
.dl-ballot select { width: auto; min-width: 200px; }
.training-file .tf-about { margin: 0; }
.training-file .tf-form { margin-top: 14px; }
@media (max-width: 860px) {
  .dl-field { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .dl-field select { max-width: none; }
  .dl-line > .btn { width: 100%; text-align: center; }
  .dl-ballot .row { flex-wrap: wrap; width: 100%; }
  .dl-ballot select { flex: 1 1 100%; min-width: 0; }
}

/* Seeing the lab as another member (2026-11-05): a slim bar over everything, the floating bars below it. */
.va-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: nowrap;
  box-sizing: border-box; height: 46px; padding: 0 16px; background: #1d1d1b; color: #f6f6f3; font-size: 13px; letter-spacing: -0.005em; }
.va-bar .va-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.va-bar b { font-weight: 600; }
.va-bar .va-meta { color: rgba(246, 246, 243, 0.68); }
.va-eye { width: 8px; height: 8px; border-radius: 999px; background: #f5b13d; box-shadow: 0 0 0 3px rgba(245, 177, 61, 0.22); flex: 0 0 auto; }
.va-bar .va-stop { padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(246, 246, 243, 0.35); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.va-bar .va-stop:hover { background: rgba(246, 246, 243, 0.12); }
body.viewing-as .subnav { top: 58px; }
/* The bar takes its 46px from the page: the side index and the page under it are that much shorter, so neither scrolls the page. */
body.viewing-as .shell { min-height: calc(100vh - 46px); }
body.viewing-as .bar { top: 46px; height: calc(100vh - 46px); }
.va-bar .va-short { display: none; }
.va-bar .va-ro { color: rgba(246, 246, 243, 0.68); }
@media (max-width: 860px) {
  .va-bar { justify-content: space-between; font-size: 13px; gap: 10px; padding: 0 12px; }
  .va-bar .va-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .va-bar .va-long, .va-bar .va-meta { display: none; }
  .va-bar .va-short { display: inline; }
  .va-bar .va-stop { flex: 0 0 auto; }
  body.viewing-as .subnav { top: 52px; }
}

/* A prompt's history under its row on Samples (2026-11-05, it needs more depth): a white card a part on the open row's grey, lined up with
   the prompt's name; a count in each head; each entry its name and where it stands, then a tag for its kind and when. */
tr.history-row > td { padding: 2px 20px 18px 78px !important; background: var(--field); }
.prompt-history { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; gap: 12px; padding-top: 4px; }
.ph-card { min-width: 0; padding: 12px 14px 4px; border-radius: 12px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.06), 0 0 0 1px rgba(17, 17, 17, 0.045); }
.ph-card.empty { padding-bottom: 12px; background: transparent; box-shadow: none; border: 1px dashed rgba(17, 17, 17, 0.16); }
.ph-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.ph-head h4 { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.ph-count { min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--field); color: var(--ink); font-size: 11.5px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.ph-list { list-style: none; margin: 0; padding: 0; }
.ph-list li { min-width: 0; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.ph-list li:first-child { border-top: 0; }
.ph-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.ph-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 500; color: var(--ink); }
a.ph-main { text-decoration: none; }
a.ph-main:hover { text-decoration: underline; }
.ph-num { flex: none; white-space: nowrap; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ph-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-size: 12px; color: var(--ink-2); }
.ph-tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px; background: var(--field); color: var(--ink-2); font-size: 11.5px; }
.ph-empty { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); }
.ph-card .chip { flex: none; padding: 1px 8px; font-size: 11px; }
.prompt-history-block { margin-bottom: 18px; }
@media (max-width: 860px) { tr.history-row > td { padding: 2px 12px 14px !important; } .prompt-history { grid-template-columns: minmax(0, 1fr); } }

/* The pieces under an open prompt begin below its cards, not against them. */
tr.history-row + tr:not(.rubric-row) > td, tr.rubric-row + tr > td { border-top: 1px solid var(--line-soft); }

/* On a phone the open prompt's cards sit on one grey band from edge to edge, history and rubric alike (2026-11-05). */
@media (max-width: 860px) {
  table.cards.list tr.history-row, table.cards.list tr.rubric-row { display: block; padding: 0 12px 12px; background: var(--field); }
  table.cards.list tr.history-row > td, table.cards.list tr.rubric-row > td { display: block; padding: 0 !important; max-width: none; background: none; }
}

/* ---- Samples: the prompts, and the one chosen open on the right (Jay, 2026-11-05) ------------------------------------------ */
/* Only the pieces with a trace (Write with AI set for it from Generate pieces): one soft chip under the filters; it clears itself. */
.sp-layout.with-detail { display: grid; grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
main:has(.sp-layout.with-detail) { max-width: 1500px; }
.sp-list tr.prompt-group { cursor: pointer; }
.sp-list tr.prompt-group > td { transition: background-color 0.12s; }
.sp-list tr.prompt-group.on > td { background: var(--field); }
.sp-list tr.prompt-group.on .pg-name { color: var(--ink); }
.sp-list tr.prompt-group.on > td:last-child { box-shadow: inset -3px 0 0 var(--ink); }
.pg-open { all: unset; cursor: pointer; min-width: 0; display: inline-flex; font-weight: 600; font-size: 14px; color: var(--ink); }
.pg-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sp-list .pg-facts { display: block; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.sp-detail { display: none; }
.sp-layout.with-detail > .sp-detail { display: flex; flex-direction: column; min-width: 0; position: sticky; top: 14px; overflow: hidden;
  border-radius: var(--radius-lg, 16px); background: var(--surface); box-shadow: var(--ring), 0 18px 40px -24px rgba(17, 17, 17, 0.22); animation: rw-in 0.2s ease-out; }
.sp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 8px; }
.sp-title { min-width: 0; }
.sp-title h2 { margin: 0 0 4px; font-size: 17px; line-height: 1.3; }
.sp-title .pg-facts { color: var(--ink-2); }
.sp-close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 999px; background: var(--field); color: var(--ink-2); font-size: 18px; line-height: 1; cursor: pointer; transition: background-color 0.12s; }
.sp-close:hover { background: var(--hover); color: var(--ink); }
.sp-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; padding: 6px 18px 12px; border-bottom: 1px solid var(--line-soft); }
.sp-tabs .seg { display: inline-flex; align-items: center; gap: 6px; }
.sp-n { min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--field); font-size: 11.5px; font-weight: 600; text-align: center; }
.sp-links { display: inline-flex; align-items: center; gap: 12px; }
.sp-body { padding: 14px 18px 18px; }
.sp-body.flush { padding: 0; }
.sp-body > .prompt-history { grid-template-columns: minmax(0, 1fr); padding-top: 0; }
.sp-body > table.sp-pieces { width: 100%; }
.sp-body > table.sp-pieces th:first-child, .sp-body > table.sp-pieces td:first-child { padding-left: 18px; }
.sp-body > table.sp-pieces th:last-child, .sp-body > table.sp-pieces td:last-child { padding-right: 18px; }
.sp-body > table.sp-pieces > thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
@media (max-width: 860px) {
  .sp-layout.with-detail { display: block; }
  .sp-layout.with-detail > .sp-detail { position: fixed; inset: 0; z-index: 55; border-radius: 0; animation: rise-in 0.22s ease-out; }
  /* Over the prompt on a phone, the selection bar stays in reach. */
  body:has(.sp-layout.with-detail) .selectionbar { z-index: 57; }
  body.viewing-as .sp-layout.with-detail > .sp-detail { top: 46px; }
  .sp-layout.with-detail > .sp-detail .sp-body { flex: 1 1 auto; max-height: none !important; }
  /* The bar of what to do with the ticked pieces stands at the foot of a phone's screen: the list scrolls clear of it. */
  body:has(.selectionbar.shown) .sp-layout.with-detail > .sp-detail .sp-body { padding-bottom: 160px; }
  .sp-head { padding: 14px 16px 6px; }
  .sp-bar { padding: 6px 16px 10px; }
}

/* ---- the index: open beside the page, folded while the page is in two columns (Jay, 2026-11-05) ----------------------------
   On a wide screen with a pointer the index stays open, every page in it by name (if it is not in the two-column state, the sidebar can stay). While a
   prompt is open beside a list (Samples, Rubrics) it folds to Grégoire's EQ mark and a short line where each name was, the page's own
   line dark and its part's line grey, so the strip reads as the index (people must still be able to tell it can be opened); it opens over the page while the
   pointer (or the keyboard) is in it, each line turning back into its name. A moment's wait before it opens, so passing over it does
   nothing. A touch screen keeps it open; a phone keeps its two rows. */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-logo { width: 26px; height: 27px; flex: none; }
@media (max-width: 860px) { .brand-logo { width: 22px; height: 23px; } }
/* The wide logo (Greg's "the eq company"): a mask filled with the ink colour. Only where it has room: the open sidebar, the sign-in page included (the mark stays
   for the folded strip and the phone bar). */
.eq-wordmark { display: none; flex: none; aspect-ratio: 640 / 140; background: currentColor;
  -webkit-mask: url(eq-wordmark.png) left center / contain no-repeat; mask: url(eq-wordmark.png) left center / contain no-repeat; }
@media (min-width: 861px) and (hover: hover) {
  .shell:not(:has(.sp-layout.with-detail, .rw.split)) > header .brand { flex-direction: column; align-items: flex-start; gap: 7px; }
  .shell:not(:has(.sp-layout.with-detail, .rw.split)) > header .brand-logo { display: none; }
  .shell:not(:has(.sp-layout.with-detail, .rw.split)) > header .eq-wordmark { display: block; width: 148px; }
  .shell:not(:has(.sp-layout.with-detail, .rw.split)) > header .brand-text { font-size: 12.5px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
}
@media (min-width: 861px) and (hover: hover) {
  .shell { grid-template-columns: 236px minmax(0, 1fr); }
  .shell > header { position: relative; z-index: 45; }
  .shell > header > .bar { width: 236px; padding: 26px 0 20px 0; overflow: hidden; background: var(--bg);
    transition: width 0.2s var(--ease-out, ease-out) 0.05s, box-shadow 0.2s ease 0.05s; }
  .shell > header > .bar > * { width: 236px; padding-left: 19px; padding-right: 18px; box-sizing: border-box; }
  .shell > header > .bar > .brand { padding-left: 19px; }
  .shell > header > .bar > .who { padding-left: 29px; }
  .shell > header .nav-row { display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .shell > header .nav-row > .nav { height: 100%; overflow: visible; }
  .shell > header .brand-text, .shell > header > .bar > .who { transition: opacity 0.18s ease 0.16s, visibility 0s linear 0.12s; }
  .selectionbar { left: calc(50% + 118px); }
  /* Each name's line, drawn while the index is folded: under the mark, at the name's height; Samples' indented like its name, the
     foot's shorter and lighter. */
  .shell > header .nav a { position: relative; }
  .shell > header .nav a::before { content: ""; position: absolute; top: calc(50% - 1px); left: 3px; width: 20px; height: 2px; border-radius: 1px;
    background: rgba(17, 17, 17, 0.28); opacity: 0; pointer-events: none; transition: opacity 0.1s ease 0.12s; }
  .shell > header .nav-subs a::before { left: -7px; width: 16px; }
  .shell > header .nav-group.foot a::before { width: 14px; background: var(--line-2); }
  .shell > header .nav-group:has(a.on) > a.top::before { background: var(--ink-3); }
  .shell > header .nav a.on::before { background: var(--ink); }
  /* Two columns: the strip, opening over the page. */
  .shell:has(.sp-layout.with-detail, .rw.split) { grid-template-columns: 64px minmax(0, 1fr); }
  .shell:has(.sp-layout.with-detail, .rw.split) > header > .bar { width: 64px; }
  .shell:has(.sp-layout.with-detail, .rw.split) > header:hover > .bar, .shell:has(.sp-layout.with-detail, .rw.split) > header:focus-within > .bar { width: 236px; box-shadow: 18px 0 40px -18px rgba(17, 17, 17, 0.24); transition-delay: 0.12s; }
  .shell:has(.sp-layout.with-detail, .rw.split) > header .nav a { transition: background-color 0.12s, color 0.18s ease 0.14s; }
  .shell:has(.sp-layout.with-detail, .rw.split) > header .nav a.on { transition: background-color 0.18s ease 0.14s, color 0.18s ease 0.14s; }
  .shell:has(.sp-layout.with-detail, .rw.split) > header:not(:hover):not(:focus-within) .nav a { color: transparent; background-color: transparent; transition: color 0.1s, background-color 0.1s; }
  .shell:has(.sp-layout.with-detail, .rw.split) > header:not(:hover):not(:focus-within) .nav a::before { opacity: 1; transition: opacity 0.18s ease 0.1s; }
  .shell:has(.sp-layout.with-detail, .rw.split) > header:not(:hover):not(:focus-within) .brand-text, .shell:has(.sp-layout.with-detail, .rw.split) > header:not(:hover):not(:focus-within) > .bar > .who { opacity: 0; visibility: hidden; transition: opacity 0.12s ease, visibility 0s linear 0.12s; }
  body:has(.rw.split) .selectionbar { left: calc(50% + 32px); }
}
/* Two columns, the logo (Jay, 2026-11-14: when folded only the logo shows, and hovering over the sidebar expands it): the folded strip shows the eq of the wide logo alone, where the
   mark stood; as the strip opens, the wide logo grows out of it, "the" before and "company" after, the eq sliding to its place, and "Research lab"
   comes in under it, as on a page with the sidebar open. The eq is the wide logo's own (640 x 140: its glyph at x 151 to 252), so it never changes
   shape; the index under it stands where it does with the sidebar open. */
@media (min-width: 861px) and (hover: hover) {
  .shell:has(.sp-layout.with-detail, .rw.split) > header .brand { flex-direction: column; align-items: flex-start; gap: 7px; }
  .shell:has(.sp-layout.with-detail, .rw.split) > header .brand-logo { display: none; }
  .shell:has(.sp-layout.with-detail, .rw.split) > header .eq-wordmark { display: block; width: 148px; clip-path: inset(0 0 0 0); transform: translateX(0);
    transition: clip-path 0.28s var(--ease-out, ease-out) 0.12s, transform 0.28s var(--ease-out, ease-out) 0.12s; }
  .shell:has(.sp-layout.with-detail, .rw.split) > header:not(:hover):not(:focus-within) .eq-wordmark { clip-path: inset(0 calc(100% - 58.6px) 0 34.6px); transform: translateX(-34.6px);
    transition-duration: 0.16s; transition-delay: 0s; }
  .shell:has(.sp-layout.with-detail, .rw.split) > header .brand-text { font-size: 12.5px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) { .shell > header > .bar, .shell > header > .bar > *, .shell > header .brand-text, .shell > header .nav a, .shell > header .nav a::before, .shell > header .eq-wordmark { transition: none !important; } }

/* A prompt's pieces in the panel (2026-11-05): two lines a piece, not six columns. The tick box; the writer and opening, then the
   words; on the right its QA and date, then its scan score and reviews. */
.sp-pieces thead { display: none; }
.sp-pieces tbody { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; column-gap: 14px; }
/* Each row takes its columns from the list (subgrid), so the QA chips, dates, scores and reviews line up from row to row. */
.sp-pieces tbody tr { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; column-gap: 14px; row-gap: 3px; align-items: center;
  padding: 11px 18px 11px 0; border-bottom: 1px solid var(--line-soft); }
.sp-pieces tbody tr:last-child { border-bottom: 0; }
.sp-pieces tbody td { display: block; padding: 0 !important; border: 0 !important; background: none !important; min-width: 0; }
.sp-pieces td.check { grid-column: 1; grid-row: 1 / span 2; justify-self: stretch; }
/* The tick box in the middle of its column, so it sits as far in from the panel's edge as the list's do (Jay, 2026-11-05: this is too close to the edge). */
table.list.sp-pieces tbody td.check { width: auto; display: flex !important; justify-content: center; }
.sp-pieces td.primary { grid-column: 2; grid-row: 1 / span 2; }
.sp-pieces td.primary .line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-pieces td.qa { grid-column: 3; grid-row: 1; justify-self: end; text-align: right; }
.sp-pieces td.qa .sub { max-width: 200px; margin-left: auto; }
.sp-pieces td.date { grid-column: 4; grid-row: 1; justify-self: end; color: var(--ink-2); font-size: 12.5px; }
.sp-pieces td.scan { grid-column: 3; grid-row: 2; justify-self: end; font-size: 12px; color: var(--ink-2); }
.sp-pieces td.reviews { grid-column: 4; grid-row: 2; justify-self: end; font-size: 12px; }
.sp-pieces tbody tr:hover { background: var(--field); }
.sp-list .pg-line { padding-right: 4px; }
@media (max-width: 860px) { .sp-pieces tbody { grid-template-columns: 44px minmax(0, 1fr) auto; } .sp-pieces tbody tr { padding-right: 14px; } .sp-pieces td.date, .sp-pieces td.reviews { grid-column: 3; } .sp-pieces td.date { grid-row: 2; } .sp-pieces td.scan, .sp-pieces td.reviews { display: none; } }
table.list.sp-pieces tr.piece-under td.check input { position: static; left: auto; }
.sp-list .pg-facts { contain: inline-size; }

/* ---- Samples to the window's bottom (Jay, 2026-11-05: it should expand to the bottom of the page): lab.js gives .fill-down its height; the list and
   the prompt beside it fill it, each list scrolling inside. Room at the end of each list for the selection bar and Feedback. ---- */
@media (min-width: 861px) {
  main:has(.fill-down) { padding-bottom: 20px !important; }
  .sp-layout.fill-down { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 16px; }
  .sp-layout.fill-down.with-detail { grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.25fr); align-items: stretch; }
  .sp-layout.fill-down > .sp-list, .sp-layout.fill-down.with-detail > .sp-detail { display: flex; flex-direction: column; min-height: 0; height: 100%; }
  .sp-layout.fill-down.with-detail > .sp-detail { position: relative; top: auto; }
  .sp-layout.fill-down > .sp-list > .scroll-box, .sp-layout.fill-down > .sp-detail > .sp-body { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
  .sp-layout.fill-down > .sp-detail > .sp-body { padding-bottom: 24px; }
  .sp-layout.fill-down > .sp-detail > .sp-body.flush { padding-bottom: 8px; }
  /* What to do with the ticked pieces, in the row above the list beside the pager (Jay, 2026-11-05: this may get in the way): the same bar,
     standing in the row instead of floating over the lists; its menus open downwards. The row keeps its height either way. */
  .pager-top.sp-top { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-bottom: 10px; }
  .pager-top.sp-top > .pager { margin: 0 2px 0 auto; }
  .sp-top > .selectionbar { position: relative; left: auto; bottom: auto; z-index: 6; transform: translateY(4px); box-shadow: var(--ring), 0 6px 18px -10px rgba(17, 17, 17, 0.3); }
  .sp-top > .selectionbar.shown { transform: none; }
  .sp-top > .selectionbar details.menu.up .menu-list { top: calc(100% + 8px); bottom: auto; }
}
@media (max-width: 860px) { .sp-pieces tbody { grid-template-columns: 52px minmax(0, 1fr) auto; } }

/* A prompt's history (Jay, 2026-11-05: none of them can be opened or folded to see details): a card's head folds it; each entry is one target, a batch or a
   benchmark opening its page and a way of writing opening its texts in place, each text opening itself. */
.ph-fold { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 2px; padding: 2px 0; cursor: pointer; }
.ph-fold:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.ph-chev { width: 7px; height: 7px; margin-left: auto; margin-right: 4px; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3); transform: translateY(-2px) rotate(45deg); transition: transform 0.16s var(--ease-out, ease-out); flex: none; }
.ph-fold:hover .ph-chev { border-color: var(--ink); }
.ph-card.folded .ph-fold .ph-chev { transform: rotate(-45deg); }
.ph-card.folded { padding-bottom: 12px; }
.ph-card.folded > .ph-list { display: none; }
.ph-link { all: unset; box-sizing: border-box; display: block; margin: -6px -8px; padding: 6px 8px; width: calc(100% + 16px); border-radius: 9px; cursor: pointer; transition: background-color 0.12s; }
.ph-link:hover { background: var(--field); }
.ph-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.ph-link .ph-main { flex: 1 1 auto; text-decoration: none; }
.ph-go { flex: none; color: var(--ink-3); font-size: 15px; line-height: 1; }
.ph-link:hover .ph-go { color: var(--ink); }
.ph-link .ph-chev { margin-left: 0; }
li.open > .ph-link .ph-chev { transform: translateY(1px) rotate(-135deg); }
.ph-texts { margin: 8px 0 2px; padding: 4px 0 2px 12px; border-left: 2px solid var(--line-soft); animation: drop-in 0.2s var(--ease-out, ease-out) backwards; }
.ph-texts-list { list-style: none; margin: 0; padding: 0; }
.ph-texts-list li { padding: 0; }
.ph-texts-list a { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13px; }
.ph-texts-list a:hover { background: var(--field); }
.ph-texts-list .ph-main { flex: 1 1 auto; font-size: 13px; font-weight: 500; }
.ph-method { display: inline-block; margin: 6px 0 2px; font-size: 12.5px; color: var(--ink-2); }
.ph-texts > .ph-empty { margin: 4px 0; }
@media (prefers-reduced-motion: reduce) { .ph-chev { transition: none; } .ph-texts { animation: none; } }

/* The Prompt tab (Jay, 2026-11-05: the prompt's own details must be shown too): the prompt's whole text, its brief on a soft ground, then what it
   has, a label and a line each; a line that has more opens the tab that shows it. */
.prompt-about { display: grid; gap: 16px; }
.pa-text { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 500; color: var(--ink); }
.pa-brief { padding: 12px 16px; border-radius: 12px; background: var(--field); color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.pa-brief .prose p { margin: 0 0 8px; }
.pa-brief .prose p:last-child { margin-bottom: 0; }
.pa-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 22px; margin: 0; align-items: baseline; }
.pa-row { display: contents; }
.pa-facts dt { font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.pa-facts dd { margin: 0; min-width: 0; font-size: 13.5px; color: var(--ink); }
.pa-facts code { font-size: 12px; color: var(--ink-2); }
.pa-facts .chip { margin-right: 6px; }
.pa-to { all: unset; cursor: pointer; color: var(--ink); border-radius: 6px; }
.pa-to:hover { text-decoration: underline; text-underline-offset: 3px; }
.pa-to:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sp-title h2 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* A status dot (Sam's script, the rubric run page, a trace run): black made, blue pulsing generating, blue ring queued, red failed, red ring still waiting, grey ring nothing. The colour and the word carry the state. */
.st-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.st-dot.made { background: var(--ink); box-shadow: none; }
.st-dot.generating { background: var(--accent); box-shadow: none; animation: st-pulse 1.4s ease-in-out infinite; }
.st-dot.queued { box-shadow: inset 0 0 0 2px var(--accent); }
.st-dot.failed { background: var(--danger); box-shadow: none; }
.st-dot.waiting { box-shadow: inset 0 0 0 2px var(--danger); }
@keyframes st-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .st-dot.generating { animation: none; } }

/* A page docked in a panel beside a list (public/peek.js dock): its head (‹ back, a label, Full page ›, ✕), then the page in a box of its own that scrolls. */
.dk-head { display: flex; align-items: center; gap: 8px; flex: none; padding: 8px 10px 8px 12px; box-shadow: inset 0 -1px 0 var(--line-soft); }
.dk-label { min-width: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-gap { flex: 1 1 auto; }
.dk-back { font-size: 21px; padding-bottom: 2px; }
.dk-full { flex: none; color: var(--accent-ink); }
.dk-full:hover { background: var(--accent-soft); }
.dock-body.peek-body { flex: 1 1 auto; min-height: 0; padding: 16px 18px 24px; overflow-y: auto; overscroll-behavior: contain; }
.sp-detail.docked { display: flex; flex-direction: column; }

/* ---- the window over the page (peek.js; Jay, 2026-11-05: it should be a floating window, it should not keep jumping around) -----------------------
   A prompt, a piece, a text, a script, an experiment, a batch, a benchmark, a rubric or a review opens here, in front of everything
   but notes and tips: its head (‹ back, what it is, Full page, ×) stays while its page scrolls inside. */
.sheet.peek { align-items: center; padding: 24px; }
.sheet.peek > .sheet-card { width: min(1120px, 100%); height: min(940px, calc(100vh - 48px)); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.peek-head { display: flex; align-items: center; gap: 10px; flex: none; padding: 12px 16px 12px 20px; border-bottom: 1px solid var(--line-soft); background: var(--bg); }
.peek-back { font-size: 21px; padding-bottom: 2px; }
.peek-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.peek-gap { flex: 1 1 auto; }
.peek-full { font-size: 13px; color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 9px; }
.peek-full:hover { background: var(--hover); color: var(--ink); }
.peek-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 26px 40px 48px; }
.peek-body.loading .sk { animation: sk-breathe 1.6s ease-in-out infinite; }
.peek-body .scroll-box.tall { max-height: min(62vh, 560px); min-height: 0; }
@media (max-width: 860px) {
  .sheet.peek { padding: 0; align-items: stretch; }
  .sheet.peek > .sheet-card { width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .peek-head { padding: 10px 12px 10px 14px; }
  .peek-body { padding: 18px 16px 40px; }
}

/* What to do with the ticked pieces, in the list's own head row in place of its count (Jay, 2026-11-05: the row above the list held a
   pager, now gone: "all scroll"). Nothing moves when a piece is ticked and nothing covers the list; its menus open downwards over the
   rows. On a phone it stays at the foot of the screen. */
@media (min-width: 861px) {
  .pg-head .selectionbar { position: static; left: auto; bottom: auto; transform: none; z-index: auto; padding: 0; margin: -4px 0; border-radius: 0;
    background: none; box-shadow: none; text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 400; transition: opacity 0.16s; }
  .pg-head .selectionbar:not(.shown) { display: none; }
  /* Beside an open prompt the list is narrow: the bar wraps (each button whole) rather than run under the prompt. */
  .pg-head .selectionbar { flex-wrap: wrap; row-gap: 4px; white-space: normal; }
  .pg-head .selectionbar > * { white-space: nowrap; }
  .pg-head:has(.selectionbar.shown) .pg-head-info { display: none; }
  .pg-head .selectionbar details.menu.up .menu-list { top: calc(100% + 8px); bottom: auto; }
}
/* On a phone the bar floats at the foot of the screen but is still a child of the list's box, and the box's fade (a mask, style.css `more-below`) clips and un-clicks everything inside
   it, fixed or not: the bar was invisible and Research, Send for review and Mark could not be pressed. While the bar shows, the box keeps no fade. */
@media (max-width: 860px) {
  body:has(.selectionbar.shown) .sp-list .scroll-box.more-below { -webkit-mask-image: none; mask-image: none; }
  /* The feedback button (bottom right, drawn above the list's box) sat on the bar's last button; it waits while the bar shows, as it does while a mail is composed (mail.css). */
  body:has(.selectionbar.shown) .workspace-feedback-button { display: none; }
}

/* ---- One scroll, the list's (Jay, 2026-11-05: fix 146 first) ----
   Rubrics: the general rubrics fold to one line; the list and the prompt beside it fill the window below the head, like Samples. */
.rw-general-fold { margin: 0 0 22px; scroll-margin-top: 80px; }
.rw-general-fold > summary { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-radius: 14px; background: var(--surface); box-shadow: var(--ring); cursor: pointer; list-style: none; }
.rw-general-fold > summary::-webkit-details-marker, .rw-general-fold > summary::after { display: none; }
.rw-general-fold > summary:hover { background: var(--field); }
.rw-general-fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rw-fold-name { flex: none; font-weight: 600; font-size: 15px; color: var(--ink); white-space: nowrap; }
.rw-fold-line { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-general-fold > summary .ph-chev { transform: rotate(-45deg); }
.rw-general-fold[open] > summary .ph-chev { transform: translateY(-2px) rotate(45deg); }
.rw-general-fold[open] > summary { margin-bottom: 12px; }
.rw-prompts-head .rw-how { margin-left: auto; }
.rw-how[aria-expanded="true"] { color: var(--ink); }
@media (min-width: 861px) {
  .rw.fill-down { grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .rw.fill-down > .rw-list { display: flex; flex-direction: column; min-height: 0; }
  .rw.fill-down > .rw-list > .panel.flush { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
  .rw.fill-down > .rw-panel { position: relative; top: auto; max-height: none; min-height: 0; }
  /* In the window over a page the window scrolls: the list keeps a box, the prompt beside it stays in sight. */
  .peek-body .rw.fill-down > .rw-list > .panel.flush { max-height: min(62vh, 560px); }
  .peek-body .rw.fill-down > .rw-panel { position: sticky; top: 0; align-self: start; max-height: min(70vh, 640px); }
}
/* A page whose one list reaches the window's bottom keeps a small foot under it (the Feedback button is kept clear by lab.js). */
main:has(.scroll-box.tall[data-fill]) { padding-bottom: 24px; }
/* Send for review: a prompt's rubric opened under it lines up with the prompt's name, a child of its row. */
.piece-pick > .pr-inline { margin: 2px 8px 14px 66px; }
@media (max-width: 860px) { .piece-pick > .pr-inline { margin-left: 12px; } }
/* A list's panel that scrolls (lab.js autoPage): its column names stand at the very top, with nothing showing above them. */
.panel.flush.scroll-box { padding-top: 0; }
/* Members: the people in a box of their own (its rows' menus open over it, lab.js overTheBox). */
.panel.flush.people.scroll-box { overflow: hidden auto; }

/* The Dashboard after Yusuf's notes (2026-11-06): a section's link to its page beside its title; the prompt sets and the pieces' stages
   folded to one line each, like the general rubrics on Rubrics. */
.dash-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dash-more { flex: none; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.dash-more:hover { color: var(--ink); }
.dash-section.folded { margin-top: 12px; padding-top: 0; border-top: 0; }
.dash-section:not(.folded) + .dash-section.folded { margin-top: 34px; }
.dash-fold > summary { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-radius: 14px; background: var(--surface); box-shadow: var(--ring); cursor: pointer; list-style: none; }
.dash-fold > summary::-webkit-details-marker, .dash-fold > summary::after { display: none; }
.dash-fold > summary:hover { background: var(--field); }
.dash-fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dash-fold-name { flex: none; font-weight: 600; font-size: 15px; color: var(--ink); white-space: nowrap; }
.dash-fold-line { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-size: 13px; }
.dash-fold > summary .ph-chev { transform: rotate(-45deg); }
.dash-fold[open] > summary .ph-chev { transform: translateY(-2px) rotate(45deg); }
.dash-fold[open] > summary { margin-bottom: 12px; }
.dash-fold-about { margin: 0 2px 12px; }
/* The review form's editor: one part at a time, each item folded to its name. */
.rv-edit-tabs { justify-self: start; margin: 0; }
/* Its fields as tall as their words (a name is one line), not the page's 90px boxes. */
.rv-editor textarea { min-height: 0; field-sizing: content; font-size: 14px; line-height: 1.45; }
.rv-edit-fold { margin: 0 0 8px; border-radius: 10px; background: var(--surface); box-shadow: var(--ring); }
.rv-edit-fold > summary:hover { background: var(--field); border-radius: 10px; }
.rv-edit-fold > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; font-weight: 600; font-size: 14px; color: var(--ink); }
.rv-edit-fold > summary::-webkit-details-marker, .rv-edit-fold > summary::after { display: none; }
.rv-edit-fold > summary .ph-chev { transform: rotate(-45deg); }
.rv-edit-fold[open] > summary .ph-chev { transform: translateY(-2px) rotate(45deg); }
.rv-edit-fold > :not(summary) { margin: 0 14px 12px; }
.rv-edit-part > .field { margin-bottom: 12px; }
@media (max-width: 640px) {
  .dash-fold > summary { flex-wrap: wrap; row-gap: 4px; }
  .dash-fold-line { flex-basis: 100%; order: 3; white-space: normal; }
}
/* The form editor's own controls on an item, and adding one (Jay, 2026-11-06). */
.rv-edit-tools { display: flex; gap: 16px; }
.rv-edit-fold > .rv-edit-tools { margin: 4px 14px 16px; }
.rv-edit-remove { color: var(--danger); }
.rv-edit-check { margin-top: 2px; }
.rv-edit-add { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.rv-edit-add select { width: auto; }

/* ---- Send for review: how many reviews each piece already has (Yusuf + Ryan, 2026-11-12) ----------------------------------- */
.choose-line.pick-line .pipeline { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 10px; border-radius: 10px; background: var(--field); font-size: 12.5px; color: var(--ink-2); }
.pk-key { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
.pk-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pk-ready { width: 14px; height: 10px; border-radius: 3px; background: #e6f4ea; box-shadow: inset 0 0 0 1px #b7dfc3; }
.pipeline-target { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pipeline-target .target-n { width: 52px; padding: 3px 6px; font-size: 12.5px; text-align: center; }
.stage-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.stage-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.stage-chip:hover { background: var(--surface); }
.stage-chip[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--ring); }
.stage-chip .sc-n { color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 500; }
.sc-dot { width: 7px; height: 7px; border-radius: 50%; background: #c9c9cc; }
.sc-short .sc-dot { background: var(--accent); }
.sc-waiting .sc-dot { background: #e0a336; }
.sc-ready .sc-dot { background: #2f9e55; }

/* The dots: one a review the target asks for. Done: filled. Sent but not answered: a ring. Missing: faint. */
.rm-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #d4d4d8; flex: none; }
.rm-dot.done { background: var(--ink); box-shadow: none; }
.rm-dot.open { box-shadow: inset 0 0 0 2px #e0a336; }
.rmeter { display: inline-flex; align-items: center; gap: 7px; padding: 2px 6px; margin: -2px -6px; border: 0; border-radius: 6px; background: transparent; font: inherit; color: var(--ink-2); cursor: pointer; }
.rmeter:hover { background: rgba(17, 17, 17, 0.05); }
.rm-dots { display: inline-flex; align-items: center; gap: 3px; }
.rm-extra { font-size: 11px; color: var(--ink-3); margin-left: 2px; }
.rm-num { font-size: 12.5px; font-variant-numeric: tabular-nums; min-width: 24px; }
.rmeter.stage-none .rm-num { color: var(--ink-3); }
.rmeter.stage-ready .rm-num, .rmeter.stage-ready .rm-num { color: #1f7a3a; font-weight: 700; }
.rmeter.stage-ready .rm-dot.done { background: #2f9e55; }
.rk-tag { font-size: 11px; padding: 0 6px; border-radius: 999px; background: rgba(17, 17, 17, 0.06); color: var(--ink-2); white-space: nowrap; }

/* Rows: checkbox, piece, reviews, length, open. A piece with enough reviews is tinted; one never reviewed reads a touch bolder. */
.piece-pick .pick-piece { grid-template-columns: 18px minmax(0, 1fr) 230px 128px 14px; }
.pick-reviews { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pick-piece.stage-ready { background: #f0f8f2; }
.pick-piece.stage-ready:hover { background: #e6f4ea; }
.pick-piece.stage-ready.on { background: #f0f8f2; box-shadow: inset 0 0 0 1px #b7dfc3; }
.pick-piece.stage-none .piece-writer { font-weight: 650; }
.pick-piece.sent:not(.on) .piece-label { opacity: 1; }
.piece-pick > .pick-cols { display: grid; grid-template-columns: minmax(0, 1fr) 230px 128px; gap: 8px; padding: 6px 34px 2px 54px; font-size: 11.5px; color: var(--ink-3); position: sticky; top: 0; background: var(--field); z-index: 1; border-radius: 12px 12px 0 0; }
.piece-pick > .pick-cols span:last-child { text-align: right; }
.pick-prompt-stages { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }

/* Who reviewed a piece, opened from its dots. */
.pick-history { margin: -1px 6px 6px 54px; padding: 8px 12px; border-radius: 8px; background: var(--surface); box-shadow: var(--ring); font-size: 12.5px; }
.piece-pick .pick-prompt.open ~ .pick-history { margin-left: 82px; }
.pick-history ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.pick-history li { display: grid; grid-template-columns: 74px 78px minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 10px; align-items: center; }
.pick-history li > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ph-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.ph-open .ph-dot { background: transparent; box-shadow: inset 0 0 0 2px #e0a336; }
.ph-open .ph-status { color: #8a5a00; }
.ph-skipped { color: var(--ink-3); }
.ph-skipped .ph-dot { background: #d4d4d8; }
.ph-kind, .ph-when { color: var(--ink-3); }
.ph-batch { color: var(--ink-2); }

/* The chosen pieces, said under the list. */
.pick-summary { margin-top: 8px; padding: 8px 12px; border-radius: 10px; font-size: 13px; color: var(--ink-2); }
.pick-summary.warn { background: var(--warn-soft); color: var(--warn); }
.pick-summary .linkish { margin-left: 4px; }

/* One sentence under each step's title saying what it is for, in plain words. */
.step-lede { margin: -8px 0 14px 32px; font-size: 13px; color: var(--ink-2); max-width: 72ch; }
.task-about { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-2); max-width: 60ch; }

@media (max-width: 860px) {
  .piece-pick .pick-piece { grid-template-columns: 18px minmax(0, 1fr) auto; }
  .pick-piece .pick-meta { display: none; }
  .piece-pick > .pick-cols { display: none; }
  .pick-history { margin-left: 12px; }
  .pick-history li { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .pick-history .ph-kind, .pick-history .ph-batch { display: none; }
  .stage-chips { margin-left: 0; }
  .step-lede { margin-left: 0; }
}
/* ---- The piece page as tabs (Part 5; Jay, 2026-11-13: show samples should not show all of the text at once, as it takes long scrolling to reach the bottom) ----------------------------------------
   The head stays. Under it one sticky row of tabs; one tab's body at a time, filling to the window's bottom (lab.js .fill-down), so nothing on the page grows it: the final piece
   and the notes each scroll in a box of their own, side by side. In the window beside a page and on a phone the piece is one column that scrolls with the page, with Brief and
   notes a fold above it (closed), and the tabs stay at the top. */
.pt-page { min-width: 0; }
.pt-page > .head { margin-bottom: 8px; }
.pt-tabs-row { position: sticky; top: 0; z-index: 6; margin: 0 -4px 10px; padding: 6px 4px; background: var(--bg); }
/* A phone's strip scrolls sideways: an edge with more tabs behind it fades into the pill's own colour. */
.pt-tabs-row.more-left::before, .pt-tabs-row.more-right::after { content: ""; position: absolute; top: 6px; bottom: 6px; width: 30px; pointer-events: none; z-index: 1; }
.pt-tabs-row.more-left::before { left: 4px; border-radius: 12px 0 0 12px; background: linear-gradient(to left, rgba(241, 241, 239, 0), #f1f1ef 80%); }
.pt-tabs-row.more-right::after { right: 4px; border-radius: 0 12px 12px 0; background: linear-gradient(to right, rgba(241, 241, 239, 0), #f1f1ef 80%); }
.pt-tabs-row .segs { max-width: 100%; }
.pt-body { min-width: 0; }
/* In the window beside a page the scroll is the window body's, which has padding above it: the stuck row reaches up through that padding, so nothing shows above it. */
.pt-in-peek .pt-tabs-row { top: -26px; }
.pt-quiet-row { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.pt-open-reviews.rb-quiet { text-decoration: none; }
.pt-scrollbody > .panel:first-child, .pt-scrollbody > .piece-results { margin-top: 0; }
.pt-scrollbody .piece-results { margin-top: 0; }
/* One column (the window, a phone): the piece as a panel, the notes a closed fold over it. */
.pt-piece.one { display: grid; gap: 12px; }
.pt-piece.one .piece { padding: 20px 18px 8px; margin: 0; }
.pt-piece.one .piece .prose { max-width: 70ch; margin-top: 12px; }
.pt-piece.one > .side-notes { position: static; }
.pt-notes-fold { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--ring); }
.pt-notes-fold > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; font-weight: 600; cursor: pointer; list-style: none; }
.pt-notes-fold > summary::-webkit-details-marker { display: none; }
.pt-notes-fold > summary::after { content: ""; width: 7px; height: 7px; margin: -3px 2px 0 auto; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(45deg); transition: transform 0.12s; }
.pt-notes-fold[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.pt-notes-fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius-lg); }
.pt-notes-fold > .side-notes { position: static; gap: 0; padding: 0 0 6px; }
.pt-notes-fold > .side-notes .panel { box-shadow: none; background: transparent; border-radius: 0; border-top: 1px solid var(--line-soft); padding: 14px 16px; }
@media (min-width: 861px) {
  main:has(.pt-page:not(.pt-in-peek)) { max-width: 1240px; }
  .pt-page:not(.pt-in-peek) > .pt-body { overflow: hidden; }
  .pt-page:not(.pt-in-peek) .pt-scrollbody, .pt-page:not(.pt-in-peek) .pt-piece.one { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 2px 6px 24px 2px; }
  .pt-page:not(.pt-in-peek) .pt-piece.one { align-content: start; }
  /* Two boxes, each to the window's bottom with its own scroll: the final piece, and what stands beside it. */
  .pt-piece.two { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; height: 100%; }
  .pt-piece.two > .pt-box { min-height: 0; height: 100%; max-height: none; background: var(--surface); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line); }   /* inside the border box: a scroll box's fade mask would cut a ring or shadow outside it */
  .pt-piece.two > .pt-box-text > .piece { box-shadow: none; background: transparent; margin: 0; padding: 30px 40px 28px; }
  .pt-piece.two > .pt-box-text > .piece .prose { max-width: 68ch; margin-top: 12px; }
  .pt-piece.two > .pt-box-side > .side-notes { position: static; gap: 0; }
  .pt-piece.two > .pt-box-side > .side-notes > .panel { box-shadow: none; background: transparent; border-radius: 0; margin: 0; padding: 16px 20px; }
  .pt-piece.two > .pt-box-side > .side-notes > .panel + .panel { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 860px) {
  .pt-in-peek .pt-tabs-row { top: -18px; }
  .pt-tabs-row { margin-left: -2px; margin-right: -2px; }
  .pt-tabs-row .segs { display: flex; width: 100%; }
  .pt-body .piece-results .result-card { padding: 14px; }
}

/* Send for review (Jay, 2026-11-14): the number and what it is per on one line; a comparison's two sides as two columns in the Pieces step; the row that
   narrows the pieces on one line of one height, what is chosen and the switches on the line under it. */
.count-pick { flex-wrap: nowrap; }
.count-pick input[type=number] { width: 64px; }
.count-pick .count-unit { flex: 1 1 auto; min-width: 0; width: auto; }
.cmp-box { display: grid; gap: 10px; margin: 0 0 16px; }
.cmp-box[hidden] { display: none; }
.cmp-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.cmp-col { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 14px 16px; border-radius: 12px; background: var(--field, #f6f6f4); }
.cmp-head { display: flex; align-items: center; gap: 10px; }
.cmp-letter { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); box-shadow: var(--ring); font-size: 12.5px; font-weight: 700; color: var(--ink); }
.cmp-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.cmp-about { margin: 0; font-size: 13px; color: var(--ink-2); }
.cmp-col .gen-field { margin: 0; }
.cmp-col .gen-field > span:first-child { font-size: 12.5px; color: var(--ink-3); }
.cmp-col .gen-field .select-open { max-width: none; }
.cmp-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.cmp-foot .texts-box { flex: 1 1 auto; min-width: 0; }
.cmp-foot .texts-box:empty { display: none; }
.cmp-similar { flex: none; margin-left: auto; }
.choose.one { align-items: center; }
/* Pick's two rows (the search, then the menus): the ways of choosing sit level with the search. */
.choose.one:has(> .pick-line) { align-items: flex-start; }
/* The search on a line of its own, the menus that narrow the list under it, each as wide as its words (Jay, 2026-11-15: with "Prompts with", one line had no room). */
.choose-line.pick-line { flex-wrap: wrap; }
.choose-line.pick-line .pick-search { flex: 1 1 100%; width: auto; min-width: 0; }
.choose-line.pick-line > select, .choose-line.pick-line > .pick-reviewers-box { flex: none; }
.pick-status { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 2px 2px 10px; font-size: 13px; color: var(--ink-2); }
.pick-status[hidden] { display: none; }
.pick-status-chosen, .pick-status-switches { display: inline-flex; align-items: center; gap: 12px; }
.pick-status-switches:empty { display: none; }
@media (max-width: 860px) {
  .cmp-cols { grid-template-columns: minmax(0, 1fr); }
  .choose-line.pick-line { flex-wrap: wrap; }
}
.gen-slot:empty { display: none; }

/* The one Compare (public/compare_pick.js): A and B each Writers or AI; the one list of A's kind beside the pairs, each with its B. */
.cp .cmp-head { gap: 10px; }
.cp .cp-kind .seg { padding: 4px 12px; }
.cp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 12px; }
@media (max-width: 900px) { .cp-body { grid-template-columns: 1fr; } }
.cp-pick { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cp-list { max-height: 460px; overflow: auto; border-radius: 12px; background: var(--field); padding: 4px; }
/* Beside the pairs on a wide screen the list stays in view while the pairs scroll, and is as tall as the screen allows (Jay, 2026-11-15: the column went empty
   beside a long list of pairs). On a phone the two stack and nothing sticks. */
@media (min-width: 901px) {
  .cp-pick { position: sticky; top: 12px; align-self: start; }
  /* Never taller than nine or so prompts (Jay, 2026-11-17: the prompt list is far too long): the search and the filter find the rest. */
  .cp-list { max-height: min(460px, calc(100vh - 140px)); }
}
/* AI reviewers (Send for review, Reviewers; Jay, 2026-11-19): each a script and a model beside the people, one row each, then the one way to add another. */
.who-ai { display: grid; gap: 8px; margin-top: 14px; }
.who-ai .ai-head { display: flex; gap: 6px; align-items: baseline; margin: 0; }
.who-ai .ai-list { display: grid; gap: 8px; }
.who-ai .ai-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px 12px; align-items: end; }
.who-ai .ai-name { font-weight: 600; font-size: 13px; align-self: center; min-width: 0; overflow-wrap: anywhere; }
.who-ai .ai-tag { margin-right: 8px; font: 600 10px/14px var(--mono); color: var(--ink-3); }
.who-ai .ai-pick { display: grid; gap: 2px; min-width: 0; }
.who-ai .ai-pick select { width: 100%; min-width: 0; }
.who-ai .ai-add { justify-self: start; }
.who-ai .ai-note { margin: 0; }
@media (max-width: 860px) { .who-ai .ai-row { grid-template-columns: minmax(0, 1fr) auto; } .who-ai .ai-name { grid-column: 1; } .who-ai .ai-remove { grid-column: 2; grid-row: 1; } .who-ai .ai-pick { grid-column: 1 / -1; } }
.cp-group + .cp-group { border-top: 1px solid var(--line-soft); }
.cp-prompt { display: flex; width: 100%; gap: 10px; align-items: baseline; justify-content: space-between; padding: 9px 10px; background: none; border: 0; text-align: left; cursor: pointer; font: inherit; }
.cp-prompt-title { font-weight: 600; font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-prompt-n { flex: none; font-size: 12px; color: var(--ink-3); }
.cp-group.on .cp-prompt-n { color: var(--accent, #2563eb); }
.cp-rows { padding: 0 6px 8px 6px; }
.cp-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 6px; border-radius: 8px; font-size: 13px; }
.cp-row-wrap:hover, .cp-row-wrap.on { background: var(--surface); border-radius: 8px; }
.cp-open { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.cp-details { padding: 2px 10px 10px 34px; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
.cp-details p { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; margin: 2px 0; }
.cp-k { color: var(--ink-3); }
.cp-excerpt { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: var(--field); white-space: pre-wrap; font-family: var(--serif, Georgia, serif); font-size: 13px; color: var(--ink); max-height: 220px; overflow: auto; }
.cp-prompt-main { display: grid; gap: 1px; min-width: 0; flex: 1 1 auto; }
/* A group folds: its arrow, as on Pick's prompts (Jay, 2026-11-15: why can it not be folded). */
.cp-prompt > .pg-chevron { align-self: center; margin-left: -4px; }
.cp-prompt[aria-expanded="true"] > .pg-chevron::before { transform: rotate(45deg); margin-top: -3px; }
.cp-prompt-facts { font-size: 12px; font-weight: 400; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-sub, .cp-words { color: var(--ink-3); font-size: 12px; }
.cp-words { white-space: nowrap; }
/* What a chosen piece carries (flagged by QA, set aside, test set), said where it is listed: marked, never dropped (Jay, 2026-11-19). */
.cp-mark { color: #9b2c1f; font-size: 12px; }
.cp-pairs { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cp-pairs-head { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.cp-pair { padding: 10px 12px; border-radius: 12px; background: var(--field); }
.cp-pair-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cp-pair-sides { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; font-size: 13px; }
.cp-side { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; min-width: 0; }
.cp-side .cp-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-letter.small { width: 18px; height: 18px; font-size: 11px; }
.cp-gap { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
/* B's line is a picker: a field with ▾ at its end, the letters of A and B on one edge. */
.cp-pair-sides .cp-side { padding: 5px 8px; }
.cp-bpick { width: 100%; border: 0; border-radius: 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.cp-bpick:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.cp-bpick.open { box-shadow: inset 0 0 0 2px var(--accent, #2563eb); }
.cp-bpick .cp-chev { justify-self: end; margin: 0 2px 0 0; }
.cp-bpick[aria-expanded="true"] .cp-chev { transform: translateY(2px) rotate(-135deg); }
.cp-gap.bad { color: var(--danger); }
/* B's choices: a panel under its picker; the one chosen marked by a tick and a tint, never a ring the list's scrolling cuts (Jay, 2026-11-15: this looks odd). */
.cp-options { display: flex; flex-direction: column; gap: 0; margin-top: 6px; padding: 4px; max-height: 240px; overflow: auto; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cp-option { display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; border: 0; border-radius: 8px; background: var(--surface); cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.cp-options .cp-option { background: transparent; color: inherit; }
.cp-options .cp-option:hover { background: var(--hover); }
.cp-options .cp-option.on { background: var(--accent-soft); }
.cp-options .cp-option.on .cp-name::before { content: "\2713  "; color: var(--accent-ink); font-weight: 700; }
.cp-options .cp-option:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--accent, #2563eb); }
.cp-none { padding: 10px; }
.pick-area[hidden] { display: none; }
.sp-clear { margin-left: 10px; font-size: 12.5px; }

/* Generate pieces' list for Write with AI's choice: a kind's traces, or the prompts with a rubric (public/generate_lists.js). */
.sp-list-title { flex: none; margin: 12px 16px 4px; font-size: 14px; font-weight: 600; }
/* Tick all: a small line above the rows, not a row of its own kind. */
.gl-every { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; padding: 6px 10px 8px; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink-3); cursor: pointer; }
.gl-every-text { font-weight: 500; letter-spacing: .02em; text-transform: uppercase; font-size: 11.5px; }
.gl-every-n { margin-left: auto; font-variant-numeric: tabular-nums; }
/* The list's filter, already chosen (Greg and Jay, 2026-11-19): Samples' own controls (QA in segments, the mark in a menu) under the search, on its edges; at the
 * line's end what they hide and why. */
.gl-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 14px 10px; }
.gl-filter[hidden] { display: none; }
.gl-filter .segs { height: 34px; align-items: center; }
.gl-filter select { width: auto; height: 34px; padding-top: 0; padding-bottom: 0; }
.gl-filter-says { margin-left: auto; min-width: 0; font-size: 12.5px; line-height: 1.4; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gl-out { font-size: 12.5px; color: var(--ink-2); }
.gl-dropout { margin-left: auto; font-size: 12.5px; font-weight: 400; }
.gl-dropout[hidden] { display: none; }
/* Send for review's Pieces step: the tidy set as an ordinary control, already set, with what it hides beside it (Jay, 2026-11-19). */
.piece-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.piece-filter[hidden] { display: none; }
.piece-filter .segs { height: 34px; align-items: center; }
.piece-filter select { width: auto; height: 34px; padding-top: 0; padding-bottom: 0; }
.piece-filter-says { margin-left: auto; min-width: 0; font-size: 12.5px; line-height: 1.4; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pick-out { color: #9b2c1f; }
.going-line { font-size: 12.5px; color: var(--ink-2); }
.gl { display: flex; flex-direction: column; min-height: 0; }
.gl-bar { padding: 6px 14px 8px; }
.gl-list { padding: 0 6px 8px; }
.gl-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.gl-row:hover, .gl-row.on { background: var(--field); }
.gl-row + .gl-row { margin-top: 1px; }
.gl-text { display: grid; gap: 1px; min-width: 0; }
.gl-title { font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-sub { font-size: 12px; color: var(--ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-none { padding: 12px 10px; }
.cp-empty { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 8px 4px; font-size: 13px; color: var(--ink-2); }

/* Samples' and Generate pieces' list on a phone (Jay, 2026-11-15: fix this one's top and bottom too): one left edge for the list's tabs, the box over every prompt and each prompt's box;
   each box beside its prompt's first line, not the middle of a long one; the count and the names on one edge; a pressed row lit as one, with no seam between its box and its name. */
@media (max-width: 860px) {
  .sp-list-title { margin-left: 14px; }
  .sp-list table.cards tr.pg-head { gap: 10px; }
  .sp-list table.cards tr.pg-head th.pg-all { padding: 0 !important; }
  .sp-list table.cards.list tr.prompt-group > td.pg-check { align-self: flex-start !important; align-items: flex-start !important; min-height: 0; padding: 0 !important; }
  .sp-list table.cards.list tr.prompt-group > td.pg-check input { margin-top: 1px; }
  .sp-list table.cards.list tr.prompt-group:hover > td { background: transparent; }
}
@media (max-width: 860px) and (hover: hover) {
  .sp-list table.cards.list tr.prompt-group:not(.open):hover { background: var(--hover); }
}

/* A generated text's page: Send for review, then Details (where it came from and what came back) folded beside it. */
.gen-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 14px; margin: 0 0 14px; }
.gen-more { min-width: 0; }
.gen-more > summary { display: inline-flex; align-items: center; height: 36px; padding: 0 4px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; list-style: none; }
.gen-more > summary::-webkit-details-marker { display: none; }
.gen-more > summary::after { content: ""; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.gen-more[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.gen-more-links { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 4px 2px; font-size: 13px; }

/* Compare's list: the search and "N ticked" (the ticked alone) on one line; a generation's head is its box, then its name, what wrote it and when. */
.cp-bar { display: flex; align-items: center; gap: 8px; }
.cp-bar .cp-search { flex: 1 1 auto; min-width: 0; }
.cp-bar .cp-has { flex: none; width: auto; max-width: 48%; }
/* On a phone the search has its line, Prompts with and "N ticked" the one under it. */
@media (max-width: 640px) {
  .cp-bar { flex-wrap: wrap; }
  .cp-bar .cp-search { flex: 1 1 100%; }
  .cp-bar .cp-has { flex: 1 1 auto; max-width: none; }
}
.cp-ticked { flex: none; height: 34px; padding: 0 12px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.cp-ticked[hidden] { display: none; }
.cp-ticked[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.cp-gen-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 0 4px; padding-left: 12px; }
.cp-gen-head .cp-all { margin-top: 12px; }
.cp-gen-head .cp-prompt { min-width: 0; }
/* Buttons keep the page's text colour (Safari paints a button's text blue). */
.cp-prompt, .cp-open, .cp-option, .cp-bpick { color: inherit; }
/* A generation's texts one step in under it; its name and what wrote it wrap rather than being cut. */
.cp-gen .cp-rows { padding-left: 26px; }
.cp-gen .cp-prompt-title, .cp-gen .cp-prompt-facts { white-space: normal; overflow: visible; text-overflow: clip; }
/* Generate pieces' list head: "Show N ticked" (the ticked alone) beside Clear. */
.sp-show-ticked { margin-left: 10px; height: 26px; padding: 0 10px; cursor: pointer; }
.sp-show-ticked[hidden] { display: none; }
.sp-show-ticked[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
/* Generate pieces' Rubrics and Traces lists: "N ticked" (the ticked alone) beside the search. */
.gl-bar { display: flex; align-items: center; gap: 8px; }
.gl-bar .gl-search { flex: 1 1 auto; min-width: 0; }
.gl-ticked { flex: none; height: 34px; padding: 0 12px; font-size: 13px; cursor: pointer; }
.gl-ticked[hidden] { display: none; }
.gl-ticked[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }

/* B chosen under its pair: the closest few as choices, the one chosen marked, the rest under "All N". */
.cp-b { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; padding: 2px 8px 0; }
.cp-b > .cmp-letter { margin-top: 6px; }
.cp-b-say { padding: 6px 8px 2px; font-size: 12.5px; }
.cp-choices { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-left: -8px; }
.cp-choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.cp-choice:hover { background: var(--hover); }
.cp-choice.on { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cp-choice .cp-name { min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.cp-choice .cp-words { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.cp-radio { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.cp-choice.on .cp-radio { box-shadow: inset 0 0 0 4px var(--accent, #2563eb); }
.cp-b .cp-more-b { align-self: flex-start; height: 28px; font-size: 12.5px; color: var(--accent-ink); }

/* Send for review, each prompt's own rubric (Jay, 2026-11-15): its title, then its rubrics as choices to tap (the chosen one with Read), then
   Generate a draft and Set it up in Rubrics ›; the draft's progress in place. One column, whatever the width. */
.send-rubrics .send-rubric { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: start; }
.send-rubric-choices { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.send-rubric-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; border-radius: 8px; }
.send-rubric-choice.on { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.send-rubric-choose { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.send-rubric-choose:disabled { opacity: 0.5; cursor: default; }
.send-rubric-choice:not(.on) .send-rubric-choose:hover { background: var(--hover); }
.send-rubric-choice-text { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
/* When the version was made (or the setup saved), at the row's end. */
.send-rubric-when { color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.send-rubric-radio { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.send-rubric-choice.on .send-rubric-radio { box-shadow: inset 0 0 0 4px var(--accent, #2563eb); }
.send-rubric-choice .send-rubric-read { margin-right: 8px; }
.send-rubric-all { align-self: flex-start; height: 28px; margin-left: 8px; font-size: 12.5px; color: var(--accent-ink); }
.send-rubric-none { margin: 0; }
/* Generate and the setup link on one row, on a phone too: the link gives way (ellipsis) before the row wraps. */
.send-rubric-make { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; min-width: 0; }
.send-rubric-generate { height: 32px; flex: none; }
.send-rubric-configure { font-size: 13px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.send-rubric-progress { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-2); }
.send-rubric-progress.err { color: var(--danger); }
.send-rubrics .send-rubric-note { grid-column: 1; }

/* On a phone: the search on its row, the order and the reviewers filter side by side on the next (Jay, 2026-11-15: some places take up too many rows);
   once a number of reviewers is asked, that filter takes its own row. */
@media (max-width: 640px) {
  .choose-line.pick-line { column-gap: 8px; }
  .choose-line.pick-line > select { flex: 1 1 160px; }
  .choose-line.pick-line > .pick-reviewers-box { flex: 1 1 140px; }
  .choose-line.pick-line > select, .choose-line.pick-line > .pick-reviewers-box { min-width: 0; max-width: none; }
  .choose-line.pick-line > select, .pick-reviewers-box .pick-reviewers { width: 100%; padding-right: 30px; background-position: right 10px center; }
  .pick-reviewers-box .pick-reviewers { flex: 1 1 auto; min-width: 0; }
  .choose-line.pick-line > .pick-reviewers-box:has(.pick-reviewers-n:not([style*="none"])) { flex-basis: 100%; }
}

/* Generate pieces: what is ticked, fixed above its list and set apart from it (public/app.js prompts, public/generate_lists.js traces and rubric prompts). A row
   leaves the list and arrives here with a little motion; no motion for someone who asked for less. */
.pg-ticked, .gl-ticked-part { flex: none; position: relative; z-index: 1; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 8px 14px -12px rgba(0, 0, 0, .28); }
.pg-ticked-head, .gl-ticked-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 16px 0; min-height: 28px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.pg-ticked-rows, .gl-ticked-rows { max-height: 32vh; overflow-y: auto; }
.gl-ticked-rows { padding: 0 6px 6px; }
.pg-ticked-rows table.cards.list { margin: 0; width: 100%; }
@media (min-width: 761px) { .pg-ticked-rows table.cards.list tr.prompt-group > td.check { box-sizing: border-box; width: 47px; padding-left: 20px; padding-right: 10px; } }
.sp-list tr.prompt-group.pg-leave > td, .gl-row.gl-leave { opacity: 0; transition: opacity .16s ease-out; }
.sp-list tr.prompt-group.pg-arrive > td, .gl-row.gl-arrive { animation: tick-arrive .5s ease-out; }
@keyframes tick-arrive { 0% { opacity: 0; background-color: rgba(47, 109, 240, .16); } 35% { opacity: 1; background-color: rgba(47, 109, 240, .16); } 100% { opacity: 1; background-color: transparent; } }
.gl-row.gl-arrive { animation-name: tick-arrive-row; }
@keyframes tick-arrive-row { 0% { opacity: 0; transform: translateY(8px); background-color: rgba(47, 109, 240, .16); } 35% { opacity: 1; transform: none; background-color: rgba(47, 109, 240, .16); } 100% { opacity: 1; background-color: var(--field); } }
@media (prefers-reduced-motion: reduce) {
  .sp-list tr.prompt-group.pg-leave > td, .gl-row.gl-leave { transition: none; }
  .sp-list tr.prompt-group.pg-arrive > td, .gl-row.gl-arrive { animation: none; }
}

/* Send for review in a flow before its texts exist (public/flows.js): who reviews, how many, the pay, the form and the email; no pieces, grid or Send yet. */
.send-form.flow-early > .step-pieces, .send-form.flow-early > .step-edit, .send-form.flow-early > .form-foot, .send-form.flow-early .name-field,
.send-form.flow-early .size-note { display: none !important; }
/* There it sits inside the flow's own Reviewers step: no second set of step numbers, no second Task or Reviewers heading. */
.send-form.flow-early .step-n, .send-form.flow-early > .step-task > .step-head, .send-form.flow-early > .step-who > .step-head, .send-form.flow-early .send-fields > .field:first-child { display: none !important; }
.send-form.flow-early > .step + .step { margin-top: 18px; padding-top: 16px; }

/* One comparison's grid in a flow, before its texts exist: who reviews what and nothing else of the form. */
.send-form.flow-grid > .step-task, .send-form.flow-grid > .step-pieces, .send-form.flow-grid > .step-rubric, .send-form.flow-grid > .step-edit, .send-form.flow-grid > .step-who,
.send-form.flow-grid > .step-email, .send-form.flow-grid > .form-foot, .send-form.flow-grid .step-n, .send-form.flow-grid > .step-grid > .step-head h2 { display: none !important; }
.send-form.flow-grid > .step-grid { margin-top: 0; padding-top: 0; box-shadow: none; }
/* A flow's one table: its comparisons' names are long, so its first column is wider, and each line says its prompt. */
.send-form.flow-early table.assign .prompt-row .row-prompt { white-space: normal; font-weight: 600; }
.send-form.flow-early .row-of-prompt { color: var(--ink-3); }

/* A flow's review: pay, the review form and the email are one line until Change; who gets which piece is dealt by the rules until the table is opened. */
/* The review form (general rubric, or each prompt's own) is always in sight in a flow's review (Jay, 2026-11-18: why can he not choose rubrics in a review: it was behind
   Change); pay and the email stay behind it. */
.send-form.flow-early:not(.show-details) > .step-email, .send-form.flow-early:not(.show-details) .pay-field { display: none !important; }
.send-form.flow-early:not(.show-grid) > .step-grid { display: none !important; }
.send-form.flow-early .flow-more { display: grid; gap: 4px; margin-top: 12px; }
.send-form.flow-early .flow-more-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-2); }
.send-form.flow-early .flow-more-line > button { flex: none; }

/* An AI text against the writer's piece: what it kept, plain; its own words marked; the writer's words it left out struck through. */
.diff-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 4px 0 12px; font-size: 13px; }
.diff-stats { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.text-diff ins.diff-add { text-decoration: none; background: #e7efff; border-radius: 3px; box-shadow: 0 0 0 1px #e7efff; }
.text-diff del.diff-del { color: #9a9a96; text-decoration: line-through; text-decoration-color: #b8b8b4; }

/* Batches: what was sent, what is not sent yet, what failed (Jay, 2026-11-18), each a list under a short heading. */
.batches-k { font-size: 15px; font-weight: 600; margin: 22px 0 8px; }
.batches-k:first-of-type { margin-top: 6px; }
.batches-k .muted { font-weight: 400; }

/* Signed out there is no index (Jay, 2026-11-18: the sign-in card sat right of the middle): the mark over the page, the page the whole width. */
.shell.signed-out { display: block; }
.shell.signed-out > header > .bar { position: static; height: auto; width: auto; padding-bottom: 0; box-shadow: none; }
.shell.signed-out > header > .bar > * { width: auto; }

/* A prompt's rubrics beside its pieces in a flow's list (Jay, 2026-11-18): quiet, also when the prompt is chosen. */
.cp-group.on .cp-prompt-r, .cp-prompt-r { color: var(--ink-3); }
/* On a phone the count and the rubrics go under the prompt, which keeps the width (they squeezed it to a word a line). */
@media (max-width: 600px) { .cp-gen .cp-prompt { flex-wrap: wrap; row-gap: 2px; } .cp-gen .cp-prompt-main { flex: 1 1 0; } .cp-gen .cp-prompt-n { flex: 1 1 100%; padding-left: 22px; } }

/* A prompt's rubrics under its pieces in a flow's list (Jay, 2026-11-18): read-only lines, set in from the pieces, no box to tick. */
.cp-rub-k { margin: 8px 0 2px 38px; font-size: 12px; color: var(--ink-3); }
.cp-rub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; padding: 3px 0 3px 38px; font-size: 13px; color: var(--ink-2); cursor: default; }
.cp-rub-v { font-variant-numeric: tabular-nums; color: var(--ink); }
.cp-rub-ok { color: var(--ink); font-weight: 500; }

/* Removing a block that takes others with it, asked in a line of its own under the block's name (2026-11-18). */
.fl-rm-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px }

/* New flow and New prefill test side by side, one under the other on a phone (2026-11-18). */
.fl-new-row { display: flex; flex-wrap: wrap; gap: 12px }
.fl-new-row > .fl-new { flex: 1 1 320px; width: auto }
.fl-new-test .fl-new-words { padding-left: 4px }

/* On a phone the "N short" at a row's end has its own room: the names' column gave it 30px, it needs more, and it lay over the last reviewer's cell (seen in a
   pass of screenshots, 2026-11-18). */
@media (max-width: 640px) {
  table.assign.has-short .row-prompt, table.assign.has-short tr.piece-row .row-title { width: clamp(130px, calc(100cqw - var(--n, 0) * 31px - 62px), 240px); }
}

/* A sentence with fields in it wraps between its parts, never inside one (2026-11-18). */
.draw-line .draw-part { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.send-form .draw-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
/* The link at a step's right: its arrow a set space after its word on every width (it was flush on a phone). */
.step-link { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* Send for review: the one question before sending pieces QA flagged, in place of the Send buttons (Jay, 2026-11-19). */
.form-foot.asking { flex-wrap: wrap; }
.flag-ask { flex: 1 0 100%; order: -1; display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.flag-ask[hidden] { display: none; }
.flag-ask-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.flag-ask-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; max-height: 240px; overflow-y: auto; font-size: 13px; }
.flag-ask-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; min-width: 0; }
.flag-ask-list a, .flag-ask-name { flex: 1 1 280px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.flag-ask-why { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.flag-ask-buttons { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.flag-ask-ack { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.flag-ask-ack input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
/* Send pressed before the tick: the box is the thing to do, in the colour a step to finish has (.send-form .step.needs). */
.flag-ask.needs .flag-ask-ack { color: #b42318; }
.flag-ask.needs .flag-ask-ack input { outline: 2px solid #b42318; outline-offset: 2px; }
@media (max-width: 640px) {
  .send-form .form-foot.spread > .flag-ask { flex: none; }
  .flag-ask-buttons { flex-direction: column; align-items: stretch; }
  .flag-ask-ack { min-height: 44px; }
  .flag-ask-buttons > button { width: 100%; min-height: 44px; }
}
