/* The two Rules screens, drawn in the design's vocabulary (tokens.css).
 *
 * Where this departs from the design, it is because the design's data is
 * not this console's data. The prototype's rules carry a prose name and a
 * four-value status vocabulary (Active / Shadow / Dormant / Proposed);
 * registered rules carry an id, a version, an enablement, and a derived
 * dormancy — and enablement and dormancy are orthogonal, so a rule can be
 * enabled and dormant at once. Both facts are drawn rather than collapsed
 * into one stamp that would have to lie about one of them.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--ground);
  color: var(--ink-body);
  font-family: var(--face-body);
  font-size: var(--size-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--accent-deep);
}
::selection {
  background: var(--accent-tint);
}

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

/* The header, the nav and main all run full-bleed at the one gutter, so
   the chrome's text and the content column share an edge at any width.
   Text that should stay readable carries a measure of its own (the lede,
   the prose, the cards); a list of rows, a grid of figures or a map is
   for the whole window. */

/* Centred, not on the baseline: the wordmark is a lockup whose first
   item is the mark, and a flex row's baseline would be the mark's bottom
   edge rather than the word's. */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter) 14px;
  border-bottom: 1px solid var(--border);
}

/* The mark and the name, one lockup: the small cut of the ARGUS mark
   (brand/README.md) at 24px beside the word. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--face-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.masthead .session {
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.masthead .who {
  font-family: var(--face-mono);
  font-size: var(--size-label);
  color: var(--ink-muted);
}
/* Help, Change password and Sign out read as the masthead's other words,
   not as links and a button: the controls are quiet because they are
   always there. */
.masthead .help,
.masthead .account,
.masthead .signout button {
  font-family: var(--face-mono);
  font-size: var(--size-label);
  color: var(--ink-muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.masthead .help:hover,
.masthead .account:hover,
.masthead .signout button:hover {
  color: var(--ink);
}

/* The nav is seven destinations across, and under them the active
   destination's screens when it has more than one. Two rows on one band:
   the top row is the bold names, the second is lighter, so the eye reads
   it as belonging to the name above it. The active item in each
   row is underlined in the accent. Seven names fit one line at the measure;
   below it the row may wrap. */
.tabs {
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--border);
  background: var(--band);
}

.tabs .destinations,
.tabs .subtabs {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}

.tabs a {
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  font-family: var(--face-display);
}

.tabs .destinations {
  gap: 4px;
}
.tabs .destinations a {
  padding: 13px 16px 11px;
  font-weight: 700;
  font-size: var(--size-small);
  color: var(--ink-body);
}
.tabs .destinations a:hover {
  color: var(--accent);
}
.tabs .destinations a[aria-current='page'] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* The active destination's screens: a lighter row, sunk a shade, with its
   own active mark so both rows say where you are. A screen's tab under one
   of the four words is a line taller than a bare one, so the tabs sit on
   the row's bottom edge, their names level. */
.tabs .subtabs {
  align-items: flex-end;
  gap: 2px;
  padding: 0 8px;
  background: var(--surface-sunk);
  border-top: 1px solid var(--divider-strong);
}
.tabs .subtabs a {
  padding: 8px 12px 7px;
  font-weight: 600;
  font-size: var(--size-mono);
  color: var(--ink-soft);
}
.tabs .subtabs a:hover {
  color: var(--accent);
}
.tabs .subtabs a[aria-current='page'] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* The same sub-tab look drawn inside a screen rather than in the nav, over
   one document's panels rather than destinations: the in-force kinds, a
   rule's page. The active tab's underline sits on the row's rule. */
.screen-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 22px;
  border-bottom: 1px solid var(--border);
}
/* A screen's first line; only a card saying where it is comes before it. */
.screen-tabs:first-child {
  margin-top: 0;
}
.screen-tabs a {
  padding: 9px 12px 8px;
  margin-bottom: -1px;
  font-family: var(--face-display);
  font-weight: 600;
  font-size: var(--size-small);
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
/* A tab with nothing in it is still a tab, quieter, so its zero is seen.
   Declared before the active rule: the two are equal in specificity, and an
   empty tab can be the active one (a bookmarked URL names it), where the
   accent must win. */
.screen-tabs a.is-empty {
  color: var(--ink-muted);
}
.screen-tabs a:hover,
.screen-tabs a[aria-current='page'] {
  color: var(--accent);
}
.screen-tabs a[aria-current='page'] {
  border-bottom-color: var(--accent);
}
.screen-tabs .count {
  font-family: var(--face-mono);
  font-size: var(--size-label);
  color: var(--ink-muted);
}
.screen-tabs a[aria-current='page'] .count {
  color: var(--accent);
}
/* A tab whose panel holds a break says so on the tab itself. */
.screen-tabs .count.is-bad,
.screen-tabs a[aria-current='page'] .count.is-bad {
  color: var(--negative);
}

main {
  width: 100%;
  padding: var(--gutter);
}

/* ---- headings ----------------------------------------------------- */

h1 {
  font-family: var(--face-display);
  font-weight: 800;
  font-size: var(--size-title);
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px;
}

.lede {
  margin: 0 0 22px;
  font-size: var(--size-lede);
  color: var(--ink-soft);
  max-width: 720px;
  text-wrap: pretty;
}

.tally {
  font-family: var(--face-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

/* ---- the label that names a fact ---------------------------------- */

.label {
  font-family: var(--face-display);
  font-weight: 700;
  font-size: var(--size-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

/* ---- stamps and chips --------------------------------------------- */

/* A stamp is never filled: the whole mark is a 1.5px border and matching
   text. Dashed means not in force, and that distinction is load-bearing —
   it is why there is no single "status" colour ramp here. */
.stamp {
  display: inline-block;
  font-family: var(--face-mono);
  font-size: var(--size-stamp);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-stamp);
  white-space: nowrap;
}
.stamp.is-enabled {
  border: 1.5px solid var(--positive);
  color: var(--positive);
}
.stamp.is-disabled {
  border: 1.5px dashed var(--ink-muted);
  color: var(--ink-muted);
}
.stamp.is-dormant {
  border: 1.5px dashed var(--accent);
  color: var(--accent);
}
.stamp.is-unregistered {
  border: 1.5px dashed var(--warning);
  color: var(--warning);
}

/* A verdict is not an enablement. A clean stage, a passed fixture and an
   accepted report wear this mark — the same solid positive as enabled, so
   the eye reads "good" — under a name that keeps the two facts apart in
   the markup. Registration is a third fact again: something the registry
   holds, whether or not it is in force, in a neutral solid. */
.stamp.is-pass {
  border: 1.5px solid var(--positive);
  color: var(--positive);
}
.stamp.is-registered {
  border: 1.5px solid var(--ink-body);
  color: var(--ink-body);
}

.chip {
  display: inline-block;
  font-family: var(--face-mono);
  font-size: var(--size-meta);
  background: var(--accent-wash);
  border: 1px solid var(--accent-tint);
  color: var(--accent);
  padding: 3px 9px;
  border-radius: var(--radius);
}
.chip.is-small {
  font-size: var(--size-label);
  padding: 2px 7px;
}
/* An edge the registry could not resolve is drawn as unresolved rather
   than as an ordinary claim type: the console must not invent an edge. */
.chip.is-unresolved {
  background: transparent;
  border-style: dashed;
  border-color: var(--border-strong);
  color: var(--ink-muted);
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mono {
  font-family: var(--face-mono);
}

/* ---- cards -------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card.is-padded {
  padding: 20px 24px;
}
.card + .card,
.card + .grid,
.grid + .card {
  margin-top: 22px;
}

/* ---- the catalogue table ------------------------------------------ */

/* Header band and rows are separate grid containers repeating one
   template. The band carries no bottom border of its own: the line under
   it is the first row's top border, and adding one here doubles it. */
.rows {
  --columns: minmax(240px, 1.5fr) minmax(220px, 1.4fr) 152px 64px 116px;
}

.rows .head,
.rows .row {
  display: grid;
  grid-template-columns: var(--columns);
  gap: 24px;
}

/* A grid item's default min-width is auto, which means it refuses to
   shrink below its own content — so one long locator or one wide stamp
   pushes into the next column and the table reads as though it has no
   columns at all. This one line is what keeps them apart. */
.rows .head > *,
.rows .row > * {
  min-width: 0;
}

.rows .head {
  padding: 13px 26px;
  align-items: start;
  background: var(--surface-sunk);
}

.rows .row {
  padding: 18px 26px;
  align-items: start;
  border-top: 1px solid var(--divider-strong);
  text-decoration: none;
  color: inherit;
}
.rows .row:hover {
  background: var(--surface-sunk);
}

.rows .head .label {
  margin-bottom: 0;
}

.rows .id {
  font-family: var(--face-mono);
  font-size: var(--size-mono);
  color: var(--accent);
  word-break: break-all;
}

.rows .condition {
  font-family: var(--face-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.rows .flow {
  font-family: var(--face-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.rows .stamps {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}

.rows .version,
.rows .counts {
  font-family: var(--face-mono);
  font-size: var(--size-meta);
  color: var(--ink-muted);
}
.rows .counts .fired {
  color: var(--positive);
}

.empty {
  padding: 22px;
  font-size: var(--size-body);
  color: var(--ink-muted);
  border-top: 1px solid var(--divider-strong);
}

/* The five columns need about 900px before their own minimums start
   pushing the page sideways. Below that the row stacks and the header
   band goes, because a column header naming a column that is no longer
   beside it is worse than none: every cell here already says what it is
   (a dotted id, a flow, stamps, a version, a count). */
@media (max-width: 900px) {
  .rows .head {
    display: none;
  }
  .rows .row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 18px;
  }
  .rows .stamps {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .rows .version::before {
    content: 'version ';
  }
  .rows.is-rules .counts::before {
    content: 'fired ';
  }
  main {
    padding: 22px 18px;
  }
  .masthead,
  .tabs {
    padding-left: 18px;
    padding-right: 18px;
  }
  .masthead {
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* ---- toolbar ------------------------------------------------------ */

.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar input[type='search'],
.toolbar select {
  font-family: var(--face-display);
  font-size: var(--size-small);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 13px;
}
.toolbar input[type='search'] {
  flex: 1;
  min-width: 220px;
  max-width: 520px;
}
.toolbar input[type='search']:focus,
.toolbar select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-tint);
}

/* A toolbar where it is not the screen's business — the record's long
   panels' controls — takes less room. */
.toolbar.is-compact {
  margin: 18px 0 14px;
}
.toolbar.is-compact input[type='search'] {
  max-width: 420px;
  padding: 7px 11px;
}

.toolbar .shown {
  font-family: var(--face-mono);
  font-size: var(--size-label);
  color: var(--ink-muted);
}

/* ---- buttons ------------------------------------------------------ */

.button {
  font-family: var(--face-display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
/* A control that is unavailable rather than busy: a console with no
   submitter principal renders its enablement acts disabled with the reason
   as their title, and a button that reads as clickable when it is not is a
   worse answer than no button at all. This is also what a disabled button
   looks like for the sub-second a form mid-write locks it, unless that
   button sits inside .act — author.css's .act button:disabled is more
   specific there and says wait rather than no. */
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.button.is-primary {
  background: var(--accent);
  color: var(--ground);
  border: 1px solid var(--accent-deep);
}
.button.is-primary:hover {
  background: var(--accent-deep);
  color: var(--ground);
}
.button.is-quiet {
  background: transparent;
  color: var(--ink-body);
  border: 1px solid var(--border-strong);
  padding: 8px 14px;
}
.button.is-quiet:hover {
  border-color: var(--ink-body);
  color: var(--ink-body);
}
/* The one act a screen leads to — compile, make it live — is wider than
   the controls around it, so the eye finds it before reading. */
.button.is-wide {
  padding: 11px 26px;
  font-size: 12.5px;
}
/* The one act that removes something is marked with the one hue that
   means so; it is never the default and never filled. */
.button.is-danger {
  background: transparent;
  color: var(--negative);
  border: 1px solid var(--negative);
}
.button.is-danger:hover {
  background: var(--negative);
  color: var(--ground);
}

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

/* The toolbar's search box, widened to a name, a path, an answer. The
   browser does not inherit font-family into form controls, so each is
   declared. */
.act input[type='text'],
.act textarea {
  font-family: var(--face-display);
  font-size: var(--size-small);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 13px;
}
.act input[type='text']:focus,
.act textarea:focus,
.prose-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-tint);
}

/* Prose in and prose out: a statement typed in the field's own words, and
   what the model said back. One size for both, so Ask's question and
   answer and Author's draft and restatement read alike. */
.prose-input {
  display: block;
  width: 100%;
  max-width: 860px;
  min-height: 84px;
  resize: vertical;
  font-family: var(--face-body);
  font-size: var(--size-prose);
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
}
/* A statement standing still while its reading is checked, and the name
   typed beside it. */
.prose-input[readonly],
.act input[type='text'][readonly] {
  background: var(--surface-sunk);
  color: var(--ink-body);
}
.prose-output {
  margin: 0 0 12px;
  max-width: 760px;
  font-size: var(--size-prose);
  line-height: 1.6;
  color: var(--ink);
  text-wrap: pretty;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---- the rule detail ---------------------------------------------- */

.identity {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
/* The margin parts the identity from what follows it in its card; alone
   there, it would only make the card's lower padding the deeper. */
.card > .identity:last-child {
  margin-bottom: 0;
}
.identity .ref {
  font-family: var(--face-mono);
  font-size: 15px;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.identity .meta {
  font-family: var(--face-mono);
  font-size: var(--size-meta);
  color: var(--ink-muted);
}

.condition-block {
  font-family: var(--face-mono);
  font-size: var(--size-mono);
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface-sunk);
  border: 1px solid var(--divider-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0;
  max-width: 860px;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 18px;
}
/* A fact keeps to its own column: a grid item is as wide as its longest
   word unless told otherwise, and a contract's name is one long word, so
   it wraps inside the column and never runs under the one beside it. */
.facts > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.facts .value {
  font-size: var(--size-body);
  color: var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.panel > .title {
  font-family: var(--face-display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-body);
  margin-bottom: 4px;
}
.panel > .gloss {
  font-size: var(--size-mono);
  color: var(--ink-muted);
  margin-bottom: 10px;
}

/* Neighbours and history are divider-only lists: no nested boxes. */
.entry {
  display: block;
  padding: 12px 0;
  border-top: 1px solid var(--divider);
  text-decoration: none;
  color: inherit;
}
a.entry:hover {
  background: var(--surface-sunk);
}
/* The entry a link landed on — #analysis-<id> from the Map — is told apart
   from its neighbours, since the page scrolled to it and nothing else says
   which one was meant. */
.entry:target {
  background: var(--surface-sunk);
}
/* A row of things that sit on one baseline with air between them. It is a
   class of its own, not .entry .line: the trail's rows are not entries, and
   scoped to .entry they lost their gaps entirely — a rule id ran straight
   into the reason beside it. */
.line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.entry .id {
  font-family: var(--face-mono);
  font-size: var(--size-meta);
  color: var(--accent);
  overflow-wrap: anywhere;
}
.entry .via {
  margin-top: 6px;
}
/* A sentence about a thing, wherever it sits — under an entry, in a
   confirm strip, beside a stamp. */
.said {
  font-size: var(--size-small);
  color: var(--ink-body);
}
.entry.is-empty {
  font-size: var(--size-small);
  color: var(--ink-muted);
  padding: 10px 0;
}

/* ---- states the console must never dress up as data ---------------- */

/* A section that could not be read is not an empty section. The contract
   keeps the two apart per section, and so does this. */
.unavailable {
  background: var(--warning-wash);
  border: 1px solid var(--warning);
  color: var(--warning);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: var(--size-small);
  margin: 0 0 16px;
}

.loading {
  font-family: var(--face-mono);
  font-size: var(--size-label);
  color: var(--ink-muted);
  padding: 22px 0;
}

/* ---- added for Explore ------------------------------------------- */

.faint {
  color: var(--ink-muted);
}

/* The model's words as a turn streams, under an act's busy label: the
   tail of what it is thinking or writing, as text, never as markup. */
.progress-line {
  font-style: italic;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 72ch;
}
.progress-line:empty {
  display: none;
}

.verdict {
  font-size: var(--size-lede);
  color: var(--ink);
  max-width: 860px;
  margin: 0 0 22px;
  text-wrap: pretty;
}

/* The corpus list uses the catalogue's row grid at its own column widths.
   It is the console's only list of media now. The tile column is --tile,
   which Browse's thumbnail size sets (screens/explore.css). */
.rows.is-corpus {
  --tile: 160px;
  --columns: var(--tile) minmax(240px, 1fr) 232px 84px;
}

/* A stamp with no standing to report — a medium's kind, a call's state. */
.stamp.is-neutral {
  border: 1.5px solid var(--border-strong);
  color: var(--ink-body);
}
.stamp.is-open {
  border: 1.5px dashed var(--accent);
  color: var(--accent);
}
.stamp.is-bad {
  border: 1.5px solid var(--negative);
  color: var(--negative);
}

/* Trail badges: the console's own event vocabulary (trail.go), not the
   design's — the design badges a prototype's kinds. */
.badge {
  display: inline-block;
  font-family: var(--face-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border-radius: var(--radius-stamp);
  white-space: nowrap;
}
.badge.is-system { border: 1.5px solid var(--ink-muted); color: var(--ink-muted); }
/* An ingestor declares what a source said; the engine concluded what it
   committed. One step apart on the ink ramp, because they are not the
   same act and the trail should not draw them as one. */
.badge.is-sender { border: 1.5px solid var(--ink-soft); color: var(--ink-soft); }
.badge.is-rule { border: 1.5px solid var(--ink-body); color: var(--ink-body); }
.badge.is-model { border: 1.5px solid var(--accent); color: var(--accent); }
.badge.is-human { border: 1.5px solid var(--positive); color: var(--positive); }
.badge.is-quiet { border: 1.5px dashed var(--ink-muted); color: var(--ink-muted); }
.badge.is-bad { border: 1.5px solid var(--negative); color: var(--negative); }
.badge.is-open { border: 1.5px dashed var(--warning); color: var(--warning); }
.badge.is-release { border: 1.5px solid var(--negative); color: var(--negative); }

.trail-row {
  display: grid;
  grid-template-columns: 168px 96px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--divider);
  align-items: start;
}
.trail-at {
  font-family: var(--face-mono);
  font-size: var(--size-label);
  color: var(--ink-muted);
  white-space: nowrap;
}
/* A row sharing the instant above it: the stamp is blank, and the rule
   between them goes with it, so one evaluation pass reads as one block. */
.trail-row.is-same-instant {
  border-top-color: transparent;
  padding-top: 3px;
}
/* The repeated stamp is not drawn and is not removed: the column reads as
   one block, and a reader hearing the rows one at a time still hears the
   time of each. */
.trail-row.is-same-instant .trail-at {
  opacity: 0;
}
.trail-row.is-same-instant + .trail-row:not(.is-same-instant) {
  padding-top: 15px;
}


/* A payload an operator opens rather than reads by default. */
.fold {
  margin-top: 10px;
}
.fold > summary {
  cursor: pointer;
  font-family: var(--face-display);
  font-weight: 600;
  font-size: var(--size-small);
  color: var(--accent);
  list-style: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before {
  content: '▸ ';
  color: var(--ink-muted);
}
.fold[open] > summary::before { content: '▾ '; }

.payload {
  font-family: var(--face-mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface-sunk);
  border: 1px solid var(--divider-strong);
  border-radius: var(--radius);
  padding: 11px 13px;
  margin: 8px 0 0;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The "why is nothing happening" heading sits above its own grid. */
.panel.is-head {
  border: none;
  background: transparent;
  padding: 22px 0 0;
}

.panel + .panel,
.grid + .panel,
.panel + .grid {
  margin-top: 22px;
}
/* In a grid the gap spaces the panels, side by side or stacked; the margin
   as well would drop the second below its neighbour. */
.grid > .panel + .panel {
  margin-top: 0;
}

@media (max-width: 900px) {
  .trail-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ---- added for Capabilities --------------------------------------- */

/* Six columns, because the four states are the screen: a dashed mark in a
   column of solid ones is the disagreement, seen without reading. Below
   900px the catalogue's own rule stacks this row like every other, and
   every cell here already says which state it is. */
.rows.is-capabilities {
  --columns: minmax(250px, 1.6fr) 134px 134px minmax(150px, 0.9fr) 134px minmax(165px, 1fr);
}
.rows.is-capabilities .arm {
  margin-top: 8px;
}
.rows.is-capabilities > .outcome {
  padding: 0 16px 12px;
}
.outcome-notice .title {
  font-family: var(--face-display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--positive);
  margin-bottom: 6px;
}

/* A state cell's chips sit under the sentences that name them. */
.rows.is-capabilities .chips {
  margin-top: 7px;
}
.rows.is-capabilities .cap-word {
  align-self: center;
  font-family: var(--face-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* The one diagnosis a row belongs to. Warning, never negative: a contract
   registered and not yet enabled is a state to act on, not a failure. */
.rows .diagnosis {
  font-family: var(--face-mono);
  font-size: 11.5px;
  color: var(--warning);
  overflow-wrap: anywhere;
}
.rows .diagnosis.is-agreeing {
  color: var(--ink-muted);
}

/* Not known is a third texture, not a third colour: solid is in force,
   dashed is known not to be, dotted was never learned. Drawing "not known"
   as "no" would report an unreachable host as a stopped fleet. */
.stamp.is-unknown {
  border: 1.5px dotted var(--border-strong);
  color: var(--ink-muted);
}

/* The mismatch cards are the point of the screen, so they carry the
   warning hue on their leading edge and a heading of their own. */
.card.is-diagnosis {
  border-left: 4px solid var(--warning);
}
.card.is-diagnosis + .card.is-diagnosis {
  margin-top: 14px;
}
.card.is-diagnosis .cure {
  margin: 0 0 12px;
  max-width: 760px;
  text-wrap: pretty;
}
.cap-diagnosis-title {
  font-family: var(--face-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--warning);
  margin-bottom: 6px;
}

/* ---- added for Author -------------------------------------------- */

/* The file tree is two real columns: the path, and what the report has to
   say about it. Nothing is invented to fill a third. */
.rows.is-author {
  --columns: minmax(280px, 1fr) 160px;
}
.rows .counts .is-error {
  color: var(--negative);
}
.rows .counts .is-warning {
  color: var(--warning);
}

/* A stage that raised a warning: in force, and something to read. The
   dashed amber stamp already means "not registered", so a solid one is
   what separates a warned stage from an unregistered anything. */
.stamp.is-warning {
  border: 1.5px solid var(--warning);
  color: var(--warning);
}

/* Standing prose about what the screen will not do — the design's band
   note. Never a state and never data: it says the same thing on an empty
   workspace as on a full one. */
.note {
  background: var(--band);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 22px 0 0;
  font-size: var(--size-small);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 860px;
}

/* The first panel under a tally needs the gap the toolbar usually gives. */
.tally + .panel,
.tally + .card {
  margin-top: 18px;
}

/* The file viewer: numbered lines, and the two marks a finding can leave
   on one. A tinted row is the whole of the highlighting — there is no
   syntax colouring, because the console does not parse the file. */
.file-lines {
  padding: 14px 0;
  overflow-x: auto;
}
.file-line {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  min-height: 1.55em;
}
.file-line .n {
  font-family: var(--face-mono);
  font-size: var(--size-label);
  color: var(--ink-muted);
  text-align: right;
  padding-right: 16px;
  user-select: none;
}
.file-line .t {
  font-family: var(--face-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
  padding-right: 22px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.file-line.is-error {
  background: var(--negative-wash);
}
.file-line.is-warning {
  background: var(--warning-wash);
}

/* ---- the screen head, as the design has it ------------------------ */

/* Eyebrow, headline and a right-aligned tally on one baseline, then the
   lede beneath at a readable measure. Every screen opens this way. */
.screen-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.eyebrow {
  font-family: var(--face-mono);
  font-size: var(--size-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}

/* The SUDA mark: one of the four words beside the thing it names, in the
   eyebrow's voice but quieter, so it reads as a part of the arc and not as
   a title. */
.suda {
  display: inline-block;
  font-family: var(--face-mono);
  font-size: var(--size-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
  margin-right: 8px;
}
.station .suda,
.step-box .suda,
.panel.is-head .suda {
  display: block;
  margin: 0 0 4px;
}
/* Over a tab's word, in the nav's second row and on the Shelf's kind tabs:
   a line of its own, two words where a tab's things are two parts of the
   arc, a dot between them. */
.tab-suda {
  display: block;
  margin: 0 0 2px;
}
.tab-suda .suda {
  margin: 0;
}
.tab-suda .suda + .suda::before {
  content: '·';
  margin: 0 5px;
}

.screen-head h1 {
  margin: 0;
}

.screen-head .tally,
.screen-head .actions {
  margin: 0;
  flex-shrink: 0;
}

.screen-head .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Sort controls in a column header, the design's ⇅ / ▲ / ▼. */
.rows .head a.sort {
  text-decoration: none;
  color: inherit;
}
.rows .head a.sort:hover {
  color: var(--accent);
}
.rows .head .arrow {
  color: var(--ink-muted);
  margin-left: 4px;
}
.rows .head a.sort[data-active='true'] .arrow {
  color: var(--accent);
}

/* A row's own two-line cell: a name over a quiet subline. */
.rows .name {
  font-family: var(--face-display);
  font-weight: 600;
  font-size: var(--size-name);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.rows .sub {
  font-size: var(--size-mono);
  color: var(--ink-muted);
  margin-top: 2px;
  overflow-wrap: anywhere;
}

/* Long machine strings — locators, digests, uuids — get their own
   treatment rather than breaking a column's back. */
.rows .id.is-long {
  font-size: 11.5px;
  line-height: 1.45;
}

/* More air between the page's blocks than the first pass had. */
main > * + .card,
main > * + .panel,
main > * + .grid,
main > * + .toolbar {
  margin-top: 22px;
}
.lede {
  margin-bottom: 24px;
}

/* ---- table cells, after the first pass ran them together ---------- */

/* A stamp is nowrap so a status never breaks mid-word, but inside a table
   cell that is what pushed a wide one (EMAIL.ATTACHMENT) into the next
   column. In a cell it wraps as a block instead. */
.rows .stamps {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.rows .stamps .stamp {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Locators and digests are long and unbreakable by nature. They get the
   smaller mono size and are allowed to break anywhere, so a column keeps
   its width instead of the URL deciding it. */
.rows .id {
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.5;
}

/* Prose in a narrow cell — a reason, a note — reads at the quiet size. */
.rows .why {
  font-size: var(--size-mono);
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

/* A thumbnail keeps its box whatever the image is. */
.rows .tile img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-stamp);
  border: 1px solid var(--divider-strong);
}

/* ---- the record's two columns ------------------------------------- */

/* The admission record stays put while the trail scrolls beside it: the
   trail is the long thing on this screen, and the identity of what you
   are reading about should not leave the viewport with it. */
.record-split {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}
.record-split > * {
  min-width: 0;
}
.record-aside {
  position: sticky;
  top: 18px;
}
.record-aside .card + .panel {
  margin-top: 18px;
}
.record-aside .title {
  font-family: var(--face-display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-body);
  padding-bottom: 7px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--divider-strong);
}

/* The same split with the main column first in the DOM and on the left:
   what is being read leads, and the identity keeps it company on the
   right. Below the breakpoint the aside follows the main column. */
.record-split.is-main-first {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
}

/* Below about a laptop the two columns stop earning their keep, and a
   sticky card in a single column just steals height. */
@media (max-width: 1000px) {
  .record-split,
  .record-split.is-main-first {
    grid-template-columns: 1fr;
  }
  .record-aside {
    position: static;
  }
}

/* The three placements author.js once set inline: a verdict line with air
   above and below it, a title after a list, the stage chips under a gloss. */
.line.is-verdict {
  margin: 10px 0;
}
.title.is-spaced {
  margin-top: 14px;
}
.chips.is-stages {
  margin: 10px 0;
}

/* ---- the knowledge graph ------------------------------------------ */

/* The one dark surface in the interface. Its background matches the
   canvas gradient's top stop so there is no seam before first paint. The
   reader sizes it by its corner: no taller than the viewport, since the
   rows scroll under it and a panel filling the viewport would hide them
   all, and no shorter than a graph can be read at. */
.graph {
  position: relative;
  overflow: hidden;
  resize: vertical;
  height: 62vh;
  min-height: 240px;
  max-height: calc(100vh - 32px);
  margin-bottom: 18px;
  border-radius: var(--radius);
  border: 1px solid #22262b;
  background: #14181d;
}

.graph canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.graph-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--face-mono);
  font-size: var(--size-label);
  color: #8a9099;
  text-align: center;
  padding: 0 24px;
}

/* A short viewport should not give the whole screen to the graph. */
@media (max-height: 760px), (max-width: 760px) {
  .graph {
    height: 340px;
    min-height: 0;
  }
}

/* ---- media tiles -------------------------------------------------- */

.tile img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-stamp);
  border: 1px solid var(--divider-strong);
  background: var(--surface-sunk);
}

/* A medium with nothing to show says so rather than leaving a hole. */
.tile.is-empty {
  font-size: var(--size-label);
  line-height: 1.45;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

/* ---- sortable, filterable column headers -------------------------- */

/* A header cell is a label over the control that narrows that column, as
   the design has it — the filter belongs to the column it filters rather
   than to a toolbar somewhere above the table. */
.head-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}
.head-cell .label {
  margin-bottom: 0;
}

.head-cell select {
  font-family: var(--face-mono);
  font-size: var(--size-label);
  color: var(--ink-body);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px 5px;
  max-width: 100%;
}
.head-cell select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-tint);
}

/* ---- the record's media well -------------------------------------- */

/* The design opens the identity card with the picture, on near-black so a
   frame with dark edges still reads as a frame. */
.media-well {
  margin: -20px -24px 16px;
  background: #22262b;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-well img {
  display: block;
  width: 100%;
  height: auto;
}
.media-well.is-empty {
  font-family: var(--face-mono);
  font-size: var(--size-label);
  color: #8a9099;
  text-align: center;
  padding: 26px 20px;
  line-height: 1.5;
}
/* A sound or a moving picture is played in the well: the browser's own
   player, the picture no taller than most of the window so its controls
   stay in reach, the sound's bar across the box. */
.media-well.is-player video {
  display: block;
  width: 100%;
  max-height: 70vh;
}
.media-well.is-player audio {
  display: block;
  width: calc(100% - 40px);
  margin: 26px 20px;
}
/* Where the bytes can be fetched the well is a link to them: the same box,
   a hand on hover, and — where there is no picture to invite it — a hint. */
a.media-well {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.media-well.is-empty {
  flex-direction: column;
  gap: 6px;
}
a.media-well:hover {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.media-well .download-hint {
  font-family: var(--face-mono);
  font-size: var(--size-label);
  color: #c8d3df;
}

.value.breakable {
  overflow-wrap: anywhere;
}

/* A graph section that failed its own read, said over the panel. */
.graph-note {
  position: absolute;
  left: 14px;
  bottom: 34px;
  right: 14px;
  font-family: var(--face-mono);
  font-size: var(--size-label);
  color: #e8c87a;
  pointer-events: none;
}

/* ---- a trail row that says the whole of what it is ---------------- */

.trail-title {
  font-family: var(--face-display);
  font-weight: 600;
  font-size: var(--size-name);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.trail-row .said {
  margin-top: 2px;
}
.trail-chips {
  margin-top: 6px;
  font-size: var(--size-meta);
}
.trail-row .fold {
  margin-top: 8px;
}
.trail-row .fold .label {
  margin: 12px 0 4px;
}

/* ---- the kind chips ----------------------------------------------- */

.kind-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 4px;
}

.kind-chip {
  font-family: var(--face-mono);
  font-size: var(--size-label);
  color: var(--ink-body);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 11px;
  cursor: pointer;
}
.kind-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.kind-chip.is-on {
  background: var(--accent-wash);
  border-color: var(--accent-tint);
  color: var(--accent);
}

.button.is-small {
  padding: 3px 9px;
  font-size: 11px;
}

/* ---- what this shows, plain words, explain ------------------------- */

/* A closed disclosure of prose (lib.js aboutBox). Closed by default: a
   person with a task reads the line above it and goes; the rest is one
   click away, not in the way. */
.about {
  margin: -10px 0 22px;
  max-width: 720px;
  font-size: var(--size-small);
  color: var(--ink-soft);
}
.about summary {
  cursor: pointer;
  color: var(--ink-muted);
  font-family: var(--face-mono);
  font-size: var(--size-mono);
  letter-spacing: 0.04em;
}
.about summary:hover {
  color: var(--accent);
}
.about[open] summary {
  margin-bottom: 8px;
}
.about p {
  margin: 0 0 8px;
  line-height: 1.55;
}

/* A plain word standing in for a system word (lib.js plain): the dotted
   underline says there is more on hover. */
.term {
  text-decoration: underline dotted var(--border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: help;
}

/* Explain (lib.js explain): the quiet button, and the answer drawn beneath
   it in the screen's own prose. */
.explain {
  margin-top: 8px;
}
.explain-out .said {
  margin: 8px 0 6px;
  max-width: 720px;
}
.explain-out .chips {
  margin-top: 6px;
}
/* Explain as a closed section at the top of a page or a tab (lib.js
   explainFold): a quiet card holding one fold, so a page opens on its facts
   and the model is asked only after two deliberate acts. */
.card.is-explain {
  padding: 4px 24px;
}
.card.is-explain .explain {
  margin: 4px 0 12px;
}

/* The rule page's Path panel (rules.js pathPanel): the links a rule reaches
   its capability through, drawn in a row, each card carrying its own
   standing. A broken link takes the negative edge and wash; the sentence
   under the row names the break and the act that mends it. */
.path-links {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin-top: 12px;
}
.path-link {
  flex: 1 1 180px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.path-link .mono {
  overflow-wrap: anywhere;
}
.path-link.is-broken {
  border: 1.5px solid var(--negative);
  background: var(--negative-wash);
}
.path-arrow {
  align-self: center;
  color: var(--ink-muted);
  font-family: var(--face-mono);
}
.path-broken {
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--negative);
  border-radius: var(--radius);
  background: var(--negative-wash);
  color: var(--negative);
}
.path-dormant .said {
  margin-top: 6px;
}

/* ---- the page pattern (lib.js) ------------------------------------- */

/* Chips: a row of choices narrowing the list beneath, one of them on. A
   chip is a link, so the choice is an address; the one on is inked. */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 14px 0 4px;
}
.choice {
  font-family: var(--face-display);
  font-size: var(--size-meta);
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 11px;
  text-decoration: none;
}
.choice:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.choice.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}
.choice .count {
  font-family: var(--face-mono);
  margin-left: 6px;
  opacity: 0.75;
}

/* Tiles: a row of counts, each with its word under it. A tile with a key
   is a link that filters the list beneath; the one on is ringed in the
   accent. A state hue colours the count, never the box. */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 18px 0 14px;
}
.count-tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  text-decoration: none;
}
a.count-tile:hover {
  border-color: var(--accent);
}
.count-tile.is-on {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.count-tile .tile-figure {
  font-family: var(--face-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.count-tile .tile-figure small {
  font-family: var(--face-body);
  font-size: var(--size-meta);
  font-weight: 400;
  color: var(--ink-muted);
  margin-left: 6px;
}
.count-tile .tile-word {
  font-family: var(--face-display);
  font-size: var(--size-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 2px;
}
.count-tile.is-ok .tile-value { color: var(--positive); }
.count-tile.is-warn .tile-value { color: var(--warning); }
.count-tile.is-bad .tile-value { color: var(--negative); }
.count-tile.is-off .tile-value { color: var(--off); }

/* A banner: one problem, its act at the right. The leading edge carries
   the problem's hue. */
.banner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 10px;
}
.banner.is-bad { border-left-color: var(--negative); }
.banner.is-ok { border-left-color: var(--positive); }
.banner.is-info { border-left-color: var(--accent); }
.banner-says b {
  display: block;
  font-family: var(--face-display);
  font-weight: 600;
}
.banner-says span {
  font-size: var(--size-small);
  color: var(--ink-soft);
}
.banner-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* A row that opens in place: the row is the summary, its detail beneath
   on the sunk surface. */
.row-fold {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.row-fold + .row-fold {
  margin-top: 6px;
}
.row-fold > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
}
.row-fold > summary::-webkit-details-marker { display: none; }
.row-fold > summary:hover {
  background: var(--accent-wash);
}
.row-fold-detail {
  border-top: 1px solid var(--divider);
  background: var(--surface-sunk);
  padding: 12px 14px 14px;
}

/* ---- the sign-in page --------------------------------------------- */

/* templates/login.html.tmpl and templates/password.html.tmpl: the two
   pages this package still renders itself. Both are drawn in the shell's
   own chrome — the masthead with the lockup and the empty nav band — so
   the door looks like the house: the illustration on the left, the form
   on the right, and under the measure one under the other. */
.signin .tabs {
  min-height: 36px;
}
.signin-body {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 48px var(--gutter) 60px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.signin-illustration {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
  margin: 0 auto;
}
.signin-form {
  max-width: 360px;
}
.signin-form h1 {
  font-family: var(--face-display);
  font-weight: 700;
  font-size: var(--size-title);
  color: var(--ink);
  margin: 0 0 18px;
}
.signin-note {
  font-size: var(--size-body);
  color: var(--ink-soft);
  margin: 0 0 16px;
}
/* A refusal, in the one hue that means so. */
.signin-message {
  font-size: var(--size-small);
  color: var(--negative);
  background: var(--negative-wash);
  border: 1px solid var(--negative);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin: 0 0 16px;
}
.signin-form .field {
  display: block;
  margin: 0 0 14px;
}
.signin-form .field span {
  display: block;
  font-family: var(--face-display);
  font-weight: 600;
  font-size: var(--size-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 5px;
}
.signin-form input {
  width: 100%;
  font-family: var(--face-display);
  font-size: var(--size-small);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 13px;
}
.signin-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-tint);
}
.signin-form .button {
  margin-top: 4px;
}
/* The second way in, under a rule that says so. */
.signin-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  font-family: var(--face-mono);
  font-size: var(--size-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.signin-or::before,
.signin-or::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}
@media (max-width: 760px) {
  .signin-body {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 18px 48px;
  }
  .signin-illustration {
    max-width: 280px;
  }
}

/* A screen being replaced (app.js render): the one showing stays, dimmed
   here and inert by the attribute render sets, until the next document
   lands, so a fast read swaps with no blank between; the "Reading…" line
   render adds over it after a moment keeps its own ink. The first draw
   has only that line, so this touches nothing then. */
#screen.is-reading > :not(.loading) {
  opacity: 0.4;
  transition: opacity 0.15s ease-in;
}

/* The cue render puts over a screen being replaced (app.js): a turning
   ring beside "Reading…", the one motion on the page, so the wait reads
   as work and not as a page that stopped. */
.is-reading-cue {
  display: flex;
  align-items: center;
  gap: 10px;
}
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: var(--border); }
}
/* A figure not yet read (rules.js dayTag before the counts land). */
.tag.is-quiet {
  color: var(--ink-muted);
  border-color: transparent;
}
