/* browser-solver hub — human web UI.
   Dark-mode first, light via prefers-color-scheme. Works from ~700px up.
   The page body never scrolls horizontally: the shell is a fixed-height flex
   column, each pane scrolls itself, and wide content lives in .scroll-x. */

/* ── tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg: #0d1117;
  --panel: #11161d;
  --panel-2: #161c25;
  --panel-3: #1b222c;
  --line: #232b36;
  --line-2: #313c4b;
  --fg: #dce5ee;
  --fg-2: #9aa9b8;
  --fg-3: #6b7a8b;
  --acc: #58a6ff;
  --acc-ink: #06131f;
  --ok: #3fb950;
  --warn: #d29922;
  --bad: #f85149;
  --violet: #a371f7;
  --teal: #39c5cf;

  --ok-bg: rgba(63, 185, 80, .14);
  --warn-bg: rgba(210, 153, 34, .14);
  --bad-bg: rgba(248, 81, 73, .14);
  --acc-bg: rgba(88, 166, 255, .14);
  --violet-bg: rgba(163, 113, 247, .14);
  --teal-bg: rgba(57, 197, 207, .14);
  --neutral-bg: rgba(154, 169, 184, .12);
  --flash-bg: rgba(88, 166, 255, .22);

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 8px;
  --r-sm: 5px;
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f9;
    --panel: #ffffff;
    --panel-2: #f7f9fb;
    --panel-3: #eef2f6;
    --line: #dde3ea;
    --line-2: #c6d0da;
    --fg: #16202b;
    --fg-2: #4f5d6b;
    --fg-3: #7a8794;
    --acc: #0969da;
    --acc-ink: #ffffff;
    --ok: #1a7f37;
    --warn: #9a6700;
    --bad: #cf222e;
    --violet: #8250df;
    --teal: #0f7c86;

    --ok-bg: rgba(26, 127, 55, .12);
    --warn-bg: rgba(154, 103, 0, .12);
    --bad-bg: rgba(207, 34, 46, .10);
    --acc-bg: rgba(9, 105, 218, .10);
    --violet-bg: rgba(130, 80, 223, .10);
    --teal-bg: rgba(15, 124, 134, .10);
    --neutral-bg: rgba(79, 93, 107, .10);
    --flash-bg: rgba(9, 105, 218, .16);
    --shadow: 0 8px 28px rgba(20, 30, 45, .18);
  }
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.5 var(--sans);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; line-height: 1.25; }
p { margin: 0 0 .6em; }
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: .92em; }
pre { margin: 0; }
.tiny { font-size: 11.5px; }
.dim { color: var(--fg-3); }
.warn-text { color: var(--warn); }
.scroll-x { overflow-x: auto; max-width: 100%; }
.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* ── controls ───────────────────────────────────────────────────────── */
.btn, .chip, .pal-btn {
  font: inherit;
  color: var(--fg);
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 5px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn:hover, .chip:hover, .pal-btn:hover { background: var(--panel-2); border-color: var(--acc); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: 3px 8px; font-size: 12px; }
.btn-icon { padding: 3px 7px; line-height: 1; }
.btn-primary { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); font-weight: 600; }
.btn-primary:hover { filter: brightness(1.1); background: var(--acc); }
.btn-danger { color: var(--bad); border-color: var(--bad); background: var(--bad-bg); }
.btn-active { border-color: var(--acc); background: var(--acc-bg); color: var(--acc); }
.linkish { background: none; border: 0; color: var(--acc); cursor: pointer; font: inherit; padding: 0; }
.linkish:hover { text-decoration: underline; }

.input {
  font: inherit;
  color: var(--fg);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 6px 9px;
  width: 100%;
  min-width: 0;
}
.input:focus { border-color: var(--acc); outline: none; box-shadow: 0 0 0 2px var(--acc-bg); }
textarea.input { resize: vertical; line-height: 1.45; }
.select { cursor: pointer; }
.field { display: block; margin: 12px 0; }
.field-label { display: block; font-size: 12px; color: var(--fg-2); margin-bottom: 4px; }

/* ── badges ─────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  background: var(--neutral-bg);
  color: var(--fg-2);
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-soft, .badge-type, .badge-dom { background: var(--neutral-bg); color: var(--fg-2); }
.badge-type { font-family: var(--mono); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }

.s-open { background: var(--acc-bg); color: var(--acc); }
.s-answered { background: var(--violet-bg); color: var(--violet); }
.s-injecting, .s-testing { background: var(--warn-bg); color: var(--warn); }
.s-graded { background: var(--teal-bg); color: var(--teal); }
.s-solved { background: var(--ok-bg); color: var(--ok); }
.s-abandoned { background: var(--neutral-bg); color: var(--fg-3); }

.r-pass { background: var(--ok-bg); color: var(--ok); }
.r-fail, .r-error { background: var(--bad-bg); color: var(--bad); }
.r-timeout { background: var(--warn-bg); color: var(--warn); }
.r-unknown { background: var(--neutral-bg); color: var(--fg-2); }

.m-image { background: var(--violet-bg); color: var(--violet); }
.m-audio, .m-video { background: var(--teal-bg); color: var(--teal); }
.m-formula { background: var(--warn-bg); color: var(--warn); }
.m-text { background: var(--neutral-bg); color: var(--fg-2); }

.src-human { background: var(--acc-bg); color: var(--acc); }
.src-bot { background: var(--violet-bg); color: var(--violet); }
.src-agent { background: var(--teal-bg); color: var(--teal); }
.src-page { background: var(--warn-bg); color: var(--warn); }

.st-submitted { background: var(--acc-bg); color: var(--acc); }
.st-graded { background: var(--ok-bg); color: var(--ok); }
.st-superseded { background: var(--neutral-bg); color: var(--fg-3); }
.st-draft { background: var(--neutral-bg); color: var(--fg-2); }
.st-injected, .st-testing { background: var(--warn-bg); color: var(--warn); }

.a-agent { background: var(--teal-bg); color: var(--teal); }
.a-human { background: var(--acc-bg); color: var(--acc); }
.a-bot { background: var(--violet-bg); color: var(--violet); }
.a-hub { background: var(--neutral-bg); color: var(--fg-2); }

/* ── topbar ─────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex: 0 0 auto;
}
.brand { display: flex; align-items: baseline; gap: 6px; }
.brand .logo { color: var(--acc); font-size: 16px; }
.brand .sub { color: var(--fg-3); font-size: 12px; }
.topbar-meta { display: flex; gap: 12px; flex: 1; min-width: 0; overflow: hidden; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.chip { font-size: 12px; padding: 4px 9px; }

.conn { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; }
.conn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-3); flex: 0 0 auto; }
.conn-live .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.conn-connecting .dot { background: var(--warn); animation: pulse 1s ease-in-out infinite; }
.conn-down .dot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.conn-live { color: var(--ok); border-color: var(--ok); }
.conn-down { color: var(--bad); border-color: var(--bad); }
@keyframes pulse { 50% { opacity: .3; } }

/* ── workspace ──────────────────────────────────────────────────────── */
.workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(230px, 310px) minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--panel);
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.filters {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 2;
}
.filters .select { grid-column: 1; }
.filters .btn-icon { grid-row: 2; grid-column: 2; }
.filters #q { grid-column: 1 / -1; }
.list-meta { padding: 6px 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-meta .btn { margin-left: auto; }

/* very large statements are rendered head-first; the rest is on demand */
.stmt-more {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stmt-more .raw-details { width: 100%; margin-top: 4px; }
/* off-screen slices of a very long statement are not laid out until scrolled to */
.stmt-chunk { content-visibility: auto; contain-intrinsic-size: auto 600px; }
.plist { list-style: none; margin: 0; padding: 0 8px 16px; }
.plist-empty { padding: 18px 6px; }

.prow {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  background: var(--panel-2);
  display: grid;
  gap: 5px;
}
.prow:hover { border-color: var(--line-2); background: var(--panel-3); }
.prow-sel { border-color: var(--acc); background: var(--acc-bg); }
.prow-top { display: flex; gap: 6px; align-items: flex-start; }
.prow-title {
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.prow-mods, .prow-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.prow-host { color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.prow-vers { color: var(--fg-2); }
.flash { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: var(--flash-bg); } }

/* ── detail ─────────────────────────────────────────────────────────── */
.detail {
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  padding: 14px 18px 60px;
}
.empty, .loading { max-width: 62ch; margin: 8vh auto; color: var(--fg-2); }
.empty h2 { margin-bottom: .5em; color: var(--fg); }

.dtl-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.dtl-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.dtl-title { font-size: 20px; overflow-wrap: anywhere; }
.dtl-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.dtl-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 7px; color: var(--fg-2); }

.dtl-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.dtl-main, .dtl-rail { min-width: 0; display: grid; gap: 14px; align-content: start; }
@media (min-width: 1300px) {
  .dtl-cols { grid-template-columns: minmax(0, 1.35fr) minmax(340px, .9fr); }
  .dtl-rail { position: sticky; top: 0; }
}

.prompt-box { border-left: 3px solid var(--acc); padding: 2px 0 2px 12px; }
.prompt { font-size: 17px; line-height: 1.45; font-weight: 550; margin: 0; overflow-wrap: anywhere; }
.constraints { margin-top: 10px; }
.constraint-list { margin: 4px 0 0; padding-left: 20px; color: var(--fg-2); }
.block-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); margin: 12px 0 6px; }

.sec { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.sec-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
  background: var(--panel-2); border-radius: var(--r) var(--r) 0 0;
}
.sec-title { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-2); }
.sec-body { padding: 12px; min-width: 0; }
.sec-log .sec-body { max-height: 340px; overflow-y: auto; }
.sec-history { border-color: var(--line-2); }
.sec-history .sec-head { background: var(--panel-3); }

/* markdown */
.md { overflow-wrap: anywhere; }
.md-h { margin: 14px 0 6px; font-size: 15px; }

/* Heading LEVELS, added 2026-09-14. The markdown-lite renderer already emits real
   h2/h3/h4, but every one carried only .md-h and a single font-size, so a nested
   statement rendered as flat as an unnested one and there was no way to see which part
   contained which. These are additive: anything filing flat markdown looks as it did. */
h1.md-h { font-size: 21px; font-weight: 650; margin: 26px 0 10px;
          padding-bottom: 5px; border-bottom: 2px solid var(--line-2); }
h2.md-h { font-size: 18px; font-weight: 650; margin: 22px 0 8px;
          padding-bottom: 4px; border-bottom: 1px solid var(--line); }
h3.md-h { font-size: 15.5px; font-weight: 600; margin: 16px 0 6px; color: var(--fg); }
h4.md-h { font-size: 14px; font-weight: 600; margin: 12px 0 4px; color: var(--fg-2); }
h5.md-h, h6.md-h { font-size: 13px; font-weight: 600; margin: 10px 0 4px; color: var(--fg-3); }

/* Indent the nested levels so containment is visible at a glance rather than inferred
   from font size -- the operator's ask was to see which part is inside which. */
h3.md-h { margin-left: 10px; }
h4.md-h { margin-left: 22px; }
h5.md-h, h6.md-h { margin-left: 34px; }
.md-p { margin: 0 0 .7em; }
.md-list { margin: 0 0 .7em; padding-left: 22px; }
.md-quote { margin: 0 0 .7em; padding: 2px 0 2px 12px; border-left: 3px solid var(--line-2); color: var(--fg-2); }
.md-hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.md-pre, .raw-pre, .fasset-src, .ver-val, .example pre {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  overflow-x: auto;
  max-width: 100%;
}
.md-code { background: var(--panel-3); border-radius: 4px; padding: 1px 5px; }
.raw-details { margin-top: 8px; }
.raw-details summary { cursor: pointer; color: var(--fg-2); font-size: 12px; }
.raw-pre { margin-top: 6px; max-height: 320px; overflow-y: auto; }

.examples { display: grid; gap: 8px; }
.example { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; background: var(--panel-2); }
.example-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: start; margin-bottom: 5px; }
.ex-k { color: var(--fg-3); text-transform: uppercase; padding-top: 8px; }
.example-note { margin-top: 4px; }

/* ── assets ─────────────────────────────────────────────────────────── */
.asset-block { margin-bottom: 14px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tile { margin: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--panel-2); }
.tile-img { display: block; width: 100%; height: auto; max-height: 320px; object-fit: contain; background: var(--panel-3); cursor: zoom-in; }
.tile-big .tile-img { max-height: 460px; }
.tile-broken { padding: 14px; color: var(--fg-3); font-size: 12px; text-align: center; }
.tile-cap { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 6px 8px; font-size: 11.5px; border-top: 1px solid var(--line); }
.tile-id { color: var(--acc); font-family: var(--mono); }
.tile-txt { color: var(--fg-2); overflow-wrap: anywhere; }

.cmp-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.cmp-groups { display: flex; gap: 12px; align-items: start; }
.cmp-col { flex: 1 1 0; min-width: 220px; display: grid; gap: 6px; align-content: start; }
.cmp-col-head { display: flex; gap: 8px; align-items: center; }
.cmp-blink { position: relative; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--panel-3); padding: 6px; }
.blink-img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; }
.blink-label { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, .65); color: #fff; padding: 2px 7px; border-radius: 4px; }

.media { display: grid; gap: 8px; }
.media-el { width: 100%; }
video.media-el { max-height: 420px; background: #000; border-radius: var(--r-sm); }
.media-switch, .media-loop { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.media-cap { color: var(--fg-2); margin-top: 4px; }
.media-pos { margin-left: auto; }
.warn-note { color: var(--warn); background: var(--warn-bg); border-radius: var(--r-sm); padding: 6px 9px; font-size: 12px; }

.fasset-list { display: grid; gap: 10px; }
.fasset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px; background: var(--panel-2); }
.fasset-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.fasset-src { margin: 0 0 8px; }
.fasset-render, .fx-preview { font-size: 17px; padding: 8px 10px; background: var(--panel-3); border-radius: var(--r-sm); overflow-x: auto; }

/* formula subset renderer */
.fx { line-height: 1.9; }
.fx sub, .fx sup { font-size: .68em; }
.fx-frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 .18em; }
.fx-num { border-bottom: 1px solid currentColor; padding: 0 .3em; }
.fx-den { padding: 0 .3em; }
.fx-sqrt { display: inline-flex; align-items: stretch; }
.fx-radic { margin-right: 1px; }
.fx-rad { border-top: 1px solid currentColor; padding: 0 .2em; }
.fx-root { font-size: .6em; }
.fx-text { font-family: var(--sans); }
.fx-bold { font-weight: 700; }
.fx-vec { border-top: 1px solid currentColor; }
.fx-arrow { color: var(--acc); }
.fx-unknown { color: var(--warn); font-family: var(--mono); font-size: .8em; }
.fx-preview { min-height: 42px; }

/* ── editors ────────────────────────────────────────────────────────── */
.ed-type { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.ed { display: grid; gap: 8px; }
.hint { color: var(--fg-3); margin: 0; }
.code-input { min-height: 180px; white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.canon-row { display: flex; gap: 8px; align-items: baseline; margin-top: 10px; }
.canon {
  flex: 1; min-width: 0;
  background: var(--panel-2); border: 1px dashed var(--line-2); border-radius: var(--r-sm);
  padding: 5px 8px; overflow-x: auto; white-space: pre; color: var(--acc);
}
.ed-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.ed-actions .select { width: auto; flex: 0 1 auto; }
.ed-actions .input[type="text"] { flex: 1 1 180px; }

/* answerSpec.type "form" — one page, one record. The fields stack, each with its
 * own label and the page's own help text, so the record reads next to the live
 * page instead of collapsing into a single box. */
.ed-multifield { display: grid; gap: 4px; }
.ed-fields { display: grid; gap: 14px; }
.ed-field { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); }
.ed-label { color: var(--fg); font-size: 13px; font-weight: 600; }
.ed-label.tiny { font-size: 11px; font-weight: 500; }
.ed-sec { margin-top: 8px; color: var(--fg-2); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ed-sub { display: grid; gap: 3px; }
.ed-repeat { display: grid; gap: 10px; }
.ed-repeat-row { display: grid; gap: 6px; padding: 8px 10px; border-left: 2px solid var(--line); }

/* answerSpec.type "file" — the manifest is the answer; bytes are optional. */
.file-list { display: grid; gap: 3px; }
.file-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 12px; }
.file-row .ok { color: var(--ok); }
.file-row .warn { color: var(--warn); }

.opt-list { display: grid; gap: 4px; }
.opt { display: flex; gap: 9px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; background: var(--panel-2); }
.opt:hover { border-color: var(--line-2); }
.opt:has(.opt-input:checked) { border-color: var(--acc); background: var(--acc-bg); }
/* Fixed width so the labels line up in a column however many options there are. */
.opt-n { min-width: 1.4em; text-align: right; flex: none; }
.opt-label { overflow-wrap: anywhere; }
.opt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.opt-card { display: grid; gap: 6px; justify-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--panel-2); text-align: center; }
.opt-card:hover { border-color: var(--line-2); }
.opt-card:has(.opt-input:checked) { border-color: var(--acc); background: var(--acc-bg); box-shadow: 0 0 0 1px var(--acc) inset; }
.opt-card-label { display: grid; gap: 2px; overflow-wrap: anywhere; }
.thumb { width: 100%; max-width: 200px; height: auto; max-height: 130px; object-fit: contain; background: var(--panel-3); border-radius: 4px; cursor: zoom-in; }
.opt .thumb, .match-item .thumb, .order-item .thumb { width: 54px; height: 40px; flex: 0 0 auto; }
.thumb-empty { display: grid; place-items: center; width: 54px; height: 40px; color: var(--fg-3); }

.palette-wrap { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.palette { display: flex; gap: 4px; flex-wrap: wrap; }
.pal-btn { padding: 2px 7px; font-size: 12px; font-family: var(--mono); }

.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.order-item {
  display: flex; gap: 9px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 5px 8px; background: var(--panel-2); cursor: grab;
}
.order-item.dragging { opacity: .45; }
.order-item.drop-over { border-color: var(--acc); box-shadow: 0 -2px 0 var(--acc); }
.order-rank { width: 20px; text-align: center; color: var(--acc); font-weight: 700; font-family: var(--mono); }
.order-grip { color: var(--fg-3); cursor: grab; }
.order-label { flex: 1; min-width: 0; display: grid; }
.order-text { overflow-wrap: anywhere; }
.order-keys { display: flex; gap: 3px; }

.match-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match-col { display: grid; gap: 5px; align-content: start; }
.match-h { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-3); }
.match-item {
  display: flex; gap: 8px; align-items: center; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 6px 8px; background: var(--panel-2); color: var(--fg);
  font: inherit; cursor: pointer;
}
.match-item:hover { border-color: var(--line-2); }
.match-item.picked { border-color: var(--acc); background: var(--acc-bg); box-shadow: 0 0 0 1px var(--acc) inset; }
.match-item.paired { border-left: 3px solid var(--ok); }
.match-item.armed:hover { border-color: var(--ok); }
.match-label { flex: 1; min-width: 0; display: grid; overflow-wrap: anywhere; }
.match-arrow { color: var(--ok); }
.match-made { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.pair-chip { display: inline-flex; gap: 5px; align-items: center; background: var(--ok-bg); color: var(--ok); border-radius: 999px; padding: 2px 4px 2px 9px; font-size: 12px; }
.chip-x { background: none; border: 0; color: inherit; cursor: pointer; font-size: 11px; padding: 0 4px; }

/* ── version history ────────────────────────────────────────────────── */
.ver-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ver { border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 10px; background: var(--panel-2); }
.ver-current { border-left-color: var(--acc); background: var(--acc-bg); }
.ver-old { opacity: .78; }
.ver-head { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ver-n { font-weight: 700; color: var(--acc); }
.ver-author { font-weight: 600; }
.ver-val { margin: 0; max-height: 180px; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.ver-note { color: var(--fg-2); font-style: italic; margin-top: 5px; }
.ver-links { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.ver-results { display: grid; gap: 6px; margin-top: 7px; }
.ver-noresult { margin-top: 6px; }
.ver-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* ── results ────────────────────────────────────────────────────────── */
.verdict-box:empty { display: none; }
.verdict {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 9px 12px; background: var(--panel-2);
}
.verdict-word { font-weight: 800; letter-spacing: .08em; font-size: 13px; }
.verdict-detail { color: var(--fg-2); flex: 1; min-width: 140px; overflow-wrap: anywhere; }
.verdict-pass { border-color: var(--ok); background: var(--ok-bg); }
.verdict-pass .verdict-word { color: var(--ok); }
.verdict-fail, .verdict-error { border-color: var(--bad); background: var(--bad-bg); }
.verdict-fail .verdict-word, .verdict-error .verdict-word { color: var(--bad); }
.verdict-timeout { border-color: var(--warn); background: var(--warn-bg); }
.verdict-timeout .verdict-word { color: var(--warn); }
.verdict-unknown .verdict-word { color: var(--fg-2); }

.res { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; background: var(--panel-2); margin-bottom: 8px; }
.res-compact { margin-bottom: 0; background: var(--panel-3); }
.res-pass { border-left: 3px solid var(--ok); }
.res-fail, .res-error { border-left: 3px solid var(--bad); }
.res-timeout { border-left: 3px solid var(--warn); }
.res-unknown { border-left: 3px solid var(--fg-3); }
.res-head { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.res-detail { margin-top: 5px; overflow-wrap: anywhere; }
.res-actions { margin-top: 7px; }

/* ── process log ────────────────────────────────────────────────────── */
.timeline { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--line-2); display: grid; gap: 4px; }
.tl-item { display: flex; gap: 7px; align-items: baseline; flex-wrap: wrap; position: relative; }
.tl-dot { position: absolute; left: -16px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.tl-error .tl-dot { background: var(--bad); }
.tl-graded .tl-dot, .tl-observed .tl-dot { background: var(--ok); }
.tl-answered .tl-dot { background: var(--acc); }
.tl-action { font-weight: 600; }
.tl-detail { color: var(--fg-2); overflow-wrap: anywhere; }

/* ── toasts ─────────────────────────────────────────────────────────── */
.toasts { position: fixed; right: 14px; bottom: 14px; z-index: 60; display: grid; gap: 8px; width: min(390px, calc(100vw - 28px)); }
.toast { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); padding: 9px 11px; animation: rise .16s ease-out; }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } }
.toast-head { display: flex; gap: 8px; align-items: baseline; }
.toast-title { font-weight: 700; font-size: 12px; flex: 1; font-family: var(--mono); overflow-wrap: anywhere; }
.toast-close { background: none; border: 0; color: var(--fg-3); cursor: pointer; font-size: 13px; padding: 0 2px; }
.toast-body { font-size: 12.5px; color: var(--fg-2); margin-top: 3px; overflow-wrap: anywhere; max-height: 140px; overflow-y: auto; }
.toast-action { margin-top: 7px; }
.toast-error { border-color: var(--bad); }
.toast-error .toast-title { color: var(--bad); }
.toast-ok { border-color: var(--ok); }
.toast-ok .toast-title { color: var(--ok); }
.toast-info .toast-title { color: var(--acc); }

/* ── overlay: lightbox + modals ─────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 70; background: rgba(3, 7, 12, .74); display: grid; place-items: center; padding: 20px; overflow: auto; }
.overlay[hidden] { display: none; }
.overlay-box { position: relative; max-width: min(1100px, 96vw); max-height: 92vh; overflow: auto; }
.overlay-modal .overlay-box { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; width: min(520px, 96vw); }
.overlay-close { position: absolute; top: 6px; right: 8px; background: rgba(0, 0, 0, .5); color: #fff; border: 0; border-radius: 4px; cursor: pointer; padding: 2px 7px; z-index: 2; }
.lightbox { margin: 0; }
.lightbox-img { display: block; max-width: 96vw; max-height: 84vh; width: auto; height: auto; border-radius: var(--r-sm); background: var(--panel-3); }
.lightbox-cap { color: #dfe7ef; padding-top: 8px; font-size: 12.5px; text-align: center; }
.modal-title { font-size: 17px; margin-bottom: 8px; }
.modal-note { color: var(--fg-2); font-size: 12.5px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
body.overlay-open { overflow: hidden; }

/* ── narrow: one pane at a time ─────────────────────────────────────── */
.only-narrow { display: none; }
@media (max-width: 899px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  body[data-pane="list"] .detail { display: none; }
  body[data-pane="detail"] .sidebar { display: none; }
  .only-narrow { display: inline-flex; }
  .detail { padding: 12px 12px 60px; }
  .match-cols { grid-template-columns: 1fr; }
  .cmp-groups { flex-direction: column; }
  .topbar-meta { display: none; }
  .cmd-input { font-size: 13px; }
  .cmd-log { max-height: 96px; }
}

/* ── Q-numbers and copy ─────────────────────────────────────────────── */
.qnum {
  flex: 0 0 auto;
  padding: 0 6px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--acc);
  font: 600 11px/17px ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}
.qnum:empty { display: none; }
.qnum-lg { font-size: 13px; line-height: 21px; padding: 0 8px; }
/* The hub-wide problem number. Filled rather than outlined, and set apart from the
   per-page Qn beside it, because the two are different claims: #17 is the problem,
   Q3 is only where it sat on the page it came from. */
.pnum {
  flex: 0 0 auto;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--line-2);
  color: var(--fg-2, var(--acc));
  font: 600 11px/17px ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}
.pnum:empty { display: none; }
.pnum-lg { font-size: 13px; line-height: 21px; padding: 0 8px; }
.prow-copy { margin-left: auto; }
.btn-xs { padding: 1px 7px; font-size: 11px; line-height: 17px; }
/* Off-screen rather than display:none — a hidden textarea cannot be selected, and
   execCommand('copy') needs a real selection in the document. */
.copy-sink {
  position: fixed;
  top: -1000px;
  left: -1000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ── the command bar: plain English to the agent ────────────────────── */
.cmdbar {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.cmdbar-row { display: flex; gap: 8px; align-items: center; }
.cmd-input { flex: 1 1 auto; min-width: 0; }
.cmd-preview { min-height: 16px; margin-top: 5px; }
.cmd-preview.cmd-bad, .cmd-bad { color: var(--bad); }
.cmd-good { color: var(--ok); }
.cmd-verb {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--acc);
  font: 600 11px/16px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.cmd-log {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  max-height: 140px;
  overflow-y: auto;
}
.cmd-entry {
  padding: 4px 0;
  border-top: 1px solid var(--line);
}
.cmd-entry-bad .cmd-said { color: var(--fg-2); }
.cmd-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cmd-said { color: var(--fg-2); font-size: 12px; }
.cmd-body { margin-top: 2px; word-break: break-word; }

/* ── tab bar: user-owned drawers over one flat list ─────────────────── */
.tabbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  overflow-x: auto;
  overflow-y: hidden;
}
.tabbar:empty { display: none; }
.tabbar-gap { flex: 1 1 auto; min-width: 8px; }
.tabbar-note { padding: 2px 0; }

.tab {
  font: inherit;
  color: var(--fg-2);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-bottom-color: transparent;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  padding: 5px 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.tab:hover { background: var(--panel-3); color: var(--fg); }
.tab-on { color: var(--fg); background: var(--panel-3); border-color: var(--line-2); box-shadow: inset 0 -2px 0 var(--acc); }
.tab-name { font-weight: 600; }
.tab-count {
  min-width: 1.6em;
  text-align: center;
  border-radius: 999px;
  padding: 0 6px;
  background: var(--neutral-bg);
  color: var(--fg-3);
  font: 600 11px/17px var(--mono);
}
.tab-on .tab-count { background: var(--acc-bg); color: var(--acc); }

/* Unfiled is a to-do, not a resting state: when something is sitting in it,
   it says so loudly enough to be acted on rather than lived with. */
.tab-unfiled .tab-name { font-style: italic; }
.tab-todo { color: var(--warn); border-color: var(--warn); background: var(--warn-bg); }
.tab-todo:hover { background: var(--warn-bg); color: var(--warn); }
.tab-todo .tab-count { background: var(--warn); color: var(--acc-ink); }
.tab-todo.tab-on { box-shadow: inset 0 -2px 0 var(--warn); }

/* manage modal — wider than the credential modals, because a row is a name plus
   its count plus three controls, and 520px squeezes the name to nothing */
.overlay-modal:has(.tabs-modal) .overlay-box { width: min(640px, 96vw); }
.tab-rows { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.tab-row { display: flex; gap: 6px; align-items: center; }
.tab-row-name { flex: 1 1 auto; min-width: 0; }
.tab-row-count { flex: 0 0 auto; white-space: nowrap; }
.tab-new { display: flex; gap: 6px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* the filing control on the problem view */
.tab-pick-wrap { display: inline-flex; gap: 6px; align-items: center; }
.tab-pick { width: auto; max-width: 220px; padding: 2px 6px; font-size: 12px; }

/* ── reviews: commentary on one answer version ──────────────────────── */
.revs { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; }
.revs-sum { cursor: pointer; display: flex; gap: 7px; align-items: center; list-style: none; }
.revs-sum::-webkit-details-marker { display: none; }
.revs-sum::before { content: "▸"; color: var(--fg-3); }
.revs[open] > .revs-sum::before { content: "▾"; }
.revs-label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-2); }
.revs-kinds { font-family: var(--mono); }
.revs-body { margin-top: 7px; }
.rev-list { display: grid; gap: 6px; }

.rev { border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: var(--r-sm); padding: 6px 9px; background: var(--panel); }
.rev-head { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.rev-who { font-weight: 600; }
.rev-when { margin-left: auto; }
.rev-body { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* the kind is the point: three sources of very different weight, told apart at a
   glance rather than read out of the text. */
.badge-rk { text-transform: uppercase; letter-spacing: .04em; }
.rk-site { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.rk-agent { background: var(--teal-bg); color: var(--teal); border-color: var(--teal); }
.rk-human { background: var(--acc-bg); color: var(--acc); border-color: var(--acc); }
.rk-unknown { background: var(--neutral-bg); color: var(--fg-3); }
.rev-site { border-left-color: var(--warn); }
.rev-agent { border-left-color: var(--teal); }
.rev-human { border-left-color: var(--acc); }
.badge-rev-verdict { background: var(--violet-bg); color: var(--violet); font-family: var(--mono); }

.rev-form { display: grid; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.rev-form-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rev-form-row .input { flex: 1 1 120px; min-width: 0; }
.rev-form-row .select { flex: 0 0 auto; width: auto; }

/* ── guidelines panel ───────────────────────────────────────────────── */
.gpanel {
  flex: 0 0 auto;
  max-height: 46vh;
  overflow-y: auto;
  padding: 10px 14px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.gpanel[hidden] { display: none; }
.gpanel-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.gpanel-head .sec-title { font-size: 12px; }
.gpanel-close { margin-left: auto; }
.gpanel-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.gcol { min-width: 0; }
.gcol .block-h { margin-top: 0; }
.g-empty { max-width: 60ch; }
.g-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.g-item { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; background: var(--panel); }
.g-book { border-left: 3px solid var(--violet); }
.g-exp { border-left: 3px solid var(--teal); }
.g-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.g-title { font-weight: 600; overflow-wrap: anywhere; }
.g-preview { margin-top: 6px; }
.g-teaser { color: var(--fg-2); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 6px; }
.g-full { max-height: 300px; overflow-y: auto; white-space: pre-wrap; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; }
.g-note { min-height: 60px; }
.g-actions { display: flex; gap: 6px; align-items: center; margin-top: 7px; flex-wrap: wrap; }
.g-add { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.g-add .input { flex: 1 1 150px; min-width: 0; }
.g-add textarea.input { flex: 1 1 100%; }
.g-file { padding: 4px 6px; }

/* ── activity panel ─────────────────────────────────────────────────── */
.apanel {
  flex: 0 0 auto;
  max-height: 46vh;
  overflow-y: auto;
  padding: 10px 14px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.apanel[hidden] { display: none; }
.apanel-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.apanel-head .sec-title { font-size: 12px; }
/* specificity has to beat any `.parent .btn-icon` rule, or the close button stops
 * being pushed to the right edge and lands mid-row next to ↻ */
.apanel-head .apanel-close { margin-left: auto; }
.a-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.a-item {
  display: grid;
  grid-template-columns: 56px auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  padding: 4px 8px 4px 7px;
  border-left: 3px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--panel);
}
.a-problem { border-left-color: var(--acc); }
.a-answer  { border-left-color: var(--teal); }
.a-review  { border-left-color: var(--violet); }
/* unread, and it has to survive the kind colour on the same edge — so the mark is a
 * tinted row plus a dot, never a second border */
.a-new { background: var(--acc-bg); }
.a-new .a-kind::after { content: " ●"; color: var(--acc); }
.a-kind { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3); }
.a-num { padding: 0 6px; font-family: var(--mono); font-size: 11px; }
.a-text { min-width: 0; overflow-wrap: anywhere; }
.a-verdict { color: var(--fg-2); margin-left: 6px; }
.a-when { white-space: nowrap; }

@media (max-width: 899px) {
  .gpanel-cols { grid-template-columns: minmax(0, 1fr); }
  .gpanel { max-height: 60vh; }
  .apanel { max-height: 60vh; }
  /* the four-column row cannot hold under ~600px: let the text wrap under the head */
  .a-item { grid-template-columns: 52px auto minmax(0, 1fr); }
  .a-when { grid-column: 3; justify-self: end; }
  .tabbar { padding: 6px 10px; }
}

/* ---------------------------------------------------------------- chat (§17b)
 * The conversation with the sessions working the selected tab. Laid out like the
 * activity panel above it — same slot, same max height — because it is the same kind
 * of thing: a per-tab drawer that opens over the workspace rather than beside it.
 *
 * Read downwards, unlike the feed: `.c-list` scrolls internally and renderChat pins it
 * to the bottom, so the newest line is the one on screen when it opens. */
.cpanel {
  flex: 0 0 auto;
  max-height: 52vh;
  overflow-y: auto;
  padding: 10px 14px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.cpanel[hidden] { display: none; }
.cpanel-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.cpanel-head .sec-title { font-size: 12px; }
.cpanel-head .cpanel-close { margin-left: auto; }

/* Who is listening, and how far behind they are. The one line that tells a waiting
 * session apart from a dead one, so it sits above the conversation, not under it. */
.c-readers { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.c-reader { display: inline-flex; align-items: center; gap: 4px; }
.c-waiting strong { color: var(--acc); }

.c-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 32vh;
  overflow-y: auto;
}
.c-item {
  padding: 6px 9px;
  border-left: 3px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--panel);
}
/* The person's own messages are set apart from the sessions'. Colour is the weaker
 * signal of the two — the author name carries it — so the border does the work and
 * the panel stays legible where the accent does not render. */
.c-user { border-left-color: var(--acc); }
.c-agent { border-left-color: var(--line-2); }
.c-instruction { background: var(--warn-bg); border-left-color: var(--warn); }
.c-meta { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; margin-bottom: 2px; }
.c-who { font-weight: 600; }
.c-body { min-width: 0; overflow-wrap: anywhere; }
.c-body .md { margin: 0; }
.c-empty { margin: 6px 0; }

.c-compose { display: flex; gap: 8px; align-items: flex-start; }
.c-input { flex: 1 1 auto; min-height: 42px; resize: vertical; font: inherit; }
.c-kind { flex: 0 0 auto; }

/* A tab whose chat has something unheard on it. Same warn treatment `tab-todo` uses
 * for unfiled problems: both mean "this one needs you", and inventing a second visual
 * language for that would make neither read. */
.tab-unheard { border-color: var(--warn); }
.tab-unheard .tab-name::after { content: ' ●'; color: var(--warn); }
.chip-todo { color: var(--warn); border-color: var(--warn); }

/* The top of a trimmed conversation. Deliberately quiet — it is a fact about the window,
 * not a message someone sent, so it must not read as one. */
.c-trimmed { border-left-color: transparent; background: none; padding-left: 9px; }

/* ── task tags: type, state and when it was sent (taskTag in app.js) ─────── */
.t-new { background: var(--teal-bg); color: var(--teal); }
.t-revise { background: var(--warn-bg); color: var(--warn); }
.ts-opened { background: var(--acc-bg); color: var(--acc); }
.ts-answered { background: var(--violet-bg); color: var(--violet); }
.ts-closed { background: var(--ok-bg); color: var(--ok); }
.task-sent { color: var(--fg-2); font-weight: 600; white-space: nowrap; }
/* a tagged row puts its title on its own line: two badges beside it left "Gera niu…" */
.prow-tagged .prow-top { flex-wrap: wrap; }
.prow-tagged .prow-title { flex-basis: 100%; }
