/* Circle Eight management plane — single stylesheet, no build step (ADR 6). */

/*
 * THE CONTAINER RING
 *
 * Every card, panel, table wrapper and KPI tile carries the same 1.5px ring in --ring. One rule
 * rather than a border on each component, because the previous arrangement had four slightly
 * different greys and nobody could have told you which was intentional.
 *
 * A container that also represents a single box overrides --ring with its health colour by
 * carrying a state-* class; the ring below reads the variable, so that override needs no second
 * rule and cannot be forgotten. That is the point of expressing it this way.
 */
.card,
.panel,
.table-wrap,
.kpi,
.notice,
.wizard-field input,
.wizard-field select,
.wizard-field textarea {
  border: var(--ring-w) solid var(--state, var(--ring));
  border-radius: var(--radius);
  background: var(--surf);
}

/*
 * Colours, type and geometry live in tokens.css and nothing below may name one directly.
 *
 * That is enforced rather than intended: test_design_tokens.py fails the build on a raw hex in
 * this file. The reason is not tidiness — a health colour that is correct in four places and
 * stale in the fifth gives a box a green name beside a red dot, which tells an operator two
 * different things at once and is worse than no colour at all.
 */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--font-mono); font-size: 0.85em; }

/* ---------- chrome: the left rail (baseline §4) ---------- */

/*
 * A 252px rail beside the main column, replacing the flat row of thirteen links across the top.
 *
 * The grouping is the reason, not the position. Thirteen headings in a row is a list somebody
 * reads from the left every single time, because nothing tells them where to look; seven groups
 * of two or three is a shape you learn once and then navigate by muscle memory. The rail also
 * gives the groups somewhere to live — a top bar has no room for a heading above two links.
 */
.app {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  min-height: 100vh;
  align-items: start;
}
.app:not(:has(.rail)) { grid-template-columns: minmax(0, 1fr); }

.rail {
  position: sticky;
  top: 0;
  align-self: stretch;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 14px 14px;
  background: var(--rail);
  color: var(--rail-text);
  overflow-y: auto;
}

/*
 * The brand block is the logo itself rather than a coloured square and a name typed beside it. The
 * rail is indigo, so it carries the version of the logo drawn for dark backgrounds; the light
 * version is for the login card and printed documents.
 */
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-decoration: none;
  padding: 4px 10px 20px;
}
.brand:hover { text-decoration: none; }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-sub {
  font-family: var(--font-mono);
  font-size: var(--size-micro);
  font-weight: 400;
  color: var(--rail-faint);
  text-transform: uppercase;
  letter-spacing: var(--tracking-micro);
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--size-card-title);
  line-height: 1.1;
}

.rail-nav { display: flex; flex-direction: column; gap: 2px; }

/* A group heading, not a link. Mono micro-caps, the same texture as a table header. */
.rail-group {
  font-family: var(--font-mono);
  font-size: var(--size-micro);
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
  color: var(--rail-faint);
  padding: 16px 10px 6px;
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--rail-text);
  font-size: var(--size-body);
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: background-color 160ms ease, color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .rail-item:hover { background: var(--rail-hover); color: var(--rail-ink); text-decoration: none; }
}
.rail-item:focus-visible { outline: 2px solid var(--rail-marker); outline-offset: 2px; }

/* Active: tint background, ink text, and a 3px mint marker on the right edge (§4). The marker
   rather than a left border because the rail is scrollable and a left rule reads as a divider. */
.rail-item.active { background: var(--rail-active); color: var(--rail-ink); }
.rail-marker {
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: var(--rail-marker);
  margin-left: auto;
}

.rail-foot { margin-top: auto; padding-top: 14px; }

.account-chip {
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--rail-hover);
  border: 1px solid var(--rail-line);
  display: grid;
  gap: 3px;
}
.account-email {
  font-size: var(--size-label);
  color: var(--rail-ink);
  overflow-wrap: anywhere;
}
.account-role {
  font-family: var(--font-mono);
  font-size: var(--size-micro);
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
  color: var(--rail-faint);
}
.rail .link-button { color: var(--rail-text); }
.rail .link-button:hover { color: var(--rail-ink); }

/* Narrow screens get the rail back on top rather than a hamburger nobody asked for. */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; height: auto; }
  .rail-nav { flex-direction: row; flex-wrap: wrap; }
  .rail-group { width: 100%; padding-top: 10px; }
  .rail-foot { margin-top: 12px; }
}

.link-button {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font: inherit; font-size: 13px; padding: 0;
}
.link-button:hover { color: var(--ink); }

.shell { flex: 1; padding: 28px 24px 48px; max-width: 1400px; width: 100%; margin: 0 auto; }
.centred { flex: 1; display: grid; place-items: center; padding: 24px; }

.footer {
  border-top: 1px solid var(--hair);
  padding: 12px 24px;
  display: flex; justify-content: space-between;
  color: var(--faint); font-size: 12px;
}

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

.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
h1 { font-size: 22px; margin: 0 0 2px; letter-spacing: -0.02em; }
h2 { font-size: 15px; margin: 0 0 12px; letter-spacing: -0.01em; }
.subtitle { color: var(--muted); margin: 0; font-size: 13px; }

/* ---------- stat tiles ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
  background: var(--surf); border: 1px solid var(--hair);
  border-radius: var(--radius); padding: 14px 16px;
}
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.stat.ok .stat-value { color: var(--state-healthy); }
.stat.warn .stat-value { color: var(--state-updating); }
.stat.bad .stat-value { color: var(--state-crashed); }

/* ---------- cards & tables ---------- */

.card {
  background: var(--surf); border: 1px solid var(--hair);
  border-radius: var(--radius); overflow: hidden;
}
.card + .card { margin-top: 16px; }
.card-head {
  padding: 12px 16px; border-bottom: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-body { padding: 16px; }

@media print {
  /* The quote document is the only thing on this page a client should ever receive, so the rail,
     our working notes and every control disappear. One page, one artifact — rather than a screen
     and a separate exported file that drift apart. */
  .rail, .footer, .no-print, .page-head { display: none !important; }
  .app, .shell { display: block; margin: 0; padding: 0; }
  .quote-document { border: none; box-shadow: none; }
  body { background: var(--print-bg); color: var(--print-ink); }
}

.quote-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--ring);
}

.quote-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--ring);
}

.quote-figure {
  font-family: var(--font-mono);
  font-size: 22px;
  text-align: right;
  white-space: nowrap;
}

.quote-terms {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1.5px solid var(--ring);
  font-size: 12.5px;
  color: var(--faint);
}

.quote-terms p { margin: 0 0 8px; }

.fingerprint {
  /* The one number on the page whose whole job is to be compared, character by character, against
     a second screen. Monospaced and spaced out, because a proportional font makes 1 and l the same
     shape and this is exactly the comparison where that costs something. */
  font-family: var(--font-mono);
  font-size: 30px;
  letter-spacing: 2px;
  margin-top: 6px;
}

.fingerprint-key {
  /* The eight characters the operator actually checks. Everything else is context. */
  color: var(--state-healthy);
  font-weight: 600;
  margin-right: 12px;
}

.fingerprint-rest {
  color: var(--faint);
  font-size: 20px;
  letter-spacing: 1px;
}

.code-block {
  width: 100%;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
  resize: vertical;
}

.inline-select {
  /* Sits inside a table row next to its button, so it has to stay narrow enough that the actions
     column does not push the rest of the table sideways. */
  max-width: 150px;
  margin-right: 4px;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 9px 16px; color: var(--faint);
  font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em;
  border-bottom: 1px solid var(--hair); white-space: nowrap;
}
td { padding: 11px 16px; border-bottom: 1px solid var(--surf-2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surf-2); }
td.num { text-align: right; font-family: var(--font-mono); font-size: 12px; }

/* ---------- health ---------- */

.health { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.health-healthy .dot { background: var(--state-healthy); box-shadow: 0 0 8px color-mix(in srgb, var(--state-healthy) 45%, transparent); }
.health-healthy { color: var(--state-healthy); }
.health-degraded .dot { background: var(--state-updating); box-shadow: 0 0 8px color-mix(in srgb, var(--state-updating) 45%, transparent); }
.health-degraded { color: var(--state-updating); }
.health-unreachable .dot { background: var(--state-crashed); box-shadow: 0 0 8px color-mix(in srgb, var(--state-crashed) 45%, transparent); }
.health-unreachable { color: var(--state-crashed); }
.health-never_seen .dot, .health-decommissioned .dot { background: var(--state-retired); }
.health-never_seen, .health-decommissioned { color: var(--state-retired); }

/* ---------- meters ---------- */

.meter { display: flex; flex-direction: column; gap: 4px; min-width: 110px; }
.meter-track { height: 5px; border-radius: 3px; background: var(--surf-2); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 3px; background: var(--accent-deep); transition: width .4s ease; }
.meter-fill.warn { background: var(--state-updating); }
.meter-fill.bad { background: var(--state-crashed); }
.meter-label { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* ---------- key/value ---------- */

.kv { display: grid; grid-template-columns: minmax(150px, auto) 1fr; gap: 8px 20px; font-size: 13px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; font-family: var(--font-mono); font-size: 12px; word-break: break-all; }

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

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

.form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
input, select, textarea {
  background: var(--surf-2); border: 1px solid var(--ring);
  border-radius: 7px; padding: 9px 11px; color: var(--ink);
  font: inherit; font-size: 14px; width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--accent-deep); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-deep) 22%, transparent); }
button.primary {
  background: var(--accent-deep); color: var(--surf); border: none; border-radius: 7px;
  padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer;
}
button.primary:hover { filter: brightness(1.08); }

.login-card { width: min(400px, 100%); }
.login-card .card-body { padding: 24px; }

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

.notice { border-radius: 8px; padding: 11px 14px; font-size: 13px; border: 1px solid; }
.notice.error { background: var(--tint-crashed); border-color: var(--state-crashed); color: var(--state-crashed); }
.notice.ok { background: var(--tint-healthy); border-color: var(--state-healthy); color: var(--state-healthy); }
.notice.info { background: var(--brand-fill); border-color: var(--accent-deep); color: var(--accent-deep); }
.notice.warn { background: var(--tint-updating); border-color: var(--state-updating); color: var(--state-updating); }

/* A provisional node is enrolled and managed but its hardware is unverified. Amber, not red:
   it is a condition to resolve, not a failure. */
.chip-warn {
  display: inline-block; padding: 1px 7px; border-radius: 5px;
  background: var(--tint-updating); border: 1px solid var(--state-updating);
  color: var(--state-updating); font-size: 11px; letter-spacing: 0.02em; cursor: help;
}

/* The green counterpart, for a condition that is met rather than pending. */
.chip-ok {
  display: inline-block; padding: 1px 7px; border-radius: 5px;
  background: var(--tint-healthy); border: 1px solid var(--state-healthy);
  color: var(--state-healthy); font-size: 11px; letter-spacing: 0.02em;
}

.secret {
  font-family: var(--font-mono); font-size: 13px; background: var(--surf-2);
  border: 1px dashed var(--ring); border-radius: 8px;
  padding: 12px 14px; word-break: break-all; user-select: all;
}

pre.command {
  background: var(--surf-2); border: 1px solid var(--hair);
  border-radius: 8px; padding: 14px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin: 0;
}

/* ---------- audit ---------- */

.event-type {
  font-family: var(--font-mono); font-size: 11px; padding: 2px 7px; border-radius: 5px;
  background: var(--surf-2); border: 1px solid var(--hair); white-space: nowrap;
}
.hash { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.chain-ok { color: var(--state-healthy); }
.chain-bad { color: var(--state-crashed); }

.empty { padding: 40px 16px; text-align: center; color: var(--faint); }
.empty strong { display: block; color: var(--muted); margin-bottom: 6px; font-size: 14px; }

/* ---------- sparkline ---------- */

.spark { width: 100%; height: 44px; display: block; }
.spark path { fill: none; stroke: var(--accent-deep); stroke-width: 1.5; }
.spark .area { fill: var(--brand-fill); stroke: none; }

@media (max-width: 720px) {
  .nav { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}

/* ---------------------------------------------------------------------------------------
   Operator-first presentation.

   The console is the product, and its primary view is written for someone who has never used a
   terminal. Raw JSON, chain hashes and record ids are not removed — they are the evidence, and an
   auditor will want them — but they live one click away instead of in front of the sentence they
   are evidence for.
   --------------------------------------------------------------------------------------- */

.story { display: flex; gap: 12px; align-items: baseline; padding: 11px 0; }
.story + .story { border-top: 1px solid var(--hair); }
.story-when { color: var(--faint); font-size: 12px; white-space: nowrap; min-width: 92px; }
.story-body { flex: 1; min-width: 0; }
.story-headline { font-size: 14px; line-height: 1.45; }
.story-detail { color: var(--faint); font-size: 12.5px; line-height: 1.5; margin-top: 2px; }

/* Tone marks the entries that mean something, so a page of routine activity does not visually
   flatten the one line that matters. Colour is a hint, never the only signal — the sentence
   itself says what happened. */
.story-good .story-headline { color: var(--state-healthy); }
.story-warn .story-headline { color: var(--state-updating); }
.story-bad .story-headline { color: var(--state-crashed); font-weight: 600; }

.technical { margin-top: 6px; }
.technical > summary {
  cursor: pointer; color: var(--faint); font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase; list-style: none;
  display: inline-flex; align-items: center; gap: 5px; user-select: none;
}
.technical > summary::-webkit-details-marker { display: none; }
.technical > summary::before { content: "▸"; font-size: 9px; transition: transform 0.12s; }
.technical[open] > summary::before { transform: rotate(90deg); }
.technical > summary:hover { color: var(--muted); }
.technical-body {
  margin-top: 7px; padding: 10px 12px; background: var(--surf-2);
  border: 1px solid var(--hair); border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; line-height: 1.6; color: var(--faint);
  overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
.technical-body dt { color: var(--faint); opacity: 0.75; }
.technical-body dd { margin: 0 0 6px; }

/* Wizard: one question at a time, a plain confirmation, a plain result. */
.wizard { max-width: 620px; }
.wizard-steps { display: flex; gap: 8px; margin-bottom: 22px; align-items: center; }
.wizard-step {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--faint); font-size: 12px;
}
.wizard-step .num {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--hair); font-size: 11px;
}
.wizard-step.current { color: var(--ink); }
.wizard-step.current .num { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--surf); }
.wizard-step.done .num { background: var(--state-healthy); border-color: var(--state-healthy); color: var(--surf); }
.wizard-rule { flex: 1; height: 1px; background: var(--hair); }
.wizard-field { display: block; margin-bottom: 16px; }
.wizard-field > .label { display: block; font-size: 13px; margin-bottom: 5px; }
.wizard-field > .hint { display: block; color: var(--faint); font-size: 12px; margin-top: 4px; }
.wizard-field input[type="text"], .wizard-field select, .wizard-field textarea {
  width: 100%; padding: 8px 10px; font-size: 14px;
}
.confirm-line { display: flex; gap: 10px; padding: 9px 0; }
.confirm-line + .confirm-line { border-top: 1px solid var(--hair); }
.confirm-key { color: var(--faint); min-width: 150px; font-size: 13px; }
.confirm-value { font-size: 13px; }

.btn-primary {
  background: var(--accent-deep); color: var(--surf); border: 0; border-radius: 7px;
  padding: 10px 18px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary {
  background: transparent; color: var(--faint); border: 1px solid var(--hair);
  border-radius: 7px; padding: 10px 18px; font-size: 14px; cursor: pointer;
}
.btn-row { display: flex; gap: 10px; align-items: center; margin-top: 22px; }

/* The idle warning.
   Fixed to the corner rather than a modal overlay: it must be impossible to miss and must not
   block the page, because the most likely response to seeing it is to carry on working — which
   dismisses it by itself. A modal would make the warning more disruptive than the timeout. */
.idle-warning {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--state-updating);
  background: var(--tint-updating);
  color: var(--ink);
  box-shadow: var(--shadow-raised);
  z-index: 1000;
}
.idle-warning p { margin: 8px 0; font-size: 0.92em; }
.idle-warning .idle-countdown { font-variant-numeric: tabular-nums; }
.idle-warning button { margin-top: 8px; }

/* The wall screen.
   Sized for reading across a room rather than at a desk: one headline, four numbers, one line of
   detail. Everything here is deliberately larger than anywhere else in the console, because the
   failure mode of a dashboard is that nobody looks at it. */
.display-body { margin: 0; display: grid; place-items: center; min-height: 100vh; }
.display { width: min(1100px, 92vw); text-align: center; }
.display-headline { font-size: clamp(2rem, 6vw, 4.5rem); font-weight: 700; line-height: 1.1; }
.display-headline.tone-good { color: var(--state-healthy); }
.display-headline.tone-warn { color: var(--state-updating); }
.display-headline.tone-bad  { color: var(--state-crashed); }
.display-headline.tone-neutral { color: var(--muted); }
.display-grid {
  margin-top: clamp(24px, 5vh, 56px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(12px, 3vw, 32px);
}
.display-stat { display: grid; gap: 6px; }
.display-number { font-size: clamp(2rem, 5vw, 3.5rem); font-variant-numeric: tabular-nums; }
.display-label { font-size: clamp(0.8rem, 1.4vw, 1rem); color: var(--muted); }
.display-stat.tone-warn .display-number { color: var(--state-updating); }
.display-stat.tone-bad .display-number { color: var(--state-crashed); }
.display-footer {
  margin-top: clamp(24px, 5vh, 56px);
  color: var(--muted);
  font-size: clamp(0.8rem, 1.3vw, 1rem);
}
.display-time { margin-left: 12px; font-variant-numeric: tabular-nums; }

/* =========================================================================================
 * THE HEALTH-STATE SYSTEM
 *
 * A box has one health, and that health drives one colour applied to *every* element of the box
 * at once. The failure this is arranged to prevent is a coloured dot beside a grey name: a
 * half-coloured row makes an operator look twice to work out what it is telling them, and on a
 * fleet page the whole value is being able to not look twice.
 *
 * A template sets `state-healthy` / `state-updating` / `state-crashed` / `state-retired` once, on
 * the row or the panel. Everything below reads `--state`, so the parts cannot disagree — there is
 * no second place to update and therefore no place to forget.
 * ========================================================================================= */

/* The dot. Filled, with a soft halo of the same colour rather than a different one. */
.state-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--state, var(--state-retired));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--state, var(--state-retired)) 18%, transparent);
  display: inline-block;
  flex: none;
}

/* The word. Never grey while the dot is coloured. */
.state-word {
  color: var(--state, var(--state-retired));
  font-weight: 500;
}

/* The node's name, at 600. Weight as well as colour, because colour alone fails for the eight
   percent of men who cannot reliably separate the green from the orange. */
.state-name {
  color: var(--state, var(--ink));
  font-weight: 600;
}

/* Load and VRAM bars. Same colour as the rest of the box, so a bar on a struggling machine reads
   as part of that machine's story rather than as a generic meter. */
.state-bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--state-tint, var(--surf-2));
  overflow: hidden;
}
.state-bar > span {
  display: block;
  height: 100%;
  background: var(--state, var(--accent-deep));
  border-radius: inherit;
}

/* A single-box container takes the health colour as its ring. The .card rule already reads
   --state, so a panel about one box needs nothing but the class. */
.card.state-healthy,
.card.state-updating,
.card.state-crashed {
  background: var(--surf);
}

/* =========================================================================================
 * MONO FOR ALL DATA
 *
 * Versions, digests, counts, percentages, timestamps, identifiers. Proportional digits make a
 * column of numbers unscannable, and this console is columns of numbers.
 * ========================================================================================= */
.mono,
.num,
td.num,
th.num,
.kpi-value,
.state-bar-value,
time,
code {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Headings are the only place the serif appears. */
h1, h2, h3, .wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* =========================================================================================
 * THE PRODUCT INVARIANTS, ON SCREEN
 *
 * Three sentences the console has to keep saying, because they are what the product is sold on
 * and a claim that only exists in a document is a claim nobody has read. Styled as a quiet note
 * rather than a banner: something an operator stops noticing is something they can still point at
 * when a client's security officer asks.
 * ========================================================================================= */
.invariant {
  display: flex;
  gap: 8px;
  align-items: baseline;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  padding: 10px 12px;
  border-left: var(--ring-w) solid var(--ring);
  background: var(--surf-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.invariant strong { color: var(--ink); font-weight: 600; }

/* ---------- a ceremony that is over ---------- */

/* Shown in place of the three signing steps once a change has been applied. The steps used to stay
   on screen underneath "the change is live", one of them a box asking for a signature that had
   already been accepted — which reads as unfinished work and invites a confusing refusal. */
.done-state { display: flex; gap: 14px; align-items: flex-start; }
.done-mark {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px;
  background: var(--tint-healthy); color: var(--state-healthy);
}

/* Sign-in. The light logo, because the card is white; the heading says what the page is for, since
   a partner arriving from circleeight.ai should know at a glance they are in the right place. */
.login-brand { display: grid; gap: 18px; justify-items: start; margin-bottom: 20px; }
.login-brand img { height: 40px; width: auto; display: block; }
.login-title { font-family: var(--font-display); font-weight: 600; font-size: var(--size-page-title); letter-spacing: -0.02em; margin: 0; color: var(--ink); }

/* Two-factor sign-in */
.code-input { font-family: var(--font-mono); font-size: 18px; letter-spacing: 0.12em; }
.two-factor-setup .code-input { max-width: 220px; }
.two-factor-setup { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.two-factor-setup .qr { border: 1px solid var(--hair); border-radius: 10px; background: var(--surf); }
.secret-key { font-size: 15px; letter-spacing: 0.06em; color: var(--ink); background: var(--surf-2); border: 1px solid var(--hair); border-radius: 8px; padding: 8px 12px; display: inline-block; }
.recovery-codes { columns: 2; font-size: 15px; line-height: 1.9; padding-left: 2.8em; background: var(--surf-2); border: 1px solid var(--hair); border-radius: 8px; padding-top: 10px; padding-bottom: 10px; }
@media (max-width: 640px) { .two-factor-setup { grid-template-columns: minmax(0, 1fr); } }
