/* Swarm — screen layer. tokens.css holds the world; this holds the rooms.
   Nothing here invents a value: every colour, size, radius and gap is a token from
   tokens.css, because DESIGN.md's spacing rhythm (4 8 16 24 32 48 72) and its 1px/2px
   /3px radius vocabulary are the whole reason the interface reads as one piece of
   stock rather than a dashboard. A 12px gap or a 6px radius in here is a bug. */

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 var(--s-3); }
@media (max-width: 820px) { .wrap { padding: 0 var(--s-2); } }

/* ------------------------------------------------------------- the bundle cover */
.topbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-2); padding-top: var(--s-2);
  border-bottom: 1px solid var(--hairline);
}
.mark {
  display: flex; align-items: baseline; gap: var(--s-1);
  font-size: var(--t-20); font-weight: 800; letter-spacing: -0.01em;
  color: var(--text); padding-bottom: var(--s-2);
}
.mark__seal {
  font-family: var(--font-mono); font-size: var(--t-11); font-weight: 700;
  letter-spacing: 0.08em; padding: 2px 6px; border-radius: var(--r-xs);
  background: var(--gold); color: var(--on-gold); transform: translateY(-2px);
}
.topbar__right {
  display: flex; align-items: center; gap: var(--s-1); padding-bottom: var(--s-1);
}
/* At phone width the name and workspace wrap onto two lines and crowd the seal, and
   neither is information the person needs while working — they know who they are.
   The theme control stays, because that one is a choice. */
@media (max-width: 560px) { #whoami { display: none; } }

/* The divider tab: the system's one curved form, top corners only, sitting flush on
   the stock it indexes. Used for navigation because that is literally what a tab
   index is for. */
.tab, .sw-nav__tab {
  font-family: var(--font-mono); font-size: var(--t-11);
  text-transform: uppercase; letter-spacing: 0.14em;
  background: var(--sunken); color: var(--muted);
  border: 1px solid var(--hairline); border-bottom: none;
  border-radius: var(--r-tab);
  padding: 5px 10px 6px;
}
.sw-nav {
  display: flex; gap: var(--s-0); overflow-x: auto;
  padding: var(--s-2) 0 0 var(--s-1);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--s-3);
  scrollbar-width: none;
}
.sw-nav::-webkit-scrollbar { display: none; }
.sw-nav__tab {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; text-decoration: none; white-space: nowrap;
  margin-bottom: -1px; cursor: pointer;
}
.sw-nav__tab:hover { color: var(--text); }
.sw-nav__tab[aria-current="page"] {
  background: var(--surface); color: var(--text); border-bottom: 1px solid var(--surface);
}
.sw-nav__n {
  font-size: var(--t-11); font-weight: 700; letter-spacing: 0.04em;
  color: var(--muted);
}
.sw-nav__tab[aria-current="page"] .sw-nav__n { color: var(--text); }

/* --------------------------------------------------------------------- headings */
.page { padding-bottom: var(--s-6); }
.page__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-3);
}
.page__head h1 { margin: 0; }          /* one Display element per screen */
.page__asof {
  font-family: var(--font-mono); font-size: var(--t-12); color: var(--faint);
}
.hero { padding: var(--s-5) 0 var(--s-4); max-width: 660px; }
.hero h1 { margin-bottom: var(--s-2); }
.hero p { font-size: var(--t-18); color: var(--muted); margin: 0 0 var(--s-3); }

.grid { display: grid; gap: var(--s-2); grid-template-columns: repeat(3, 1fr); padding-bottom: var(--s-5); }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }
.card-title { font-family: var(--font-ui); font-size: var(--t-16); font-weight: 700; color: var(--text); margin: 0 0 var(--s-1); }
.card-body { color: var(--muted); font-size: var(--t-14); margin: 0; }

.state { display: none; }
.state--on { display: block; }

/* ---------------------------------------------------------------------- banners */
.banner {
  border: 1px solid var(--risk); background: var(--surface);
  border-radius: var(--r-sm); padding: var(--s-2); margin: var(--s-3) 0;
  font-size: var(--t-14); color: var(--text);
  display: flex; gap: var(--s-1); align-items: flex-start;
}
/* An author `display` rule beats the UA rule for [hidden] (I-012), so an empty
   banner renders on every clean load unless this is said explicitly. */
.banner[hidden] { display: none; }
.banner__mark { font-family: var(--font-mono); font-weight: 700; color: var(--risk); flex: none; }
.banner--ok { border-color: var(--ok); }
.banner--ok .banner__mark { color: var(--ok); }

/* --------------------------------------------------------------------- sections */
.sw-section { margin-bottom: var(--s-4); }
.sw-section__tabs { display: flex; padding-left: var(--s-2); }
.sw-section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-2); padding: var(--s-2) var(--s-2) var(--s-1);
  background: var(--surface);
  border: 1px solid var(--hairline); border-bottom: none;
  border-top-left-radius: 0;
}
.sw-section__head h2 { font-size: var(--t-18); font-weight: 700; }
.sw-section__note { font-size: var(--t-13); color: var(--muted); }
.sw-section__body {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 0 var(--r-sm) var(--r-sm) var(--r-sm);
  padding: 0 var(--s-2);
}

/* ------------------------------------------------- the ruled index: a bundle row */
.sw-row {
  display: grid;
  grid-template-columns: 132px 96px 1fr auto;
  gap: var(--s-2); align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--hairline);
  font-size: var(--t-14); text-decoration: none; color: inherit;
}
.sw-row:last-child { border-bottom: 0; }
.sw-row:hover { background: var(--sunken); }
.sw-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.sw-row__code {
  font-family: var(--font-mono); font-size: var(--t-13); color: var(--muted);
}
.sw-row__title { color: var(--text); font-weight: 600; }
.sw-row__where { color: var(--muted); font-size: var(--t-13); }
.sw-row__right {
  display: flex; align-items: baseline; gap: var(--s-2); justify-self: end;
  font-family: var(--font-mono); font-size: var(--t-13); color: var(--muted);
  white-space: nowrap;
}
.sw-row__date--late { color: var(--risk); font-weight: 700; }
.sw-row__who { font-family: var(--font-ui); font-size: var(--t-13); }

@media (max-width: 820px) {
  .sw-row {
    grid-template-columns: 1fr; gap: var(--s-0);
    padding: var(--s-2) 0;
  }
  .sw-row__right { justify-self: start; }
}

/* Status: a mark, then a label, then a colour — in that order of importance, so the
   interface still works in greyscale and for a colour-blind reader. */
.sw-status { display: inline-flex; align-items: baseline; gap: 6px; font-size: var(--t-13); font-weight: 600; }
.sw-status__mark { font-family: var(--font-mono); font-size: var(--t-12); font-weight: 700; }

/* The inference marker. A derived item never looks like a stated one. */
.sw-derived {
  display: inline-flex; align-items: baseline; gap: 5px;
  font-family: var(--font-mono); font-size: var(--t-11);
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
}
.sw-derived__ref { color: var(--gold-ink); }

/* ---------------------------------------------------------- detail: the meta grid */
.sw-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; }
@media (max-width: 560px) { .sw-meta { grid-template-columns: 1fr; } }
.sw-meta__row {
  display: flex; justify-content: space-between; gap: var(--s-2);
  padding: 11px var(--s-2) 11px 0; border-bottom: 1px solid var(--hairline);
  font-size: var(--t-14);
}
.sw-meta__row dt { color: var(--muted); margin: 0; }
.sw-meta__row dd { margin: 0; color: var(--text); font-family: var(--font-mono); font-size: var(--t-13); text-align: right; }
.sw-meta__row dd.is-ui { font-family: var(--font-ui); }

.row {
  display: flex; justify-content: space-between; gap: var(--s-2);
  padding: 11px 0; border-bottom: 1px solid var(--hairline); font-size: var(--t-14);
}
.row:last-child { border-bottom: 0; }
.row dt { color: var(--muted); margin: 0; }
.row dd { margin: 0; color: var(--text); font-family: var(--font-mono); font-size: var(--t-13); }

/* -------------------------------------------------------------------- the detail */
.detail__head { margin-bottom: var(--s-3); }
.detail__codeline {
  display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
  margin-bottom: var(--s-1);
}
.detail__code { font-family: var(--font-mono); font-size: var(--t-13); color: var(--muted); }
.detail__title { font-size: var(--t-28); font-weight: 800; line-height: 1.15; letter-spacing: -0.015em; }
.detail__body { color: var(--body); max-width: 70ch; margin: var(--s-2) 0 0; }
.detail__cols { display: grid; grid-template-columns: 1fr; gap: var(--s-3); }

.sw-block {
  border: 1px solid var(--risk); background: var(--surface);
  border-radius: var(--r-sm); padding: var(--s-2); margin: var(--s-2) 0;
  display: flex; gap: var(--s-1); align-items: flex-start; font-size: var(--t-14);
}
.sw-block__mark { font-family: var(--font-mono); font-weight: 700; color: var(--risk); flex: none; }
.sw-block__since { display: block; font-family: var(--font-mono); font-size: var(--t-12); color: var(--muted); margin-top: var(--s-0); }

.sw-list { list-style: none; margin: 0; padding: 0; }
.sw-list__item {
  padding: 11px 0; border-bottom: 1px solid var(--hairline); font-size: var(--t-14);
}
.sw-list__item:last-child { border-bottom: 0; }
.sw-list__meta { font-family: var(--font-mono); font-size: var(--t-12); color: var(--muted); }

.sw-check { display: flex; align-items: center; gap: var(--s-1); min-height: 36px; cursor: pointer; }
.sw-check input { width: 16px; height: 16px; accent-color: var(--gold-ink); margin: 0; flex: none; }
.sw-check--done span { color: var(--muted); text-decoration: line-through; }

/* ------------------------------------------------------------------- the actions */
.sw-actions { display: flex; flex-wrap: wrap; gap: var(--s-1); margin: var(--s-2) 0; }
.sw-field { display: flex; flex-wrap: wrap; gap: var(--s-1); align-items: center; margin: var(--s-2) 0; }
.sw-label--inline { flex: none; }

.sw-input, .sw-select, .sw-textarea {
  font-family: var(--font-ui); font-size: var(--t-14); color: var(--text);
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-sm); padding: 0 var(--s-1); min-height: 44px;
}
.sw-textarea { padding: var(--s-1); min-height: 72px; line-height: 1.5; width: 100%; resize: vertical; }
.sw-input:focus-visible, .sw-select:focus-visible, .sw-textarea:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 1px;
}
.sw-input--grow { flex: 1 1 220px; min-width: 0; }

.sw-filters {
  display: flex; flex-wrap: wrap; gap: var(--s-1); align-items: center;
  padding-bottom: var(--s-2); margin-bottom: var(--s-2);
  border-bottom: 1px solid var(--hairline);
}
.sw-chip--button { cursor: pointer; min-height: 36px; padding: 0 var(--s-1); font-family: var(--font-ui); }

.sw-count {
  font-family: var(--font-mono); font-size: var(--t-12); color: var(--muted);
}

footer { border-top: 1px solid var(--hairline); padding: var(--s-3) 0; color: var(--faint); font-size: var(--t-13); }
footer a { color: var(--faint); }

/* The toast genuinely floats, so it is one of the three things in this product
   allowed a shadow. It carries NO border: a 1px edge plus a wide diffuse shadow is a
   recurring generated-UI signature, and Impeccable is right that a thing should commit
   to one or the other. The tonal step from board to page is the second signal, as it
   is everywhere else here.
   A refusal is marked and labelled rather than outlined, which is the Status rule
   (mark, then label, then colour) applied to a message instead of a row. */
.sw-toast {
  position: fixed; left: 50%; bottom: var(--s-3); transform: translateX(-50%);
  background: var(--surface); color: var(--text);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-panel);
  padding: var(--s-1) var(--s-2); font-size: var(--t-14);
  max-width: calc(100vw - var(--s-4)); z-index: 20;
  display: flex; align-items: baseline; gap: var(--s-1);
}
.sw-toast[hidden] { display: none; }
.sw-toast__mark {
  font-family: var(--font-mono); font-weight: 700; color: var(--risk); flex: none;
}

/* ------------------------------------------------------------- the proposals */
/* A proposal is not a work item and must not look like one. It is a reading of a
   message, shown with the sentence it was read from, waiting for somebody to say
   what it is. The exhibit is the largest thing in it on purpose. */
.sw-proposal {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--hairline);
}
.sw-proposal:last-child { border-bottom: 0; }
.sw-proposal__head {
  display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap;
  margin-bottom: var(--s-1);
}
.sw-proposal__ref {
  font-family: var(--font-mono); font-size: var(--t-12);
  color: var(--gold-ink); text-decoration: none;
}
.sw-proposal__ref:hover { text-decoration: underline; }
.sw-proposal__from { font-size: var(--t-13); color: var(--muted); }
.sw-proposal__title {
  font-size: var(--t-18); font-weight: 700; color: var(--text);
  margin: 0 0 var(--s-1);
}
.sw-proposal__meta { font-size: var(--t-13); color: var(--muted); margin: var(--s-1) 0 0; }
.sw-mono { font-family: var(--font-mono); font-size: var(--t-13); }

/* The abstention. Marked and labelled, not outlined — a coloured edge on one side is
   the anti-pattern this system has a tonal step for. */
.sw-abstain {
  display: flex; gap: var(--s-1); align-items: flex-start;
  background: var(--sunken); border-radius: var(--r-sm);
  padding: var(--s-1) var(--s-2); margin: var(--s-2) 0 0;
  font-size: var(--t-14); color: var(--body);
}
.sw-abstain__mark {
  font-family: var(--font-mono); font-weight: 700; color: var(--risk); flex: none;
}

.sw-button--small { min-height: 36px; font-size: var(--t-13); padding: 0 var(--s-1); }

/* ------------------------------------------------- the command bar and the bell */
/* The command bar floats, so it is one of the very few things entitled to a shadow
   (the design rule is: depth is a tonal step; shadow is only for what genuinely
   leaves the page). No border — the surface step and the shadow are the edge, which
   is also why the toast and the panel lost theirs in I-018. */
.sw-cmd {
  position: fixed; inset: 0; z-index: 40;
  background: oklch(22% 0.015 265 / 0.28);
  display: flex; align-items: flex-start; justify-content: center;
  padding: var(--s-5) var(--s-2);
}
.sw-cmd[hidden] { display: none; }
.sw-cmd__box {
  background: var(--surface); border-radius: var(--r-md);
  box-shadow: var(--shadow-panel);
  width: 100%; max-width: 620px; overflow: hidden;
}
.sw-cmd__input {
  width: 100%; box-sizing: border-box;
  font-family: var(--font-mono); font-size: var(--t-16);
  color: var(--text); background: transparent;
  border: 0; border-bottom: 1px solid var(--hairline);
  padding: var(--s-2); outline-offset: -3px;
}
.sw-cmd__input::placeholder { color: var(--faint); }
/* The answer is prose, not a status chip. A refusal is a sentence a person reads. */
.sw-cmd__answer:not(:empty) {
  padding: var(--s-2); font-size: var(--t-14); color: var(--text);
  white-space: pre-wrap;
}
.sw-cmd__answer .mark {
  font-family: var(--font-mono); font-weight: 700; margin-right: var(--s-0);
}
.sw-cmd__answer--refused .mark { color: var(--risk); }
.sw-cmd__answer--asked .mark { color: var(--attention); }
.sw-cmd__answer--done .mark { color: var(--ok); }
.sw-cmd__hint {
  padding: var(--s-1) var(--s-2); background: var(--sunken);
  font-family: var(--font-mono); font-size: var(--t-11); color: var(--faint);
}
.sw-cmd__cands { margin-top: var(--s-1); display: flex; flex-wrap: wrap; gap: var(--s-0); }

/* The notification drawer. Anchored to the top bar it came from. */
.sw-drawer {
  position: fixed; right: var(--s-2); top: 64px; z-index: 30;
  width: min(420px, calc(100vw - var(--s-3)));
  max-height: min(70vh, 560px); overflow-y: auto;
  background: var(--surface); border-radius: var(--r-md);
  box-shadow: var(--shadow-panel);
}
.sw-drawer[hidden] { display: none; }
.sw-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-1); padding: var(--s-1) var(--s-1) var(--s-1) var(--s-2);
  border-bottom: 1px solid var(--hairline); position: sticky; top: 0;
  background: var(--surface);
}
.sw-drawer__title { margin: 0; font-size: var(--t-14); letter-spacing: 0.02em; }
.sw-alert {
  display: block; padding: var(--s-2); text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--hairline);
}
.sw-alert:last-child { border-bottom: 0; }
.sw-alert:hover { background: var(--sunken); }
/* Unread is marked, not merely coloured — the third-signal rule applies to a list
   row exactly as it does to a status chip. */
.sw-alert--unread { background: var(--gold-quiet); }
.sw-alert__ref {
  font-family: var(--font-mono); font-size: var(--t-11); color: var(--faint);
  display: block; margin-bottom: 2px;
}
/* On the tinted unread row, `--faint` came to 4.37:1 in dark mode — under the floor,
   and only visible once check_contrast.py learned to composite the tint's alpha. The
   metadata steps up one level rather than the floor stepping down. */
.sw-alert--unread .sw-alert__ref { color: var(--muted); }
.sw-alert__subject { font-size: var(--t-14); font-weight: 600; }
.sw-alert__body {
  font-size: var(--t-13); color: var(--muted); margin: var(--s-0) 0 0;
  white-space: pre-wrap;
}
.sw-alert__unread-mark {
  font-family: var(--font-mono); font-weight: 700; color: var(--gold-ink);
  margin-right: var(--s-0);
}
.sw-drawer__empty {
  padding: var(--s-3) var(--s-2); font-size: var(--t-14); color: var(--muted);
}
/* The bell's count. Same treatment as the nav counts, so two numbers meaning
   "things waiting for you" do not look like different kinds of thing. */
.sw-bell__n {
  font-family: var(--font-mono); font-size: var(--t-11); font-weight: 700;
  margin-left: var(--s-0);
}

@media (max-width: 540px) {
  .sw-drawer { right: var(--s-1); left: var(--s-1); width: auto; top: 56px; }
  .sw-cmd { padding: var(--s-3) var(--s-1); }
}

/* ========================================================================
   M5 — plan. Two new shapes, and one rule governing both.

   A dependency wait and a projected date are INFERENCES (D035). A stated
   block is a fact somebody wrote. They must not be able to be mistaken for
   one another at a glance, so the wait carries the same `¶ Derived` marker
   the rest of the system uses for a drawn conclusion, and the block keeps
   its own heavier treatment. Nothing here borrows `.sw-block`.
   ===================================================================== */

.sw-wait {
  display: flex; gap: var(--s-1); align-items: baseline;
  padding: 11px var(--s-2);
  border-bottom: 1px solid var(--hairline);
}
.sw-wait:last-child { border-bottom: 0; }
/* A short code is a reference somebody transcribes. Breaking one across two lines
   at 360px turned WRK-0001 into "WRK-" / "0001", which is a different string. */
.sw-wait__code { font-family: var(--font-mono); font-weight: 700; white-space: nowrap; }
.sw-wait__title { flex: 1 1 auto; min-width: 0; }
.sw-wait__meta {
  font-family: var(--font-mono); font-size: var(--t-11); color: var(--muted);
}
/* A settled predecessor no longer holds anything up, and says so with a mark
   before it says so with a colour. */
.sw-wait--settled .sw-wait__code { color: var(--muted); }

/* The projected date. Divider stock, because it is drawn rather than stated —
   the same material the exhibit block uses for the same reason. */
.sw-feasible {
  background: var(--sunken); border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: var(--s-2); margin: var(--s-1) 0 var(--s-3);
}
.sw-feasible__label {
  font-family: var(--font-mono); font-size: var(--t-11);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  display: block; margin-bottom: var(--s-0);
}
.sw-feasible__date {
  font-family: var(--font-mono); font-size: var(--t-16); font-weight: 700;
}
.sw-feasible__because {
  font-size: var(--t-13); color: var(--body); margin: var(--s-0) 0 0;
}
/* An abstention is a real answer and is set in reading type, not in the
   quiet tier — "we do not know when WRK-13 lands" is the useful sentence. */
.sw-feasible__unknown { font-size: var(--t-14); color: var(--body); margin: var(--s-0) 0 0; }

/* ------------------------------------------------------------ the impact
   What a date move breaks, shown before it is saved (D037). It is a
   consequence, not an error: mark, then label, then colour. */
.sw-impact {
  border: 1px solid var(--hairline); border-radius: var(--r-sm);
  background: var(--sunken); margin: var(--s-2) 0;
}
.sw-impact[hidden] { display: none; }
.sw-impact__head {
  display: flex; gap: var(--s-1); align-items: baseline;
  padding: var(--s-2); border-bottom: 1px solid var(--hairline);
}
.sw-impact__mark {
  font-family: var(--font-mono); font-weight: 700; color: var(--risk);
}
.sw-impact__title { font-weight: 700; font-size: var(--t-16); }
.sw-impact__list { list-style: none; margin: 0; padding: 0; }
.sw-impact__item { padding: 11px var(--s-2); border-bottom: 1px solid var(--hairline); }
.sw-impact__item:last-child { border-bottom: 0; }
.sw-impact__party { font-weight: 700; }
.sw-impact__dates {
  font-family: var(--font-mono); font-size: var(--t-11); color: var(--muted);
  display: block; margin-top: 2px;
}
.sw-impact__via {
  font-family: var(--font-mono); font-size: var(--t-11); color: var(--muted);
}
.sw-impact__foot { padding: var(--s-2); }
/* Gold link text comes to 3.98:1 on divider stock — under the floor, and caught by
   check_contrast.py the first time these two regions were declared to it. Links in
   here are underlined ink instead. It also keeps the Seal Rule: gold appears at
   most twice on a screen, and neither of them is a reference in a warning panel. */
.sw-impact a, .sw-feasible a { color: var(--text); text-decoration: underline; }

/* ---------------------------------------------------------- the workload
   One claim per row, and the items that produced it directly underneath. */
.sw-load { border: 1px solid var(--hairline); border-radius: var(--r-sm);
           background: var(--surface); margin-bottom: var(--s-3); }
.sw-load__who {
  display: flex; gap: var(--s-1); align-items: baseline; flex-wrap: wrap;
  padding: var(--s-2); border-bottom: 1px solid var(--hairline);
}
.sw-load__name { font-weight: 700; font-size: var(--t-18); }
.sw-load__cap {
  font-family: var(--font-mono); font-size: var(--t-11); color: var(--muted);
}
.sw-load__day {
  padding: 11px var(--s-2); border-bottom: 1px solid var(--hairline);
}
.sw-load__day:last-child { border-bottom: 0; }
.sw-load__line {
  display: flex; gap: var(--s-1); align-items: baseline; flex-wrap: wrap;
}
.sw-load__date { font-family: var(--font-mono); font-weight: 700; min-width: 11ch; }
.sw-load__mins { font-family: var(--font-mono); }
/* The bar is a ruled measure, not a chart: divider stock with a hairline, a
   fill in ink, and a tick where the stated capacity sits. No gradient, no
   rounded cap — it is drawn in the same vocabulary as everything else. */
.sw-load__meter {
  position: relative; height: 8px; margin: var(--s-0) 0 0;
  background: var(--sunken); border: 1px solid var(--hairline);
  border-radius: var(--r-xs); overflow: hidden;
}
.sw-load__fill { height: 100%; background: var(--body); }
.sw-load__fill--over { background: var(--risk); }
.sw-load__tick {
  position: absolute; top: 0; bottom: 0; width: 1px; background: var(--text);
}
.sw-load__items { list-style: none; margin: var(--s-0) 0 0; padding: 0; }
.sw-load__item {
  display: flex; gap: var(--s-1); align-items: baseline;
  font-size: var(--t-13); padding: 2px 0;
}
.sw-load__item .sw-row__code { font-family: var(--font-mono); white-space: nowrap; }
.sw-load__est { font-family: var(--font-mono); color: var(--muted); margin-left: auto; }
/* Unsized work is the caveat on the number above it, so it sits with the
   number rather than in a footnote (D036). */
.sw-load__unsized { color: var(--attention); }
.sw-load__note {
  padding: var(--s-2); font-size: var(--t-14); color: var(--body);
  border-bottom: 1px solid var(--hairline);
}

@media (max-width: 540px) {
  .sw-load__est { margin-left: 0; }
  .sw-wait { flex-wrap: wrap; }
}

/* ========================================================================
   M6 — decide. Versions, approvals and decisions.

   One rule governs the lot: these are records of things that happened, and
   the screen has to make a *superseded* one still legible rather than hide
   it. A withdrawn version and a superseded decision both stay on the page,
   marked, because the record is the product (D041).

   Note what is NOT here: no `¶ Derived` mark. An approval rollup is
   arithmetic over answers people gave, not an inference Swarm drew — it is
   a status, so it gets a mark, a label and then a colour, in that order,
   like every other status in the system.
   ===================================================================== */

.sw-version {
  padding: 11px var(--s-2);
  border-bottom: 1px solid var(--hairline);
}
.sw-version:last-child { border-bottom: 0; }
.sw-version__line {
  display: flex; gap: var(--s-1); align-items: baseline; flex-wrap: wrap;
}
.sw-version__no {
  font-family: var(--font-mono); font-weight: 700; white-space: nowrap;
}
.sw-version__label { flex: 1 1 auto; min-width: 0; }
.sw-version__right {
  display: flex; gap: var(--s-1); align-items: baseline;
  margin-left: auto; flex-wrap: nowrap;
}
.sw-version__current {
  font-family: var(--font-mono); font-size: var(--t-11); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
}
.sw-version__meta {
  font-family: var(--font-mono); font-size: var(--t-11); color: var(--muted);
}
/* The URI is a reference somebody may need to transcribe, so it is set in
   Courier and never broken mid-token. */
.sw-version__uri {
  font-family: var(--font-mono); font-size: var(--t-11);
  display: block; margin-top: 2px; overflow-wrap: anywhere;
}
.sw-version__fingerprint {
  font-family: var(--font-mono); font-size: var(--t-11); color: var(--muted);
}
/* Withdrawn stays on the page. Struck, with its reason, because "there was a
   v2 and it was pulled on Tuesday" is information and deleting the row would
   be the lie. */
.sw-version--withdrawn .sw-version__label { text-decoration: line-through; }
.sw-version--withdrawn { color: var(--muted); }
.sw-version__withdrawn {
  font-size: var(--t-13); color: var(--body); display: block; margin-top: var(--s-0);
}

.sw-approval {
  display: flex; gap: var(--s-1); align-items: baseline; flex-wrap: wrap;
  font-size: var(--t-13); padding: 2px 0 2px var(--s-2);
}
.sw-approval__party { font-weight: 600; }
.sw-approval__note {
  font-family: var(--font-mono); font-size: var(--t-11); color: var(--muted);
  display: block; padding-left: var(--s-2);
}

/* ------------------------------------------------------------- decisions */
.sw-decision {
  padding: var(--s-2);
  border-bottom: 1px solid var(--hairline);
}
.sw-decision:last-child { border-bottom: 0; }
.sw-decision__subject {
  font-family: var(--font-mono); font-size: var(--t-11);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  display: block; margin-bottom: var(--s-0);
}
.sw-decision__chose { font-weight: 700; font-size: var(--t-16); }
.sw-decision__rationale { margin: var(--s-0) 0 0; font-size: var(--t-14); }
.sw-decision__considered {
  display: flex; gap: var(--s-0); flex-wrap: wrap; margin-top: var(--s-1);
}
.sw-decision__meta {
  font-family: var(--font-mono); font-size: var(--t-11); color: var(--muted);
  display: block; margin-top: var(--s-1);
}
/* A superseded decision is not struck through — it was true, it was acted on,
   and somebody may have to read it to understand why something looks the way
   it does. It is quieted and labelled, not crossed out. */
.sw-decision--superseded .sw-decision__chose {
  font-weight: 400; color: var(--muted);
}

/* ------------------------------------------------- the approvals list page */
.sw-ask {
  display: block; padding: 11px var(--s-2);
  border-bottom: 1px solid var(--hairline); color: inherit; text-decoration: none;
}
.sw-ask:last-of-type { border-bottom: 0; }
.sw-ask:hover { background: var(--sunken); }
.sw-ask__line {
  display: flex; gap: var(--s-1); align-items: baseline; flex-wrap: wrap;
}
.sw-ask__who { font-weight: 700; }
.sw-ask__meta {
  font-family: var(--font-mono); font-size: var(--t-11); color: var(--muted);
}
.sw-ask__actions {
  display: flex; gap: var(--s-1); flex-wrap: wrap; padding: var(--s-1) var(--s-2);
  border-bottom: 1px solid var(--hairline);
}

@media (max-width: 540px) {
  .sw-approval { padding-left: var(--s-1); }
  .sw-approval__note { padding-left: var(--s-1); }
}
