/* ═══════════════════════════════════════════════════════════════════════
   SOQUPOOL — Foundry console, stage 1 draft
   One console stylesheet for both consoles. Extends foundry.css tokens
   (iron ground, welded seams, copper = live and primary action, the three
   metals encode chains, Archivo nameplates, Martian Mono for numbers).
   Successor to foundry-console.css + foundry-admin.css + foundry-tools.css
   + wave-c.css, all retired. Served by app.html and admin.html; the stage
   previews under stage1/ load it too, so a preview and the console agree.

   Rules this sheet enforces
   · type floor 11 px: nothing a person reads to act is smaller
   · one button family: .btn (secondary) · .btn-primary (copper, one per
     band) · .btn-quiet (text) · .btn-danger (destructive, never beside a
     neutral action without a gap)
   · one feedback component: .fb, always present where a state matters
     (an all-clear line is a state, not an absence)
   · one confirmation modal: .modal replaces prompt(), alert(), confirm()
   · markup carries no styling: every inline style attribute the consoles
     carry today maps to a class in this file
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --fs-min: 11px;              /* the floor */
  --fs-ui: 12px;               /* buttons, chips, table cells */
  --fs-body: 13.5px;           /* panel prose */
  --rail-w: 264px;
}

/* ── shell ────────────────────────────────────────────────────────────── */
.console { display: grid; grid-template-columns: var(--rail-w) 1fr; min-height: 100vh; }

.rail {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--seam);
  background: linear-gradient(180deg, var(--iron-900), var(--iron-950));
  display: flex; flex-direction: column;
}
.rail-brand { display: flex; align-items: center; gap: 11px; padding: 20px 22px; border-bottom: 1px solid var(--seam); font-size: 15px; }
.rail-brand svg { width: 20px; height: 20px; }
.rail-ident { padding: 22px; border-bottom: 1px solid var(--seam); }
.rail-ident .who { color: var(--text-hi); font-weight: 600; font-size: 16px; display: block; }
.rail-ident .tier {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 8px;
  font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .14em;
  text-transform: uppercase; color: var(--soq);
  border: 1px solid color-mix(in srgb, var(--soq) 40%, transparent); padding: 4px 9px;
}
.rail-ident .tier.op { color: var(--copper); border-color: color-mix(in srgb, var(--copper) 40%, transparent); }
.rail-ident .since { display: block; margin-top: 12px; }

.rail-nav { padding: 12px 0; flex: 1; }
.rail-nav button {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 12px 22px; background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-lo); border-left: 2px solid transparent;
}
.rail-nav button:hover { color: var(--text-mid); background: var(--iron-850); }
.rail-nav button.on { color: var(--text-hi); border-left-color: var(--copper); background: var(--iron-850); }
.rail-nav button .ico { width: 15px; height: 15px; flex: none; opacity: .8; }
/* the forum lives on its own origin; the rail reaches it with a plain link */
.rail-nav a.rail-link {
  display: flex; align-items: center; gap: 13px; width: 100%; box-sizing: border-box;
  padding: 12px 22px; text-decoration: none;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-lo); border-left: 2px solid transparent;
}
.rail-nav a.rail-link:hover { color: var(--text-mid); background: var(--iron-850); }
.rail-nav a.rail-link .ico { width: 15px; height: 15px; flex: none; opacity: .8; }
.rail-nav a.rail-link .ext { margin-left: auto; font-size: 11px; opacity: .7; }
.rail-nav .badge {
  margin-left: auto; font-size: var(--fs-min); color: var(--copper);
  border: 1px solid var(--copper-dim); padding: 1px 6px; font-family: var(--font-mono);
}
.rail-nav .badge.hot { color: var(--copper-hot); border-color: var(--copper); }
.rail-foot { padding: 18px 22px; border-top: 1px solid var(--seam); display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.rail-foot a { display: block; font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-lo); padding: 4px 0; letter-spacing: .06em; }
.rail-foot a:hover { color: var(--text-hi); }
.rail-foot .theme-toggle { margin: 4px 0; }

.surface { min-width: 0; }
.surface-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px 32px; border-bottom: 1px solid var(--seam);
  background: color-mix(in srgb, var(--iron-950) 90%, transparent); backdrop-filter: blur(10px);
}
.surface-top h1 { font-variation-settings: "wdth" 116; font-weight: 700; text-transform: uppercase; font-size: 20px; color: var(--text-hi); letter-spacing: .01em; }
.pool-pulse { display: flex; gap: 24px; align-items: center; font-family: var(--font-mono); font-size: var(--fs-min); }
.pool-pulse .k { color: var(--text-lo); letter-spacing: .1em; text-transform: uppercase; }
.pool-pulse .v { color: var(--text-hi); margin-left: 7px; }
.pool-pulse .v.warn { color: var(--warn); }

/* notices that sit between the top bar and the pane share the pane gutter */
.surface-notices { padding: 16px 32px 0; display: flex; flex-direction: column; gap: 10px; }
.surface-notices:empty { display: none; }

.pane { padding: 28px 32px 64px; display: none; }
.pane.on { display: block; }
.pane-head { display: flex; align-items: baseline; gap: 14px; margin: 4px 0 22px; }
.pane-head .tick { width: 22px; height: 1px; background: var(--seam-hi); transform: translateY(-4px); }
.pane-head h2 { font-variation-settings: "wdth" 114; font-weight: 700; text-transform: uppercase; font-size: 16px; color: var(--text-mid); letter-spacing: .05em; }
.pane-head .right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.pane-lead { font-size: var(--fs-body); color: var(--text-mid); max-width: 72ch; margin: -10px 0 22px; }
.pane-lead b { color: var(--text-hi); font-weight: 600; }

/* ── type roles the consoles add to foundry's ─────────────────────────── */
.mono { font-family: var(--font-mono); }
.hi { color: var(--text-hi); }
.lo { color: var(--text-lo); }
.stamp { font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-lo); letter-spacing: .04em; }
.prose { font-size: var(--fs-body); line-height: 1.6; max-width: 62ch; }
.prose.sm { font-size: 12.5px; }
a.link { color: var(--copper-hot); }
a.link:hover { text-decoration: underline; }
code, .code { font-family: var(--font-mono); font-size: 12px; color: var(--copper-hot); }
.kbd { font-family: var(--font-mono); font-size: var(--fs-min); border: 1px solid var(--seam-hi); padding: 1px 6px; color: var(--text-mid); }

/* ── buttons: the one family ─────────────────────────────────────────── */
/* .btn itself comes from foundry.css (outline, mono 12 px, 11/20 padding). */
.btn { line-height: 1.2; white-space: nowrap; justify-content: center; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-primary, .btn-pour { background: var(--copper); border-color: var(--copper); color: #16100a; }
.btn-primary:hover, .btn-pour:hover { background: var(--copper-hot); border-color: var(--copper-hot); color: #16100a; }
.btn-quiet { border-color: transparent; color: var(--text-mid); padding-left: 10px; padding-right: 10px; }
.btn-quiet:hover { border-color: var(--seam-hi); color: var(--text-hi); background: var(--iron-850); }
.btn-danger { border-color: color-mix(in srgb, var(--down) 55%, transparent); color: var(--down); }
.btn-danger:hover { background: var(--down); border-color: var(--down); color: #16100a; }
.btn-sm { padding: 8px 14px; font-size: var(--fs-min); }
.btn-block { width: 100%; }
.btn .ico { width: 13px; height: 13px; }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 12px; height: 12px;
  border: 2px solid var(--text-lo); border-top-color: var(--copper); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* an actions row: primary first, quiet after, danger apart */
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions .spacer { flex: 1; }
.actions.end { justify-content: flex-end; }
.actions .close-help { flex: 0 0 100%; }  /* cvt6: a full row of its own under the buttons */
.actions .close-help .stamp { display: block; max-width: 72ch; line-height: 1.5; }  /* the text measure, inside the panel */

/* ── feedback: the one way to say what happened ─────────────────────── */
.fb {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border: 1px solid var(--seam); border-left: 2px solid var(--fb-c, var(--seam-hi));
  background: var(--iron-900); font-size: var(--fs-body); color: var(--text-mid); line-height: 1.5;
}
.fb .fb-mark {
  flex: none; width: 18px; height: 18px; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: var(--fs-min); font-weight: 700;
  color: var(--fb-c, var(--text-lo)); border: 1px solid var(--fb-c, var(--seam-hi)); border-radius: 50%;
}
.fb .fb-mark::before { content: "i"; }
.fb-ok   { --fb-c: var(--ok); }    .fb-ok .fb-mark::before { content: "\2713"; }
.fb-warn { --fb-c: var(--warn); }  .fb-warn .fb-mark::before { content: "!"; }
.fb-down { --fb-c: var(--down); }  .fb-down .fb-mark::before { content: "\00d7"; }
.fb-live { --fb-c: var(--copper); } .fb-live .fb-mark::before { content: "\25CF"; }
.fb-idle { --fb-c: var(--text-lo); } .fb-idle .fb-mark::before { content: "\00b7"; }
.fb .fb-text { flex: 1; min-width: 0; }
.fb .fb-text b { color: var(--text-hi); font-weight: 600; }
.fb .fb-title { display: block; color: var(--text-hi); font-weight: 600; margin-bottom: 2px; }
.fb .fb-act { flex: none; align-self: center; }
.fb .fb-close { flex: none; background: none; border: 0; color: var(--text-lo); cursor: pointer; font-family: var(--font-mono); font-size: 14px; padding: 0 2px; line-height: 1; }
.fb .fb-close:hover { color: var(--text-hi); }
/* inline: the line under a form that used to be a *Msg span. The mark is a
   pseudo-element, so a script may set textContent and the mark survives; an
   empty element is not shown, which is how "no message" reads. */
.fb.inline { display: block; position: relative; padding: 8px 12px 8px 36px; font-size: 12.5px; margin-top: 10px; overflow-wrap: anywhere; }  /* a whole address in a message wraps instead of widening the console */
.fb.inline::before {
  content: "i"; position: absolute; left: 12px; top: 9px; width: 15px; height: 15px;
  border: 1px solid var(--fb-c, var(--seam-hi)); border-radius: 50%; color: var(--fb-c, var(--text-lo));
  font-family: var(--font-mono); font-size: var(--fs-min); line-height: 13px; font-weight: 700; text-align: center;
}
.fb-ok.inline::before { content: "\2713"; } .fb-warn.inline::before { content: "!"; } .fb-down.inline::before { content: "\00d7"; }
.fb-live.inline::before { content: "\25CF"; } .fb-idle.inline::before { content: "\00b7"; }
.fb.inline .fb-mark { display: none; }
.fb.inline:empty, .fb.inline.empty, .fb.inline[hidden] { display: none; }
.fb.inline b, .fb.inline code { overflow-wrap: anywhere; }
.fb.inline .fb-act { position: absolute; right: 10px; top: 6px; }
.fb .fb-text a, .fb.inline a { color: var(--copper-hot); }
/* a stack of feedback rows inside one panel */

/* ── the confirmation modal: replaces prompt(), alert(), confirm() ──── */
.modal {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(4, 6, 9, .72);
}
.modal[hidden] { display: none; }
.modal-card {
  width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto;
  background: var(--iron-900); border: 1px solid var(--seam-hi); border-top: 2px solid var(--copper);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
}
.modal-card.danger { border-top-color: var(--down); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--seam); }
.modal-head .m-title { font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .16em; text-transform: uppercase; color: var(--text-hi); }
.modal-head .m-kind { font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .1em; text-transform: uppercase; color: var(--warn); }
.modal-card.danger .m-kind { color: var(--down); }
.modal-body { padding: 20px; }
.modal-body .what { font-size: var(--fs-body); color: var(--text-mid); line-height: 1.55; margin-bottom: 16px; }
.modal-body .what b { color: var(--text-hi); }
.modal-body .then { font-size: 12.5px; color: var(--text-lo); margin: -8px 0 16px; line-height: 1.5; }
.modal-body .then b { color: var(--text-mid); font-weight: 600; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn-quiet { margin-left: auto; }
.modal .fb.inline { margin-top: 14px; }
.modal-foot { padding: 10px 20px 14px; border-top: 1px solid var(--seam); font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-lo); line-height: 1.6; }

/* ── panel primitive ─────────────────────────────────────────────────── */
.panel { border: 1px solid var(--seam); margin-top: 24px; min-width: 0; }
.panel.first, .pane > .panel:first-child, .stab > .panel:first-child { margin-top: 0; }
.panel.accent-copper { border-left: 2px solid var(--copper); }
.panel.accent-down { border-left: 2px solid var(--down); }
.panel.accent-down .p-title { color: var(--down); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--seam); background: var(--iron-900);
}
.panel-head .p-title { font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .16em; text-transform: uppercase; color: var(--text-mid); }
.panel-head .p-sub { font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-lo); letter-spacing: .04em; }
.panel-head .p-tools { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.panel-head .p-tools .stamp { margin-left: 8px; }
.panel-body { padding: 20px; }
.panel-body.tight { padding: 14px 20px; }
.panel-body + .panel-body { border-top: 1px solid var(--seam); }
.panel-foot { padding: 12px 20px; border-top: 1px solid var(--seam); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-lo); }
.panel-foot .btn { margin-left: auto; }
.panel .scroll { overflow-x: auto; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid2 > .panel { margin-top: 0; }

/* ── segmented control · chips · sub-tabs ───────────────────────────── */
.seg { display: inline-flex; border: 1px solid var(--seam); }
.seg button {
  background: none; border: 0; cursor: pointer; padding: 6px 11px;
  font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .06em;
  color: var(--text-lo); border-right: 1px solid var(--seam);
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--iron-800); color: var(--copper-hot); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .06em;
  padding: 7px 13px; border: 1px solid var(--seam); color: var(--text-lo); background: none; cursor: pointer;
}
.chip.on { border-color: var(--copper); color: var(--copper-hot); background: var(--iron-850); }
.chip .n { margin-left: 6px; color: var(--copper); }
.subtabs { display: flex; border: 1px solid var(--seam); margin: 0 0 22px; overflow-x: auto; }
.subtabs button {
  flex: 1; min-width: 96px; padding: 12px 14px; background: none; border: 0; border-right: 1px solid var(--seam);
  border-bottom: 2px solid transparent; cursor: pointer; font-family: var(--font-mono); font-size: var(--fs-min);
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-lo); white-space: nowrap;
}
.subtabs button:last-child { border-right: 0; }
.subtabs button.on { color: var(--text-hi); background: var(--iron-850); border-bottom-color: var(--copper); }
.subtabs button .n { margin-left: 8px; color: var(--copper); }
.stab { display: none; }
.stab.on { display: block; }
.toolbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { flex: 1; min-width: 200px; max-width: 380px; }

/* ── state chips: one vocabulary for live · stale · down · idle ─────── */
.state { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .1em; text-transform: uppercase; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state-live { color: var(--copper-hot); } .state-stale { color: var(--warn); } .state-down { color: var(--down); } .state-idle { color: var(--text-lo); } .state-ok { color: var(--ok); }
.pill { font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .1em; text-transform: uppercase; padding: 4px 9px; border: 1px solid var(--seam-hi); color: var(--text-mid); white-space: nowrap; }
.pill-on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.pill-off { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.pill-down { color: var(--down); border-color: color-mix(in srgb, var(--down) 40%, transparent); }
.pill-soq { color: var(--soq); border-color: color-mix(in srgb, var(--soq) 40%, transparent); }
.tier-badge { font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--seam-hi); color: var(--text-mid); white-space: nowrap; }
.tier-bronze   { color: var(--copper); border-color: color-mix(in srgb, var(--copper) 40%, transparent); --tc-c: var(--copper); }
.tier-standard { color: var(--text-lo); --tc-c: var(--text-lo); }
.tier-verified { color: var(--ltc); border-color: color-mix(in srgb, var(--ltc) 35%, transparent); --tc-c: var(--ltc); }
.tier-partner  { color: var(--doge); border-color: color-mix(in srgb, var(--doge) 40%, transparent); --tc-c: var(--doge); }
.tier-genesis  { color: var(--soq); border-color: color-mix(in srgb, var(--soq) 45%, transparent); --tc-c: var(--soq); }
.st { font-family: var(--font-mono); font-size: 12px; }
.st-passed, .st-approved { color: var(--ok); } .st-pending { color: var(--warn); } .st-failed, .st-flagged, .st-declined { color: var(--down); } .st-expired { color: var(--text-lo); }
.lamp2 { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.lamp-on { background: var(--ok); box-shadow: 0 0 6px color-mix(in srgb, var(--ok) 60%, transparent); } .lamp-idle { background: var(--warn); } .lamp-off { background: var(--down); }
.c-ltc { color: var(--ltc); } .c-doge { color: var(--doge); } .c-soq { color: var(--soq); } .c-ok { color: var(--ok); } .c-warn { color: var(--warn); } .c-down { color: var(--down); } .c-copper { color: var(--copper-hot); }
.dup-flag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .08em; text-transform: uppercase; color: var(--down); border: 1px solid color-mix(in srgb, var(--down) 40%, transparent); padding: 3px 8px; }

/* ── readouts · gauges · balances ───────────────────────────────────── */
.readouts { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--seam); }
.readouts.r3 { grid-template-columns: repeat(3, 1fr); }
.gauge { padding: 22px 24px; border-right: 1px solid var(--seam); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gauge:last-child { border-right: 0; }
.gauge .g-value { font-family: var(--font-mono); font-weight: 600; color: var(--text-hi); font-size: clamp(20px, 2.2vw, 30px); letter-spacing: -.01em; }
.gauge .g-value .u { font-size: 13px; color: var(--text-lo); font-weight: 400; margin-left: 5px; }
.gauge .g-sub { font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-lo); }
.gauge.g-live .g-value { color: var(--copper-hot); }
.gauge.g-lead { background: var(--iron-900); }
.gauge.g-lead .g-label { color: var(--text-mid); }
.payout-gauge { display: flex; align-items: center; gap: 16px; }
.payout-gauge .ring { flex: none; }
.payout-gauge .pg-txt .g-value { font-size: 22px; }
.ring-track { stroke: var(--iron-800); }
.ring-fill { stroke: var(--copper); }
.balances { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--seam); margin-top: 24px; }
.bal { padding: 20px 22px; border-right: 1px solid var(--seam); position: relative; }
.bal:last-child { border-right: 0; }
.bal::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--bal-c); }
.bal .b-chain { display: block; font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .14em; color: var(--bal-c); text-transform: uppercase; }
.bal .b-amt { display: block; font-family: var(--font-mono); font-weight: 600; color: var(--text-hi); font-size: 24px; margin-top: 10px; letter-spacing: -.01em; }
.bal .b-amt .u { font-size: 12px; color: var(--text-lo); font-weight: 400; margin-left: 5px; }
.bal .b-meta { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--seam); font-family: var(--font-mono); font-size: var(--fs-min); }
.bal .b-meta span:first-child { color: var(--text-lo); }
.bal .b-meta span:last-child { color: var(--text-mid); }
.b-ltc { --bal-c: var(--ltc); } .b-doge { --bal-c: var(--doge); } .b-soq { --bal-c: var(--soq); }
/* s2y: the Earnings cards are these cards with a sentence per fact under the figure; an empty line is
   not shown. What is locked and what has paid sit under a seam, as .b-meta does. */
.balances.earn .bal { min-width: 0; }
.balances.earn .b-line { margin-top: 8px; font-size: var(--fs-body); line-height: 1.55; color: var(--text-mid); overflow-wrap: anywhere; }
.balances.earn .b-line:empty { display: none; }
.balances.earn .b-line a { color: var(--copper-hot); }
.balances.earn .b-line a:hover, .balances.earn .b-line.c-warn a { text-decoration: underline; }  /* in a warning the colour alone does not mark the link */
.balances.earn .b-line .mono { font-size: var(--fs-ui); }
.balances.earn .b-lock, .balances.earn .b-paid { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--seam); }
.balances.earn .b-lock .b-line:first-child { margin-top: 0; }

/* facts strip: the pool's terms, stated the same on every surface (landing, console) */
.facts { display: flex; flex-wrap: wrap; border: 1px solid var(--seam); background: var(--iron-900); }
.facts .fact { display: flex; flex-direction: column; gap: 4px; padding: 12px 18px; border-right: 1px solid var(--seam); min-width: 0; }
.facts .fact:last-child { border-right: 0; }
.facts .fact .k { font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .14em; text-transform: uppercase; color: var(--text-lo); }
.facts .fact .v { font-family: var(--font-mono); font-size: 13px; color: var(--text-hi); }
.facts .fact .v .u { color: var(--text-lo); font-weight: 400; }
.facts .fact.fill { flex: 1; }

/* ── data tables ─────────────────────────────────────────────────────── */
.dtable { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 12.5px; }
.dtable th {
  text-align: left; padding: 11px 20px; background: var(--iron-900);
  font-size: var(--fs-min); font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--text-lo);
  border-bottom: 1px solid var(--seam); white-space: nowrap;
}
.dtable th.sort { cursor: pointer; }
.dtable td { padding: 13px 20px; border-bottom: 1px solid var(--seam); color: var(--text-mid); white-space: nowrap; vertical-align: middle; }
.dtable tr:last-child td { border-bottom: 0; }
.dtable td.hi { color: var(--text-hi); }
.dtable td.wrap { white-space: normal; }
.dtable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dtable td.actions { display: table-cell; text-align: right; white-space: nowrap; }  /* a cell, not a flex row: Remove stays in the last column whether or not Make payout is beside it */
.dtable td.actions .btn + .btn { margin-left: 6px; }
.dtable tbody tr:hover td { background: var(--iron-900); }
.dtable tr.row-open > td { background: var(--iron-900); }
.dtable tr.row-open > td:first-child, .dtable tr.row-enforced > td:first-child, .dtable tr.detail > td { box-shadow: inset 3px 0 0 var(--copper); }
.dtable tr.detail > td { background: var(--iron-950); white-space: normal; padding: 18px 20px 20px 40px; }
.dtable tr.detail:hover > td { background: var(--iron-950); }
.dtable td.empty { text-align: center; color: var(--text-lo); padding: 26px 20px; white-space: normal; }
.dtable .hash { color: var(--text-lo); }
.dtable .ref { color: var(--copper-hot); }
.dtable .row-off td.hi { color: var(--down); } .dtable .row-idle td.hi { color: var(--warn); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 24px; font-family: var(--font-mono); font-size: 12px; }
.kv .k { display: block; color: var(--text-lo); letter-spacing: .12em; text-transform: uppercase; font-size: var(--fs-min); margin-bottom: 4px; }
.kv .v { color: var(--text-hi); overflow-wrap: anywhere; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--seam); font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-lo); }

/* ── forms ───────────────────────────────────────────────────────────── */
.field { margin-bottom: 18px; min-width: 0; }
.field label, .field .lbl { display: block; font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .12em; text-transform: uppercase; color: var(--text-lo); margin-bottom: 8px; }
.field input, .field select, .field textarea, .search {
  width: 100%; padding: 11px 13px; background: var(--iron-950);
  border: 1px solid var(--seam); color: var(--text-hi); font-family: var(--font-mono); font-size: 13px;
}
.field textarea { resize: vertical; min-height: 72px; }
.field input:focus, .field select:focus, .field textarea:focus, .search:focus { outline: none; border-color: var(--copper); }
.field input[readonly] { color: var(--text-mid); }
.field .hint { margin-top: 7px; font-size: 12px; color: var(--text-lo); font-family: var(--font-display); line-height: 1.5; }
.field .hint b { color: var(--text-mid); font-weight: 600; }
.field.auto { margin-bottom: 0; }
.field-row { display: grid; gap: 12px; align-items: end; }
.field-row .field { margin-bottom: 0; }
.field-row.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.field-row.act { grid-template-columns: minmax(0, 1fr) auto; }
.field-row.who { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }  /* watcher form: who it is for, what it shows, create */
.field-row.addr { grid-template-columns: 150px minmax(0, 1fr) 160px auto; }
.field-row.quiz { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }  /* the SOQ wallet's three-word check: three across, wrapping on a phone */
.field-row .btn { height: 41px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--text-mid); line-height: 1.55; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--copper); width: 15px; height: 15px; flex: none; }
.radio-list { display: flex; flex-direction: column; gap: 8px; }
.radio-list .check b { color: var(--text-hi); }
/* a settings row: name, description, one control on the right */
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--seam); }
.sec-row:first-child { padding-top: 0; }
.sec-row:last-child { border-bottom: 0; padding-bottom: 0; }
.sec-row .s-name { color: var(--text-hi); font-weight: 600; font-size: 14px; }
.sec-row .s-desc { font-size: 12.5px; color: var(--text-lo); margin-top: 3px; max-width: 52ch; line-height: 1.5; }
.sec-row .s-desc b { color: var(--text-mid); font-weight: 600; }
.sec-row .s-ctl { flex: none; display: flex; gap: 8px; align-items: center; }
.sec-row .sec-check { width: 18px; height: 18px; accent-color: var(--copper); cursor: pointer; flex: none; }
.sec-row .sec-check:disabled { cursor: default; }
.sec-row .s-val { font-family: var(--font-mono); font-size: 13px; color: var(--text-hi); }
/* switch: a real toggle, the member's word for "on" */
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .knob { position: absolute; inset: 0; border: 1px solid var(--seam-hi); background: var(--iron-950); transition: background .15s, border-color .15s; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: var(--text-lo); transition: transform .15s, background .15s; }
.switch input:checked + .knob { background: var(--copper-dim); border-color: var(--copper); }
.switch input:checked + .knob::after { transform: translateX(16px); background: var(--copper-hot); }
.switch input:focus-visible + .knob { outline: 2px solid var(--copper); outline-offset: 2px; }

/* ── KPI strip (operator) ────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--seam); margin-bottom: 24px; }
.kpi { padding: 20px 22px; border-right: 1px solid var(--seam); min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi .k-value { display: block; font-family: var(--font-mono); font-weight: 600; color: var(--text-hi); font-size: clamp(20px, 2.1vw, 28px); margin-top: 8px; }
.kpi .k-value .u { font-size: 13px; color: var(--text-lo); font-weight: 400; }
.kpi .k-sub { display: block; font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-lo); margin-top: 4px; }
.kpi.alert .k-value { color: var(--copper-hot); }
.kpi.decide { background: var(--iron-900); }

/* ── request card (dual control): what · who asked · why · affects ──── */
.reqs { border: 1px solid var(--seam); }
.req { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; padding: 18px 22px; border-bottom: 1px solid var(--seam); align-items: start; }
.req:last-child { border-bottom: 0; }
.req .r-what { color: var(--text-hi); font-size: 15px; font-weight: 600; line-height: 1.4; }
.req .r-what .who { color: var(--soq); }
.req .r-what .tier-badge { vertical-align: 2px; margin-left: 4px; }
.req .r-meta { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 12px; margin-top: 10px; font-family: var(--font-mono); font-size: 12px; }
.req .r-meta .k { color: var(--text-lo); letter-spacing: .1em; text-transform: uppercase; font-size: var(--fs-min); padding-top: 1px; }
.req .r-meta .v { color: var(--text-mid); overflow-wrap: anywhere; }
.req .r-meta .v.reason { color: var(--text-hi); font-family: var(--font-display); font-size: 13px; }
.req .r-meta .v.reason::before, .req .r-meta .v.reason::after { content: "\201C"; color: var(--text-lo); }
.req .r-meta .v.reason::after { content: "\201D"; }
.req .r-meta .v.none { color: var(--text-lo); font-style: italic; }
.req .r-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 150px; }
.req .r-actions .stamp { text-align: center; }
.req.mine { background: color-mix(in srgb, var(--iron-900) 60%, transparent); }
.req.mine .r-actions .btn { display: none; }

/* ── tier cards ──────────────────────────────────────────────────────── */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.tier-card { border: 1px solid var(--seam); padding: 20px; position: relative; }
.tier-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--tc-c, var(--seam-hi)); }
.tier-card h3 { font-family: var(--font-display); font-variation-settings: "wdth" 114; text-transform: uppercase; font-size: 16px; color: var(--text-hi); margin-bottom: 4px; display: flex; align-items: baseline; gap: 8px; }
.tier-card h3 .key { font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-lo); text-transform: none; font-variation-settings: "wdth" 100; font-weight: 400; }
.tier-card .room { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 14px; padding: 10px 12px; background: var(--iron-900); border: 1px solid var(--seam); }
.tier-card .room .n { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--ok); }
.tier-card .room .t { font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-lo); letter-spacing: .08em; text-transform: uppercase; }
.tier-card.full .room .n { color: var(--down); }
.tier-card.full .room .t { color: var(--down); }
.tier-card .trow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--seam); font-family: var(--font-mono); font-size: 11.5px; }
.tier-card .trow:last-child { border-bottom: 0; }
.tier-card .trow span:first-child { color: var(--text-lo); }
.tier-card .trow span:last-child { color: var(--text-hi); text-align: right; overflow-wrap: anywhere; }
.tier-card .trow span.lo { color: var(--text-lo); }
.tier-card .trow span.c-warn { color: var(--warn); }
/* vd0g part 2: live figures under the configured limits */
.tier-card .tlive-h { margin-top: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--seam); font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-lo); letter-spacing: .08em; text-transform: uppercase; }
/* ko9x slice 2: the Bronze enrolment switch */
.tier-card .bz-switch { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--seam); background: var(--iron-900); display: grid; gap: 6px; }
.tier-card .bz-state { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-family: var(--font-mono); }
.tier-card .bz-state .k { font-size: var(--fs-min); color: var(--text-lo); letter-spacing: .08em; text-transform: uppercase; }
.tier-card .bz-state .v { font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.tier-card .bz-meta { font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-mid); overflow-wrap: anywhere; }
.tier-card .bz-meta.c-warn { color: var(--warn); }
.tier-card .bz-actions { margin-top: 4px; }
.tier-card .bz-actions .btn { width: 100%; justify-content: center; }

/* ── audit rows ──────────────────────────────────────────────────────── */
.audit { border: 1px solid var(--seam); }
.audit-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 160px; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--seam); font-family: var(--font-mono); font-size: 12px; }
.audit-row:last-child { border-bottom: 0; }
.audit-row .a-time { color: var(--text-lo); }
.audit-row .a-act { color: var(--text-mid); overflow-wrap: anywhere; }
.audit-row .a-act strong { color: var(--text-hi); }
.audit-row .a-act .why { display: block; color: var(--text-lo); font-family: var(--font-display); font-size: 12.5px; margin-top: 2px; }
.audit-row .a-by { color: var(--copper-hot); text-align: right; }

/* ── action groups on a detail row (operator) ───────────────────────── */
.op-group { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--seam); }
.op-group:first-child { border-top: 0; padding-top: 0; }
.op-group-label { font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .12em; text-transform: uppercase; color: var(--copper); display: inline-flex; align-items: center; gap: 8px; }
.op-group-label::before { content: ''; width: 12px; height: 1px; background: var(--copper); opacity: .6; }
.op-state { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-mid); }
.op-group.danger { margin-top: 8px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--down) 45%, transparent); }
.op-group.danger .op-group-label { color: var(--down); } .op-group.danger .op-group-label::before { background: var(--down); }

/* ── guide pane: one typographic register inside the shell ──────────── */
.guide { max-width: 78ch; }
.guide h3 { font-variation-settings: "wdth" 114; text-transform: uppercase; font-weight: 700; font-size: 16px; color: var(--text-hi); margin: 0 0 14px; }
.guide h4 { font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .16em; text-transform: uppercase; color: var(--copper); margin: 28px 0 10px; display: flex; align-items: center; gap: 10px; }
.guide h4::before { content: ""; width: 14px; height: 1px; background: var(--copper); opacity: .7; }
.guide p, .guide li { font-size: var(--fs-body); line-height: 1.65; color: var(--text-mid); }
.guide p { margin: 0 0 12px; }
.guide ol, .guide ul { padding-left: 22px; margin: 0 0 12px; }
.guide li { margin: 0 0 8px; }
.guide li::marker { color: var(--copper); font-family: var(--font-mono); font-size: 12px; }
.guide code { font-family: var(--font-mono); font-size: 12px; color: var(--copper-hot); background: var(--iron-900); padding: 1px 5px; border: 1px solid var(--seam); }
.guide a { color: var(--copper-hot); }
.guide table.tbl { width: 100%; border-collapse: collapse; margin: 6px 0 16px; border: 1px solid var(--seam); font-size: 13px; }
.guide table.tbl th { text-align: left; padding: 10px 14px; background: var(--iron-900); font-family: var(--font-mono); font-size: var(--fs-min); font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--text-lo); border-bottom: 1px solid var(--seam); }
.guide table.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--seam); color: var(--text-mid); vertical-align: top; line-height: 1.5; }
.guide table.tbl td:first-child { color: var(--text-hi); font-weight: 600; white-space: nowrap; }
.guide table.tbl tr:last-child td { border-bottom: 0; }

/* ── empty state: one sentence, one action ──────────────────────────── */
.empty { padding: 30px 24px; text-align: center; color: var(--text-lo); font-size: var(--fs-body); }
.empty .btn { margin-top: 14px; }

/* ── seed grid (SOQ wallet ceremony) ────────────────────────────────── */
.shield-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shield-word { display: flex; align-items: baseline; gap: 8px; border: 1px solid var(--seam); background: var(--iron-950); padding: 8px 10px; }
.shield-word::before { content: attr(data-n); font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-lo); min-width: 18px; }
.shield-word .sw-text { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-hi); }

/* ── chart frame ─────────────────────────────────────────────────────── */
.chart-wrap { position: relative; }
.chart-wrap svg { display: block; width: 100%; height: auto; }

/* ── auth gate ───────────────────────────────────────────────────────── */
body.locked .rail-nav, body.locked .rail-ident, body.locked .pool-pulse, body.locked .tabbar, body.locked .more-sheet { display: none !important; }
.login-wrap { max-width: 420px; margin: 8vh auto 0; }
.login-wrap .btn-primary { width: 100%; }

/* ── mobile navigation: tab bar + more sheet, both consoles ─────────── */
.tabbar { display: none; }
.more-sheet { display: none; }
.sheet-scrim { display: none; }
@media (max-width: 900px) {
  .console { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--seam); padding-right: 14px; }
  .rail-brand { border: 0; }
  .rail-ident { display: flex; padding: 0 0 0 12px; border: 0; gap: 10px; align-items: center; min-width: 0; max-width: 60%; }
  .rail-ident .who { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail-ident .tier { margin-top: 0; }
  .rail-ident .since { display: none; }
  .rail-nav { display: none; }
  .rail-foot { display: none; }
  body.locked .rail-foot { display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 0; border-top: 0; }
  body.locked .rail-foot .theme-toggle { margin: 0; }
  .surface { padding-bottom: 84px; }
  .surface-top { flex-wrap: wrap; gap: 8px; padding: 14px 18px; }
  .surface-top h1 { font-size: 18px; }
  .pool-pulse { gap: 12px; flex-wrap: wrap; }
  .surface-notices { padding: 12px 18px 0; }
  .pane { padding: 20px 18px 80px; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: color-mix(in srgb, var(--iron-950) 94%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--seam); padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .tabbar button {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 12px 4px 10px; background: none; border: 0; border-top: 2px solid transparent;
    font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-lo); cursor: pointer; min-height: 56px;
  }
  .tabbar button .ico { width: 18px; height: 18px; }
  .tabbar button.on { color: var(--text-hi); border-top-color: var(--copper); }
  .tabbar button .badge { position: absolute; top: 6px; right: calc(50% - 24px); font-size: var(--fs-min); color: var(--iron-950); background: var(--down); padding: 1px 6px; border-radius: 9px; line-height: 1.3; font-weight: 600; }
  .more-sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    transform: translateY(100%); transition: transform .2s ease-out;
    background: var(--iron-900); border-top: 1px solid var(--seam-hi); padding: 8px 0 calc(16px + env(safe-area-inset-bottom, 0));
  }
  .more-sheet.open { transform: translateY(0); }
  .more-sheet .grip { width: 36px; height: 3px; background: var(--seam-hi); margin: 6px auto 12px; }
  .more-sheet .sheet-ident { display: flex; justify-content: space-between; align-items: center; padding: 6px 20px 14px; border-bottom: 1px solid var(--seam); }
  .more-sheet .sheet-ident .who { color: var(--text-hi); font-weight: 600; }
  .more-sheet button.row, .more-sheet a.row {
    display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 20px;
    background: none; border: 0; border-bottom: 1px solid var(--seam); text-align: left;
    font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-mid); cursor: pointer;
  }
  .more-sheet .row .ico { width: 16px; height: 16px; opacity: .8; }
  .more-sheet .row .hint { margin-left: auto; font-size: var(--fs-min); color: var(--text-lo); text-transform: none; letter-spacing: 0; }
  .more-sheet .row.danger { color: var(--down); }
  .more-sheet .row.on { color: var(--text-hi); border-left: 2px solid var(--copper); }
  .sheet-scrim.open { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .55); }

  .readouts, .readouts.r3 { grid-template-columns: 1fr 1fr; }
  .gauge:nth-child(2n) { border-right: 0; }
  .gauge:nth-child(n+3) { border-top: 1px solid var(--seam); }
  .readouts.r3 .gauge:nth-child(3) { grid-column: 1 / -1; }
  .balances { grid-template-columns: 1fr; }
  .bal { border-right: 0; border-bottom: 1px solid var(--seam); }
  .bal:last-child { border-bottom: 0; }
  .facts .fact { flex: 1 1 45%; border-bottom: 1px solid var(--seam); }
  .grid2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(2n) { border-right: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--seam); }
  .tier-grid { grid-template-columns: 1fr; }
  .req { grid-template-columns: 1fr; }
  .req .r-actions { flex-direction: row; }
  .req .r-actions .btn { flex: 1; }
  .req .r-meta { grid-template-columns: 80px minmax(0, 1fr); }
  .audit-row { grid-template-columns: 1fr; gap: 4px; }
  .audit-row .a-by { text-align: left; }
  .field-row.two, .field-row.act, .field-row.who, .field-row.addr { grid-template-columns: minmax(0, 1fr); }
  .field-row .btn { width: 100%; }
  .op-group { grid-template-columns: 1fr; }
  .sec-row { align-items: flex-start; flex-wrap: wrap; }
  .sec-row .s-ctl { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-start; min-width: 0; }
  .panel-head { flex-wrap: wrap; }
  .panel-head .p-tools { flex-wrap: wrap; margin-left: 0; }
  .payout-gauge { gap: 10px; }
  .payout-gauge .pg-txt .g-value { font-size: 18px; }
  .gauge .g-value { overflow-wrap: anywhere; }
  .subtabs { flex-wrap: wrap; overflow: visible; }
  .subtabs button { flex: 1 1 33%; min-width: 0; padding: 12px 6px; letter-spacing: .04em; border-bottom: 1px solid var(--seam); }
  .subtabs button.on { border-bottom: 2px solid var(--copper); }
  .sec-row .s-val { white-space: normal; overflow-wrap: anywhere; }
  .facts .fact .v { overflow-wrap: anywhere; }
  .req .r-what, .kv .v { overflow-wrap: anywhere; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-card { max-width: none; max-height: 88vh; border-left: 0; border-right: 0; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn-quiet { margin-left: 0; }
  .field input, .field select, .field textarea, .search { font-size: 16px; }   /* no iOS zoom */
  /* tables: scroll inside their panel, and the actions column stays reachable */
  .panel .scroll, .panel > table { overflow-x: auto; display: block; }
  .panel > table.dtable { display: table; }
}


/* ── spacing scale: the only margins markup may ask for ─────────────── */
.mt-sm { margin-top: 12px; } .mt { margin-top: 16px; } .mt-md { margin-top: 18px; } .mt-lg { margin-top: 24px; }
.mb { margin-top: 0; margin-bottom: 16px; } .mb-md { margin-bottom: 18px; } .mb-lg { margin-bottom: 24px; }
.ml-sm { margin-left: 8px; }
.note { margin-top: 18px; font-size: 12.5px; color: var(--text-lo); max-width: 72ch; line-height: 1.6; }
.w-auto { width: auto; }
.pill.op { color: var(--copper); border-color: color-mix(in srgb, var(--copper) 40%, transparent); }
a.link.sm { font-size: var(--fs-min); font-family: var(--font-mono); }
details.fold > summary { cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "\25B8 "; }
details.fold[open] > summary::before { content: "\25BE "; }
details.panel.fold > summary.panel-head { display: flex; }                 /* a folded panel: its head is the summary */
details.panel.fold > summary.panel-head::before { color: var(--text-lo); }
details.panel.fold > summary.panel-head > .p-title { flex: 1; }             /* title stays left of the marker's gap; the sub keeps the right edge */
details.panel.fold:not([open]) > summary.panel-head { border-bottom: 0; }
.panel-body .facts { margin-bottom: 0; }

/* ── preview ribbon (previews only; never served) ───────────────────── */
.preview-ribbon {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: var(--copper); color: #16100a; text-align: center;
  font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .08em; padding: 7px 12px;
}
.preview-ribbon a { color: inherit; text-decoration: underline; }
@media (max-width: 900px) { .preview-ribbon { position: static; margin-bottom: 84px; } }   /* on a phone the ribbon follows the content; the tab bar keeps the bottom */


/* ═══════════════════════════════════════════════════════════════════════
   Panes the stage 1 previews did not draw, carried over from the retired
   sheets at the 11 px floor: Workers (wave C-2), the whole-pool panel
   (wave C-5), the Calculator (wave C-3), the Connect terminal, the watcher
   view and the SOQ wallet ceremony. Stage 2 rebuilds Connect; stage 1 swaps
   their buttons, feedback and type only.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── workers ─────────────────────────────────────────────────────────── */
.reject-ok { color: var(--ok); } .reject-warn { color: var(--warn); }
.spark { width: 96px; height: 26px; display: block; }
.wk-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px; }
.wk-filters .search { flex: 1; min-width: 180px; }
.wk-summary { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--seam); margin-bottom: 18px; }
.wk-summary .cell { padding: 14px 18px; border-right: 1px solid var(--seam); }
.wk-summary .cell:last-child { border-right: 0; }
.wk-summary .k { display: block; font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .14em; text-transform: uppercase; color: var(--text-lo); }
.wk-summary .v { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 20px; font-weight: 600; color: var(--text-hi); }
.wk-summary .v.bad { color: var(--down); } .wk-summary .v.ok { color: var(--ok); } .wk-summary .v.idle { color: var(--warn); }
.wk-summary .v .u { font-size: 12px; color: var(--text-lo); font-weight: 400; margin-left: 5px; }
.grp-head td { background: var(--iron-900); padding: 9px 20px; color: var(--text-mid); font-size: var(--fs-min); letter-spacing: .12em; text-transform: uppercase; }
.grp-head .caret { display: inline-block; width: 0; height: 0; border: 5px solid transparent; border-left-color: var(--text-lo); margin-right: 10px; transform: rotate(90deg); vertical-align: 1px; }
.grp-head.collapsed .caret { transform: none; }
.grp-head .grp-meta { float: right; color: var(--text-lo); letter-spacing: 0; text-transform: none; }
.grp-head .grp-meta b { color: var(--text-hi); font-weight: 600; }
.grp-head .grp-meta a { color: var(--copper-hot); }
.expand td { background: var(--iron-950); padding: 14px 20px 18px 40px; white-space: normal; border-left: 2px solid var(--copper-dim); }
.expand .kv { font-size: 11.5px; }
.expand .acts { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.expand .acts .btn { margin-left: auto; }
.chev { color: var(--text-lo); font-size: var(--fs-min); }
.wk-cards { display: none; }
.wk-row { cursor: pointer; }
.wk-row.is-open td { background: var(--iron-900); }
.wk-empty { text-align: center; color: var(--text-lo); padding: 30px; white-space: normal; }
@media (max-width: 900px) {
  .wk-summary { grid-template-columns: 1fr 1fr; }
  .wk-summary .cell:nth-child(2) { border-right: 0; }
  .wk-summary .cell:nth-child(n+3) { border-top: 1px solid var(--seam); }
  .wk-table { display: none; }
  .wk-cards { display: block; border: 1px solid var(--seam); }
  .wk-card { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--seam); font-family: var(--font-mono); }
  .wk-card:last-child { border-bottom: 0; }
  .wk-card .name { color: var(--text-hi); font-size: 13.5px; font-weight: 600; }
  .wk-card .hr { color: var(--text-hi); font-size: 13.5px; text-align: right; }
  .wk-card .sub { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-min); color: var(--text-lo); }
  .wk-card .sub.mt-sm { margin-top: 6px; }
  .wk-card.off .name { color: var(--down); }
  .wk-card.idle .name { color: var(--warn); }
  .wk-cards .grp { padding: 9px 16px; background: var(--iron-900); font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .12em; text-transform: uppercase; color: var(--text-mid); border-bottom: 1px solid var(--seam); display: flex; justify-content: space-between; }
}

/* ── whole-pool panel (Overview) ─────────────────────────────────────── */
.pool-stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--seam); }
.pool-stats .cell { padding: 14px 18px; border-right: 1px solid var(--seam); min-width: 0; }
.pool-stats .cell:last-child { border-right: 0; }
.pool-stats .k { display: block; font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .14em; text-transform: uppercase; color: var(--text-lo); }
.pool-stats .v { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 17px; font-weight: 600; color: var(--text-hi); white-space: nowrap; }
.pool-stats .v .u { font-size: 12px; color: var(--text-lo); font-weight: 400; margin-left: 5px; }
.pool-stats .v.stale { opacity: .55; }
.pool-stats .k .state { margin-left: 6px; font-size: inherit; letter-spacing: .08em; }
.pool-stats .k .state:empty, .pool-stats .k .state-idle { display: none; }
.pool-grid { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 24px; align-items: center; }
.pool-grid > div { min-width: 0; }
.luck-side { text-align: center; }
.hint { font-size: 12px; color: var(--text-lo); line-height: 1.5; }
.hint.mono { font-family: var(--font-mono); font-size: 11.5px; }
.hint b { color: var(--text-mid); font-weight: 600; }
@media (max-width: 1100px) { .pool-stats .v { font-size: 15px; } }
/* seven cells only fit one row on a wide screen: beside the 264px rail they take two rows of four */
@media (min-width: 901px) and (max-width: 1600px) {
  .pool-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pool-stats .cell:nth-child(4n) { border-right: 0; }
  .pool-stats .cell:nth-child(n+5) { border-top: 1px solid var(--seam); }
  .pool-stats .cell:nth-child(7) { grid-column: span 2; }
}
@media (max-width: 900px) {
  .pool-stats { grid-template-columns: 1fr 1fr; }
  .pool-stats .cell:nth-child(2n) { border-right: 0; }
  .pool-stats .cell:nth-child(n+3) { border-top: 1px solid var(--seam); }
  .pool-stats .cell:nth-child(7) { grid-column: 1 / -1; border-right: 0; }
  .pool-stats .v { font-size: 15px; }
  .pool-grid { grid-template-columns: 1fr; }
}

/* ── connect: the terminal (stage 2 rebuilds this pane) ───────────────── */
.pane .section { padding: 0; background: transparent; border: 0; }
.pane .container { max-width: 1080px; margin: 0; padding: 0; }
.section-sub { color: var(--text-mid); font-size: 13.5px; margin-bottom: 28px; max-width: 640px; }
.terminal { background: var(--iron-900); border: 1px solid var(--seam); overflow: hidden; max-width: 700px; margin: 0 auto 32px; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--iron-850); border-bottom: 1px solid var(--seam); }
.term-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--seam-hi); }
.term-dot.r { background: var(--down); } .term-dot.y { background: var(--warn); } .term-dot.g { background: var(--ok); }
.term-title { margin-left: 8px; font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .12em; text-transform: uppercase; color: var(--text-lo); }
.term-body { padding: 18px 20px; font-family: var(--font-mono); font-size: 13px; line-height: 1.9; }
.term-line { white-space: pre-wrap; word-break: break-all; }
.term-line.spacer { margin-top: 12px; }
.t-c { color: var(--text-lo); } .t-k { color: var(--copper); display: inline-block; min-width: 76px; } .t-v { color: var(--text-hi); } .t-h { color: var(--text-mid); }
.term-cursor { display: inline-block; width: 8px; height: 14px; background: var(--copper); vertical-align: text-bottom; animation: termBlink 1.1s steps(1) infinite; }
@keyframes termBlink { 50% { opacity: 0; } }
.connect-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; max-width: 900px; margin: 0 auto; }
.cn-item { border: 1px solid var(--seam); background: var(--iron-900); padding: 16px 18px; font-size: 13px; color: var(--text-mid); line-height: 1.65; }
.cn-item strong { display: block; color: var(--text-hi); font-family: var(--font-mono); font-size: var(--fs-min); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.cn-item code { font-family: var(--font-mono); color: var(--copper-hot); font-size: 12px; }

/* ── SOQ wallet ceremony: the seed and import dialogs are .modal cards ─── */
.modal-card.wide { max-width: 680px; }
.shield-word .sw-num { font-family: var(--font-mono); font-size: var(--fs-min); color: var(--text-lo); min-width: 18px; }
.shield-addr { font-family: var(--font-mono); font-size: 12px; color: var(--text-hi); word-break: break-all; }
.code-block { font-family: var(--font-mono); font-size: 12.5px; background: var(--iron-950); border: 1px solid var(--seam); padding: 12px; margin: 0; user-select: all; white-space: pre-wrap; }
.qr-box { display: inline-block; padding: 10px; background: #fff; border: 1px solid var(--seam); line-height: 0; }
@media (max-width: 700px) { .shield-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── rows a script renders as lines, not table rows (sessions, watcher links) ── */
.rows { font-family: var(--font-mono); font-size: 12px; }
.rows .row-line { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--seam); flex-wrap: wrap; }
.rows .row-line:last-child { border-bottom: 0; }
.rows .row-line.dim { opacity: .65; }
.rows .row-line .end { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.rows .row-line a { color: var(--copper-hot); }
.pill.sm { padding: 2px 7px; }
.pill.op, .pill-copper { color: var(--copper); border-color: color-mix(in srgb, var(--copper) 40%, transparent); }
.engraved.copper { color: var(--copper); }
.engraved.block { display: block; margin-bottom: 4px; }
.right-auto { margin-left: auto; }
.center { text-align: center; }
.wrap { white-space: normal; overflow-wrap: anywhere; }
.dtable td.hash, .dtable td.lo { color: var(--text-lo); }
.dtable tr.dim { opacity: .5; }
.dtable td.warn, .c-warn { color: var(--warn); }
.dtable td .sub { display: block; font-size: var(--fs-min); color: var(--text-lo); }
.op-group .actions .field.auto { margin-bottom: 0; }
.op-group select { width: auto; padding: 6px 9px; font-size: var(--fs-min); background: var(--iron-950); border: 1px solid var(--seam); color: var(--text-mid); font-family: var(--font-mono); }

/* ── late rules: the attribute and the utility win ──────────────────── */
/* the hidden attribute is the one way a script hides something; no component's display rule may beat it */
[hidden] { display: none !important; }
/* a switch's knob is drawn over its input; the click belongs to the input */
.switch .knob { pointer-events: none; }
/* a label inside .field is the field's caption; a .check label inside it keeps the check look */
.field label.check { font-family: var(--font-display); font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--text-mid); margin-bottom: 0; display: flex; }
/* the notices strip holds its three notices in markup; it takes room only when one is shown */
.surface-notices:not(:has(> :not([hidden]))) { display: none; }
.more-sheet .row .hint.c-ok { color: var(--ok); } .more-sheet .row .hint.c-warn { color: var(--warn); }
/* colour utilities outrank the component's own colour (the component rules above carry two or three classes) */
.c-ltc.c-ltc.c-ltc { color: var(--ltc); } .c-doge.c-doge.c-doge { color: var(--doge); } .c-soq.c-soq.c-soq { color: var(--soq); }
.c-ok.c-ok.c-ok { color: var(--ok); } .c-warn.c-warn.c-warn { color: var(--warn); } .c-down.c-down.c-down { color: var(--down); }
.c-copper.c-copper.c-copper { color: var(--copper-hot); } .hi.hi.hi { color: var(--text-hi); } .lo.lo.lo { color: var(--text-lo); }
/* a row that opens on click says so */
.dtable tr[onclick], .dtable tr.wk-row { cursor: pointer; }
/* a superscript a script writes (the calculator power of two) stays at the floor */
sup, sub { font-size: var(--fs-min); line-height: 0; }
/* hcih: the saved address row. Short by default with Copy and Show beside it;
   open, the whole address wraps on its own lines and the tools drop below it. */
.dtable td.addr-cell .addr-text { display: inline; padding: 0; border: 0; background: none; font: inherit; color: inherit; }
.dtable td.addr-cell .addr-tools { display: inline-flex; gap: 6px; margin-left: 12px; vertical-align: middle; }
.dtable td.addr-cell.addr-open { white-space: normal; max-width: 34em; }
.dtable td.addr-cell.addr-open .addr-text { display: block; word-break: break-all; -webkit-user-select: all; user-select: all; }
.dtable td.addr-cell.addr-open .addr-tools { display: flex; margin: 8px 0 0; }
/* On a phone the table scrolls sideways, so the tools drop under the address
   where the member sees them without a swipe. */
@media (max-width: 720px) { .dtable td.addr-cell .addr-tools { display: flex; margin: 8px 0 0; } }

/* cu4j: hashrate and count readouts keep their width as digits change, so a
   refresh never shifts a column; a held value (a worker's last good reading
   carried across one stats refresh) is dimmed and titled. */
.gauge .g-value, .cell .v, .dtable td, .wk-card .hr, .soq-card .big { font-variant-numeric: tabular-nums; }
.dtable td.held, .wk-card .hr.held { opacity: .62; }

/* uo92: the directory says which column sorts it and which way, and a row
   reached by keyboard shows where focus is. */
.dtable th.sort.sorted { color: var(--text-hi); }
.dtable th.sort[aria-sort="ascending"]::after { content: " \25B2"; font-size: .8em; }
.dtable th.sort[aria-sort="descending"]::after { content: " \25BC"; font-size: .8em; }
.dtable th.sort .th-sort {
  appearance: none; background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
}
.dtable th.sort .th-sort:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.wk-card .hr .held-tag { font-size: .78em; color: var(--text-lo); }
.dtable tr[data-mid]:focus-visible { outline: 2px solid var(--copper); outline-offset: -2px; }
.dtable tr.dir-hidden td { white-space: normal; }

/* ko9x.4 Watchtower: the directory's link chip and the evidence lists */
.sec-chip { margin-left: 6px; white-space: nowrap; }
.op-group.sec-panel { align-items: start; }
.sec-links .sec-link { padding: 6px 0; border-top: 1px solid var(--seam); }
.sec-links .sec-link:first-child { border-top: 0; }
.sec-ev { margin: 4px 0 0; padding-left: 18px; }
.sec-ev li { font-size: 12px; color: var(--text-mid); overflow-wrap: anywhere; }
.sec-links { white-space: normal; }

/* 6nki: the directory's live health columns and the network chip */
.dtable.no-health .col-health { display: none; }
.pay-chip { white-space: nowrap; font-size: 12px; margin-right: 4px; }
.hlth-ago { font-size: 12px; }
.net-chip { margin-left: 6px; white-space: nowrap; }
