/* THE ADMIN CONSOLE'S SHELL AND SHARED LOOK (build plan 2026-11-07, A2).

   index.html loads desk/desk.css FIRST: the Front Office's tokens (light, dark and
   the appearance switch) and its parts — buttons, chips, message boxes, folds,
   fields, the ribbon, toggles — which the admin draws through admin-ui.js. This
   file comes after it, with the admin's own shell (the bar, the menu, the plane
   band) and the pages' shared shapes, written in the same tokens only: no raw
   colour, no raw font size, 4px corners on controls and 8px on boxes (tokens.css
   lists the old names and what replaced them).

   A PAGE THAT HAS MOVED wears `class="pane"` on its <main>: the Front Office's
   pane rules then apply to it whole (its folds, fields and spacing). A page not
   yet moved keeps the browser's paragraph and heading spacing, which desk.css
   takes away — restored below at the element's own weight (a bare `p`, later than
   desk.css's) so any rule of the page's own still wins. */
*{box-sizing:border-box}
/* `hidden` is an ATTRIBUTE, and the UA implements it as display:none — which any
   author `display` rule outranks. `nav{display:flex}` therefore defeated
   `<nav hidden>` silently, and a signed-out visitor was shown the whole list of
   surfaces. That is the enumeration CON-AUT-007 forbids. One rule, once, so no
   component can reintroduce it (desk.css has the same). */
[hidden]{display:none !important}
body{margin:0;padding:var(--s-5);
  font:var(--text-base)/1.55 var(--sans);color:var(--ink);background:var(--surface)}
/* desk.css sets p, h1, h2 and h3 to no margin; these are the browser's own again. */
:where(main:not(.pane), .dlg) p{margin-block:1em}
:where(main:not(.pane), .dlg) h2{margin-block:.83em}
:where(main:not(.pane), .dlg) h3{margin-block:1em}

/* MOTION, ONLY FOR THOSE WHO HAVE NOT ASKED FOR LESS (prefers-reduced-motion). */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{transition:none !important;animation:none !important;scroll-behavior:auto !important}
  a.node.link:hover{transform:none}
}

/* THE SKIP LINK. A button, as on the Front Office: the admin routes on the hash,
   so an `<a href="#…">` would change the page instead of moving the focus. It is
   off-screen until the keyboard reaches it (desk.css `.skip`). */

/* THE APPEARANCE SWITCH: Light, Dark or Auto, the Front Office's three blocks
   (desk.css `.theme`), and the same choice — one setting kept in this browser for
   both apps. In the bar, before the person. */
header .theme{flex:none;width:11rem;grid-template-columns:repeat(3,1fr)}

/* THE MENU ON A PHONE. Under 40rem the bar folds: the mark, the person and a
   "Menu" button; the menu opens under them as one column. */
.navtoggle{display:none}
@media (max-width:40rem){
  .navtoggle{display:inline-flex}
  header nav.navfold{display:none}
  header nav.navfold.open{display:flex;flex-direction:column;align-items:stretch}
  header nav.navfold.open .navgrp{flex-direction:column;align-items:stretch}
  header nav.navfold.open .navgrp:not(:first-child){border-left:0;border-top:1px solid var(--line);
    padding:var(--s-2) 0 0;margin:var(--s-2) 0 0}
  header nav.navfold.open .navgrp.plat + .navgrp.plat{border-top:0;padding-top:0;margin-top:0}
  header nav.navfold.open .navsub{position:static;box-shadow:none;max-width:none}
}

/* THE ONE TAB BAR (admin-ui.js tabs / wireTabs): a rule under the row, the chosen
   tab underlined in the accent and bold — the Front Office's tab look (the Email
   pages). Tabs go between parts of one page; a filter is the ribbon's. */
.tabs{display:flex;flex-wrap:wrap;gap:var(--s-1);margin:var(--s-3) 0 var(--s-4);
  box-shadow:inset 0 -1px 0 var(--line-strong)}
.tabs .tab{font:inherit;font-size:var(--text-base);cursor:pointer;padding:var(--s-2) var(--s-3);
  border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:var(--ink-2)}
.tabs .tab:hover{color:var(--ink);border-bottom-color:var(--line-strong)}
.tabs .tab[aria-selected="true"]{color:var(--accent-ink);font-weight:600;border-bottom-color:var(--accent)}
.tabs .tab:focus-visible{outline:var(--focus-width) solid var(--accent);outline-offset:-2px}
.tabs.small{margin:var(--s-2) 0}
.tabs.small .tab{font-size:var(--text-sm);padding:var(--s-1) var(--s-3)}

/* A QUESTION ASKED IN PLACE (admin-ui.js askInPlace / sayInPlace): the Front
   Office's "Before saving" box, under the thing it is about. */
.inplace-host{margin:var(--s-2) 0}
.inplace-cell{padding:var(--s-2) var(--s-3)}
.inplace{max-width:44rem}
.inplace .error{color:var(--stop);font-size:var(--text-sm)}

/* desk.css draws a number (`.num`) small and grey, for its lists; a page not yet
   moved keeps its figures in the table's own size and ink. */
:where(main:not(.pane)) .num{font-size:inherit;color:inherit}

/* CON-NAV-013 / NFR-USA-003. One rule, every interactive element, before any
   component gets a chance to forget. `:focus-visible` rather than `:focus` so a
   pointer click does not ring, but every keyboard arrival does — and the ring is
   drawn OUTSIDE the element (`outline-offset`) so a dense table row cannot clip it.
   Removing an outline without replacing it is the most common regression when a
   screen is generated; this makes the default correct rather than the exception. */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,
textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:var(--focus-width) solid var(--accent);outline-offset:var(--focus-offset);
  border-radius:var(--radius)}
/* align-items was `baseline` while the first item was type. IT IS NOW A MARK,
   and an SVG has no text baseline — the browser falls back to its bottom margin
   edge, which drops the mark below the nav labels. `center` is the honest fix
   once nothing in this row is type that has to line up with the rest. nav and
   .who already centre their own children, so this changes only how the three
   groups sit against each other. */
header{display:flex;align-items:center;gap:var(--s-5);border-bottom:1px solid var(--line);padding-bottom:var(--s-3);margin-bottom:var(--s-4)}
h1{font-size:var(--text-lg);margin:0;font-weight:600;line-height:1}
.muted{color:var(--ink-2);font-weight:400}
a{color:var(--accent-ink)}
/* Pills, matching the reference (UI.md §1). Zitadel renders an inactive item as
   plain text and the active one as a filled accent pill — the fill is the only
   thing carrying "you are here", which is why the accent appears nowhere else in
   the bar. A bottom-border underline was doing that job before and read as a tab
   strip rather than as navigation.
   Colour is not the only signal: aria-current on the active link is what a screen
   reader announces, and it is set in app.js alongside the class. */
nav a{color:var(--ink);text-decoration:none;font-size:var(--text-sm);
  padding:var(--s-1) var(--s-3);border-radius:var(--radius);white-space:nowrap;
  transition:background-color .12s,color .12s}
nav a:hover{background:var(--surface-3)}
nav a.active{background:var(--accent);color:var(--on-accent);font-weight:600}
nav a.active:hover{background:var(--accent)}
/* THE WAY ACROSS TO THE FRONT DESK, made to stand out (owner, 2026-09-16) — and
   OUTLINED, not filled. A filled pill is how this bar says "you are here", so a
   filled link would read as the current page. The arrow says it leaves this
   console; it is text, so it is announced, and colour is not the only signal. */
nav a.desklink{color:var(--accent);font-weight:600;
  box-shadow:inset 0 0 0 1.5px var(--accent)}
nav a.desklink::after{content:" \2192"}
nav a.desklink:hover,nav a.desklink:focus-visible{background:var(--accent);color:var(--on-accent)}
/* ── The ingestion queue. THE EXEMPLAR (UI.md §8) ─────────────────────────────
   Every value below is a token. When adding a screen, copy this block's discipline
   rather than the prose in UI.md: spacing from --s-*, size from --text-*, radius
   from --radius, and no literal anywhere. The rest of this file predates the
   tokens and is normalised view by view, not in one sweep — the diff that touches
   every view at once is unreviewable and lands its regressions everywhere. */
.flags{display:flex;flex-wrap:wrap;gap:var(--s-2);margin-bottom:var(--s-4)}
.flag{font-size:var(--text-xs);padding:var(--s-1) var(--s-3);
  border:1px solid var(--line);border-radius:var(--radius)}
.flag.off{background:var(--wait-soft);border-color:var(--wait);color:var(--wait);
  font-weight:600}
.backlog{display:flex;gap:var(--s-6);padding:var(--s-3) var(--s-4);
  border:1px solid var(--line);border-radius:var(--radius);margin-bottom:var(--s-5)}
.backlog.alert{border-color:var(--wait);background:var(--wait-soft)}
.backlog div{display:flex;flex-direction:column}
.backlog b{font-size:var(--text-lg);font-weight:600;
  font-variant-numeric:tabular-nums}
.backlog span{font-size:var(--text-xs);color:var(--ink-2);
  text-transform:uppercase;letter-spacing:.04em}
.filters{display:flex;gap:var(--s-4);margin-bottom:var(--s-3);font-size:var(--text-sm)}
select{font:inherit;padding:var(--s-1)}
table{width:100%;border-collapse:collapse;font-size:var(--text-sm)}
th{text-align:left;font-weight:600;color:var(--ink-2);
  font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.04em;
  padding:var(--s-2) var(--s-3);border-bottom:1px solid var(--line)}
td{padding:var(--s-2) var(--s-3);border-bottom:1px solid var(--line)}
/* Status as a TINTED PILL, not coloured text — the reference's treatment. A pill
   reads as a value at a glance down a column; coloured text reads as emphasis. */
.state{font-size:var(--text-xs);padding:var(--s-1) var(--s-2);
  border-radius:var(--radius);border:1px solid transparent;
  background:color-mix(in srgb,var(--ink-2) 14%,transparent);color:var(--ink-2)}
.state.quarantined,.state.failed{
  background:color-mix(in srgb,var(--stop) 16%,transparent);color:var(--stop)}
.state.drafted{background:color-mix(in srgb,var(--ok) 16%,transparent);color:var(--ok)}
/* The three states that are not "populated" (UI.md §5). */
.empty{color:var(--ink-2);font-style:italic;padding:var(--s-4) 0;max-width:70ch}
.loading{color:var(--ink-2);padding:var(--s-4) 0}
.errstate{border:1px solid var(--stop);border-left:3px solid var(--stop);
  border-radius:0 var(--radius) var(--radius) 0;padding:var(--s-3) var(--s-4);
  margin:var(--s-4) 0;max-width:70ch}
.errstate p{margin:var(--s-2) 0;color:var(--ink-2)}
/* The same box for a success that must stay (Compose's "Submitted"). */
.errstate.done{border-color:var(--ok)}
/* Compose's subject and message take the row's width (they were inline styles). */
.cmpwide{flex:1}
.cmpwide input,.cmpwide textarea{width:100%}
footer{margin-top:var(--s-8);font-size:var(--text-xs)}
code{font-size:.85em}

/* The health map's --h-* set moved to tokens.css with the rest of the palette.
   It stays a distinct vocabulary from --ok/--warn/--bad — one view's semantics,
   not the platform's — but a colour is a token wherever it lives (UI.md §2). */
nav{display:flex;align-items:center;gap:var(--s-2);flex-wrap:wrap}
/* CON-NAV-010: the plane boundary is structural, not decorative. With the visible
   labels removed the rule is the only thing carrying it on screen, so it is a real
   divider rather than extra gap — and the group keeps its accessible name in the
   markup, which is what a screen reader announces. */
nav .navgrp{display:flex;align-items:center;gap:var(--s-2)}
nav .navgrp:not(:first-child){margin-left:var(--s-2);padding-left:var(--s-4);
  border-left:1px solid var(--line)}
/* THE SEVEN PLATFORM MENUS (owner, 2026-11-13) are one plane, so no divider between
   them: the rule falls once, on the first group after the last `.plat` one (Company).
   Their buttons sit a little closer than the gap between planes, and the row wraps
   (nav flex-wrap) rather than pushing the person off the bar. */
nav .navgrp.plat + .navgrp.plat{margin-left:0;padding-left:0;border-left:0}
nav .navgrp.plat .navtop{padding:var(--s-1) var(--s-2)}

/* Submenus. A disclosure, not a hover menu: it opens on click and stays open
   until dismissed, because a menu that opens on hover cannot be operated by
   keyboard or touch without a second mechanism (NFR-USA-003, CON-NAV-013). The
   button carries aria-expanded and the panel is `hidden` rather than moved
   offscreen, so a screen reader is told the same thing the eye is. */
nav .navmenu{position:relative;display:flex;align-items:center}
nav .navtop{font:inherit;font-size:var(--text-sm);color:var(--ink);background:none;
  border:0;cursor:pointer;padding:var(--s-1) var(--s-3);border-radius:var(--radius);
  display:flex;align-items:center;gap:var(--s-1);white-space:nowrap;
  transition:background-color .12s,color .12s}
nav .navtop::after{content:"";width:.32rem;height:.32rem;border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-.1rem);opacity:.7}
nav .navtop[aria-expanded="true"]::after{transform:rotate(-135deg) translateY(.05rem)}
nav .navtop:hover,nav .navtop:focus-visible{background:var(--surface-3)}
/* `.hasactive` keeps the parent lit while a child view is showing, so the trail
   from menu to open view is visible when the panel is closed. */
nav .navtop.hasactive{background:var(--accent);color:var(--on-accent);
  font-weight:600}
nav .navsub{position:absolute;top:calc(100% + var(--s-1));left:0;z-index:40;
  display:flex;flex-direction:column;min-width:11rem;padding:var(--s-1);
  background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius-lg);
  box-shadow:var(--shadow)}
nav .navsub[hidden]{display:none}
nav .navsub a{display:block;white-space:nowrap}
/* HEADED SECTIONS inside a menu (Company; the platform menus have none since
   2026-11-13, each being one section on its own). The
   heading is a label, not a link — small, muted, upper case, the same voice as a
   table heading — and a hairline separates one section from the next. Each section
   is a role=group in the markup, so the heading is aria-hidden there. */
nav .navsec{display:flex;flex-direction:column}
nav .navsec + .navsec{border-top:1px solid var(--line);margin-top:var(--s-1);padding-top:var(--s-1)}
nav .navhead{font-size:var(--text-xs);color:var(--ink-2);text-transform:uppercase;
  letter-spacing:.04em;padding:var(--s-1) var(--s-3) 0;white-space:nowrap}
/* "Company: <name>". A long name is cut with an ellipsis rather than pushing the
   bar wider; the whole name is in the button's title. Borrowed access is said in
   words ("(borrowed)"), and the outline repeats it for the eye. */
nav .navtop.navcompany{max-width:24rem}
nav .navtop.navcompany .navlabel{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
nav .navtop.navcompany.borrowed{box-shadow:inset 0 0 0 1.5px var(--wait)}
/* PHONE WIDTH. The bar wraps under the wordmark, and an open menu never runs off
   the screen: it is capped to the viewport and scrolls inside. */
@media (max-width:40rem){
  header{flex-wrap:wrap;row-gap:var(--s-2)}
  /* The menu takes a row of its own under the wordmark and the person, so the
     three items sit side by side instead of one per line. */
  nav{order:3;width:100%}
  nav .navgrp:not(:first-child){margin-left:0;padding-left:var(--s-2)}
  nav .navgrp.plat + .navgrp.plat{padding-left:0}
  nav .navtop.navcompany{max-width:14rem}
  nav .navsub{max-width:calc(100vw - 2 * var(--s-5));max-height:70vh;overflow:auto}
  nav .navsub a{white-space:normal}
}
/* TODO #223: the System / Test chip (syslabel.js), beside a name or in Kind. A
   neutral tint, not a warning: these rows are not wrong, only not customers. */
.state.syslabel{margin-left:var(--s-1);white-space:nowrap}
.state.syslabel.system{background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--ink)}
.state.syslabel.test{background:color-mix(in srgb,var(--wait) 18%,transparent);color:var(--ink)}
.systoggle{font-size:var(--text-sm);display:inline-flex;align-items:center;gap:var(--s-1);white-space:nowrap}
.hhead{display:flex;gap:var(--s-6);align-items:flex-start;margin-bottom:var(--s-4);flex-wrap:wrap}
.hhead h2{font-size:var(--text-lg);margin:0 0 var(--s-1)}
.hhead p{margin:0;font-size:var(--text-sm);max-width:52ch}
.hhead-right{margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;gap:var(--s-1)}
.hhead-right p{font-size:var(--text-xs);opacity:.85}
.hsum{display:flex;gap:var(--s-4);font-size:var(--text-xs);flex-wrap:wrap}
.hsum .k{display:flex;align-items:center;gap:var(--s-1);white-space:nowrap}
.hsum i{width:.6rem;height:.6rem;border-radius:50%;background:var(--ink-2)}
.hsum .healthy i{background:var(--ok)}.hsum .degraded i{background:var(--wait)}
.hsum .fault i{background:var(--stop)}
.hsum .external i{background:var(--accent)}

/* ONE NUMBER FOR BOTH BANDS, declared here because both are children of it.
   They must stay the same width: the connectors that cross between them are
   routed through the gutter at the midpoint, and two bands of different widths
   put the two ends of that gutter in different places.

   IT IS A FLOOR, NOT A WIDTH. Below it the map scrolls sideways (overflow-x),
   which is the honest behaviour for a diagram whose whole meaning is six stages
   left to right — squeezing them into a column would not make it readable, it
   would make it a list that still claims to be a pipeline.

   790px rather than 960px: six columns at 118px with .6rem gaps. That is the
   difference between a 900px-wide window scrolling and not scrolling, which is
   most laptop halves of a split screen. */
.hmap{--hmap-min:790px;position:relative;overflow-x:auto;padding:var(--s-5) 0 var(--s-2)}
.hwires{position:absolute;inset:0;pointer-events:none;overflow:visible}
.wire{fill:none;stroke:var(--ink-2);stroke-width:1.5;opacity:.5}
.wire.healthy{stroke:var(--ok);opacity:.85}.wire.degraded{stroke:var(--wait);opacity:.85}
.wire.fault{stroke:var(--stop);opacity:.85}
.wire.external{stroke:var(--accent);opacity:.7}
.wire.unknown{stroke-dasharray:4 4}
.wire.back{stroke-dasharray:2 5}
/* A gateway route is not traffic — it is reachability, so it is drawn lighter
   than a data-path edge and never competes with one for attention. */
.wire.route{stroke-width:1;stroke-dasharray:1 4;opacity:.45}
.hband{display:grid;grid-template-columns:repeat(6,minmax(118px,1fr));gap:var(--s-2);
  min-width:var(--hmap-min)}
/* min-width:0 for the same reason the box carries it: a grid ITEM's automatic
   minimum is its content, so a column holding a long name refuses to shrink and
   drags the whole six-column band wider than the floor above. The rule has to be
   on both — the column is the grid item here, the box is the grid item in the
   platform row below. */
.col{display:flex;flex-direction:column;gap:var(--s-2);min-width:0}
/* min-height reserves the optional note line in every column, so the first box of
   a column with no note still lines up with its neighbours. */
.hband h3,.hplat h3{font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.06em;
  color:var(--ink-2);margin:0;font-weight:600;display:flex;flex-direction:column;gap:.15rem}
.hband h3{min-height:2.4rem}
.hband h3 span,.hplat h3 span{text-transform:none;letter-spacing:0;font-weight:400;font-size:var(--text-xs);opacity:.8}
.hplat{margin-top:var(--s-5);padding-top:var(--s-4);border-top:1px dashed var(--line);
  min-width:var(--hmap-min)}
/* auto-fit, not a fixed count. It was repeat(5,...) and a sixth platform
   service (party-svc) wrapped onto a row of its own at the bottom left —
   present, green and easy to miss, which reads as a rendering fault rather
   than as a service. The count of platform services is not a layout constant;
   the next one added would have done the same thing. */
.hplat .row{display:grid;grid-template-columns:repeat(auto-fit,minmax(178px,1fr));
  gap:var(--s-2);margin-top:var(--s-2)}

/* The box. `position:relative` and a background are required: the connectors are
   drawn underneath, and a line must not run through the text it points at. */
.node{position:relative;background:var(--surface);border:1px solid var(--line);
  border-left:3px solid var(--ink-2);border-radius:var(--radius);padding:var(--s-2) var(--s-2);font-size:var(--text-sm);
  /* A LONG SERVICE NAME MUST BREAK RATHER THAN WIDEN THE COLUMN. `pipeline-engine`
     and `redpanda-console` are wider than a 118px column, and a grid track sized
     with minmax() grows to fit its content — so without this the six columns
     silently become eight hundred pixels again and the min-width above does
     nothing. `min-width:0` is the half everyone forgets: a grid item's automatic
     minimum size is its content, not zero. */
  min-width:0;overflow-wrap:anywhere}
.node.healthy{border-left-color:var(--ok);background:var(--ok-soft)}
.node.degraded{border-left-color:var(--wait);background:var(--wait-soft)}
.node.fault{border-left-color:var(--stop);background:var(--stop-soft)}
/* SOLID BORDER, unlike .node.unknown's dashes and no dimming: this box reports
   real counts and is not a placeholder for something unwritten. */
.node.external{border-left-color:var(--accent);background:var(--accent-soft)}
.node.unknown{border-style:dashed;border-left-style:solid;opacity:.75}
.node.external{background:transparent;border-left-width:1px}
.node-h{display:flex;align-items:center;gap:var(--s-2)}
.node-h b{font-weight:600;font-size:var(--text-sm)}
.dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--ink-2);flex:none}
.healthy .dot{background:var(--ok)}.degraded .dot{background:var(--wait)}
.external .dot{background:var(--accent)}
.fault .dot{background:var(--stop)}
.node-d{color:var(--ink-2);font-size:var(--text-xs);margin-top:.1rem}
.node-s{font-size:var(--text-xs);margin-top:var(--s-1);font-weight:600}
.healthy .node-s{color:var(--ok)}.degraded .node-s{color:var(--wait)}
.fault .node-s{color:var(--stop)}.unknown .node-s{color:var(--ink-2)}
.node-s .why{font-weight:400;color:var(--ink-2)}
/* Where the statistics will go. Empty renders as nothing rather than as a gap. */
.node-stats{display:flex;flex-wrap:wrap;gap:var(--s-2);margin-top:var(--s-1)}
.node-stats:empty{display:none}
.node-stats span{display:flex;flex-direction:column;font-size:var(--text-xs);color:var(--ink-2);
  text-transform:uppercase;letter-spacing:.03em}
.node-stats b{font-size:var(--text-base);color:var(--ink);font-variant-numeric:tabular-nums}

.who{margin-left:auto;font-size:var(--text-base);display:flex;align-items:center;gap:var(--s-2)}
.who .note{color:var(--ink-2);font-size:var(--text-xs)}

/* The warn colour marks the block; it does not set the body text. --warn on
   --warnbg is 4.84:1 in light theme — over the AA line but thin for a dense
   explanatory paragraph, and these blocks carry the longest prose on the page.
   The border and the bold lead carry the semantic, the sentences use --fg
   (17.8:1 light, 12.9:1 dark), which is what the reader is actually here for. */
.ierr{background:var(--wait-soft);border:1px solid var(--wait);border-left:3px solid var(--wait);
  color:var(--ink);padding:var(--s-2) var(--s-3);border-radius:var(--radius)}
.ierr>b:first-child{color:var(--wait)}
/* The signed-out gate. Deliberately sparse: it is the whole page for anyone
   without a session, and everything it does not say is the point (CON-AUT-007). */
.gate{max-width:44rem;margin:var(--s-8) auto;padding:var(--s-5);border:1px solid var(--line);border-radius:var(--radius-lg)}
.gate h2{font-size:var(--text-lg);margin:0 0 var(--s-2)}
.gate p{font-size:var(--text-base);margin:var(--s-2) 0}
.gate .btn{margin:var(--s-1) var(--s-1) 0 0}
.row{display:flex;gap:var(--s-2);flex-wrap:wrap;margin:var(--s-2) 0}
.row input{font:inherit;padding:var(--s-1) var(--s-2);border:1px solid var(--line);border-radius:var(--radius);background:transparent;color:inherit}
.act{white-space:nowrap;display:flex;gap:var(--s-1);align-items:center}
.act select{font:inherit;font-size:var(--text-base)}
.role{font-size:var(--text-sm);border:1px solid var(--line);border-radius:var(--radius);padding:.1rem var(--s-2)}
.role a{text-decoration:none;color:var(--ink-2)}
tr.sel{outline:2px solid var(--ok);outline-offset:-2px}
.state.active{color:var(--ok);border-color:currentColor}
.state.suspended{color:var(--wait);border-color:currentColor}
h3{font-size:var(--text-lg);margin:var(--s-4) 0 var(--s-2)}
h3 .muted{font-size:var(--text-xs);font-weight:400}
.small{font-size:var(--text-xs)}
.state.removed{color:var(--ink-2);border-style:dashed}

/* Identity administration — CON-IDN-013..024.
   Native <dialog>: showModal() gives the focus trap, the Escape handler and the
   focus restore that CON-IDN-024 wants, without a hand-rolled version to drift. */
.dlg{border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);color:var(--ink);
  padding:var(--s-4) var(--s-4);max-width:46rem;width:calc(100% - 2rem);font:inherit}
.dlg::backdrop{background:var(--backdrop)}
.dlg h3{margin:0 0 var(--s-2)}
.dlg h4{font-size:var(--text-base);margin:var(--s-2) 0 var(--s-1)}
.dlg p{margin:var(--s-2) 0;font-size:var(--text-base)}
.dlg ul{margin:var(--s-1) 0 var(--s-1) var(--s-4);padding:0;font-size:var(--text-sm)}
.dlg label{display:block;margin:var(--s-3) 0;font-size:var(--text-base)}
/* type=email and type=url are listed explicitly: `input:not([type])` does not
   match them, so a typed input silently fell out of the block layout and sat
   inline beside its label while every other field stacked. */
.dlg input[type=text],.dlg input[type=email],.dlg input[type=url],
.dlg input:not([type]),.dlg textarea,.dlg select{
  display:block;width:100%;margin-top:var(--s-1);font:inherit;padding:var(--s-2) var(--s-2);
  border:1px solid var(--line);border-radius:var(--radius);background:transparent;color:inherit}
.dlg input[readonly]{color:var(--ink-2);background:color-mix(in srgb,var(--ink) 5%,transparent)}
.dlg menu{display:flex;gap:var(--s-2);justify-content:flex-end;margin:var(--s-4) 0 0;padding:0}
/* The consequence of an irreversible or asymmetrical action, not styled as an
   aside — CON-IDN-014's whole point is that it must not read as a detail. */
.warnp{background:var(--wait-soft);border-left:3px solid var(--wait);color:var(--wait);
  padding:var(--s-2) var(--s-3);border-radius:0 var(--radius) var(--radius) 0;font-size:var(--text-sm)}
.dlg fieldset{border:1px solid var(--line);border-radius:var(--radius-lg);padding:var(--s-2) var(--s-3);margin:var(--s-3) 0}
.dlg legend{font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.05em;color:var(--ink-2)}
.rolechk{display:flex;gap:var(--s-2);align-items:flex-start;margin:var(--s-2) 0}
.rolechk input{margin-top:var(--s-1);flex:none}
.rolechk span{display:flex;flex-direction:column}
.rolechk em{font-style:normal;color:var(--ink-2);font-size:var(--text-xs)}
.eff{border-top:1px dashed var(--line);padding-top:var(--s-2)}
.idty div{display:flex;gap:var(--s-2);align-items:baseline;font-size:var(--text-base)}
.idty span{color:var(--ink-2);font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.04em}
/* Platform grants — staff authority, set apart from the tenant roles above. */
.grants{border-top:1px solid var(--line);margin-top:var(--s-3);padding-top:var(--s-2)}
.grantrow{display:flex;flex-wrap:wrap;gap:var(--s-2) var(--s-3);align-items:center;
  padding:var(--s-2) 0;border-bottom:1px solid var(--line);font-size:var(--text-base)}
.grantname{display:flex;flex-direction:column;flex:1 1 16rem}
.grantname em,.grantstate em,.grantwhy{font-style:normal;color:var(--ink-2);font-size:var(--text-xs)}
.grantstate{display:flex;flex-direction:column;align-items:flex-start;gap:var(--s-1);flex:0 1 12rem}
.grantact{flex:0 1 auto;max-width:16rem;margin-left:auto;text-align:right}
.grantconfirm{padding:var(--s-2) 0 var(--s-3)}
.grantconfirm label{margin:var(--s-2) 0}
.grantbtns{display:flex;gap:var(--s-2);justify-content:flex-end}
.grantnote{color:var(--ok);font-size:var(--text-sm)}

/* CON-NAV-011: persistent, non-dismissible, and naming the tenant, the elevation
   identifier and the remaining window. It is not possible to operate inside an
   elevated session without this visible, so it sits above the content it guards. */
.elev{position:sticky;top:0;z-index:5;display:flex;gap:var(--s-2);align-items:center;
  flex-wrap:wrap;background:var(--wait-soft);border:1px solid var(--wait);color:var(--wait);
  padding:var(--s-2) var(--s-3);border-radius:var(--radius);font-size:var(--text-sm);margin:var(--s-3) 0}
.elev code{background:transparent}
.elev .btn{margin-left:auto}
#igate{border:1px solid var(--line);border-left:3px solid var(--wait);
  border-radius:0 var(--radius-lg) var(--radius-lg) 0;padding:var(--s-2) var(--s-4) var(--s-4);margin:var(--s-4) 0}
#igate .gatep{font-size:var(--text-base);max-width:70ch}

/* System Health card navigation — CON-SYS-002..010.
   A linked card is an <a>; an unlinked one is an <article>, so the pointer
   cursor and hover lift exist only where there is somewhere to go (CON-SYS-008).
   The affordance IS the difference. */
a.node.link{display:block;text-decoration:none;color:inherit;cursor:pointer}
a.node.link:hover{border-color:var(--ok);
  box-shadow:var(--shadow);transform:translateY(-1px)}
a.node.link:focus-visible{outline:2px solid var(--ok);outline-offset:2px}
a.node.link .go{position:absolute;top:.45rem;right:.5rem;
  font-size:var(--text-sm);color:var(--ink-2);opacity:.55;transition:opacity .12s}
a.node.link:hover .go{opacity:1}
/* CON-SYS-010: leaving the console is marked before the click, not after. */
a.node.leaves .go.ext{color:var(--wait);opacity:.75}
a.node.leaves:hover{border-color:var(--wait)}
/* CON-SYS-008: say why there is nowhere to go, rather than staying silent. */
.node-nolink{font-size:var(--text-xs);color:var(--ink-2);margin-top:var(--s-1);font-style:italic}

/* ── Buttons ──────────────────────────────────────────────────────────────────
   No button style lives here any more (A2, build plan 2026-11-07): every admin
   button wears the Front Office's `.btn` and its kind — primary, secondary, go,
   danger, link — drawn by desk/desk.css (STYLE.md "Buttons"). The ~17 classes of
   their own (`.linkish`, `.danger`, `.prsecondary`, the whole-view `button{}`
   fills…) are gone. A row of them keeps its spacing: */
.row .btn,.act .btn,.danger-zone .btn{margin-right:var(--s-1)}

/* ── The fan ──────────────────────────────────────────────────────────────────
   Tenant detail opens as a row inside the tenants table, directly beneath the
   tenant it belongs to, rather than as a section further down the page. The
   inset rule and the tinted ground are what say "this belongs to the row above";
   without them a full-width detail block reads as a sibling of the table. */
tr.fanrow > td{padding:0;border-bottom:1px solid var(--line);
  background:var(--surface-2);border-left:3px solid var(--accent)}
tr.fanrow #idetail{padding:var(--s-4) var(--s-5) var(--s-5)}
/* The row above is the fan's handle, so it loses its own separator — the two
   read as one object rather than as two rows that happen to touch. */
tr.sel > td{border-bottom:0}

/* The way out of the tenant plane. Sits above the tenant-scoped sections so it
   is reachable without scrolling past the data it dismisses. */
.planeout{margin:var(--s-1) 0 var(--s-3)}

/* ── Audit records (AUD-QRY-001) ──────────────────────────────────────────────
   Copies the queue exemplar: tokens only, dense rows, tinted status pills. */

/* AUD-QRY-007's completeness statement. Deliberately NOT muted and NOT a footer
   note — it is the difference between "nothing happened" and "you were not shown
   everything", and a reader who misses it draws the wrong conclusion from a
   screen that otherwise looks authoritative. Warning treatment, above the table. */
.partial{background:var(--wait-soft);border:1px solid var(--wait);color:var(--wait);
  border-left:3px solid var(--wait);border-radius:0 var(--radius) var(--radius) 0;
  padding:var(--s-2) var(--s-3);margin:var(--s-3) 0;font-size:var(--text-sm);max-width:100ch}
.partial b{font-weight:600}

/* `denied` is the platform working, not a fault. It must not share red with a
   failure, or an auditor scanning for problems stops on every enforced rule. */
.state.denied{background:color-mix(in srgb,var(--wait) 16%,transparent);color:var(--wait)}

#view-audit table{table-layout:auto}
#view-audit td{vertical-align:top}
#view-audit .filters{flex-wrap:wrap;align-items:end}
#view-audit .filters input[type=search]{font:inherit;font-size:var(--text-sm);
  padding:var(--s-1) var(--s-2);border:1px solid var(--line);
  border-radius:var(--radius);background:var(--surface);color:var(--ink)}

/* ── Configuration, Usage, and the audit registry ─────────────────────────────
   Tokens only (UI.md §2). The three views share one vocabulary deliberately:
   a revision state, a meter row and an event type are all "a fact with a
   qualifier", and giving each its own treatment would be three dialects. */

/* Revision state. `draft` and `validated` are NOT styled as success — neither is
   in effect, and CON-CFG-003 exists because a saved draft that looks like a
   published one is the whole problem. Only `published` gets the ok tint. */
.state.cfg-draft{background:color-mix(in srgb,var(--ink-2) 14%,transparent);color:var(--ink-2)}
.state.cfg-validated{background:color-mix(in srgb,var(--wait) 16%,transparent);color:var(--wait)}
.state.cfg-published{background:color-mix(in srgb,var(--ok) 16%,transparent);color:var(--ok)}
.state.cfg-superseded,.state.cfg-rolled_back{
  background:transparent;border-color:var(--line);color:var(--ink-2)}

#view-config section,#view-usage section{margin:var(--s-6) 0}
#view-config h3,#view-usage h3{display:flex;align-items:baseline;gap:var(--s-3);flex-wrap:wrap}
#view-config textarea{font:var(--text-sm)/1.4 ui-monospace,monospace;width:100%;
  padding:var(--s-2);border:1px solid var(--line);border-radius:var(--radius);
  background:transparent;color:inherit}
#view-config label{display:block;margin:var(--s-3) 0;font-size:var(--text-sm)}
#view-config input[type=text],#view-config input:not([type]),#cnewrev input{
  font:inherit;padding:var(--s-1) var(--s-2);border:1px solid var(--line);
  border-radius:var(--radius);background:transparent;color:inherit}
.checklist{list-style:none;margin:var(--s-3) 0;padding:0;max-height:16rem;overflow-y:auto}
.checklist li{padding:var(--s-1) 0}
.checklist label{display:flex;gap:var(--s-2);align-items:baseline}

/* A figure that is NOT known. CON-MTR-009: unknown and zero are different facts,
   so they get different treatments and the unknown one carries its reason. It is
   deliberately not styled as an error — nothing is broken, the number is simply
   not available, and dressing it in red would send someone looking for a fault. */
.figs{display:flex;gap:var(--s-5);flex-wrap:wrap;margin:var(--s-4) 0}
.fig{display:flex;flex-direction:column;min-width:11rem;padding:var(--s-3) var(--s-4);
  border:1px solid var(--line);border-radius:var(--radius)}
.fig b{font-size:var(--text-lg);font-weight:600;font-variant-numeric:tabular-nums}
.fig b i{font-style:normal;font-size:var(--text-sm);color:var(--ink-2);margin-left:.2em}
.fig span{font-size:var(--text-xs);color:var(--ink-2);text-transform:uppercase;letter-spacing:.04em}
/* Deliberately NOT .errstate. Nothing is broken when a figure is unavailable —
   the number simply is not known — and painting it red sends an operator looking
   for a fault that does not exist. Dashed and muted says "absent"; red says
   "wrong", and they are different claims. */
.notice{border:1px dashed var(--line);border-left:3px solid var(--ink-2);
  border-radius:0 var(--radius) var(--radius) 0;padding:var(--s-3) var(--s-4);
  margin:var(--s-4) 0;max-width:70ch}
.notice p{margin:var(--s-2) 0;color:var(--ink-2)}
.fig.unavail{border-style:dashed}
.fig.unavail b{font-size:var(--text-base);color:var(--ink-2);font-style:italic}
.fig .why{font-size:var(--text-xs);color:var(--ink-2);margin-top:var(--s-1);
  font-style:normal;max-width:22ch}

/* "This part is real." The console mixes live services with stubs, and a reader
   cannot tell by looking — so the live parts say so rather than leaving the
   stubbed parts to be discovered. */
.livechip{font-size:var(--text-xs);padding:.1rem var(--s-2);border-radius:var(--radius);
  background:color-mix(in srgb,var(--ok) 14%,transparent);color:var(--ok);
  text-transform:none;letter-spacing:0;font-weight:600}

.evts{display:flex;flex-wrap:wrap;gap:var(--s-2);margin:var(--s-3) 0}
.evt{font-size:var(--text-xs);padding:.15rem var(--s-2);border-radius:var(--radius);
  border:1px solid var(--line);font-family:ui-monospace,monospace}
/* Critical is a stronger claim than "important": AUD-CAP-004 forbids the action
   from completing until the event is durably persisted. */
.evt.crit{border-color:var(--wait);color:var(--wait);font-weight:600}
#aregbox{margin:var(--s-4) 0;padding:var(--s-3) var(--s-4);border:1px solid var(--line);
  border-radius:var(--radius)}
#aregbox summary{cursor:pointer;font-weight:600;font-size:var(--text-sm)}

/* The two irreversible party actions (PTY-CON-004, PTY-CON-012).
   Set apart deliberately: archiving is one row above, fully reversible, and a
   click away. Making these look the same as Save is how the wrong one gets
   pressed — so they get a border, a warning ground and their own heading. */
.danger-zone{margin-top:var(--s-6);padding:var(--s-3) var(--s-4);
  border:1px solid var(--stop);border-left:3px solid var(--stop);
  border-radius:0 var(--radius) var(--radius) 0;
  background:color-mix(in srgb,var(--stop) 6%,transparent);max-width:70ch}
.danger-zone h4{margin:0 0 var(--s-1);color:var(--stop);font-size:var(--text-sm)}
.danger-zone p{margin:0 0 var(--s-3)}

/* Collapsible sections (<details>). The marker and the heading sit on one line —
   an <h3> inside a <summary> is block-level and would otherwise wrap under the
   triangle. `list-style` is the Firefox spelling, `::-webkit-details-marker` the
   Safari one; both are needed and neither is sufficient. */
.fold{margin:var(--s-4) 0}
.fold > summary{cursor:pointer;list-style-position:outside}
.fold > summary > h3{display:inline-block;margin:0 0 0 var(--s-1);vertical-align:middle}
.fold > summary:hover > h3{color:var(--accent-ink)}
.fold > summary:focus-visible{outline:var(--focus-width) solid var(--accent);
  outline-offset:var(--focus-offset);border-radius:var(--radius)}
.fold[open] > summary{margin-bottom:var(--s-2)}

/* Message preview. A dialog rather than a page: previewing is a glance at one
   row, and routing to it would lose the queue's filter and scroll position. */
#qpreview{max-width:56rem;width:92vw;border:1px solid var(--line);border-radius:var(--radius);
  background:var(--surface-2);color:var(--ink);padding:0}
#qpreview::backdrop{background:var(--backdrop)}
#qpreview article{padding:var(--s-4);max-height:82vh;overflow-y:auto}
#qpreview h3{margin:0 0 var(--s-1);font-size:var(--text-lg);overflow-wrap:anywhere}
#qpreview h4{margin:var(--s-4) 0 var(--s-2);font-size:var(--text-xs);text-transform:uppercase;
  letter-spacing:.06em;opacity:.75}
.chainmsg{border-left:2px solid var(--line);padding-left:var(--s-3);margin-bottom:var(--s-3)}
/* pre-wrap, not pre: a quoted chain has 80-column hard wraps AND long unbroken
   URLs, and only one of those should force a horizontal scrollbar. */
.pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--text-xs);margin:0;
  background:var(--surface-3);padding:var(--s-2);border-radius:var(--radius)}

/* Health-card badges. Type on the left, UI on the right of it.
   These are attributes of the component, not its health. */
.node-badges{display:flex;flex-wrap:wrap;gap:var(--s-1);margin-top:var(--s-1)}
.node-badges:empty{display:none}
/* FILLED, AND THE FILL IS DERIVED FROM THE TEXT COLOUR rather than written out
   per badge. `currentColor` means each rule below sets ONE value — its hue — and
   the border and the ground follow from it, so a new badge type cannot arrive
   with a colour that matches nothing, and a hue that changes cannot leave a
   hardcoded background behind pointing at the old one.

   A TINT, NOT A BLOCK. 12% is enough to read as a chip and light enough that the
   text on top keeps the contrast it had when these were outlines — a solid fill
   would need a second, lighter foreground for every one of them, and the card's
   own background already carries STATE, which is what an operator scans first.

   `transparent` rather than a surface token so the mix sits over whatever ground
   the card has in that state, in either theme, without naming any of them. */
.badge{font-size:var(--text-xs);line-height:1.5;padding:0 var(--s-2);border-radius:var(--radius);
  border:1px solid currentColor;text-transform:uppercase;letter-spacing:.05em;
  font-weight:600;opacity:.85;white-space:nowrap;
  background:color-mix(in srgb, currentColor 12%, transparent)}
/* One hue per answer to "what do I do about it", and none of them reuse the
   health palette — a badge that borrowed --bad would read as an alert. */
.badge.t-native{color:var(--accent)}
.badge.t-container{color:var(--ink-2)}
.badge.t-external{color:var(--ink-2);border-style:dashed}
/* PLANNED KEEPS ITS LOWER OPACITY, which dims the new ground along with the text
   and is the right outcome: nothing runs, so it should recede from a page about
   what is running. Its fill is lifted to compensate for that dimming, so the chip
   is still visibly a chip rather than an outline that lost its fill. */
.badge.t-planned{color:var(--ink-2);opacity:.6;border-style:dotted;
  background:color-mix(in srgb, currentColor 18%, transparent)}
/* The UI badge is the one that says "you can go there", so it matches the link
   affordance the card already uses rather than introducing a third signal. */
.badge.b-ui{color:var(--accent-ink)}

/* The tenant, named, in the chrome. It was `tenant c565529b` in the muted note
   style; the tenant is the single most important piece of context on the page
   for anyone who administers more than one, so it reads as a value. */
.who .tenantname{font-weight:600;padding:var(--s-1) var(--s-3);
  border-radius:var(--radius);background:var(--surface-3);white-space:nowrap}

/* Platform authority, marked across the page rather than in a corner.
   Deliberately NOT --bad: holding platform authority is not a fault and must not
   read as one, or it becomes the banner everybody learns to ignore. */
.planebanner{display:flex;gap:var(--s-2);flex-wrap:wrap;align-items:baseline;
  font-size:var(--text-sm);padding:var(--s-2) var(--s-4);margin:0 0 var(--s-4);
  border:1px solid var(--accent);border-left:3px solid var(--accent);
  border-radius:0 var(--radius) var(--radius) 0;
  background:color-mix(in srgb,var(--accent) 8%,transparent)}
.planebanner b{color:var(--accent)}
/* A second, quieter signal so the state survives scrolling past the banner. */
body.has-platform-authority header{border-bottom-color:var(--accent)}

/* The principal, by email. Regular weight — the tenant is the pill because the
   tenant is what changes and what a mistake lands in; who you are does not. */
.who .principal{color:var(--ink)}

/* The tenant chip as the elevation control.
   A button only for a principal who can use one — CON-NAV-003's omit-don't-disable
   applies to affordances too, and a greyed control would disclose that a platform
   plane exists to someone who holds none of it. */
.tenantname.switchable{font:inherit;color:inherit;background:none;cursor:pointer;
  border:1px solid var(--line);border-radius:var(--radius);padding:.15rem var(--s-2);
  display:inline-flex;align-items:center;gap:var(--s-1)}
.tenantname.switchable::after{content:"";width:.3rem;height:.3rem;
  border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:rotate(45deg) translateY(-.08rem);opacity:.7}
.tenantname.switchable:hover,.tenantname.switchable:focus-visible{background:var(--surface-3)}

/* An ACTIVE elevation is not the same state as merely holding platform authority,
   and the page says so rather than leaving the band one colour for both. This is
   the one moment an operator is acting inside a tenant that is not theirs. */
body.is-elevated .planebanner{background:var(--wait);color:var(--on-accent)}
body.is-elevated .tenantname.switchable{border-color:var(--wait)}

/* NATIVE SELECT POPUPS DO NOT INHERIT THE PAGE'S BACKGROUND.
   `.dlg select` sets `background:transparent;color:inherit`, which is right for
   the closed control and wrong for the list it opens: the popup is painted by the
   platform on a system-white surface while the options keep the inherited colour.
   In dark mode that is light-grey text on white — unreadable, and invisible to
   anyone reviewing in one theme.
   Both properties are set explicitly on `option`, so the popup is legible in
   either theme rather than in whichever one was open at the time. */
.dlg select option,select option{background:var(--surface);color:var(--ink)}

/* An elevated chip is the tenant you are WORKING IN, borrowed rather than yours.
   Marked distinctly from the ordinary chip because it is the one element an
   operator glances at to answer "where am I", and the wrong answer there is the
   most expensive wrong answer on the page. */
.tenantname.elevated{border-color:var(--wait);
  background:color-mix(in srgb,var(--wait) 16%,transparent);
  font-weight:600}

/* A link-button on the elevated band's amber takes the band's own ink, keeping the
   underline that marks it as a control. "End now" was there all along and could
   not be read. */
body.is-elevated .planebanner .btn.link{color:var(--on-accent)}

/* Publication pause. Loud when paused, because a paused tenant whose operator has
   forgotten is a queue that fills with work nobody is doing — and the whole point
   of ING-EVT-007 is that this state must not be mistaken for a broken relay. */
.pausebar{display:flex;align-items:center;gap:var(--s-3);margin-bottom:var(--s-4);
  padding:var(--s-2) var(--s-3);border:1px solid var(--line);border-radius:var(--radius);
  font-size:var(--text-sm)}
.pausebar.paused{border-color:var(--wait);background:var(--wait-soft);color:var(--wait);
  font-weight:600}
/* Publication state could not be read. Deliberately NOT styled like "on":
   grey and muted, because the bar is reporting that it does not know rather
   than reporting good news (NFR-USA-004 — the text carries it either way). */
.pausebar.unknown{border-style:dashed;color:var(--ink-2)}
.pausebar .btn{margin-left:auto}

/* The audit spool tile on the Dashboard (AUD-CAP-005).
   Colour is never the only carrier: the count and its explanation are text
   (NFR-USA-004), and the grey "not observable" state reads as a sentence
   rather than as an absence of colour. */
.spool { border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius-lg);
         padding: var(--s-2) var(--s-3); margin: 0 0 var(--s-3); background: var(--surface-2); }
.spool h4 { margin: 0 0 var(--s-1); font-size: var(--text-xs); text-transform: uppercase;
            letter-spacing: .04em; color: var(--ink-2); }
.spool .srow { display: grid; grid-template-columns: 9rem 9.5rem 1fr; gap: var(--s-2);
               align-items: baseline; margin: var(--s-1) 0; }
.spool .sname { font-size: var(--text-sm); font-weight: 600; }
.spool .sval  { font-size: var(--text-base); font-weight: 600; }
.spool .sval.ok      { color: var(--ok); }
.spool .sval.bad     { color: var(--stop); }
.spool .sval.unknown { color: var(--ink-2); }
@media (max-width: 700px) { .spool .srow { grid-template-columns: 1fr; gap: .1rem; } }
.spool .why { margin: 0; font-size: var(--text-sm); color: var(--ink-2); line-height: 1.45; }
.spool.healthy { border-left-color: var(--ok); }
.spool.fault   { border-left-color: var(--stop); }
.spool.degraded { border-left-color: var(--wait); }
.spool.unknown { border-left-color: var(--line); }

/* Import view (ING-FIL-001). Deliberately small: the view reuses .row, .muted
   and .small like every other view, and adds only what has no equivalent. */

/* One choice per line with its consequence beside it. The consequence is the
   point — "evaluation" means nothing on its own, and the sentence that follows
   it is what stops somebody picking backfill for a live mailbox. */
.radio{display:flex;gap:var(--s-2);align-items:flex-start;margin:var(--s-2) 0;line-height:1.5}
.radio input{margin-top:var(--s-1);flex:none}
.radio em{color:var(--ink-2);font-style:normal}

/* The note explaining why live is absent. Bordered rather than muted-only: it
   is the reason an option somebody may go looking for is not there. */
.note{border-left:3px solid var(--line);padding:var(--s-2) var(--s-3);margin:var(--s-3) 0 0;
      color:var(--ink-2);font-size:var(--text-sm);line-height:1.5}

/* Per-file outcome. Colour is never the only carrier (NFR-USA-004) — the word
   is the label and the title says what it means for the reader. */
.chip{display:inline-block;font-size:var(--text-xs);line-height:1.6;padding:0 var(--s-2);
      border:1px solid var(--line);border-radius:var(--radius);white-space:nowrap}
.chip.ok{color:var(--ok);border-color:var(--ok)}
.chip.warn{color:var(--wait);border-color:var(--wait)}
.chip.bad{color:var(--stop);border-color:var(--stop)}
.chip.muted{color:var(--ink-2)}

/* Wide tables scroll inside their own box rather than the page. */
.scroll{overflow-x:auto;max-width:100%}

/* Bulk selection on the ingestion queue. Appears only when something is
   selected — a permanently visible bar showing "0 selected" is furniture. */
.qbulk{display:flex;gap:var(--s-2);align-items:center;flex-wrap:wrap;
       padding:var(--s-2) var(--s-3);margin:0 0 var(--s-2);border:1px solid var(--line);
       border-radius:var(--radius-lg);background:var(--surface-2)}
.qbulk #qbulk-count{font-weight:600}
th.sel,td.sel{width:1.6rem;text-align:center;padding-right:0}

/* The wordmark is a link to the principal's landing view. It must not read as
   body-copy link — it is a title that happens to navigate — so it inherits
   colour and gains its affordance on hover. */
header h1 a{color:inherit;text-decoration:none;display:inline-flex}
/* Underline was the hover affordance while this was a word; it does nothing to
   an SVG. Opacity rather than colour, because --link is the accent and the
   accent is spoken for in this bar. */
header h1 a:hover{opacity:.65}
header h1 a:focus-visible{outline:var(--focus-width) solid var(--accent);outline-offset:3px}

/* ── Tenant-plane dashboard ───────────────────────────────────────────────────
   Six rolled-up cards, reusing the health map's state colours and its `.hsum`
   summary strip rather than inventing a second status palette. That reuse is the
   point: two pages that disagree about what amber looks like is the drift UI.md
   opens with, and status colour is the worst place to have it.

   Where this deliberately differs from `.node`: these cards CONTAIN a list of
   members, so the state tint sits on the card and the member rows carry only a
   dot and a word. Tinting eleven rows inside six tinted cards would leave nothing
   for the eye to rank. Borders for structure, no shadow — UI.md §4 and §9. */
.tdgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
        gap:var(--s-4);margin:var(--s-5) 0}

.tdcard{border:1px solid var(--line);border-left-width:4px;
        border-left-color:var(--ink-2);border-radius:var(--radius);
        padding:var(--s-4);background:var(--surface)}
.tdcard.healthy{border-left-color:var(--ok);background:var(--ok-soft)}
.tdcard.degraded{border-left-color:var(--wait);background:var(--wait-soft)}
.tdcard.fault{border-left-color:var(--stop);background:var(--stop-soft)}
/* Dashed says "absent", the way it does on the health map. Red would send
   somebody looking for a fault that does not exist. */
.tdcard.unknown{border-style:dashed;border-left-style:solid}

.tdhead{display:flex;align-items:baseline;gap:var(--s-3);flex-wrap:wrap}
.tdhead h3{margin:0;font-size:var(--text-lg);font-weight:600}
/* The roll-up word, and it is a WORD as well as a colour — NFR-USA-004. */
.tdroll{margin-left:auto;display:flex;align-items:center;gap:var(--s-1);
        font-size:var(--text-xs);font-weight:600;text-transform:lowercase;
        color:var(--ink-2)}
.healthy>.tdhead .tdroll{color:var(--ok)}
.degraded>.tdhead .tdroll{color:var(--wait)}
.fault>.tdhead .tdroll{color:var(--stop)}
.tdlead{margin:var(--s-1) 0 0;font-size:var(--text-xs);color:var(--ink-2);max-width:44ch}

/* The figures. Tabular numerals so a count changing on the 15s tick does not
   shift the row it sits in — UI.md §4. */
.tdstats{display:flex;flex-wrap:wrap;gap:var(--s-5);margin-top:var(--s-3);
         padding-top:var(--s-3);border-top:1px solid var(--line)}
.tdstat{display:flex;flex-direction:column;gap:2px}
/* The SAME figure treatment as the queue's backlog tiles — --text-lg, bold,
   tabular, an uppercase label under it. Matched rather than re-chosen: a second
   big-number style is how "screen seven invents a spacing value" starts. */
.tdstat b{font-size:var(--text-lg);font-weight:600;line-height:1.2;
          font-variant-numeric:tabular-nums;color:var(--ink)}
/* A figure that is NOT known. CON-MTR-009: unknown and zero are different facts,
   so they get different treatments and this one carries its reason. Muted, never
   red — "nobody could ask" is not a fault. */
.tdstat b.unk{color:var(--ink-2);font-weight:400;cursor:help}
.tdstat span{font-size:var(--text-xs);color:var(--ink-2);
             text-transform:uppercase;letter-spacing:.04em}

/* The members behind the roll-up. Always rendered: a card that says "fault" over
   six services and does not say which one has withheld the only part of the
   answer that shortens the search. */
.tdmembers{margin-top:var(--s-3);padding-top:var(--s-3);border-top:1px solid var(--line)}
.tdrow{display:grid;grid-template-columns:.6rem 9.5rem auto;gap:var(--s-2);
       align-items:baseline;margin:0 0 var(--s-2);font-size:var(--text-xs)}
.tdrow:last-child{margin-bottom:0}
/* `.dot` and its state colours are already defined globally, and reusing them is
   the point — but the global rules are `.healthy .dot`, which match on any
   ANCESTOR carrying the state. Inside a green card that painted every member dot
   green, including the members that were grey, so the one row explaining why the
   card was not fully measured lost the only mark saying so. These re-state the
   member's own state at a specificity that beats the card's. */
.tdcard .tdrow .dot{background:var(--ink-2);align-self:center}
.tdcard .tdrow.healthy .dot{background:var(--ok)}
.tdcard .tdrow.degraded .dot{background:var(--wait)}
.tdcard .tdrow.fault .dot{background:var(--stop)}
/* BUILD PROGRESS, which is a different question from health and must not be
   mistaken for it. The bar is deliberately thin, unsaturated and OUTSIDE the
   status colour vocabulary — no green, no amber, no red — because a card whose
   health is green and whose build bar is mostly empty is a normal and common
   state, and a red-looking bar there would read as a fault.

   THREE SEGMENTS AND THE THIRD IS THE POINT. `unknown` is hatched rather than
   coloured: it means nobody has assessed that phase, and 36 of this repository's
   phases are in that state. Painting it as `open` would assert somebody looked. */
.pgbar{grid-column:2 / -1;display:flex;height:4px;border-radius:var(--radius);overflow:hidden;
       background:var(--line);margin-top:2px}
.pgbuilt{background:var(--ink);opacity:.55}
.pgopen{background:var(--line)}
.pgunk{background:repeating-linear-gradient(45deg,var(--line),var(--line) 2px,
       transparent 2px,transparent 4px)}
.pgnum{grid-column:2 / -1;font-size:var(--text-xs);color:var(--ink-2);
       font-variant-numeric:tabular-nums}
.tdname{font-weight:600;color:var(--ink)}
.tdstate{font-weight:600;color:var(--ink-2)}
.tdcard .tdrow.healthy .tdstate{color:var(--ok)}
.tdcard .tdrow.degraded .tdstate{color:var(--wait)}
.tdcard .tdrow.fault .tdstate{color:var(--stop)}
/* The reason wraps onto its own line below ~34rem rather than being truncated:
   on this page the `why` IS the content, and "derived — a service that checks
   this reports ready" truncated to "derived —" says nothing at all. */
.tdrow .why{grid-column:3;font-weight:400;color:var(--ink-2)}
@media (max-width:34rem){
  .tdrow{grid-template-columns:.6rem auto}
  .tdrow .why{grid-column:1/-1;padding-left:var(--s-3)}
}

/* The counts banner. Two causes, two treatments, and neither is red: a capped
   projection and an unreadable one are both limits on what can be said, not
   faults in the platform. */
.tdnote{margin:0 0 var(--s-4);padding:var(--s-2) var(--s-3);border-radius:var(--radius);
        font-size:var(--text-xs);border:1px solid var(--line);color:var(--ink-2)}
.tdnote.capped{border-left:4px solid var(--wait);background:var(--wait-soft);color:var(--ink)}
.tdnote.unknown{border-style:dashed;border-left:4px solid var(--ink-2)}

/* Infrastructure consoles in the System menu. Marked as leaving, on the same
   reasoning as the health map's `.leaves` cards (CON-SYS-010): a new tab and a
   second sign-in are coming, and an operator should know that before clicking
   rather than after landing on someone else's login form. */
nav .navsub a.navext .ext{margin-left:.4em;color:var(--wait);opacity:.75;font-size:.9em}
nav .navsub a.navext:hover{border-color:var(--wait)}

/* THE SITE FOOTER. Quiet by design: it is provenance, not navigation, and it
   competes with nothing on the page. `--muted` is the same token every view
   caption uses, so it reads as the same KIND of text rather than as a new one.

   OUTSIDE THE MAIN COLUMN'S FLOW but inside its width, so it lines up with the
   content above rather than floating against the viewport edge.

   NOT FIXED TO THE BOTTOM. A fixed footer on a long audit table covers a row,
   and this is worth less than any row it would cover. */
.sitefoot{
  /* No horizontal padding and no max-width: `body` already sets the page gutter
     with var(--s-5), and a second inset here would make the footer start further
     in than the content it sits under. It lines up with the tables above. */
  margin:2.5rem 0 .5rem;
  padding:var(--s-3) 0 0;
  border-top:1px solid var(--line);
  color:var(--ink-2);
  font-size:var(--text-sm);
  display:flex;
  flex-wrap:wrap;
  gap:var(--s-2);
  align-items:baseline;
}
.sitefoot .sep{opacity:.5}
/* Tabular numerals so a version and a date do not shift width between builds. */
.sitefoot .build{font-variant-numeric:tabular-nums}

/* Where the time goes (TODO #133, timespent.js): figures right-aligned in even columns. */
.tstable th.num,.tstable td.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.tstools{display:flex;gap:var(--s-2);align-items:center;flex-wrap:wrap}
