/* zyx — a reading room, not a dashboard: paper, ink, one accent, and colour
   only where it carries the verdict. */

:root {
  --paper: #f8f6f1;
  --surface: #ffffff;
  --sunk: #f1eee7;
  --ink: #1b1a17;
  --ink-2: #55514a;
  --ink-3: #8b867c;
  --line: #e4dfd5;
  --line-2: #d3cdc0;
  --accent: #2743c4;
  --brand: #9f482b;       /* the dot of the wordmark */
  --accent-soft: #e9edfb;
  --on-accent: #ffffff;
  --pos: #18755a;
  --pos-soft: #e3f2ec;
  --mid: #6f6a60;
  --mid-soft: #eceae4;
  --neg: #b0442b;
  --neg-soft: #f8e7e1;
  --add: #dff0e7;
  --del: #b0442b;
  --shadow: 0 1px 2px rgba(27, 26, 23, .05), 0 8px 24px -12px rgba(27, 26, 23, .12);
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --round: 1;     /* scales every corner radius; 0 squares them (see themes.css) */
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131312;
    --surface: #1b1b19;
    --sunk: #222220;
    --ink: #eceae4;
    --ink-2: #b5b1a8;
    --ink-3: #807c73;
    --line: #2c2b28;
    --line-2: #3a3935;
    --accent: #93a5ff;
    --brand: #d9704a;
    --accent-soft: #1f2440;
    --on-accent: #10121f;
    --pos: #62c7a3;
    --pos-soft: #16302a;
    --mid: #a39e93;
    --mid-soft: #2a2927;
    --neg: #e98469;
    --neg-soft: #3a211b;
    --add: #1c3a30;
    --del: #e98469;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14.5px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: calc(4px * var(--round)); }
code { font: 12.5px var(--mono); background: var(--sunk); padding: 1px 5px; border-radius: calc(4px * var(--round)); }
.icon { flex: none; }
.grow { flex: 1; }

main { max-width: 780px; margin: 0 auto; padding: 0 24px 96px; }

.label {
  display: block;
  font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3);
}
.aside { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.loading { color: var(--ink-3); display: flex; align-items: center; gap: 10px; padding: 48px 0; }
.quiet-text { color: var(--ink-3); }

.spinner {
  display: inline-block; flex: none; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: calc(9px * var(--round));
  border: 1px solid transparent; background: none;
  font-weight: 550; font-size: 14px; white-space: nowrap; text-decoration: none;
  transition: background .12s, border-color .12s, opacity .12s;
}
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover:not(:disabled) { opacity: .88; }
.btn.primary:disabled { opacity: .35; }
.btn.quiet { color: var(--ink-2); border-color: var(--line-2); background: var(--surface); }
.btn.quiet:hover:not(:disabled) { border-color: var(--ink-3); color: var(--ink); }
.btn.quiet:disabled { opacity: .45; }
.btn.icon-only { padding: 0; width: 36px; justify-content: center; }
.link { border: 0; background: none; padding: 0; color: var(--accent); display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--neg); }
.link:disabled { color: var(--ink-3); opacity: .55; cursor: default; text-decoration: none; }

.segmented { display: inline-flex; padding: 2px; border-radius: calc(9px * var(--round)); background: var(--sunk); gap: 2px; }
.segmented button {
  border: 0; background: none; height: 32px; min-width: 40px; padding: 0 12px; border-radius: calc(7px * var(--round));
  color: var(--ink-2); font-weight: 550; font-size: 13.5px;
}
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.segmented.small button { height: 24px; padding: 0 9px; font-size: 12px; min-width: 0; }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: calc(10px * var(--round)); margin: 16px 0;
  background: var(--mid-soft); color: var(--ink-2); font-size: 13.5px;
}
.notice .icon { margin-top: 2px; }
.notice.warn, .notice.bad { background: var(--neg-soft); color: var(--ink); }
.notice.warn .icon, .notice.bad .icon { color: var(--neg); }
.notice .actions { margin-top: 10px; }
.inline-error { color: var(--neg); font-size: 13.5px; margin: 10px 0 0; }

/* -- home */
.masthead { display: flex; align-items: baseline; gap: 12px; padding: 28px 0 0; }
/* The name: set tight, with its dot. (The favicon is its z and that dot: favicon.svg.) */
.wordmark { font: 500 32px/1 var(--serif); letter-spacing: -.095em; }
.wordmark::after { content: ''; display: inline-block; width: .15em; height: .15em; margin-left: .1em; border-radius: 50%; background: var(--brand); }
.tagline { color: var(--ink-3); font-size: 13px; }
.home h1 {
  font: 500 30px/1.2 var(--serif); letter-spacing: -.015em;
  margin: 56px 0 10px; text-wrap: balance;
}
.lede { color: var(--ink-2); font-size: 15px; line-height: 1.55; max-width: 40em; margin: 0 0 24px; }

.composer {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: calc(14px * var(--round));
  box-shadow: var(--shadow); transition: border-color .15s;
}
.composer:focus-within { border-color: var(--ink-3); }
.composer textarea {
  display: block; width: 100%; min-height: 132px; resize: none; border: 0; outline: 0; background: none;
  padding: 20px 22px 8px; font: 400 19px/1.5 var(--serif);
}
.composer textarea::placeholder { color: var(--ink-3); font-style: italic; }
.composer-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px 12px 14px; flex-wrap: wrap; }
.settings-toggle {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 6px 8px; border-radius: calc(7px * var(--round));
  color: var(--ink-2); font-size: 13px;
}
.settings-toggle:hover, .settings-toggle[aria-expanded="true"] { background: var(--sunk); color: var(--ink); }
.under-composer, .under-actions { color: var(--ink-3); font-size: 13px; margin: 12px 4px 0; }

.settings {
  border-top: 1px solid var(--line); padding: 18px 22px 16px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px;
}
.settings .field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.composer-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
/* A dropdown looks the same wherever it is: the settings here, the planner's and the coding agent's pickers
   (experiments.css only makes them a little shorter, to sit beside small buttons). */
select {
  height: 36px; padding: 0 28px 0 10px; border-radius: calc(8px * var(--round)); border: 1px solid var(--line-2);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%238b867c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 9px center / 11px;
  appearance: none; -webkit-appearance: none; font: 13px var(--mono); color: var(--ink); text-overflow: ellipsis; cursor: pointer;
}
select:hover:not(:disabled) { border-color: var(--ink-3); }
select:disabled { opacity: .5; cursor: default; }
.settings select { width: 100%; }
.settings select + input, .settings select + select, .settings .field-row { margin-top: 8px; }
.settings .field.wide { grid-column: 1 / -1; }
.settings .field { min-width: 0; }
.settings .beside { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; }
.settings .beside .hint { margin: 0; flex: 1; min-width: 240px; }
.settings .field label { white-space: nowrap; }
.settings .field-link { margin-top: 8px; font-size: 12.5px; }
.each-reviewer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; }
.each-reviewer > div { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.each-reviewer .reviewer-id { margin-top: 5px; }
.each-reviewer select { flex: 1; width: auto; min-width: 0; }
.each-reviewer input { flex-basis: 100%; }
.reviewer-model { flex: none; font: 11.5px var(--mono); color: var(--ink-3); background: var(--sunk); padding: 2px 7px; border-radius: calc(5px * var(--round)); font-weight: 400; }
.settings input[type="text"], .settings input[type="number"] {
  width: 100%; height: 36px; padding: 0 10px; border-radius: calc(8px * var(--round)); border: 1px solid var(--line-2); background: var(--surface);
  font: 13px var(--mono);
}
.settings input.narrow { width: 88px; }
.settings .hint { color: var(--ink-3); font-size: 12.5px; line-height: 1.45; margin: 7px 0 0; }
.settings-foot { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 16px; }

.history { margin-top: 64px; }
.history h2 { font: 600 11.5px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.history ul { list-style: none; margin: 0; padding: 0; }
.history li { border-top: 1px solid var(--line); }
.history li:last-child { border-bottom: 1px solid var(--line); }
.history a { display: flex; gap: 14px; align-items: flex-start; padding: 14px 6px; color: inherit; text-decoration: none; border-radius: calc(8px * var(--round)); }
.history a:hover { background: var(--sunk); }
.history-main { flex: 1; min-width: 0; }
.history-claim {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font: 400 16.5px/1.4 var(--serif);
}
/* a review with a name (naming.py) is listed by it, its claim on one quieter line under it */
.history-name { display: block; font: 600 15.5px/1.35 var(--sans); }
.history-claim.named { -webkit-line-clamp: 1; margin-top: 1px; font-size: 14.5px; color: var(--ink-2); }
.history-note { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 3px; }
.history-when { color: var(--ink-3); font-size: 12.5px; text-align: right; white-space: nowrap; line-height: 1.5; padding-top: 2px; }
.history li { display: flex; align-items: center; gap: 4px; }
/* a review's experiments are listed under it, set in from it, and fold away */
.history li.history-item { display: block; }
.history-row { display: flex; align-items: center; gap: 4px; }
.history-row > a { flex: 1; min-width: 0; }
.history-exps { margin: -6px 0 10px 48px; padding-left: 12px; border-left: 2px solid var(--line); }
.history-fold { display: inline-flex; align-items: center; gap: 5px; padding: 2px 6px; margin-left: -2px; border: 0; background: none; border-radius: calc(6px * var(--round));
  font: 600 11.5px var(--sans); letter-spacing: .04em; color: var(--ink-3); cursor: pointer; }
.history-fold:hover { background: var(--sunk); color: var(--ink); }
.history-fold .icon { transition: transform .12s; }
.history-fold.open .icon { transform: rotate(90deg); }
.history-exps li, .history-exps li:last-child { display: block; border: 0; }
.history-exps a { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 2px 8px; align-items: baseline; padding: 6px 6px; }
.history-exp-mark { grid-row: 1 / span 2; align-self: start; display: inline-flex; padding-top: 3px; color: var(--ink-3); }
.history-exps .exp-title { font: 500 14px/1.35 var(--sans); }
.history-exps .exp-sub { grid-column: 2; margin-top: 2px; }
.history-exps .history-when { grid-column: 3; grid-row: 1; padding-top: 0; }
.exp-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 550 14.5px/1.35 var(--sans); }
.exp-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.history li > a { flex: 1; min-width: 0; }
.history-note.bad { color: var(--neg); }
/* A button that is only an icon and only closes or removes something: no border, one size (the delete here, the close
   on a dialog and on the planner's panel). One that opens something keeps the bordered .btn.icon-only. */
.icon-btn, .history-delete {
  flex: none; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; border-radius: calc(7px * var(--round)); color: var(--ink-3);
}
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
.history-delete { opacity: 0; transition: opacity .12s; }
.history li:hover .history-delete, .history-delete:focus-visible { opacity: 1; }
.history-delete:hover, .history-delete:focus-visible { background: var(--neg-soft); color: var(--neg); }
@media (hover: none) { .history-delete { opacity: 1; } }
.history-confirm { flex: none; padding: 0 6px; }

/* -- API keys */
.masthead .keys-button { margin-left: auto; align-self: center; }
.keys-button { position: relative; }
.keys-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--neg); box-shadow: 0 0 0 2px var(--surface); }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(20, 19, 17, .38);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto;
}
.modal {
  width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--line-2); border-radius: calc(14px * var(--round));
  box-shadow: var(--shadow); padding: 18px 22px 18px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font: 500 21px var(--serif); margin: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.keys-group { border: 0; margin: 16px 0 0; padding: 0; }
.keys-group legend { font: 600 11.5px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding: 0; margin-bottom: 4px; }
.key-row { display: grid; grid-template-columns: 180px 1fr; gap: 2px 14px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.key-row label { display: flex; flex-direction: column; }
.key-name { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.key-use { color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.key-input { position: relative; }
.key-input input {
  width: 100%; height: 36px; padding: 0 72px 0 10px; border-radius: calc(8px * var(--round)); border: 1px solid var(--line-2); background: var(--surface);
  font: 12.5px var(--mono); color: var(--ink);
}
.key-input input::placeholder { color: var(--ink-2); }
.key-clear {
  position: absolute; right: 4px; top: 4px; height: 26px; padding: 0 8px; border: 0; background: none; border-radius: calc(6px * var(--round));
  color: var(--ink-3); font-size: 12px;
}
.key-clear:hover { color: var(--neg); background: var(--neg-soft); }
.key-status { grid-column: 2; color: var(--ink-3); font-size: 12px; }
.key-status.bad { color: var(--neg); }
.settings .hint a { color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.settings .hint a:hover { text-decoration: underline; }

.score-badge, .score-chip {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  font: 500 13px var(--mono); border-radius: calc(8px * var(--round));
}
.score-badge { width: 36px; height: 36px; margin-top: 1px; }
.score-chip { min-width: 34px; height: 24px; padding: 0 7px; border-radius: calc(6px * var(--round)); font-size: 12.5px; }
.score-badge.pos, .score-chip.pos { background: var(--pos-soft); color: var(--pos); }
.score-badge.neg, .score-chip.neg { background: var(--neg-soft); color: var(--neg); }
.score-badge.mid, .score-chip.mid { background: var(--mid-soft); color: var(--mid); }
.score-badge.working, .score-badge.idle { background: var(--sunk); color: var(--ink-3); }
.score-badge.failed { background: var(--neg-soft); color: var(--neg); }

/* -- run page */
/* stays at the top while the page scrolls, so the way back and Stop are always there */
.topbar { display: flex; align-items: center; gap: 10px; height: 56px; position: sticky; top: 0; z-index: 10; background: var(--paper); margin: 0 -8px 8px; padding: 0 8px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; margin-left: -4px; }
.back:hover { color: var(--ink); }
.confirm { font-size: 13px; color: var(--ink-2); display: inline-flex; gap: 12px; align-items: center; }

.claim { margin: 20px 0 36px; }
.claim-text { font: 400 21px/1.45 var(--serif); letter-spacing: -.005em; margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
h1.claim-text { font-size: 23px; }
h1.claim-text.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.claim .link { margin-top: 8px; }
.diff ins { background: var(--add); text-decoration: none; border-radius: calc(3px * var(--round)); padding: 1px 3px; margin: 0 -1px; }
.diff del { color: var(--del); text-decoration-thickness: 1px; opacity: .75; }

.stage { margin: 0 0 28px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: calc(14px * var(--round)); padding: 24px 26px 22px; box-shadow: var(--shadow); }
.stage-head { display: flex; align-items: center; gap: 12px; }
.stage-head h2 { font: 500 22px/1.25 var(--serif); letter-spacing: -.01em; margin: 0; }
.stage-sub { color: var(--ink-2); margin: 6px 0 0; font-size: 14px; }
.clock { font: 13px var(--mono); color: var(--ink-3); margin-left: auto; font-variant-numeric: tabular-nums; }
.thinking { margin-top: 16px; }
.thinking-body {
  margin-top: 6px; max-height: 260px; overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: calc(10px * var(--round)); background: var(--paper);
  font: 13.5px/1.6 var(--sans); color: var(--ink-2);
}
.thinking-body h4 { font: 600 13px/1.4 var(--sans); color: var(--ink); margin: 14px 0 4px; }
.thinking-body h4:first-child { margin-top: 0; }
.thinking-body p { margin: 0 0 8px; white-space: pre-wrap; }
.thinking-body p:last-child { margin-bottom: 0; }

.done-stage { margin-bottom: 20px; }
.stage-summary {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 0; background: none; padding: 6px 0; color: var(--ink-2); font-size: 13.5px;
}
.stage-summary:hover { color: var(--ink); }
.stage-summary > .icon { color: var(--ink-3); transition: transform .15s; }
.stage-summary[aria-expanded="true"] > .icon { transform: rotate(90deg); }
.stage-dot { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--pos-soft); color: var(--pos); }
.stage-detail { padding: 6px 0 4px 30px; }
.stage-detail .claim-text { font-size: 17px; }

.reads-as { margin-top: 16px; padding: 16px 18px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: calc(11px * var(--round)); }
.reads-as-head { display: flex; align-items: center; gap: 14px; }
.reads-as-head .label { flex: 1; }
.reads-as .claim-text { font-size: 18.5px; margin-top: 0; }
.changes-table { margin-top: 22px; }
.changes-row { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; }
.changes-head { border-top: 0; padding: 8px 0 6px; font-size: 12px; color: var(--ink-3); }
.changes-row del { color: var(--del); text-decoration-thickness: 1px; opacity: .8; }
.changes-row ins { background: var(--add); text-decoration: none; border-radius: 3px; padding: 1px 3px; margin: 0 -3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.changes-row i { color: var(--ink-3); }
.changes-why { color: var(--ink-2); }
.changes { color: var(--ink-2); font-size: 13.5px; line-height: 1.5; margin: 8px 0 0; }
.claim-edit {
  display: block; width: 100%; margin: 10px 0 8px; padding: 12px 14px; border-radius: calc(9px * var(--round)); border: 1px solid var(--line-2);
  background: var(--surface); font: 400 18px/1.45 var(--serif); resize: vertical;
}

.asserts { margin-top: 22px; }
.asserts ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.asserts li { font-size: 13px; padding: 4px 10px; border-radius: calc(999px * var(--round)); background: var(--sunk); color: var(--ink-2); }

/* the run as a timeline: each section is a box, open (the one being worked on) or folded to its heading
   and what came of it; a short line down the left joins one section to the next */
.timeline { margin-top: 4px; }
.tl-step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: calc(14px * var(--round)); scroll-margin-top: 64px; }
.tl-step + .tl-step { margin-top: 14px; }
.tl-step + .tl-step::before { content: ''; position: absolute; left: 33px; top: -15px; width: 1px; height: 14px; background: var(--line-2); }
.tl-step.open { box-shadow: var(--shadow); }
.tl-head {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 0; background: none; padding: 13px 24px; border-radius: calc(14px * var(--round)); color: var(--ink-2); font-size: 14px;
}
.tl-step:not(.open) .tl-head:hover { color: var(--ink); }
.tl-step:not(.open) .tl-head:hover .tl-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tl-step.open .tl-head { padding: 20px 24px 0; color: var(--ink); }
.tl-title { font-weight: 600; white-space: nowrap; }
.tl-step.open .tl-title { font: 500 21px/1.25 var(--serif); letter-spacing: -.01em; flex: 1; }
.tl-note { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-size: 13.5px; }
.tl-step.open .tl-note { display: none; }
.tl-step.open.note-open .tl-title { flex: none; }
.tl-step.open.note-open .tl-note { display: block; padding-top: 3px; }        /* the review's numbers, level with its title */
.tl-head > .icon { color: var(--ink-3); transition: transform .15s; }
.tl-step.open .tl-head > .icon { transform: rotate(90deg); }
.tl-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.tl-dot.done { background: var(--pos-soft); color: var(--pos); }
.tl-dot.bad { background: var(--neg-soft); color: var(--neg); }
.tl-dot.now { border: 2px solid var(--ink); }
.tl-dot.busy .spinner { width: 14px; height: 14px; }
.tl-body { padding: 2px 24px 22px 56px; }
.tl-body > .stage-sub:first-child { margin-top: 4px; }
.tl-body .reads-as-head { justify-content: flex-end; min-height: 0; margin-bottom: 6px; }
.tl-body .reads-as-head:empty { display: none; }
.tl-body .verdict { box-shadow: none; margin-top: 10px; }
.tl-body .reviewers { margin-top: 14px; }
.clock.inline { margin: 0; font-size: 12.5px; }
.reviewed-wording { margin: 14px 0 0; font: 400 16px/1.45 var(--serif); }
.reviewed-wording .label { margin-bottom: 4px; font-family: var(--sans); }
.thread > .card + .card { margin-top: 16px; }
.thread > .card { scroll-margin-top: 16px; }
mark.asked-about { background: #ffe9a8; color: inherit; border-radius: calc(4px * var(--round)); padding: 1px 2px; margin: 0 -2px; box-shadow: 0 0 0 2px #ffe9a8; transition: background .2s; }
.qa { list-style: none; margin: 20px 0 0; padding: 0; }
.qa-done { display: grid; grid-template-columns: 20px 1fr 1fr auto; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.qa-done:first-child { border-top: 0; }
.qa-question { color: var(--ink-2); }
.qa-answer { font-weight: 550; }
.q-number.done { background: var(--pos-soft); color: var(--pos); display: inline-flex; align-items: center; justify-content: center; transform: translateY(3px); }
.qa-open { padding: 18px 0 6px; border-top: 1px solid var(--line); scroll-margin: 72px 24px 24px; }
.qa-open:first-child { border-top: 0; padding-top: 4px; }
.q-head { display: flex; gap: 10px; align-items: baseline; font-weight: 600; font-size: 16px; }
.q-head > span:nth-child(2) { flex: 1; }
.q-count { font: 400 12px var(--mono); color: var(--ink-3); white-space: nowrap; }
button.option { width: 100%; text-align: left; }
form.option { padding: 6px 6px 6px 12px; cursor: default; }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.note.wide { width: 100%; margin: 18px 0 0; }
.questions { margin-top: 26px; }
.question { border: 0; margin: 16px 0 0; padding: 0; min-width: 0; }
.question legend { padding: 0; font-weight: 600; font-size: 15px; display: flex; gap: 10px; align-items: baseline; }
.q-number {
  flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--paper);
  font: 500 11px/20px var(--mono); text-align: center; transform: translateY(-1px);
}
.q-why { color: var(--ink-3); font-size: 13px; margin: 3px 0 10px 30px; }
.options { display: flex; flex-direction: column; gap: 6px; margin-left: 30px; }
.option {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: calc(9px * var(--round));
  border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 14px;
  transition: border-color .12s, background .12s;
}
.option:hover { border-color: var(--ink-3); }
.option.on { border-color: var(--accent); background: var(--accent-soft); }
.option input[type="radio"] { accent-color: var(--accent); margin: 0; flex: none; }
.option > span { flex: 1; }
.option em { font-style: normal; font-size: 11.5px; color: var(--ink-3); letter-spacing: .02em; }
.option.on em { color: var(--accent); }
.option.other { color: var(--ink-2); }
.other-text { flex: 1; border: 0; outline: 0; background: none; padding: 0; min-width: 0; }
.revise { display: flex; gap: 8px; margin-top: 18px; }
.revise .note { flex: 1; width: auto; margin: 0; }
.note {
  display: block; width: calc(100% - 30px); margin: 16px 0 0 30px; height: 36px; padding: 0 12px;
  border-radius: calc(8px * var(--round)); border: 1px solid var(--line-2); background: var(--surface); font-size: 14px;
}
.note:focus { border-color: var(--ink-3); outline: 0; }
.settled { margin: 18px 0 0; display: grid; gap: 8px; }
.settled div { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; font-size: 13.5px; padding-top: 8px; border-top: 1px solid var(--line); }
.settled dt { color: var(--ink-2); }
.settled dd { margin: 0; font-weight: 550; }
.actions { display: flex; align-items: center; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.actions .run-settings { margin-left: auto; color: var(--ink-3); font-size: 12.5px; }
.sharpen > .settings { margin: 14px -26px 0; padding-left: 26px; padding-right: 26px; }

/* reviewers */
.reviewers { margin-top: 18px; }
.reviewers.after { margin-top: 44px; }
.reviewers > h3, .sources > h3 { font: 600 11.5px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.reviewers > ol { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: calc(12px * var(--round)); background: var(--surface); overflow: hidden; }
.reviewer + .reviewer { border-top: 1px solid var(--line); }
.reviewer-row {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 0; background: none; padding: 13px 14px 14px;
}
.reviewer-row:hover { background: var(--paper); }
.reviewer-row > .icon:last-of-type { color: var(--ink-3); transition: transform .15s; }
.reviewer.open .reviewer-row > .icon:last-of-type { transform: rotate(90deg); }
.reviewer-id {
  flex: none; width: 24px; height: 24px; border-radius: calc(7px * var(--round)); background: var(--sunk); color: var(--ink-2);
  font: 500 12px/24px var(--mono); text-align: center;
}
.reviewer.reading .reviewer-id, .reviewer.scoring .reviewer-id { background: var(--accent-soft); color: var(--accent); }
.reviewer-now { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.reviewer-now > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reviewer-now .icon { color: var(--ink-3); }
.reviewer-now.quiet { color: var(--ink-3); }
.reviewer-count { flex: none; color: var(--ink-3); font: 12px var(--mono); font-variant-numeric: tabular-nums; }
.meter { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; }
.meter i { display: block; height: 100%; background: var(--accent); opacity: .55; transition: width .4s ease; }
.reviewer-body { padding: 4px 16px 18px 50px; }
.reviewer-body .prose { font-size: 15.5px; }

.steps { list-style: none; margin: 0; padding: 0; }
.step { font-size: 13px; }
.step-line {
  display: flex; align-items: baseline; gap: 9px; width: 100%; text-align: left;
  border: 0; background: none; padding: 4px 0; color: var(--ink-2);
}
.step-line .icon { color: var(--ink-3); transform: translateY(2px); }
.step-time { flex: none; color: var(--ink-3); font: 11px var(--mono); font-variant-numeric: tabular-nums; }
.step-tool { flex: none; display: inline-flex; cursor: help; }
.step.open > .step-line .step-text { white-space: normal; color: var(--ink); }
.step-call { margin: 2px 0 10px 22px; padding: 2px 0 2px 12px; border-left: 1px solid var(--line-2); }
.step-call pre { margin: 0 0 4px; font: 12px/1.5 var(--mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.step-call > .step-meta { margin: 0 0 6px; }
.step-call .step-error { margin-left: 0; color: var(--neg); }
.step-call .hits { margin: 6px 0 0; padding-left: 0; border-left: 0; }
.step-read { margin: 4px 0 0; display: flex; flex-direction: column; font-size: 13px; }
.step-read a { color: var(--ink); text-decoration: none; }
.step-read a:hover { color: var(--accent); }
.step-read .step-meta { overflow-wrap: anywhere; }
button.step-line:hover:not(:disabled) .step-text { color: var(--ink); }
.step-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-text a { color: inherit; text-decoration: none; }
.step-text a:hover { color: var(--accent); text-decoration: underline; }
.step-meta { flex: none; color: var(--ink-3); font: 11.5px var(--mono); }
.step.error .step-text { color: var(--ink-3); }
.step.error .step-meta { color: var(--neg); }
.step.running .step-text { color: var(--ink); }
.step.note { color: var(--ink-3); padding: 6px 0 0 22px; }
.step-error { margin: 0 0 6px 22px; color: var(--ink-3); font: 11.5px/1.5 var(--mono); overflow-wrap: anywhere; }
.hits { list-style: none; margin: 2px 0 8px 22px; padding: 0 0 0 12px; border-left: 1px solid var(--line-2); }
.hits li { padding: 3px 0; display: flex; flex-direction: column; }
.hits a { color: var(--ink); text-decoration: none; }
.hits a:hover { color: var(--accent); }
.hits .step-meta { margin-top: 1px; }


/* result */
.verdict {
  display: flex; align-items: center; gap: 28px; padding: 26px 28px; border-radius: calc(16px * var(--round));
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.verdict-main { flex: 1; display: flex; align-items: center; gap: 20px; min-width: 0; }
.verdict-score {
  flex: none; width: 76px; height: 76px; border-radius: calc(18px * var(--round)); display: flex; align-items: center; justify-content: center;
  font: 500 34px var(--serif); letter-spacing: -.02em;
}
.verdict.pos .verdict-score { background: var(--pos-soft); color: var(--pos); }
.verdict.neg .verdict-score { background: var(--neg-soft); color: var(--neg); }
.verdict.mid .verdict-score { background: var(--mid-soft); color: var(--mid); }
.verdict h2 { font: 500 25px/1.2 var(--serif); letter-spacing: -.012em; margin: 0; }
.verdict p { margin: 5px 0 0; color: var(--ink-2); font-size: 13.5px; }

.scale { flex: none; display: grid; grid-template-columns: repeat(5, 34px); align-items: end; position: relative; padding-top: 4px; }
.scale::before { content: ''; position: absolute; left: 17px; right: 17px; bottom: 26px; height: 2px; background: var(--line-2); }
.stop { display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.votes { display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; min-height: 38px; justify-content: flex-start; }
.votes i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); opacity: .55; }
.stop.chosen .votes i { opacity: 1; }
.stop.chosen.pos .votes i { background: var(--pos); }
.stop.chosen.neg .votes i { background: var(--neg); }
.stop.chosen.mid .votes i { background: var(--mid); }
.pip { width: 8px; height: 8px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line-2); position: relative; z-index: 1; }
.stop.chosen .pip { width: 14px; height: 14px; margin: -3px 0; border: 0; }
.stop.chosen.pos .pip { background: var(--pos); }
.stop.chosen.neg .pip { background: var(--neg); }
.stop.chosen.mid .pip { background: var(--mid); }
.stop-label { font: 11.5px var(--mono); color: var(--ink-3); height: 15px; }
.stop.chosen .stop-label { color: var(--ink); font-weight: 500; }

.assessment { margin-top: 36px; }
.prose { font: 400 17.5px/1.62 var(--serif); overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.05em; }
.prose h2, .prose h3, .prose h4, .prose h5 { font-family: var(--sans); font-weight: 650; letter-spacing: -.005em; margin: 1.7em 0 .5em; line-height: 1.3; }
.prose h2 { font-size: 19px; }
.prose h3 { font-size: 16.5px; }
.prose h4, .prose h5 { font-size: 14.5px; }
.prose ul, .prose ol { margin: 0 0 1.05em; padding-left: 1.35em; }
.prose li { margin: .25em 0; }
.prose li > ul, .prose li > ol { margin: .25em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line-2); margin: 2em 0; }
.prose blockquote { margin: 0 0 1.05em; padding-left: 16px; border-left: 2px solid var(--line-2); color: var(--ink-2); }
.prose pre { background: var(--sunk); padding: 12px 14px; border-radius: calc(9px * var(--round)); overflow-x: auto; font: 12.5px/1.5 var(--mono); }
.prose pre code { background: none; padding: 0; }
.prose strong { font-weight: 600; }
.table-wrap { overflow-x: auto; margin: 0 0 1.05em; }
.prose table { border-collapse: collapse; font: 13.5px/1.45 var(--sans); min-width: 100%; }
.prose th, .prose td { text-align: left; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; color: var(--ink-2); border-bottom-color: var(--line-2); }

.math { font-family: var(--serif); font-style: italic; white-space: nowrap; }
.math sub, .math sup { font-size: .72em; line-height: 0; font-style: normal; }
.math-block { display: block; text-align: center; margin: .6em 0; white-space: normal; }
.cites { white-space: nowrap; }
.cite {
  display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; margin: 0 1px 0 0; border-radius: calc(5px * var(--round));
  background: var(--accent-soft); color: var(--accent); text-decoration: none;
  font: 500 11px/18px var(--mono); text-align: center; vertical-align: 2px;
  transition: background .12s, color .12s;
}
.cite:hover, .cite:focus-visible { background: var(--accent); color: var(--on-accent); }
.cite.missing { background: var(--mid-soft); color: var(--ink-3); }
.popover {
  position: fixed; z-index: 20; display: none; max-width: 340px; padding: 10px 12px; border-radius: calc(10px * var(--round));
  background: var(--ink); color: var(--paper); font-size: 13px; line-height: 1.4; box-shadow: var(--shadow); pointer-events: none;
}
.popover b { display: block; font-weight: 550; }
.popover i { display: block; font-style: normal; opacity: .82; font-size: 12px; margin-top: 2px; }
.popover span { display: block; opacity: .65; font: 11.5px var(--mono); margin-top: 3px; }

.sources { margin-top: 44px; }
.sources ol { list-style: none; margin: 0; padding: 0; }
.sources li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.sources li:target { background: var(--accent-soft); }
.src-number { flex: none; min-width: 22px; height: 18px; padding: 0 5px; border-radius: calc(5px * var(--round)); background: var(--sunk); color: var(--ink-2); font: 500 11px/18px var(--mono); text-align: center; }
.src-main { flex: 1; min-width: 0; font-size: 14.5px; }
.src-main a { color: var(--ink); text-decoration: none; font-weight: 550; }
.src-main a:hover { color: var(--accent); text-decoration: underline; }
.src-meta { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 1px; }
.sources .link { margin-top: 12px; }
.sources .background { margin-top: 8px; opacity: .85; }

.result-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line-2);
  color: var(--ink-3); font-size: 12.5px;
}
.result-facts { flex-basis: 100%; margin-bottom: 6px; }

@media (prefers-color-scheme: dark) {
  mark.asked-about { background: #5c4a12; box-shadow: 0 0 0 2px #5c4a12; }
}

@media (max-width: 640px) {
  .tl-body { padding-left: 24px; }
  .changes-row { grid-template-columns: 1fr; gap: 3px; }
  .changes-head { display: none; }
  .qa-done { grid-template-columns: 20px 1fr auto; }
  .qa-done .qa-answer { grid-column: 2 / 3; }
  .key-row { grid-template-columns: 1fr; }
  .key-status { grid-column: 1; }
  main { padding: 0 16px 64px; }
  .home h1 { font-size: 30px; margin-top: 40px; }
  .settings { grid-template-columns: 1fr; }
  .verdict { flex-direction: column; align-items: flex-start; }
  .card { padding: 20px 18px; }
  .sharpen > .settings { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
  .options, .q-why { margin-left: 0; }
  .note { width: 100%; margin-left: 0; }
  .settled div { grid-template-columns: 1fr; gap: 2px; }
  .reviewer-count { display: none; }
  .reviewer-body { padding-left: 16px; }
}

/* -- wide screens: the claim and an outline pinned on the left, sources on the right, the timeline between them */
.rail { display: none; }
.cite.lit { background: var(--accent); color: var(--on-accent); }
.sources li.lit { background: var(--accent-soft); box-shadow: -6px 0 0 var(--accent-soft), 6px 0 0 var(--accent-soft); }

@media (min-width: 1240px) {
  /* as wide as the default layout, or as the widths the person has dragged the columns to need (split.js) */
  main.run { max-width: max(1560px, calc(var(--rail-w, 320px) + 96px + max(1144px, var(--side-w, 0px) + 824px))); padding: 0 28px 96px; }
  /* the rail | a bar to drag | the timeline. Both widths that can be dragged are variables on <html> (split.js). */
  .run-grid { display: grid; grid-template-columns: clamp(240px, 20vw, 320px) 40px minmax(0, 1fr); align-items: start; }
  :root[data-rail] .run-grid { grid-template-columns: min(var(--rail-w), 40vw) 40px minmax(0, 1fr); }
  .run-main .tl-body:not(.with-side) > * { max-width: 700px; }  /* every step's card is the full width; its text keeps a reading width */
  .tl-body.with-side { display: grid; grid-template-columns: minmax(0, 700px) 44px minmax(240px, 1fr); align-items: start; }
  :root[data-side] .tl-body.with-side { grid-template-columns: minmax(0, 1fr) 44px min(var(--side-w), calc(100% - 404px)); }
  .tl-side { position: sticky; top: 64px; max-height: calc(100vh - 84px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px 6px 12px 0; }
  /* what has been read, beside the reviewers at work: as tall as that picture and no taller, scrolling inside itself */
  .tl-body.with-side:has(> .tl-side > .sources.reading) { align-items: stretch; }
  .tl-side:has(> .sources.reading) { position: relative; top: auto; max-height: none; min-height: 340px; overflow: hidden; padding: 0; }
  .tl-side > .sources.reading { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 8px 28px 0; }
  .tl-side > .sources.reading > h3 { position: sticky; top: 0; z-index: 1; margin: 0; padding: 2px 0 8px; background: var(--surface); }
  .tl-side:has(> .sources.reading)::after { content: ''; position: absolute; left: 0; right: 8px; bottom: 0; height: 30px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
  .rail { display: block; position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 24px; scrollbar-width: thin; }
  .run-main > .claim { display: none; }                      /* the claim lives in the left rail */
  .run-main .timeline { margin-top: 0; }

  .rail-block + .rail-block { margin-top: 28px; }
  .rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .rail .claim-text { font-size: 17px; line-height: 1.5; margin-top: 10px; }
  .rail .wordings { margin-top: 10px; flex-wrap: wrap; }
  .rail-note { color: var(--ink-3); font-size: 12.5px; line-height: 1.5; margin: 10px 0 0; }
  .rail-note.facts { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); }

  .outline ol { list-style: none; margin: 8px 0 0; padding: 0; border-left: 1px solid var(--line-2); }
  .outline button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; border: 0; background: none;
    padding: 5px 10px 5px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); font-size: 13.5px; }
  .outline button:hover { color: var(--ink); }
  .outline li.here button { border-left-color: var(--ink); color: var(--ink); font-weight: 600; }
  .outline li.bad button { color: var(--neg); }
  .outline .score-chip { height: 20px; min-width: 28px; font-size: 11.5px; }

  .tl-side .sources { margin-top: 0; }
  .tl-side .sources li { padding: 8px 0; gap: 10px; border-radius: calc(4px * var(--round)); }
  .tl-side .sources li:first-child { border-top: 0; }
  .tl-side .src-main { font-size: 13.5px; line-height: 1.4; }
  .tl-side .src-meta { font-size: 12px; }
  .tl-side .sources .link { text-align: left; font-size: 12.5px; }

  /* the home page: past reviews beside the composer instead of below it */
  main.home { max-width: 1280px; display: grid; grid-template-columns: minmax(0, 760px) minmax(300px, 420px); column-gap: 64px; justify-content: center; align-content: start; }
  main.home > * { grid-column: 1; min-width: 0; }
  main.home > .history { grid-column: 2; grid-row: 2 / span 40; margin-top: 56px; align-self: start; }
}

/* -- the reviewers as a row of cards, inside the Review section whether it is open or folded */
.tl-always { padding: 0 24px 16px 56px; }
.tl-step.open .tl-always { padding: 10px 24px 0 56px; }
.flow-cards { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; }
.flow.wrapped .flow-cards { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.rcard {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; text-align: left; overflow: hidden;
  padding: 8px 9px 10px; border-radius: calc(10px * var(--round)); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
.rcard:hover { border-color: var(--ink-3); }
.rcard.picked { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.rcard-top { display: flex; align-items: center; gap: 6px; min-height: 24px; }
.rcard .reviewer-id { width: 22px; height: 22px; line-height: 22px; font-size: 11.5px; }
.rcard.reading .reviewer-id, .rcard.scoring .reviewer-id { background: var(--accent-soft); color: var(--accent); }
.rcard .reviewer-model { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; padding: 1px 5px; font-size: 10.5px; }
.rcard .score-chip { height: 22px; min-width: 30px; font-size: 12px; }
.rcard .score-chip.failed { background: var(--neg-soft); color: var(--neg); }
.rcard-now { font-size: 12px; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.rcard-now.quiet { color: var(--ink-3); }
.rcard.done .rcard-now, .rcard.failed .rcard-now, .rcard.ended .rcard-now { min-height: 0; -webkit-line-clamp: 1; }
.rcard .meter { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }


.pick-hint { margin-top: 14px; }

@media (max-width: 640px) {
  .tl-always, .tl-step.open .tl-always { padding-left: 14px; padding-right: 14px; }
  .tl-head, .tl-step.open .tl-head { padding-left: 14px; padding-right: 14px; }
  .tl-step + .tl-step::before { left: 23px; }
  .flow-cards { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* -- batches */
/* the composer's two modes: one claim, or a list of them */
.composer-tabs { display: flex; gap: 18px; padding: 14px 22px 0; border-bottom: 1px solid var(--line); }
.composer-tabs button {
  border: 0; background: none; padding: 0 1px 9px; margin-bottom: -1px; border-bottom: 2px solid transparent;
  color: var(--ink-3); font-size: 13px; font-weight: 550;
}
.composer-tabs button:hover { color: var(--ink-2); }
.composer-tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.composer textarea.claim-list {
  min-height: 176px; max-height: 50vh; overflow-y: auto; resize: vertical;
  font: 400 15px/1.65 var(--sans); padding-top: 16px;
}
.composer textarea.claim-list::placeholder { font-style: normal; }
.claim-list.loaded { padding: 16px 22px 8px; font-size: 14px; }
.claim-list.loaded ol { margin: 10px 0 0; padding-left: 1.4em; color: var(--ink-2); }
.claim-list.loaded li { margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.claim-list.loaded .hint { color: var(--ink-3); font-size: 12.5px; margin: 6px 0 0; }
.batch-head { display: flex; align-items: baseline; }

/* a list's own settings, at the top of the settings panel */
.batch-fields { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.settings .batch-fields label { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-weight: 400; font-size: 13px; color: var(--ink-2); }
.batch-fields input[type="text"], .batch-fields input[type="number"] { height: 32px; padding: 0 9px; border-radius: calc(8px * var(--round)); border: 1px solid var(--line-2); background: var(--surface); font: 13px var(--sans); width: 170px; }
.batch-fields input.narrow { width: 74px; }
.history.batches { margin-top: 36px; }
main.batch { max-width: 1120px; }
.batch-title { margin: 12px 0 22px; }
.batch-title h1 { font: 500 28px/1.2 var(--serif); letter-spacing: -.015em; margin: 6px 0 0; }
.batch-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.batch-table th { text-align: left; font: 600 11.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.batch-table td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; color: var(--ink-2); }
.batch-table td:nth-child(2) { white-space: normal; width: 100%; }
.batch-table td a { color: var(--ink); text-decoration: none; font: 400 15.5px/1.4 var(--serif); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.batch-table td a:hover { color: var(--accent); }
.batch-table tr.new td a { color: var(--ink-3); }
.batch-n { color: var(--ink-3); font: 12px var(--mono); }
@media (min-width: 1240px) { main.home > .history.batches { grid-column: 2; grid-row: auto; margin-top: 28px; } }

/* -- sources beside the assessment that cites them (stacked under it on a narrow screen) */
.tl-side .sources { margin-top: 28px; }
.tl-side .sources ol { list-style: none; margin: 0; padding: 0; }
.tl-side .rail-note { color: var(--ink-3); font-size: 12.5px; }

/* -- reviewer cards: the score large, counts as icons */
.rcard { gap: 4px; padding: 8px 10px 10px; width: 100%; max-width: 300px; justify-self: center; }   /* centred in its column, so the joining lines still meet it */
.rcard-name { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: flex-end; max-width: 100%; }
.rcard-model { font: 10.5px var(--mono); }
.rcard-result { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.rcard-score { font: 500 27px/1 var(--serif); letter-spacing: -.02em; padding: 6px 10px; border-radius: calc(8px * var(--round)); min-width: 50px; text-align: center; }
.rcard-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; }
.rcard-side .rcard-counts { flex-direction: row; gap: 8px; }
.rcard-score.pos { background: var(--pos-soft); color: var(--pos); }
.rcard-score.neg { background: var(--neg-soft); color: var(--neg); }
.rcard-score.mid { background: var(--mid-soft); color: var(--mid); }
.rcard-counts { display: inline-flex; flex-direction: column; gap: 1px; font: 11.5px/1.3 var(--mono); color: var(--ink-3); }
.rcard-counts > span { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.rcard-now { min-height: 30px; }

/* -- what the scores mean */
.scale-help { position: relative; }
.scale-panel { position: absolute; right: 0; top: 44px; z-index: 30; width: min(420px, calc(100vw - 32px)); padding: 16px 18px; background: var(--surface); border: 1px solid var(--line-2); border-radius: calc(12px * var(--round)); box-shadow: var(--shadow); font-size: 13.5px; line-height: 1.45; }
.scale-panel b { font-size: 14.5px; }
.scale-panel p { margin: 8px 0 0; color: var(--ink-2); }
.scale-panel dl { margin: 12px 0 4px; }
.scale-panel dl > div { display: grid; grid-template-columns: 42px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); align-items: baseline; }
.scale-panel dd { margin: 0; }

/* -- follow-up questions to a review's agents, beside the step they are about (ask.js) */
.ask > h3 { font: 600 11.5px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.ask > .rail-note { margin: 0 0 4px; color: var(--ink-3); font-size: 12.5px; line-height: 1.5; }
.ask-thread { list-style: none; margin: 12px 0 0; padding: 0 6px 0 0; max-height: min(50vh, 560px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-top: 1px solid var(--line); }
.ask-thread:empty { display: none; }
.ask-turn { padding: 14px 0 12px; }
.ask-turn + .ask-turn { border-top: 1px solid var(--line); }
.ask-q { background: var(--sunk); border-radius: calc(10px * var(--round)); padding: 9px 12px; }
.ask-q p { margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-who { display: block; font: 600 10.5px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.ask-a { margin-top: 12px; }
.ask-a .prose { font-size: 15px; line-height: 1.55; }
.ask-a .prose > :last-child { margin-bottom: 0; }
.ask-a .prose p, .ask-a .prose ul, .ask-a .prose ol { margin-bottom: .75em; }
.ask-a .prose h2, .ask-a .prose h3, .ask-a .prose h4, .ask-a .prose h5 { font-size: 14px; margin: 1.1em 0 .4em; }
.ask-a .prose table { font-size: 12.5px; }
.ask-steps { margin-top: 10px; }
.ask-steps > .link { font-size: 12.5px; color: var(--ink-3); }
.ask-steps > .link:disabled { cursor: default; text-decoration: none; }
.ask-steps .steps { margin-top: 4px; }
.ask-turn .thinking { margin-top: 10px; }
.ask-turn .thinking-body { max-height: 140px; }
.ask-wait { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--ink-3); font-size: 13px; }
.ask-wait .link { margin-left: auto; font-size: 12.5px; }
.ask-meta { margin: 8px 0 0; color: var(--ink-3); font: 11.5px var(--mono); }
.ask-fresh { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; line-height: 1.4; }
.ask-fresh li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; }
.ask-fresh .src-meta { color: var(--ink-3); font-size: 12px; }
.cite.fresh { font: 600 10.5px var(--mono); padding: 0 5px; min-width: 0; background: var(--mid-soft); color: var(--ink-2); flex: none; }
a.cite.fresh:hover, a.cite.fresh:focus-visible { background: var(--ink-2); color: var(--surface); }
.ask-box {
  display: flex; align-items: flex-end; gap: 8px; margin-top: 14px; padding: 8px 8px 8px 12px;
  border: 1px solid var(--line-2); border-radius: calc(11px * var(--round)); background: var(--surface); box-shadow: var(--shadow);
}
.ask-box:focus-within { border-color: var(--ink-3); }
.ask-box textarea {
  flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: none; color: var(--ink); font: 14px/1.45 var(--sans);
  padding: 3px 4px; max-height: 180px; field-sizing: content;
}
.ask-box textarea::placeholder { color: var(--ink-3); }
.ask-box .btn { flex: none; gap: 6px; }

/* -- a model's reasoning, once its call is done: folded at the foot of what it produced (timeline.js) */
details.thinking > summary {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; list-style: none; color: var(--ink-3); font-size: 12.5px;
}
details.thinking > summary::-webkit-details-marker { display: none; }
details.thinking > summary::before {
  content: ''; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .12s;
}
details.thinking[open] > summary::before { transform: rotate(45deg); }
details.thinking > summary:hover { color: var(--ink); }

/* -- what a rewording changed, beside the question and answer that led to it (clarify.js) */
/* the questions and a rewording are lists and tables: they take the card's whole width (only the lines of prose keep a reading width) */
.run-main :is(#step-questions, #step-claim, [id^="step-write-"]) > .tl-body > * { max-width: none; }
.run-main :is(#step-questions, #step-claim, [id^="step-write-"]) > .tl-body > p.stage-sub { max-width: 700px; }
.qa-open { max-width: 820px; }       /* the question in hand stays compact: its answers are buttons, not a table */
.changes-group { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); column-gap: 28px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; }
.changes-group.changes-head { border-top: 0; padding: 8px 0 6px; font-size: 12px; color: var(--ink-3); }
.changes-from, .changes-edits { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.changes-pair { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 18px; }
.changes-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); column-gap: 18px; }
.changes-q { color: var(--ink-2); display: flex; gap: 9px; align-items: baseline; }
.changes-q .q-number { flex: none; }
.changes-q.none { color: var(--ink-3); font-style: italic; }
.changes-a { font-weight: 550; }
.changes-edit del { color: var(--del); text-decoration-thickness: 1px; opacity: .8; }
.changes-edit ins { background: var(--add); text-decoration: none; border-radius: 3px; padding: 1px 3px; margin: 0 -3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.changes-edit i { color: var(--ink-3); }
.changes-edit .changes-why { display: block; margin-top: 3px; font-size: 12.5px; }
@media (max-width: 900px) {
  .changes-group { grid-template-columns: 1fr; row-gap: 8px; }
  .changes-group.changes-head { display: none; }
}

/* -- bars that drag to resize the columns either side of them (split.js); wide screens only */
.split { display: none; }
@media (min-width: 1240px) {
  .split { display: block; align-self: stretch; position: relative; cursor: col-resize; touch-action: none; outline-offset: -2px; }
  .split::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: transparent; transition: background .12s; }
  .split > i { position: sticky; top: 50vh; display: block; width: 4px; height: 34px; margin: 0 auto; border-radius: 2px; background: var(--line-2); transition: background .12s, height .12s; }
  .split:hover::before, .split.dragging::before, .split:focus-visible::before { background: var(--line-2); }
  .split:hover > i, .split.dragging > i, .split:focus-visible > i { background: var(--ink-3); height: 46px; }
  .split-rail { min-height: calc(100vh - 140px); }
  :root.resizing, :root.resizing * { cursor: col-resize !important; user-select: none !important; }
}

/* -- where you are on the run page (sections.js): the section named in the top bar */
.where {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; border: 0; background: none; padding: 4px 8px; margin-left: 4px;
  border-left: 1px solid var(--line-2); border-radius: 0; color: var(--ink); font: 600 14px var(--sans);
  opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .15s, transform .15s;
}
.where.shown { opacity: 1; transform: none; pointer-events: auto; }
.where:hover .where-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.where-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.where .score-chip { height: 20px; min-width: 28px; font-size: 11.5px; }

/* -- the timeline's cards in groups, one for each stage of the work (run.js): a name above, cards close together */
.tl-group { margin-top: 30px; }
.tl-group:first-child { margin-top: 0; }
.tl-group:not(:has(.tl-step)) { display: none; }       /* nothing in it yet */
.tl-group-name { font: 600 11.5px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px 24px; }
.tl-group .tl-step + .tl-step { margin-top: 8px; }
.tl-group .tl-step + .tl-step::before { top: -9px; height: 8px; }
.tl-group + .tl-step, .tl-step + .tl-group { margin-top: 30px; }
.tl-group + .tl-step::before { display: none; }         /* a card after a group starts something new: nothing joins them */
.outline li.group { padding: 10px 0 3px 12px; font: 600 10.5px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.outline li.group:first-child { padding-top: 2px; }
.where-group { color: var(--ink-3); font-weight: 500; }
.where-group::after { content: '›'; margin-left: 8px; }



/* --
   The reviewers at work, at a glance (overview.js): one clock for all of them,
   where they are looking, and what they are searching for. Ink and hairlines;
   the accent marks the paper indexes, the only distinction the picture turns on. */
.ov { margin-top: 6px; }
.ov-h { margin: 0 0 8px; font: 650 11px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.ov-h.second { margin-top: 18px; }
.ov-h .aside { font-size: 12px; margin-left: 6px; }
.ov-clock { display: block; width: 100%; height: auto; overflow: visible; }
.ov-clock text { font-family: var(--sans); }
.ov-grid { stroke: var(--line); stroke-width: 1; }
.ov-axis { stroke: var(--line-2); stroke-width: 1; }
.ov-tick { font-size: 10.5px; fill: var(--ink-3); }
.ov-who { font-size: 11.5px; font-weight: 650; fill: var(--ink-2); }
.ov-line { stroke: var(--line-2); stroke-width: 1; }
.ov-search.web { stroke-width: 1.2; stroke: var(--ink-3); }
.ov-search.paper { fill: var(--accent); }
.ov-read { fill: var(--ink); }
.ov-read.missed { fill: none; stroke: var(--ink-3); stroke-width: 1; }
.ov-weigh { fill: var(--accent); opacity: .22; }
.ov-end { stroke: var(--ink); stroke-width: 1.6; }
.ov-end.failed { stroke: var(--neg); }
.ov-hit { fill: transparent; }
.ov-row { cursor: pointer; }
.ov-row:hover .ov-hit { fill: var(--accent-soft); }
.ov-row:hover .ov-who { fill: var(--accent); }

.ov-key { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 6px 0 0; font: 12px var(--sans); color: var(--ink-3); }
.ov-key span { display: inline-flex; align-items: center; gap: 6px; }
.ov-key i { display: inline-block; flex: none; }
.ov-key i.web { width: 0; height: 9px; border-left: 1.2px solid var(--ink-3); }
.ov-key i.paper { width: 5px; height: 9px; background: var(--accent); }
.ov-key i.read { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.ov-key i.weigh { width: 16px; height: 6px; background: var(--accent); opacity: .22; }

.ov-cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 36px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .ov-cols { grid-template-columns: 1fr; } }
.ov-bars { margin: 0; font: 13px var(--sans); }
.ov-bars > div { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr); gap: 10px; align-items: center; padding: 2px 0; }
.ov-bars dt { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-bars dd { margin: 0; display: flex; align-items: center; gap: 7px; }
.ov-bars dd i { flex: none; height: 7px; min-width: 2px; max-width: calc(100% - 30px); background: var(--ink-3); }
.ov-bars dd i.paper { background: var(--accent); }
.ov-bars dd i.web { background: var(--ink-3); }
.ov-bars dd span { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 550; }

.ov-terms { margin: 0; display: flex; flex-wrap: wrap; gap: 3px 13px; align-items: baseline; font: 14px/1.5 var(--serif); color: var(--ink-2); }
.ov-terms span { cursor: default; }
.ov-terms .some { color: var(--ink); font-weight: 550; }
.ov-terms .most { color: var(--ink); font-weight: 700; font-size: 16.5px; }
.ov-titles { list-style: none; margin: 0; padding: 0; font: italic 14px/1.4 var(--serif); color: var(--ink-2); }
.ov-titles li { display: flex; gap: 9px; padding: 2px 0; }
.ov-titles .ov-by { margin-top: 6px; }

.ov-latest { list-style: none; margin: 0; padding: 0; font: 13px/1.4 var(--sans); color: var(--ink-2); }
.ov-latest li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; }
.ov-latest b { flex: none; width: 1.2em; color: var(--ink-3); font-weight: 650; }
.ov-latest span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-latest em { flex: none; margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--ink-3); }

/* who read a source: one mark per reviewer, filled for those that did */
.ov-by { flex: none; display: inline-flex; gap: 2px; align-self: flex-start; margin-top: 7px; }
.ov-by i { width: 5px; height: 5px; border-radius: 50%; border: 1px solid var(--line-2); }
.ov-by i.on { background: var(--ink); border-color: var(--ink); }
.sources.reading > .rail-note { margin: 0 0 6px; }
