/* The whole stylesheet of the app. RTL first; numbers are isolated so bidi never reorders them.
   Light and dark are two selected sets of the same tokens (prefers-color-scheme), not a flip. */

:root {
  color-scheme: light;
  --plane: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --border: rgba(11, 11, 11, 0.12);
  --accent: #2a78d6;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --received: #2a78d6;
  --radius: 10px;
  --gap: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --plane: #0d0d0d;
    --surface: #1a1a19;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --border: rgba(255, 255, 255, 0.12);
    --accent: #3987e5;
    --received: #3987e5;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--plane);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* -- chrome ------------------------------------------------------------------------- */

.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.topbar .brand { font-weight: 700; font-size: 1.05rem; margin-left: 8px; }
.topbar nav { display: flex; gap: 14px; flex-wrap: wrap; }
/* the reply reader's chip (docs/workbench.md §14): only when something waits for the approver */
.topbar nav a.nav-chip { font-weight: 600; }
.topbar nav .badge { display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 999px;
                     background: var(--critical); color: #fff; font-size: 0.8em; text-align: center; }
.topbar .spacer { flex: 1; }
/* the switcher must not inherit the full-width rule of the form fields below */
.topbar select { font: inherit; padding: 4px 8px; border-radius: 8px; width: auto;
                 border: 1px solid var(--border); background: var(--plane); color: var(--ink); }
.topbar label { margin: 0; }

main { max-width: 1280px; margin: 0 auto; padding: 20px 16px 64px; }
h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 26px 0 10px; }
h3 { font-size: 1rem; margin: 16px 0 8px; }
.subtitle { color: var(--ink-2); margin: 0 0 18px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: var(--gap);
}
.grid { display: grid; gap: var(--gap); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
/* trend charts: a decade of semesters needs room for its tick labels, so at most two per row */
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* -- numbers ------------------------------------------------------------------------ */

.num, td.num, th.num { unicode-bidi: isolate; direction: ltr; font-variant-numeric: tabular-nums; }
.big { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.stat { min-width: 120px; }
.stat .label { color: var(--ink-2); font-size: 0.85rem; }

/* -- tables ------------------------------------------------------------------------- */

.table-wrap { overflow: auto; max-height: 78vh; border-radius: var(--radius); }
/* A wide table scrolls sideways inside its card — with a scrollbar one can actually see,
   because an overlay scrollbar that only appears while scrolling reads as "cut off". */
.table-wrap.scrollable { scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
.table-wrap.scrollable::-webkit-scrollbar { height: 10px; width: 10px; }
.table-wrap.scrollable::-webkit-scrollbar-thumb {
  background: var(--muted); border-radius: 999px; border: 3px solid var(--surface);
}
.table-wrap.scrollable::-webkit-scrollbar-track { background: transparent; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--grid);
         white-space: nowrap; }
thead th {
  position: sticky; top: 0; z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-weight: 600; color: var(--ink-2);
}
tbody tr:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
/* the `כולן` / `ממוצע` row stays put at the bottom of a scrolling table — it is the row one
   reads the other rows against */
tr.total td { font-weight: 700; border-top: 2px solid var(--border);
              position: sticky; bottom: 0; z-index: 4; background: var(--surface); }
td.name, th.name { white-space: normal; min-width: 150px; }
/* a two-line header (`שיעור<br>החוזרים`): the way a thirteen-column table stays inside its card */
th.two { line-height: 1.15; }
/* the overview's «ימים מאז/עד הבחינה» cell may wrap rather than push the table off the card */
td.days, th.days { white-space: normal; min-width: 120px; max-width: 190px; }
.nw { white-space: nowrap; }
.legacy { color: var(--ink-2); }
/* the canonical id beside a Hebrew label, and the unit note beside the header counters */
.dim { color: var(--muted); font-size: 0.85em; }
.counter-note { color: var(--ink-2); font-size: 0.85rem; }
td.mono { font-size: 0.8rem; color: var(--ink-2); }

/* -- chips -------------------------------------------------------------------------- */

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 999px; font-size: 0.85rem; white-space: nowrap;
  border: 1px solid var(--border); background: var(--plane); color: var(--ink);
}
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.chip.good::before { background: var(--good); }
.chip.warn::before { background: var(--warning); }
.chip.serious::before { background: var(--serious); }
.chip.critical::before { background: var(--critical); }
.chip.received::before { background: var(--received); }
.chip.critical { border-color: var(--critical); font-weight: 600; }

/* the review page's action panel: as tall as its own content. Without this it stretches to the
   height of the checks column beside it and ends in a field of empty card (it used to be filled
   by the reply draft's textarea, which is parked). */
#panel { align-self: start; }

/* severity of a check */
.sev { border-right: 4px solid var(--muted); padding: 8px 12px; margin-bottom: 8px;
       background: var(--plane); border-radius: 6px; }
.sev.info { border-right-color: var(--accent); }
.sev.warn { border-right-color: var(--warning); }
.sev.red { border-right-color: var(--critical); }
.sev .scope { color: var(--ink-2); font-size: 0.85rem; }
/* a finding of several lines — the folded tampered-sheet finding, one line per signal */
.sev .msg { white-space: pre-line; }

/* the file-integrity box (docs/checks.md, "File integrity"): a broken file is not a statistic
   out of its band, so it does not queue behind the other checks — it sits above them, in its own
   red frame, on the review page and on the upload step alike. */
.integrity { border: 2px solid var(--critical); border-radius: var(--radius);
             background: color-mix(in srgb, var(--critical) 10%, var(--surface));
             padding: 12px 14px; margin-bottom: 16px; }
.integrity.soft { border-width: 1px; border-color: color-mix(in srgb, var(--warning) 55%, var(--border));
                  background: color-mix(in srgb, var(--warning) 12%, var(--surface)); }
.integrity h3 { margin: 0 0 10px; color: var(--critical); }
.integrity.soft h3 { color: var(--ink); }
.integrity .sev { background: var(--surface); }
.integrity p.dim { margin: 10px 0 0; }

/* the sheet rows behind a finding (docs/checks.md, "File integrity" — 2026-09-21): shut by
   default, because the message already names the first few of them */
details.rows { margin-top: 8px; }
details.rows > summary { cursor: pointer; color: var(--ink-2); font-size: 0.85rem; }
details.rows table.rows { margin-top: 8px; width: auto; font-size: 0.85rem; }
details.rows table.rows th, details.rows table.rows td { padding: 2px 10px; }
details.rows p.dim { margin: 6px 0 0; font-size: 0.85rem; }
button.primary.danger { background: var(--critical); border-color: var(--critical); color: #fff; }

.help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border);
  color: var(--ink-2); font-size: 0.75rem; cursor: help; margin-inline-start: 6px;
}

/* -- forms -------------------------------------------------------------------------- */

label { display: block; font-size: 0.9rem; color: var(--ink-2); margin-bottom: 4px; }
input[type="text"], input[type="number"], input[type="password"], select, textarea {
  font: inherit; width: 100%; padding: 7px 9px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--plane); color: var(--ink);
}
textarea { min-height: 180px; line-height: 1.6; }
.field { margin-bottom: 12px; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
button, .button {
  font: inherit; cursor: pointer; padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--plane); color: var(--ink);
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { border-color: var(--critical); color: var(--critical); }
button:hover { filter: brightness(1.05); }
/* a button that reads as a link: the «בטל» of a flash, inside a sentence */
button.link { background: none; border: none; padding: 0 2px; color: var(--accent);
              text-decoration: underline; font-weight: 600; }
button.small { padding: 4px 10px; font-size: 0.85em; }
form.inline { display: inline; }

/* «הוסף חריג»: a rule (`kind`) reads no value, a value takes no weights (docs/workbench.md §7) */
.ov-form .rule-only { display: none; }
.ov-form:has(option[data-rule]:checked) .rule-only { display: block; }
.ov-form:has(option[data-rule]:checked) .value-only { display: none; }
.readiness-row td { white-space: normal; border-top: none; padding-top: 0; }

.flash { padding: 8px 12px; border-radius: 8px; margin-bottom: 12px;
         background: color-mix(in srgb, var(--good) 18%, var(--surface)); }
/* the per-file row of the review panel: name, counts, and the two small actions */
.file-row { border-top: 1px solid var(--border); padding: 8px 0; }
.file-row:first-child { border-top: none; }
.file-row .actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.file-row details { margin-top: 8px; }
.file-row details > summary { cursor: pointer; color: var(--accent); font-size: 0.9em; }
.error { padding: 8px 12px; border-radius: 8px; margin-bottom: 12px;
         background: color-mix(in srgb, var(--critical) 18%, var(--surface)); }
/* something to look at before acting — not an error, not a success */
.notice { padding: 8px 12px; border-radius: 8px; margin-bottom: 12px;
          border: 1px solid color-mix(in srgb, var(--warning) 55%, var(--border));
          background: color-mix(in srgb, var(--warning) 18%, var(--surface)); }

/* -- upload ------------------------------------------------------------------------- */

.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 34px; text-align: center; color: var(--ink-2); background: var(--surface);
}
.dropzone.over { border-color: var(--accent); color: var(--ink); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.85rem;
        unicode-bidi: isolate; direction: ltr; }
pre.mono { overflow: auto; background: var(--plane); padding: 12px; border-radius: 8px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 4px 0; border-bottom: 1px solid var(--grid); }

/* -- charts ------------------------------------------------------------------------- */

.chart { direction: ltr; width: 100%; min-height: 260px; }
.chart-note { color: var(--ink-2); font-size: 0.85rem; margin-top: 4px; }

footer.page { color: var(--muted); font-size: 0.85rem; padding: 18px 20px; text-align: center; }
/* the backup's health (docs/backup.md) — quiet when fine, loud when not */
footer.page .backup-line.stale { color: var(--ink); font-weight: 600; }
footer.page .backup-line.failed { color: var(--critical); font-weight: 600; }

/* -- the workbench (docs/workbench.md) ----------------------------------------------- */

/* The upload zones are five small forms, not one drop target: each one is a *different
   file* with a different loader behind it, and mixing them up is the one mistake that
   would be expensive to undo. */
.upload-zone { display: grid; gap: 8px; padding: 10px 0; }
.upload-zone input[type="file"] { max-width: 100%; }
.upload-zone label { font-size: 0.85em; color: var(--ink-2); margin: 0; }

ul.files { list-style: none; padding: 0; margin: 8px 0 0; }
ul.files li { padding: 5px 0; border-top: 1px solid var(--grid); font-size: 0.9em;
              display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }

/* A diagnostic is a label and a number, and the number is the thing being read — so it sits
   at the far edge with tabular figures, and a finding (not a fact) is the only coloured one. */
ul.diag { list-style: none; padding: 0; margin: 0; }
ul.diag li { display: flex; justify-content: space-between; gap: 12px;
             padding: 3px 0; font-size: 0.88em; border-bottom: 1px solid var(--grid); }
ul.diag li:last-child { border-bottom: none; }
ul.diag .label { color: var(--ink-2); }
ul.diag .num { unicode-bidi: isolate; direction: ltr; font-variant-numeric: tabular-nums;
               font-weight: 600; }
ul.diag li.bad .num { color: var(--critical); }
ul.diag li.bad .label { color: var(--ink); }
ul.diag.wide li { font-size: 0.95em; padding: 5px 0; }

ul.issues { margin: 6px 0 0; padding-inline-start: 18px; font-size: 0.85em;
            color: var(--serious); }
tr.warn-row > td { background: color-mix(in srgb, var(--warning) 10%, transparent); }
td.num.bad, .num.bad { color: var(--critical); }

/* A cell of the board's approval table that a check fired on (docs/workbench.md §6). The colour
   is the check's own severity and the cell's `title` is the check's own sentence — the board
   never invents a wording for a threshold the approval card already has one for. */
td.flag-info { background: color-mix(in srgb, var(--accent) 12%, transparent); }
td.flag-warn { background: color-mix(in srgb, var(--warning) 26%, transparent); }
td.flag-red { background: color-mix(in srgb, var(--critical) 22%, transparent);
              font-weight: 600; }

/* The one red note in the app (docs/workbench.md §export). Everything else here is tokenized;
   the export's three files are the exception, and the note says so wherever they are offered.
   It is a standing statement of fact, not a flash, and it never disappears. */
.id-note { padding: 10px 14px; border-radius: 8px; margin: 0 0 var(--gap);
           border: 2px solid var(--critical); color: var(--critical); font-weight: 600;
           background: color-mix(in srgb, var(--critical) 10%, var(--surface)); }

/* The pilot's honest bar: the scrub masks ids, addresses and phones — names in prose may
   survive (docs/workbench-plan.md §Decisions 4). It is a standing warning, not a flash. */
.warn-bar { padding: 10px 14px; border-radius: 8px; margin: 0 0 var(--gap);
            border: 1px solid color-mix(in srgb, var(--warning) 60%, var(--border));
            background: color-mix(in srgb, var(--warning) 14%, var(--surface)); }

p.path { background: var(--plane); padding: 8px 10px; border-radius: 6px;
         overflow-x: auto; margin: 0 0 6px; }
p.hint { color: var(--ink-2); font-size: 0.9em; margin: 0 0 8px; }

/* -- the spec page ------------------------------------------------------------------- */

.spec-grid { align-items: start; }
.prose.md { line-height: 1.65; }
.prose.md h1 { font-size: 1.35rem; }
.prose.md h2 { font-size: 1.15rem; margin-top: 1.2em; }
.prose.md h3 { font-size: 1rem; margin-top: 1em; }
.prose.md table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.prose.md th, .prose.md td { border: 1px solid var(--grid); padding: 5px 8px; text-align: start; }
.prose.md code { background: var(--plane); padding: 1px 4px; border-radius: 4px;
                 font-family: ui-monospace, Menlo, monospace; font-size: 0.85em;
                 unicode-bidi: isolate; direction: ltr; }
.prose.md pre { background: var(--plane); padding: 10px; border-radius: 8px; overflow-x: auto;
                direction: ltr; text-align: left; }
.prose.md blockquote { margin: 10px 0; padding-inline-start: 12px;
                       border-inline-start: 3px solid var(--grid); color: var(--ink-2); }

/* TOML and the diff are code: LTR, left-aligned, inside the card, scrolling if they must. */
pre.toml, pre.diff {
  direction: ltr; text-align: left; overflow-x: auto; max-height: 900px; overflow-y: auto;
  background: var(--plane); padding: 12px; border-radius: 8px;
  font-family: ui-monospace, Menlo, monospace; font-size: 0.82rem; line-height: 1.55;
}
.t-table { color: var(--accent); font-weight: 700; }
.t-key { color: var(--ink); }
.t-string { color: var(--good); }
.t-number, .t-bool { color: var(--serious); }
.t-comment { color: var(--muted); }
/* a TODO is the whole point of a draft config — it must be the loudest thing on the page */
.t-todo { color: var(--critical); font-weight: 700; }

/* rules as code: the code is LTR inside the RTL page, like the TOML; a failing example is the
   loudest row of the card */
.rules-card h3 { margin-top: 14px; }
.rules-problems li { color: var(--critical); }
table.rules-examples td.ltr { direction: ltr; text-align: left; unicode-bidi: isolate; }
table.rules-examples tr.bad td { font-weight: 600; }

.d-add { color: var(--good); }
.d-del { color: var(--critical); }
.d-head { color: var(--accent); font-weight: 700; }
.d-same { color: var(--ink-2); }

/* One card per ingested source. A card that has a real finding gets a left rule, not a fill:
   the file is still readable, it just has something to answer for. */
.source-card h4 { margin: 0 0 4px; display: flex; gap: 8px; align-items: center;
                  flex-wrap: wrap; }
.source-card h5 { margin: 10px 0 4px; font-size: 0.8rem; color: var(--ink-2);
                  text-transform: none; font-weight: 600; }
.source-card.has-findings { border-inline-start: 4px solid var(--warning); }
.source-card .grid.two { gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.source-card ul.plain li { border-bottom: none; padding: 2px 0; }
/* A loader's issue sentence is the loader's own words, and those are English (`docs/sources.md`).
   `plaintext` takes the direction from the line's first strong character, so an English sentence
   reads left-to-right and a Hebrew one right-to-left, in the same list. */
ul.issues li { unicode-bidi: plaintext; }

/* The preview is there to recognize a document by, not to read it, so it gets a fixed width
   inside its cell — `max-width` on a `td` is only a suggestion to an auto-layout table, and
   this was the column that pushed the policy table past the card's edge (docs/web.md). */
.preview { width: 420px; max-width: 40vw; overflow-wrap: anywhere; }
td form.inline button { white-space: nowrap; }

/* -- the funnel: the default case page (docs/workbench.md §1 «The funnel») ------------ */

/* the reconciliation panel, folded into one line of chips: what is in the case, per kind */
.strip { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center;
         padding: 8px 12px; margin: 0 0 var(--gap); border-radius: var(--radius);
         background: var(--surface); border: 1px solid var(--border); font-size: 0.9em; }
.strip-title { font-weight: 600; margin-inline-end: 6px; }
.strip-chip { display: inline-flex; gap: 6px; align-items: baseline; padding: 2px 10px;
              border-radius: 999px; border: 1px solid var(--grid); }
.strip-chip .label { color: var(--ink-2); }
.strip-chip.ok { border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
.strip-chip.missing { color: var(--muted); border-style: dashed; }
.strip-chip.findings { border-color: var(--warning);
                       background: color-mix(in srgb, var(--warning) 14%, var(--surface)); }

/* the two inputs (Yohai, 2026-09-23): files | text, two equal columns, stacked when narrow */
.funnel-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap);
                 margin: 0 0 var(--gap); }
@media (max-width: 760px) { .funnel-inputs { grid-template-columns: 1fr; } }
.funnel-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.funnel-col .col-label { font-weight: 600; margin: 0; }
.funnel-col .hint, .funnel-col details { margin: 0; }
.funnel-col .col-actions { margin-top: auto; }
.funnel-drop .dropzone { flex: 1; min-height: 11em; padding: 24px; cursor: pointer;
                         display: flex; flex-direction: column; justify-content: center; }
.funnel-drop .dropzone p { margin: 4px 0; }
.funnel-drop .dropzone input[type="file"] { align-self: center; margin-top: 6px; }
.funnel-col textarea { flex: 1; min-height: 11em; width: 100%; box-sizing: border-box;
                       resize: vertical; }
ul.funnel-lines.notes-list { padding: 2px 16px; }
.notes-list > li { display: flex; gap: 10px; align-items: baseline; }
.notes-list .first-line { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
                          white-space: nowrap; }
.notes-list form.inline { margin: 0; }
.notes-list button.link { font-size: 0.85rem; }
.case-details > summary { margin: 0 0 8px; }

.funnel-item.pending { border-inline-start: 4px solid var(--warning); }
.funnel-item .sentence { font-size: 1.05em; margin: 0 0 6px; }
.funnel-item .question { margin: 2px 0; }
.funnel-item ul.evidence li { border: none; padding: 1px 0; }
.answer-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin: 10px 0 4px; }
.answer-form label { display: grid; gap: 2px; font-size: 0.85em; color: var(--ink-2); margin: 0; }

ul.funnel-lines { list-style: none; padding: 0; margin: 0; }
ul.funnel-lines > li { padding: 7px 0; border-bottom: 1px solid var(--grid); }
ul.funnel-lines > li:last-child { border-bottom: none; }

.build-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.build-form label { display: grid; gap: 2px; font-size: 0.85em; color: var(--ink-2); margin: 0; }
button.big { font-size: 1.15em; padding: 12px 28px; }
.build-card .built { padding: 8px 0; border-top: 1px solid var(--grid); display: grid; gap: 4px; }

/* -- login (docs/web.md §Login) ------------------------------------------------------ */

.topbar .who { color: var(--ink-2); }
form.login { max-width: 360px; margin: 48px auto; }
form.login h1 { margin-bottom: 16px; }
form.login button { width: 100%; margin-top: 4px; }

/* -- the sitting page: the default course page (docs/workbench.md §0) ------------------- */

/* one block per sitting, newest first; inside it a ladder of stages, newest on top. The stage
   being worked on is the one card with a coloured edge; a finished stage is a quiet line. */
.sitting-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
                margin: 0 0 var(--gap); }
.sitting-head h1 { margin: 0; }
.sitting-head p { margin: 0; }
/* the one «עוד» at the bottom of a workbench page (the minimalism pass, 2026-09-23): closed,
   and inside it the secondary things as quiet rows, grouped per sitting */
details.page-more { margin: 28px 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
details.page-more > summary { cursor: pointer; color: var(--ink-2); font-size: 0.95rem;
                              padding: 4px 0; }
details.page-more[open] > summary { margin-bottom: 8px; }
.page-more .more-group { margin: 0 0 14px; }
.page-more .more-group > h3 { margin: 0 0 4px; font-size: 1rem; }
.page-more .more-line { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 8px;
                        align-items: center; }
.page-more .more-links { margin: 14px 0 0; font-size: 0.85rem; color: var(--ink-2); }
.page-more > h3 { margin: 16px 0 6px; font-size: 1rem; }
/* the course list and the board's decision table wrap on a phone rather than scroll */
table.course-list th, table.course-list td,
table.board-main th, table.board-main td form.inline button { white-space: normal; }
@media (max-width: 600px) {
  table.board-main th, table.board-main td { padding: 6px 5px; }
}
.stage-next, .stage .attention { margin: 10px 0 0; font-size: 0.9rem; }
.stage .attention a { color: var(--warning); }
section.sitting { margin: 0 0 28px; }
section.sitting > h2 { margin: 0 0 10px; }
details.sitting.collapsed { background: var(--surface); border: 1px solid var(--border);
                            border-radius: var(--radius); padding: 10px 14px;
                            margin: 0 0 var(--gap); }
details.sitting.collapsed > summary { cursor: pointer; }
details.sitting.collapsed[open] > summary { margin-bottom: 10px; }
.stage { background: var(--surface); border: 1px solid var(--border);
         border-radius: var(--radius); padding: 12px 16px; margin: 0 0 10px; }
.stage.current { border-inline-start: 4px solid var(--accent); padding: 16px; }
.stage-line { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.stage > p:last-child { margin-bottom: 0; }
.stage-alert { padding: 10px 14px; border-radius: 8px; margin: 0 0 10px;
               border: 1px solid var(--critical);
               background: color-mix(in srgb, var(--critical) 10%, var(--surface)); }
.stage-alert p { margin: 0 0 6px; }
.stage .actions { gap: 12px; margin: 12px 0 4px; }
.stage .prose.summary { margin: 0 0 12px; }
.stage .prose.summary > :first-child { margin-top: 0; }
table.sitting-stats td.criteria { white-space: normal; }
table.sitting-stats td.criteria .chip { margin: 2px 0; margin-inline-end: 6px; }
table.sitting-stats tr.total td { position: static; }
.repeaters, .factor-line { margin: 8px 0 0; }
/* «+5» keeps its sign in front at any width (an RTL run would show «5+») */
.factor-line .num { direction: ltr; unicode-bidi: isolate; }
.repeaters .chip { margin-inline-start: 6px; }
.questions { display: grid; gap: 12px; margin: 0 0 8px;
             grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.questions .q { background: var(--plane); border-radius: 8px; padding: 10px 12px; }
.questions .q label { color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.questions .q input.short { max-width: 9em; }
.questions .q .why { margin: 6px 0 0; }
.spec-form textarea.short-area { min-height: 5em; margin-bottom: 8px; }
.files-toggle > summary { font-size: 0.95rem; }
@media (max-width: 600px) {
  .stage, .stage.current { padding: 12px; }
  button.big { font-size: 1.05em; padding: 10px 18px; }
  .funnel-drop .dropzone { padding: 16px; min-height: 8em; }
  .questions { grid-template-columns: 1fr; }
}

/* «שלח ציונים למזכירות» — the preview (docs/workbench.md §13) */
table.kv { width: auto; margin-bottom: var(--gap); }
table.kv th { text-align: start; padding-inline-end: 16px; white-space: nowrap; font-weight: 600; }
table.kv td { white-space: normal; overflow-wrap: anywhere; }
table.kv td.mono { direction: ltr; text-align: start; unicode-bidi: isolate; }
pre.mail-body { white-space: pre-wrap; font-family: inherit; background: var(--plane);
                padding: 14px 16px; border-radius: 8px; line-height: 1.6; margin: var(--gap) 0; }
/* a disabled button must look it — «שלח ציונים למזכירות» without an account, a failed run's export */
button:disabled, button:disabled:hover { opacity: 0.45; cursor: not-allowed; filter: none; }
