/* ==========================================================================
   Grading Pipeline — a marking instrument.

   Annotated paper: ink for decisions, highlighter for what still needs a
   person. Colour is semantic — amber only when attention is required.
   Interface text is set in a clean sans for clarity; monospace is kept for
   code, paths, and the live agent log where exact detail matters.
   ========================================================================== */

/* ---------------------------------------------------------- domain layout */

:root {
  --spine: 208px;
  --aside: 348px;
}

/* ------------------------------------------------------------------ base */

html, body { height: 100%; }
body { overflow: hidden; }

::-webkit-scrollbar-corner { background: transparent; }
/* Chromium draws arrow buttons on some platforms; they cannot be restyled. */
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

/* --------------------------------------------------------------- shell */

.shell {
  display: grid;
  grid-template-columns: var(--spine) minmax(0, 1fr) var(--aside);
  grid-template-rows: 52px minmax(0, 1fr) 28px;
  grid-template-areas: 'top top top' 'spine main aside' 'foot foot foot';
  height: 100vh;
}

/* --------------------------------------------------------- shared context */

.context-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 9px 11px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r);
  background: var(--accent-wash);
  color: var(--ink-2);
  font-size: 12px;
}
.context-banner strong { color: var(--ink); font-weight: 600; }
.context-banner a { margin-left: auto; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- spine */

.spine {
  grid-area: spine;
  background: var(--surface);
  border-right: 1px solid var(--rule);
  padding: 20px 0 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.spine-label {
  padding: 0 18px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

/* The stages are genuinely a sequence, so a vertical rule with a node per
   stage encodes that fact rather than decorating it. The rule passes through
   the nodes: a line beside them says nothing about the order. */
.stages { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }

.stages::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--rule);
}

.stage { position: relative; }

.stage-btn {
  width: calc(100% - 8px);
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 15px;
  background: none;
  border: 0;
  border-radius: var(--r);
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: default;
  transition: background var(--t-fast), color var(--t-fast);
}
.stage-btn[data-enabled='true'] { cursor: pointer; }
.stage-btn[data-enabled='true']:hover { background: var(--surface-2); color: var(--ink); }
.stage-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* The stage you are on is the one that matters, so it is said in the type as
   well as in the wash behind it. */
.stage[aria-current='true'] .stage-btn {
  background: var(--accent-wash);
  color: var(--ink);
  font-weight: 500;
}

/* Four states, four meanings: a stage behind you is done, the stage you are
   on is where you are, a stage with a job running is happening now, and the
   rest are still to come. */
.stage-node {
  position: relative;
  width: 9px; height: 9px;
  margin-left: 3px;
  border-radius: 50%;
  border: 1px solid var(--ink-3);
  background: var(--surface);
  transition: background var(--t), border-color var(--t);
}
.stage[data-state='done'] .stage-node { background: var(--ok); border-color: var(--ok); }
.stage[data-state='here'] .stage-node { background: var(--accent); border-color: var(--accent); }
.stage[data-state='busy'] .stage-node { background: var(--flag); border-color: var(--flag); }
.stage[data-state='busy'] .stage-node::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--flag-line);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.5); opacity: 0; }
}

.stage-count {
  font-size: 11px;
  color: var(--ink-3);
}

.spine-foot {
  margin-top: auto;
  padding: 14px 18px 0;
  border-top: 1px solid var(--rule-soft);
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.7;
}
/* What the rail is holding: the assignment in the second voice, the count in
   the third. */
.spine-foot .run-title { color: var(--ink-2); }
.spine-foot button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-3);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color var(--t-fast);
}
.spine-foot button:hover { color: var(--ink); }

/* ------------------------------------------------------------------ main */

.main {
  grid-area: main;
  overflow-y: scroll;
  padding: 26px 30px 60px;
  min-width: 0;
}

.head { margin-bottom: 22px; }
.head h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-wrap: balance;
}
.head p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
  max-width: 68ch;
  text-wrap: pretty;
}

/* --------------------------------------------------------------- controls */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), opacity var(--t-fast);
}
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: var(--ink-3); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn[data-variant='primary'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  /* A hairline of light along the top edge: enough to read as a raised
     surface, not enough to look like a gradient. */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn[data-variant='primary']:hover:not(:disabled) {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}
.btn[data-variant='ghost'] { background: none; border-color: transparent; color: var(--ink-2); }
.btn[data-variant='ghost']:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.btn[data-variant='danger'] { border-color: var(--bad); color: var(--bad); }
.btn[data-variant='danger']:hover:not(:disabled) { background: var(--bad-wash); }
.btn[data-size='sm'] { padding: 5px 10px; font-size: 12px; font-weight: 500; }

.field { margin-bottom: 16px; }
.field > label {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field .hint {
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.6;
}
.field .hint a { color: var(--accent-ink); }

/* A field with a control inside its frame. The control lies over the input's
   right edge instead of beside it, so every input on a card is the same width
   and the column keeps one right edge. */
.field-control { position: relative; width: 100%; }
.field-control .input { padding-right: 58px; }
.field-trailing {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  padding: 4px 8px;
  color: var(--ink-3);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast);
}
.field-trailing:hover { color: var(--ink); background: var(--surface-2); }
.field-trailing:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* A quiet confirmation of what just happened. Stated in one line, not in a
   panel: the outcome of an action belongs beside the action, and a bordered
   box reads as one more thing to deal with. */
.confirm {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  color: var(--ok);
  font-size: 12.5px;
}

/* The model's own facts on the left, the way to ask again on the right. The
   card header already names the model. */
.model-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.model-meta { color: var(--ink-2); font-size: 12.5px; }

/* The runtime's state on the left, its actions on the right. */
.runtime-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.runtime-state {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.runtime-actions { display: flex; align-items: center; gap: 8px; }

.input, .select {
  width: 100%;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
}
.input:focus, .select:focus { border-color: var(--accent); outline: none; }
.input::placeholder { color: var(--ink-3); }
.select { cursor: pointer; }

/* ------------------------------------------------------------------ card */

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 20px;
  min-width: 0;
}
.card + .card { margin-top: 14px; }

/* The model note on the Run grading card: says which model will be used, and
   opens the picker. Styled as text with a hover affordance rather than a
   button, because it reads as a label until you reach for it. */
/* Busy state for a button whose work is slow. Spins, and is held still when
   the system asks for less motion rather than disappearing, because the label
   change is the part that actually communicates. */
.spinner {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  opacity: 0.85;
  animation: spinner-turn 0.7s linear infinite;
}
@keyframes spinner-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}

/* The model name is a single unbreakable token: a provider, a slash and a
   long id. Wrapping it mid-name is unreadable, so it shortens with an
   ellipsis instead and the full id stays in the tooltip. */
.model-note {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}

.model-pick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r);
  padding: 3px 7px;
  margin: -3px -7px;
  font: inherit;
  color: var(--ink-3);
  cursor: pointer;
  text-align: right;
}
.model-pick:hover { color: var(--ink); background: var(--surface-2); border-color: var(--rule); }
.model-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.model-pick-label {
  font-size: 11.5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-pick .chip { flex: none; }
.model-pick-hint {
  font-size: 11px;
  opacity: 0.7;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* On a narrow window the card title and the model name cannot share a line
   without both being squeezed, so the note drops to its own line under it. */
@media (max-width: 860px) {
  .card-head { flex-wrap: wrap; }
  .model-note { align-items: flex-start; width: 100%; }
}

/* The model id in the title bar is long. It gives up space rather than
   pushing the theme control off the edge of the window. */
#model-chip .chip {
  display: inline-block;
  max-width: min(300px, 28vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* Keeps the grading controls on screen while you work down the list.
   A cohort of 150 means selecting a student at the bottom and scrolling back
   to the top to press Grade Selected, which is the whole trip the sticky bar
   exists to remove.

   The gap above the card is padding on an opaque background rather than a
   margin: a margin leaves a transparent band pinned to the top of the scroll
   area, and rows scrolling up behind the bar are visible through it.

   Once the page has scrolled, the bar stops being a wall. It fades to a
   translucent pane so the rows behind it stay readable through the surface,
   and a short scrim above it dissolves the content rather than cutting it. */
.sticky-acts {
  position: sticky;
  top: 0;
  z-index: 6;
  padding-top: 14px;
  background: var(--desk);
  transition: background var(--t);
}
.sticky-acts > .card {
  margin-top: 0;
  transition: background var(--t), border-color var(--t), box-shadow var(--t);
}

/* The dissolve above the bar. Painted below the card but above the bar's own
   background, so the rows behind fade out instead of being sliced off. */
.sticky-acts::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
  z-index: -1;
  background: linear-gradient(to bottom, var(--desk), color-mix(in srgb, var(--desk) 45%, transparent));
  opacity: 0;
  transition: opacity var(--t);
  pointer-events: none;
}

.sticky-acts[data-scrolled='true'] {
  background: transparent;
}
.sticky-acts[data-scrolled='true']::before { opacity: 1; }
.sticky-acts[data-scrolled='true'] > .card {
  /* Sheer on purpose: the rows behind stay visible through the surface while
     the labels on it stay readable. */
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  /* Elevation is declared once. At rest the card is a bordered surface;
     floating over the list it is a shadow, and a border under a wide soft
     shadow would make it a ghost card. */
  border-color: transparent;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
:root[data-theme='light'] .sticky-acts[data-scrolled='true'] > .card {
  box-shadow: 0 10px 28px rgba(30, 28, 26, 0.16);
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-head h2 { margin: 0; font-size: 13px; font-weight: 500; flex: 0 0 auto; }
.card-head .note {
  font-size: 11.5px;
  color: var(--ink-3);
  /* A note that wraps pushes the card title onto two lines; a model id is
     long enough to do that on a narrow window. */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* A note that carries a control as well as a fact: the row holds them
   side by side, and the control must not be clipped by the note. */
.card-head .note--row {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: visible;
  white-space: normal;
}

/* The count of what a card holds, and the action that refills it. */
.head-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--ink-3);
}

/* ------------------------------------------------------------ pick lists */

.picklist { display: flex; flex-direction: column; gap: 1px; background: var(--rule-soft);
            border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; }

.pick {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  background: var(--surface);
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast);
}
.pick:hover { background: var(--surface-2); }
.pick[aria-selected='true'] { background: var(--accent-wash); }

.pick-title { font-size: 12.5px; color: var(--ink); }
.pick-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-3);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pick-meta { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--ink-2); }

/* ---------------------------------------------------------- marks strip */

.marks { display: flex; flex-direction: column; gap: 9px; min-width: 0; }

/* A `nowrap` label gives its grid track a min-content floor, which pushes the
   score column out of a narrow rail. Zeroing the item's min-width is what
   actually lets the track shrink and the ellipsis engage. */
.mark-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px;
            align-items: center; min-width: 0; }
.mark-row > * { min-width: 0; }
.mark-name {
  font-size: 11.5px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mark-bar {
  position: relative;
  height: 5px;
  margin-top: 5px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}
.mark-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--t);
}
/* The bar is the score, so the bar carries the score's colour: green for a
   strong result, amber for a partial one, red for a failing one. */
.mark-row[data-tone='ok'] .mark-fill { background: var(--ok); }
.mark-row[data-tone='warn'] .mark-fill { background: var(--flag); }
.mark-row[data-tone='bad'] .mark-fill { background: var(--bad); }

/* A criterion flagged for a human, beside its score. */
.mark-flag {
  display: inline-block;
  margin-left: 7px;
  vertical-align: middle;
  color: var(--flag);
}

.mark-score {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.mark-score .of { color: var(--ink-3); font-weight: 400; }

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid var(--rule);
  background: var(--surface-2);
  font-size: 10.5px;
  color: var(--ink-2);
  white-space: nowrap;
}
.chip[data-tone='flag'] { border-color: var(--flag-line); background: var(--flag-wash); color: var(--flag); }
/* A warning is amber without the alarm: the word is coloured, the chip is
   not filled. A note is quiet, but it is still a flag and still says so. */
.chip[data-tone='warn'] { border-color: var(--flag-line); color: var(--flag); }
.chip[data-tone='note'] { color: var(--ink-3); }
.chip[data-tone='ok'] { border-color: transparent; background: var(--ok-wash); color: var(--ok); }
.chip[data-tone='bad'] { border-color: transparent; background: var(--bad-wash); color: var(--bad); }
.chip[data-tone='accent'] { border-color: var(--accent-line); background: var(--accent-wash); color: var(--accent-ink); }

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* A flag marks a report whatever the grader made of it. The severity says
   how loudly it is marked, not whether it is marked at all: a note that
   nobody can see in a list of 150 is a note nobody reads. */
.dot[data-severity='block'] { color: var(--flag); }
.dot[data-severity='warn'] { color: var(--flag); opacity: 0.72; }
.dot[data-severity='info'] { color: var(--ink-3); }

/* ---------------------------------------------------------------- aside */

.aside {
  grid-area: aside;
  background: var(--surface);
  border-left: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.aside-head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.aside-head h2 { margin: 0; font-size: 12px; letter-spacing: 0.06em;
                 text-transform: uppercase; color: var(--ink-3); font-weight: 500; }

.aside-body { flex: 1; overflow-y: auto; padding: 14px 16px; min-height: 0; min-width: 0; }
.aside-body > * { min-width: 0; }
.aside-body > * + * { margin-top: 14px; }

.console {
  font-size: 12.5px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-line { display: grid; grid-template-columns: 52px 1fr; gap: 10px; }
.log-time { color: var(--ink-3); }
.log-text { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.log-line { min-width: 0; }
.log-line[data-tone='flag'] .log-text { color: var(--flag); }
.log-line[data-tone='bad'] .log-text { color: var(--bad); }
.log-line[data-tone='ok'] .log-text { color: var(--ok); }
.log-line[data-tone='accent'] .log-text { color: var(--accent-ink); }

/* -------------------------------------------------------------- notices */

.notice {
  display: flex;
  gap: 10px;
  padding: 11px 13px;
  border-radius: var(--r);
  border: 1px solid var(--rule);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.6;
  text-wrap: pretty;
}
.notice[data-tone='flag'] { border-color: var(--flag-line); background: var(--flag-wash); color: var(--flag); }
.notice[data-tone='bad'] { border-color: transparent; background: var(--bad-wash); color: var(--bad); }
.notice[data-tone='accent'] { border-color: var(--accent-line); background: var(--accent-wash); color: var(--accent-ink); }
.notice strong { color: var(--ink); font-weight: 500; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px;
  padding: 30px;
}
.empty .big { font-size: 13px; color: var(--ink-2); }

/* -------------------------------------------------------------- progress */

.meter { height: 3px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.meter-fill { height: 100%; background: var(--accent); transition: width var(--t); }
.meter-fill[data-tone='flag'] { background: var(--flag); }

.stats { display: flex; gap: 22px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 1px; }
.stat-v { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.stat-k { font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.07em;
          text-transform: uppercase; }

/* The figure a person has to look at is marked by its colour, not by a box
   around it: the number in the flag colour and its label tinted from the
   same hue rather than left grey. A panel behind it would have disturbed the
   figures beside it, which are the same kind of thing. */
.stat[data-tone='flag'] .stat-v { color: var(--flag); }
.stat[data-tone='flag'] .stat-k {
  color: color-mix(in srgb, var(--flag) 66%, var(--ink-3));
}

/* The figures in the rail. A narrow column cannot hold four figures across,
   and a row of them wrapped and left the last one stranded on a line of its
   own. Here they are a ledger: the label on the left, the figure on the
   right, one line each, so the figures line up down the edge. */
.stats--rail {
  flex-direction: column;
  gap: 9px;
  flex-wrap: nowrap;
}
.stats--rail .stat {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.stats--rail .stat-v { font-size: 16px; }
.stats--rail .stat-k { font-size: 11px; }

/* ---------------------------------------------------------------- table */

.rows { display: flex; flex-direction: column; gap: 1px; background: var(--rule-soft);
        border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; }

.row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 92px 116px 96px;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: var(--surface);
  font-size: 12px;
  transition: background var(--t-fast);
}
.row:hover { background: var(--surface-2); }
.row[data-selected='true'] { background: var(--accent-wash); }

.row-head {
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: default;
}
.row-head:hover { background: var(--surface-2); }

.row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.row-score { text-align: right; font-weight: 500; }
.row-score .of { color: var(--ink-3); font-weight: 400; }
.row-act { display: flex; gap: 5px; justify-content: flex-end; }

/* ----------------------------------------------------------------- split */

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; height: 100%; }

.reader { min-width: 0; display: flex; flex-direction: column; }
.reader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.reader-title { font-size: 15px; font-weight: 500; margin: 0 0 4px; }
.reader-meta { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

.editor-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* Prose is the one place we leave the monospace grid: an instructor reading
   five long justifications benefits more from a proportional face than from
   the instrument's chrome. */
.prose {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.68;
  color: var(--ink);
  max-width: 74ch;
}
.prose > *:first-child { margin-top: 0; }
.prose h1 { font-family: var(--sans); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin: 26px 0 12px; }
.prose h2 {
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 600;
  margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--rule-soft);
}
.prose h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 20px 0 8px; }
.prose p { margin: 0 0 11px; }
.prose ul { margin: 0 0 11px; padding-left: 20px; }
.prose li { margin-bottom: 4px; }
.prose code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--rule-soft);
  border-radius: var(--r-sm); padding: 1px 4px;
}
/* The severity of a flag, as the report writes it. */
.prose code[data-severity='block'] {
  color: var(--flag);
  background: var(--flag-wash);
  border-color: var(--flag-line);
}
.prose code[data-severity='warn'] { color: var(--flag); }
.prose code[data-severity='info'] { color: var(--ink-3); }
.prose pre {
  background: var(--surface-2); border: 1px solid var(--rule);
  border-radius: var(--r); padding: 12px 14px; overflow-x: auto;
  font-family: var(--mono); font-size: 12px; line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose strong { font-weight: 600; }
.prose em { color: var(--ink-2); }
.prose hr { border: 0; border-top: 1px solid var(--rule-soft); margin: 20px 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 14px; font-family: var(--sans);
               font-size: 13px; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; }
.prose th { background: var(--surface-2); color: var(--ink-3); font-weight: 600;
            font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.prose blockquote { margin: 0 0 11px; padding-left: 12px; border-left: 2px solid var(--rule);
                    color: var(--ink-2); }

.editor {
  width: 100%;
  min-height: 380px;
  flex: 1;
  resize: none;
  padding: 14px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-lg);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
}
.editor:focus { border-color: var(--accent); outline: none; }

.tabs { display: flex; gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule);
        border-radius: var(--r); padding: 2px; margin-bottom: 14px; width: fit-content; }
.tab {
  padding: 5px 12px; background: var(--surface); border: 0; border-radius: 5px;
  color: var(--ink-3); font: inherit; font-size: 11.5px; cursor: pointer;
  /* A tab that wraps turns the segmented control into a two-line block, and
     everything sitting beside it grows to match. */
  white-space: nowrap;
}
.tab[aria-selected='true'] { background: var(--surface-3); color: var(--ink); }

/* The controls at the head of a report: the view switch and the save button.
   They are the same height and sit side by side, so the row reads as one
   cluster instead of a large button beside a small switch. */
.reader-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.reader-actions .tabs { margin-bottom: 0; }

/* ---------------------------------------------------------------- review */

/* Two panes side by side: the cohort list on the left, the report on the
   right. Stacking them meant clicking a student put the report below the
   fold, which is easy to miss. */
.review-split {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.review-list {
  position: sticky;
  top: 0;
  max-height: calc(100vh - 190px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.review-list .rows { overflow-y: auto; min-height: 0; }
.review-list .row { grid-template-columns: minmax(0, 1fr) 74px; gap: 8px; }
.review-list .row-head { grid-template-columns: minmax(0, 1fr) 74px; }
.review-list .row > :nth-child(4),
.review-list .row-head > :nth-child(4) { display: none; }

.review-pane { min-width: 0; animation: slide-in var(--t) both; }

/* Editing a report is a long task, and the source pane was a short box
   floating in a column the cohort list fills completely. In edit mode the
   pane takes the height of the list beside it, so the two columns read as
   one frame and the editor has room to work in. */
.review-pane--editing {
  min-height: calc(100vh - 190px);
  display: flex;
  flex-direction: column;
}
.review-pane--editing > .card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.review-pane--editing .editor-wrap { flex: 1; min-height: 0; }
.review-pane--editing .editor { min-height: 320px; }

@keyframes slide-in {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .review-pane { animation: none; }
}

@media (max-width: 1080px) {
  .review-split { grid-template-columns: minmax(0, 1fr); }
  .review-list { position: static; max-height: 260px; }
  /* Stacked, the two panes are not side by side, so matching the list's
     height would make the page a screen and a half long. */
  .review-pane--editing { min-height: 60vh; }
}

/* --------------------------------------------------------------- dialog */

.scrim {
  position: fixed; inset: 0; background: rgba(6, 7, 9, 0.66);
  display: grid; place-items: center; z-index: 40; padding: 30px;
}
:root[data-theme='light'] .scrim { background: rgba(30, 28, 26, 0.34); }

.dialog {
  width: min(680px, 100%);
  max-height: 82vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 22px;
}
/* The publish plan carries a comment per student, so it needs the room. */
.dialog--plan { width: min(760px, 100%); }
.dialog h2 { margin: 0 0 6px; font-size: 15px; font-weight: 500; }
.dialog > p { margin: 0 0 18px; color: var(--ink-2); font-size: 12.5px; line-height: 1.65; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px;
                  padding-top: 16px; border-top: 1px solid var(--rule-soft); }

/* ----------------------------------------------------------------- misc */

.plan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 12px;
}
.plan-row:last-child { border-bottom: 0; }
.plan-change { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.plan-change b { color: var(--ink); font-weight: 500; }

/* One entry per student in the publish plan: the mark that will change, and
   the comment the student will read. The comment is editable here because
   this is the last screen before it goes out. */
.plan-entry {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.plan-entry:last-of-type { border-bottom: 0; }
.plan-entry .plan-row {
  padding: 0 0 8px;
  border-bottom: 0;
}
.comment-box { margin-top: 2px; }
.comment-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  font-size: 11px;
  color: var(--ink-3);
}
.comment-count { font-variant-numeric: tabular-nums; }
.comment-input {
  width: 100%;
  min-height: 56px;
  resize: vertical;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.55;
}
.comment-input:focus { border-color: var(--accent); outline: none; }
.comment-input::placeholder { color: var(--ink-3); }

.scroll-y { overflow-y: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.rowlink {
  background: none; border: 0; padding: 0; color: var(--accent-ink);
  font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.rowlink:hover { color: var(--ink); }

@media (max-width: 1180px) {
  .shell { grid-template-columns: var(--spine) minmax(0, 1fr); grid-template-areas: 'top top' 'spine main'; }
  .aside { display: none; }
  .row { grid-template-columns: 26px minmax(0, 1fr) 84px 100px; }
  .row > :nth-child(5) { display: none; }
}

/* ------------------------------------------------------------ slide-over
   A panel that opens over the content area. Used for the assignment list (so a
   long course list no longer forces a scroll) and for the live agent log.

   Centred over the working area rather than docked to the window edge: docked,
   it covered the rubric aside and left the course list legible underneath, which
   made it look like a second column rather than a dialog. */

.slideover {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 24px;
  z-index: 40;
  /* Opaque enough that the list behind is plainly dimmed, not still readable. */
  background: rgba(4, 5, 8, 0.78);
}

:root[data-theme="light"] .slideover {
  background: rgba(24, 26, 32, 0.6);
}

.slideover-panel {
  width: min(760px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  /* Fully solid. A translucent panel over a translucent scrim was unreadable. */
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

.slideover--wide { width: min(1080px, 100%); }
.slideover--narrow { width: min(580px, 100%); }

.slideover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
}

.slideover-head h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.slideover-head .dim { font-size: 12px; color: var(--ink-3); }

.slideover-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  min-height: 0;
}

.slideover-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.slideover-foot--start { justify-content: flex-start; }

/* A saved session in the panel: what it is on the left, how far it got in
   the middle, what you can do with it on the right. The actions are drawn
   marks rather than three boxes of text, which is what made this list
   louder than the sessions in it. */
.session-list { display: flex; flex-direction: column; }

/* A card whose body is a list. A rule separates the heading from the first
   row, so the list does not read as more of the heading. */
.card--listing .card-head { margin-bottom: 0; }
.card--listing .session-list {
  margin-top: 12px;
  border-top: 1px solid var(--rule-soft);
}
.session-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 2px 20px;
  align-items: center;
  padding: 11px 2px;
  border-bottom: 1px solid var(--rule-soft);
  cursor: pointer;
  transition: background var(--t-fast);
}
.session-row:last-child { border-bottom: 0; }
.session-row:hover { background: var(--surface-2); }
.session-main { min-width: 0; }
.session-title {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.session-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--ink-3);
}
.session-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.session-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 11.5px;
  color: var(--ink-3);
}
.session-model { font-size: 11px; color: var(--ink-3); }
.session-resume { font-size: 11px; color: var(--ink-3); }
.session-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 64px;
}
.session-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.session-count-label {
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.session-actions {
  display: flex;
  gap: 2px;
  align-items: center;
  justify-content: flex-end;
}
.session-main .input { width: 100%; }
.session-empty { color: var(--ink-3); font-size: 12.5px; padding: 6px 0; }

/* Row actions: drawn marks, one stroke and one weight. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--rule);
}
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.icon-btn--danger:hover {
  color: var(--bad);
  background: var(--bad-wash);
  border-color: color-mix(in srgb, var(--bad) 40%, transparent);
}

/* The foot of a stage: the way back on the left, the way forward on the
   right. One row, one alignment, on every stage. */
.page-foot {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.page-foot--end { justify-content: flex-end; }
.page-foot-note { color: var(--ink-3); font-size: 12.5px; }

/* Reference material under a stage. What the other side receives, not
   another thing to do — so it is a footnote, not a card. */
.explain { margin-top: 18px; }
.explain h3 {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.explain ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.7;
}
.explain li { margin-bottom: 2px; }

/* The instruction box in the agent log panel, and the actions beside it.
   The field and its button share one frame: the button sits inside the
   field's edge rather than next to it, so the pair reads as one control. */
.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.steer-group {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color var(--t-fast);
}
.steer-group:focus-within { border-color: var(--accent); }
.steer-group .input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding-right: 6px;
}
.steer-group .input:focus { outline: none; }
.steer-send {
  border: 0;
  border-left: 1px solid var(--rule);
  border-radius: 0;
  background: var(--surface-2);
  padding-left: 14px;
  padding-right: 14px;
}
.steer-send:hover:not(:disabled) { background: var(--surface-3); }
.panel-foot-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: none;
}

/* The model picker. The catalogue is whatever the user's credentials reach,
   so it is grouped by price band and searched rather than listed. */
.model-picker { display: flex; flex-direction: column; gap: 14px; }
.model-search-row { display: flex; align-items: center; gap: 8px; }
.model-search-row .model-search { flex: 1 1 0; width: auto; min-width: 0; }
.model-empty { padding: 10px 2px; }
.model-group { display: flex; flex-direction: column; gap: 8px; }
.model-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.model-group-name { color: var(--ink-2); font-weight: 600; }
.model-group .btn { align-self: flex-start; }

/* Agent log. Not a terminal: it is a timeline, and the point is to read the
   reasoning, so time, kind and call arguments are all shown. Tool calls are
   collapsed by the renderer rather than here, because collapsing needs the
   sequence. */

.logview {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
}

.log-row {
  display: grid;
  grid-template-columns: 58px max-content 1fr auto;
  gap: 4px 10px;
  align-items: start;
  padding: 4px 10px;
  border-radius: 6px;
}
/* A grid track is sized by its content unless told otherwise, so one long
   unbreakable line — a path, a command — pushed the log sideways and gave
   the panel a horizontal scrollbar. */
.log-row > * { min-width: 0; }

.log-t {
  color: var(--ink-3);
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}

.log-tag {
  color: var(--accent);
  white-space: nowrap;
  padding-top: 1px;
}

.log-text {
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.log-detail {
  grid-column: 3 / -1;
  color: var(--flag);
  opacity: 0.9;
  font-size: 11px;
  padding-left: 2px;
  margin-top: 1px;
}

/* The thought process is the reason this panel exists, so it gets the most
   room and the quietest colour rather than being buried among the verbs. */
.log-think { grid-template-columns: 58px 1fr; }
.log-think .log-text {
  color: var(--ink-2);
  font-style: italic;
  border-left: 2px solid var(--rule);
  padding-left: 9px;
}

.log-tool { color: var(--ink-2); }
.log-tool .log-text { color: var(--ink-3); }

.log-meta { grid-template-columns: 58px 1fr; }
.log-meta .log-text { color: var(--accent); }

.log-step .log-text {
  color: var(--ink-3);
  opacity: 0.8;
  font-size: 11px;
}

/* A failure has to be the thing you notice. It is red, like the failed
   chips; a turn that is being retried is not a failure yet, so it is amber. */
.log-bad {
  background: color-mix(in srgb, var(--bad) 13%, transparent);
  outline: 1px solid color-mix(in srgb, var(--bad) 38%, transparent);
  padding: 7px 10px;
}
.log-bad .log-tag { color: var(--bad); }
.log-warn {
  background: color-mix(in srgb, var(--flag) 13%, transparent);
  outline: 1px solid color-mix(in srgb, var(--flag) 38%, transparent);
  padding: 7px 10px;
}
.log-warn .log-tag { color: var(--flag); }

.log-count {
  color: var(--ink-3);
  background: var(--rule);
  border-radius: 8px;
  padding: 0 6px;
  font-size: 10px;
}

.log-trim { color: var(--ink-3); font-size: 11px; }

.waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 56px 20px;
  text-align: center;
  color: var(--ink-3);
}

.waiting-bar {
  width: 220px;
  height: 3px;
  border-radius: 2px;
  background: var(--rule);
  overflow: hidden;
  position: relative;
}

.waiting-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  border-radius: 2px;
  background: var(--accent);
  animation: waiting-slide 1.15s ease-in-out infinite;
}

@keyframes waiting-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

@media (prefers-reduced-motion: reduce) {
  .waiting-bar::after { animation: none; width: 100%; opacity: 0.5; }
}

.spinner-list { display: flex; flex-direction: column; gap: 10px; }
.spinner-row { height: 44px; border-radius: 6px; background: var(--rule); opacity: 0.45; }

/* Waiting for something. Used where the work is real but slow — reading a
   course's assignments — so the screen never looks frozen. */
.loading-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 4px;
  color: var(--ink-2);
  font-size: 13px;
}

.loading-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
}


/* ---------------------------------------------------------- checkboxes
   The platform default is a 1997 widget, and it does not match the rest of
   the surface or read at all in the dark theme. Drawn by hand so checked,
   unchecked and half-checked all look like they belong. */

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background-color 90ms ease, border-color 90ms ease;
}

input[type="checkbox"]:hover:not(:disabled) {
  border-color: var(--accent);
}

input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input[type="checkbox"]:checked,
input[type="checkbox"]:indeterminate {
  background: var(--accent);
  border-color: var(--accent);
}

/* The tick, drawn with a rotated border rather than a glyph, so it scales and
   needs no icon font or SVG asset. */
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}

/* Half-checked: a dash, for "some but not all". */
input[type="checkbox"]:indeterminate::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 7px;
  height: 2px;
  background: var(--on-accent);
  border-radius: 1px;
}

input[type="checkbox"]:indeterminate:checked::after {
  display: none;
}

input[type="checkbox"]:disabled {
  opacity: 0.35;
  cursor: default;
}

.row-head input.pick-all {
  margin-left: 2px;
}

.row[data-selected="true"] {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.row input[type="checkbox"]:checked ~ .row-name {
  color: var(--ink);
}

@media (max-width: 720px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) 28px;
    grid-template-areas: 'top' 'spine' 'main' 'foot';
  }
  .spine {
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    overflow-x: auto;
    overflow-y: hidden;
  }
  .spine-label, .spine-foot { display: none; }
  .stages { display: flex; gap: 4px; padding: 0; overflow-x: auto; }
  .stages::before { display: none; }
  .stage { flex: 0 0 auto; }
  .stage-btn { width: auto; min-width: max-content; padding: 8px 10px; }
  .main { padding: 16px 12px 32px; }
  .head h1 { font-size: 23px; }
}
