/* Genesis Console — design reference system.
   Palette: assets/tokens.css, copied verbatim from the Console shell contract (--l1fe-console-*).
   Type: Hanken Grotesk (UI), Schibsted Grotesk (page titles), JetBrains Mono (identifiers, time, numbers).
   This file styles a static design reference. It is not production code. */

@font-face { font-family: 'Hanken Grotesk'; src: url('../assets/fonts/hanken-grotesk-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../assets/fonts/jetbrains-mono-latin.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: 'Schibsted Grotesk'; src: url('../assets/fonts/SchibstedGrotesk-wght.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }

:root {
  color-scheme: light;
  --canvas: var(--l1fe-console-canvas);
  --rail: var(--l1fe-console-sidebar);
  --hover: var(--l1fe-console-hover);
  --ink: var(--l1fe-console-ink);
  --ink-2: var(--l1fe-console-secondary);
  --ink-3: #8a8a8a;
  --line: var(--l1fe-console-line);
  --line-2: var(--l1fe-console-zinc-300);
  --wash: #fafafa;
  --brand: var(--l1fe-console-brand-600);
  --focus: var(--l1fe-console-focus);
  --button: var(--l1fe-console-button);
  --button-ink: var(--l1fe-console-button-foreground);
  --control: var(--l1fe-console-control);
  --control-line: var(--l1fe-console-control-border);
  --pop: var(--l1fe-console-popover);
  --shadow-pop: 0 1px 2px rgb(0 0 0 / .05), 0 12px 32px -8px rgb(0 0 0 / .18);
  /* Status: reserved, always paired with a glyph and a label. */
  --ok: #0ca30c; --warn: #b97e00; --warn-mark: #fab219; --serious: #c2562a; --crit: #d03b3b;
  --series: #2a78d6; --series-soft: #cde2fb;
  --sandbox: #9a6700; --sandbox-wash: #fff8e6; --sandbox-line: #f0d9a0;
  --font-sans: 'Hanken Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Schibsted Grotesk', 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
  --r-1: 5px; --r-2: 7px; --r-3: 10px;
  --rail-w: 248px; --top-h: 52px; --cap-w: 204px;
}
.dark {
  color-scheme: dark;
  --ink-3: #7d7d7d; --line-2: #3d3d3d; --wash: #1e1e1e;
  --shadow-pop: 0 1px 2px rgb(0 0 0 / .4), 0 16px 40px -8px rgb(0 0 0 / .7);
  --ok: #2fbf2f; --warn: #fab219; --serious: #ec835a; --crit: #e66767;
  --series: #3987e5; --series-soft: #184f95;
  --sandbox: #f2c14e; --sandbox-wash: #2a2413; --sandbox-line: #4a3d17;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; scrollbar-gutter: stable; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 14px/1.5 var(--font-sans); font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
svg { display: block; flex: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-1); }
::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); }
.mono { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -48px; z-index: 100; padding: 8px 12px; background: var(--button); color: var(--button-ink); border-radius: var(--r-2); font-size: 13px; transition: top 120ms; }
.skip:focus { top: 12px; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ic-16 { width: 16px; height: 16px; } .ic-14 { width: 14px; height: 14px; } .ic-20 { width: 20px; height: 20px; }

/* ── Shell ─────────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100dvh; }
.rail { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--rail); border-right: 1px solid var(--line); z-index: 30; }
.rail-top { padding: 14px 12px 6px; }
.brand { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 6px; margin-bottom: 12px; }
.brand svg { height: 13px; width: auto; }
.brand b { font: 600 14px/1 var(--font-display); letter-spacing: -.01em; }
.brand .rail-toggle { margin-left: auto; }
.jump { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-2); color: var(--ink-2); font-size: 12.5px; text-align: left; background: var(--canvas); transition: border-color 120ms; }
.jump:hover { border-color: var(--line-2); }
.jump kbd { margin-left: auto; }
kbd { font: 500 10.5px/1 var(--font-mono); color: var(--ink-2); padding: 3px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--canvas); }
.rail-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 14px; scrollbar-width: thin; }
.rail-bottom { border-top: 1px solid var(--line); padding: 8px; }
.nav-group { margin-top: 14px; }
.nav-group > h3 { display: flex; align-items: center; height: 24px; padding: 0 10px; font: 500 11px/1 var(--font-sans); color: var(--ink-2); }
.nav-group > h3 span { margin-left: auto; font: 400 10.5px/1 var(--font-mono); color: var(--ink-3); }
.nav a, .nav button.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 6px 10px; border-radius: var(--r-2); font-size: 13px; line-height: 20px; font-weight: 450; color: var(--ink); text-align: left; transition: background-color 120ms; }
.nav a:hover, .nav button.nav-item:hover { background: color-mix(in srgb, var(--hover) 70%, transparent); }
.nav a .ic { color: var(--ink-2); }
.nav a[aria-current='page'] { background: var(--hover); font-weight: 600; }
.nav a[aria-current='page'] .ic { color: var(--ink); }
.nav a .count { margin-left: auto; font: 400 11px/1 var(--font-mono); color: var(--ink-3); }
.nav a .flag { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--warn-mark); }
.nav a .ext { margin-left: auto; color: var(--ink-3); }
.rail .who { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; margin-top: 4px; border-radius: var(--r-2); text-align: left; }
.rail .who:hover { background: color-mix(in srgb, var(--hover) 70%, transparent); }
.avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--canvas); font: 600 10.5px/1 var(--font-sans); flex: none; }
.who span { display: block; min-width: 0; }
.who b { display: block; font-size: 12.5px; font-weight: 550; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who i { display: block; font-style: normal; font-size: 11px; line-height: 15px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 2px; height: var(--top-h); padding: 0 16px 0 14px; background: var(--canvas); border-bottom: 1px solid var(--line); }
.topbar .menu-btn { display: none; }
.ctx { display: flex; align-items: center; min-width: 0; }
.ctx-sep { color: var(--ink-3); margin: 0 1px; flex: none; }
.ctx-btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px; border-radius: var(--r-2); text-align: left; min-width: 0; max-width: 220px; transition: background-color 120ms; }
.ctx-btn:hover, .ctx-btn[aria-expanded='true'] { background: color-mix(in srgb, var(--hover) 70%, transparent); }
.ctx-btn > span { display: block; min-width: 0; }
.ctx-btn small { display: block; font-size: 11px; line-height: 15px; font-weight: 500; color: var(--ink-2); }
.ctx-btn b { display: block; font-size: 13px; line-height: 18px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-btn .ic { color: var(--ink-3); }
.ctx-btn[data-unset] b { font-weight: 400; color: var(--ink-2); }
.env { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px 0 8px; margin-left: 8px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; font-weight: 550; flex: none; }
.env i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.env[data-env='sandbox'] { color: var(--sandbox); background: var(--sandbox-wash); border-color: var(--sandbox-line); }
.env[data-env='sandbox'] i { background: transparent; border: 1.5px solid currentColor; }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-2); color: var(--ink-2); transition: background-color 120ms, color 120ms; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }

/* ── Page frame ────────────────────────────────────────────────────────── */
.page { width: 100%; max-width: 1320px; padding: 28px 32px 96px; }
.page.wide { max-width: none; }
.svc { display: grid; grid-template-columns: var(--cap-w) minmax(0, 1fr); align-items: start; }
.capnav { position: sticky; top: var(--top-h); height: calc(100dvh - var(--top-h)); overflow-y: auto; padding: 22px 10px 32px 14px; border-right: 1px solid var(--line); scrollbar-width: thin; }
.capnav .svc-id { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; }
.capnav .svc-id b { font: 600 14px/18px var(--font-display); }
.capnav .svc-id small { display: block; font-size: 11.5px; line-height: 15px; color: var(--ink-2); }
.capnav h3 { margin: 14px 0 2px; padding: 0 10px; font: 500 11px/20px var(--font-sans); color: var(--ink-2); }
.capnav a { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 5px 10px; border-radius: var(--r-2); font-size: 13px; line-height: 20px; font-weight: 450; transition: background-color 120ms; }
.capnav a:hover { background: color-mix(in srgb, var(--hover) 70%, transparent); }
.capnav a[aria-current='page'] { background: var(--hover); font-weight: 600; }
.capnav a .count { margin-left: auto; font: 400 11px/1 var(--font-mono); color: var(--ink-3); }
.capnav a .ext { margin-left: auto; color: var(--ink-3); }
.cap-select, .cap-select.field { display: none; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 12.5px; color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs .ic { color: var(--ink-3); }
.head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.glyph { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); flex: none; }
.glyph .ic { width: 20px; height: 20px; }
.head h1 { font: 600 22px/28px var(--font-display); letter-spacing: -.015em; }
.head .sub { margin-top: 3px; max-width: 68ch; font-size: 13.5px; line-height: 20px; color: var(--ink-2); }
.head .aside { margin-left: auto; display: flex; align-items: center; gap: 8px; padding-top: 2px; flex: none; }
.head .title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.read-at { display: inline-flex; align-items: center; gap: 6px; font: 400 11.5px/1 var(--font-mono); color: var(--ink-2); }
h2.sec { display: flex; align-items: baseline; gap: 10px; margin: 34px 0 12px; font: 600 15px/22px var(--font-sans); }
h2.sec small { font-size: 12.5px; font-weight: 400; color: var(--ink-2); }
h2.sec a { margin-left: auto; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
h2.sec a:hover { color: var(--ink); }
.lede { max-width: 72ch; font-size: 13.5px; line-height: 21px; color: var(--ink-2); }

/* ── Controls ──────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--canvas); font-size: 13px; font-weight: 550; line-height: 1; white-space: nowrap; transition: background-color 120ms, border-color 120ms; }
.btn:hover { background: var(--wash); border-color: var(--ink-3); }
.btn.primary { background: var(--button); border-color: var(--button); color: var(--button-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--button) 88%, var(--canvas)); }
.btn.quiet { border-color: transparent; color: var(--ink-2); padding: 0 8px; }
.btn.quiet:hover { background: var(--hover); color: var(--ink); }
.btn.danger { color: var(--crit); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 12.5px; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .5; cursor: not-allowed; }
.field { display: grid; gap: 6px; }
.field > label, .field > span.lab { font-size: 12.5px; font-weight: 550; }
.field > small { font-size: 12px; line-height: 17px; color: var(--ink-2); }
.input, .select { width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--control-line); border-radius: var(--r-2); background: var(--control); font-size: 13px; transition: border-color 120ms; }
.input:hover, .select:hover { border-color: var(--ink-3); }
.input:focus-visible, .select:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
.search { position: relative; flex: 1 1 220px; max-width: 320px; }
.search .ic { position: absolute; left: 9px; top: 8px; width: 16px; height: 16px; color: var(--ink-2); pointer-events: none; }
.search .input { padding-left: 32px; padding-right: 30px; }
.search kbd { position: absolute; right: 7px; top: 7px; }
.seg { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--wash); }
.seg button { height: 26px; padding: 0 10px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.seg button[aria-pressed='true'], .seg button[aria-selected='true'] { background: var(--canvas); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line), 0 1px 1px rgb(0 0 0 / .04); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.chip.on { border-color: var(--ink); color: var(--ink); }
button.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--hover); font: 500 11px/1 var(--font-mono); color: var(--ink-2); white-space: nowrap; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.toolbar .spacer { flex: 1; }
.toolbar .tally { font-size: 12.5px; color: var(--ink-2); }

/* ── Tabs ──────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role='tab'], .tabs a { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 9px 0 11px; font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tabs [role='tab']:hover, .tabs a:hover { color: var(--ink); }
.tabs [aria-selected='true'], .tabs a[aria-current='page'] { color: var(--ink); font-weight: 600; }
.tabs [aria-selected='true']::after, .tabs a[aria-current='page']::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.tabs .count { font: 400 11px/1 var(--font-mono); color: var(--ink-3); }
.tabs .ext { color: var(--ink-3); }

/* ── Tables ────────────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
.tbl { font-size: 13px; line-height: 20px; }
.tbl th { padding: 9px 12px 8px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--ink-2); text-align: left; white-space: nowrap; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl th button { display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; }
.tbl th button:hover { color: var(--ink); }
.tbl th[aria-sort] { color: var(--ink); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th:first-child, .tbl td:first-child { padding-left: 8px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 8px; }
.tbl tbody tr { transition: background-color 120ms; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--hover) 45%, transparent); }
.tbl tbody tr[data-href] { cursor: pointer; }
.tbl tbody tr:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 0; }
.tbl tbody tr[data-gone] td { color: var(--ink-2); }
.tbl .name { font-weight: 550; }
.tbl .name small { display: block; margin-top: 1px; font: 400 11.5px/16px var(--font-mono); color: var(--ink-2); }
.tbl .go { width: 28px; color: var(--ink-3); }
.tbl tr:hover .go { color: var(--ink); }
.tbl td.wrap { white-space: normal; min-width: 220px; }
.tbl.compact td { padding-top: 7px; padding-bottom: 7px; }
.tbl-foot { display: flex; align-items: center; gap: 12px; padding: 12px 8px 0; font-size: 12.5px; color: var(--ink-2); }
.tbl-foot .spacer { flex: 1; }

/* Status: glyph + label, never colour alone. */
.st { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; white-space: nowrap; }
.st svg { width: 14px; height: 14px; }
.st[data-s='running'] svg, .st[data-s='ok'] svg, .st[data-s='active'] svg { color: var(--ok); }
.st[data-s='attention'] svg, .st[data-s='pending'] svg { color: var(--warn-mark); }
.st[data-s='failed'] svg, .st[data-s='revoked'] svg { color: var(--crit); }
.st[data-s='paused'] svg, .st[data-s='unknown'] svg, .st[data-s='deleted'] svg { color: var(--ink-2); }
.st[data-s='deleted'], .st[data-s='unknown'] { color: var(--ink-2); }
/* "Not measured" is a value in its own right. It is never rendered as 0. */
.nm { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 12.5px; border-bottom: 1px dotted var(--ink-3); cursor: help; }

/* ── Facts, strips, panels ─────────────────────────────────────────────── */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--line); overflow: hidden; }
.strip > div { padding: 15px 18px 16px; background: var(--canvas); min-width: 0; }
.strip dt, .strip .k { font-size: 12px; line-height: 18px; color: var(--ink-2); }
.strip dd, .strip .v { margin-top: 4px; font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.strip .v.sm { font-size: 14px; line-height: 22px; font-weight: 550; letter-spacing: 0; }
.strip .n { display: block; margin-top: 3px; font-size: 11.5px; line-height: 16px; color: var(--ink-2); }
.strip a.n:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); column-gap: 32px; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facts dt { font-size: 12.5px; color: var(--ink-2); }
.facts dd { font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.rows { border-top: 1px solid var(--line); }
.rows > * { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(0, 1.6fr) auto; align-items: center; gap: 20px; padding: 14px 8px; border-bottom: 1px solid var(--line); }
.rows > a:hover { background: var(--wash); }
.rows b { font-size: 13px; font-weight: 550; }
.rows p { font-size: 13px; line-height: 20px; color: var(--ink-2); }
.panel { border: 1px solid var(--line); border-radius: var(--r-3); background: var(--canvas); }
.panel > header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel > header h3 { font-size: 13px; font-weight: 600; }
.panel > header .spacer { flex: 1; }
.panel > .body { padding: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .9fr); gap: 40px; align-items: start; }
.copy { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font: 400 12px/18px var(--font-mono); color: var(--ink); }
.copy button { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; color: var(--ink-3); }
.copy button:hover { background: var(--hover); color: var(--ink); }
.copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Notices: a rule and a sentence. No tinted boxes except the sandbox band. */
.note { display: grid; grid-template-columns: 16px 1fr; gap: 10px; padding: 2px 0 2px 12px; border-left: 2px solid var(--line-2); font-size: 13px; line-height: 20px; color: var(--ink-2); }
.note .ic { width: 16px; height: 16px; margin-top: 2px; }
.note b { color: var(--ink); font-weight: 600; }
.note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.note[data-tone='warn'] { border-left-color: var(--warn-mark); } .note[data-tone='warn'] .ic { color: var(--warn); }
.note[data-tone='crit'] { border-left-color: var(--crit); } .note[data-tone='crit'] .ic { color: var(--crit); }
.note + .note { margin-top: 10px; }
.headless { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 11px 14px; border: 1px dashed var(--line-2); border-radius: var(--r-3); font-size: 13px; color: var(--ink-2); }
.headless .ic { color: var(--ink-2); }
.headless b { color: var(--ink); font-weight: 600; }
.headless code { font: 400 12px/18px var(--font-mono); color: var(--ink); padding: 2px 6px; border-radius: 4px; background: var(--hover); }
.headless .spacer { flex: 1; }

/* ── Code ──────────────────────────────────────────────────────────────── */
.code { border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; }
.code > header { display: flex; align-items: center; gap: 4px; height: 38px; padding: 0 8px 0 6px; border-bottom: 1px solid var(--line); background: var(--wash); }
.code > header [role='tab'] { height: 26px; padding: 0 10px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.code > header [role='tab'][aria-selected='true'] { background: var(--canvas); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.code > header .spacer { flex: 1; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 400 12.5px/20px var(--font-mono); tab-size: 2; }
.code pre .c { color: var(--ink-2); }
.code pre .k { color: var(--brand); }
.log { border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; }
.log > header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--wash); }
.log ol { max-height: 440px; overflow: auto; padding: 6px 0; font: 400 12px/20px var(--font-mono); }
.log li { display: grid; grid-template-columns: 96px 52px minmax(0, 1fr); gap: 12px; padding: 1px 14px; }
.log li:hover { background: var(--wash); }
.log time { color: var(--ink-2); }
.log .lv { font-weight: 600; }
.log .lv[data-l='warn'] { color: var(--warn); } .log .lv[data-l='error'] { color: var(--crit); } .log .lv[data-l='info'], .log .lv[data-l='debug'] { color: var(--ink-2); }
.log .msg { overflow-wrap: anywhere; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 550; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.live[data-paused] i { background: transparent; border: 1.5px solid var(--ink-2); }

/* ── Charts: one series, one hue ───────────────────────────────────────── */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .bar { fill: var(--series); }
.chart .bar.dim { fill: var(--series-soft); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--ink-2); font: 400 10.5px var(--font-mono); }
.chart .hit { fill: transparent; }
.chart .hit:hover + .bar, .chart .bar.on { fill: color-mix(in srgb, var(--series) 78%, var(--ink)); }
.tip { position: absolute; z-index: 5; pointer-events: none; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--pop); box-shadow: var(--shadow-pop); font-size: 12px; line-height: 17px; white-space: nowrap; transform: translate(-50%, calc(-100% - 8px)); }
.tip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.meter .track { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--hover); overflow: hidden; }
.meter .track i { display: block; height: 100%; border-radius: 2px; background: var(--series); }

/* ── States ────────────────────────────────────────────────────────────── */
.state { max-width: 620px; padding: 36px 8px 28px; }
.state .ic-wrap { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-2); }
.state h3 { font: 600 15px/22px var(--font-sans); }
.state p { margin-top: 6px; font-size: 13.5px; line-height: 21px; color: var(--ink-2); }
.state .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.state .code { margin-top: 16px; }
.state dl { margin-top: 14px; font-size: 12.5px; color: var(--ink-2); display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.state dd { font-family: var(--font-mono); font-size: 12px; color: var(--ink); }
.skel td { padding-top: 13px; padding-bottom: 13px; }
.skel i { display: block; height: 10px; border-radius: 3px; background: var(--hover); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }

/* ── Overlays ──────────────────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / .32); }
.palette { position: fixed; left: 50%; top: 14vh; z-index: 70; width: min(600px, calc(100vw - 32px)); transform: translateX(-50%); border: 1px solid var(--line); border-radius: 12px; background: var(--pop); box-shadow: var(--shadow-pop); overflow: hidden; }
.palette input { width: 100%; height: 48px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 15px; }
.palette ul { max-height: 52vh; overflow: auto; padding: 6px; }
.palette li.h { padding: 10px 10px 4px; font-size: 11px; font-weight: 500; color: var(--ink-2); }
.palette li[role='option'] { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px; border-radius: var(--r-2); font-size: 13px; cursor: pointer; }
.palette li[role='option'] .ic { color: var(--ink-2); }
.palette li[role='option'] small { margin-left: auto; font-size: 11.5px; color: var(--ink-2); }
.palette li[aria-selected='true'] { background: var(--hover); }
.palette footer { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-2); }
.menu { position: absolute; z-index: 50; min-width: 240px; max-width: 340px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--pop); box-shadow: var(--shadow-pop); }
.menu h4 { padding: 8px 10px 4px; font-size: 11px; font-weight: 500; color: var(--ink-2); }
.menu [role='menuitemradio'], .menu [role='menuitem'] { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 6px 10px; border-radius: var(--r-2); font-size: 13px; text-align: left; }
.menu [role='menuitemradio']:hover, .menu [role='menuitem']:hover, .menu [role]:focus-visible { background: var(--hover); outline: none; }
.menu [aria-checked='true'] { font-weight: 600; }
.menu .tick { margin-left: auto; color: var(--ink); }
.menu small { display: block; font-size: 11.5px; line-height: 15px; color: var(--ink-2); font-weight: 400; }
.menu hr { height: 1px; margin: 6px 0; border: 0; background: var(--line); }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; display: flex; flex-direction: column; width: min(520px, 100vw); background: var(--canvas); border-left: 1px solid var(--line); box-shadow: var(--shadow-pop); animation: slide-in 160ms ease-out; }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.sheet > header { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.sheet > header h2 { font: 600 16px/22px var(--font-display); }
.sheet > header p { margin-top: 2px; font-size: 12.5px; line-height: 18px; color: var(--ink-2); }
.sheet > header .icon-btn { margin-left: auto; margin-top: -4px; margin-right: -6px; }
.sheet > .body { flex: 1; overflow: auto; padding: 20px; display: grid; gap: 18px; align-content: start; }
.sheet > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.steps { display: flex; gap: 6px; margin-bottom: 2px; }
.steps i { flex: 1; height: 2px; border-radius: 1px; background: var(--hover); }
.steps i.on { background: var(--ink); }
.choice { display: grid; gap: 8px; }
.choice label { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-3); cursor: pointer; transition: border-color 120ms; }
.choice label:hover { border-color: var(--ink-3); }
.choice label:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.choice input { margin: 3px 0 0; accent-color: var(--ink); }
.choice b { display: block; font-size: 13px; font-weight: 600; }
.choice small { display: block; margin-top: 1px; font-size: 12px; line-height: 17px; color: var(--ink-2); }
.secret { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-3); background: var(--wash); font: 500 12.5px/18px var(--font-mono); overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; bottom: 68px; z-index: 90; transform: translateX(-50%); padding: 9px 14px; border-radius: 8px; background: var(--ink); color: var(--canvas); font-size: 13px; box-shadow: var(--shadow-pop); }

/* Environment band: the one place a tint is allowed, because it guards money and data. */
.band { display: flex; align-items: center; gap: 10px; padding: 7px 32px; background: var(--sandbox-wash); border-bottom: 1px solid var(--sandbox-line); font-size: 12.5px; color: var(--sandbox); }
.band b { font-weight: 600; }

/* ── Design-reference chrome (not product UI) ──────────────────────────── */
.dock { position: fixed; right: 14px; bottom: 14px; z-index: 55; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px dashed var(--ink-3); border-radius: 999px; background: var(--pop); box-shadow: var(--shadow-pop); font: 500 11px/1 var(--font-mono); color: var(--ink-2); }
.dock select { height: 24px; padding: 0 22px 0 8px; border: 1px solid var(--line); border-radius: 999px; background-color: var(--canvas); font: 500 11px/1 var(--font-mono); color: var(--ink); appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; background-size: 11px; }
.dock a { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--canvas); }
.dock a[aria-current='page'] { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.dock button { height: 24px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; font: 500 11px/1 var(--font-mono); color: var(--ink); background: var(--canvas); }
.dock button[aria-pressed='true'] { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.annot { display: none; }
.annotate .annot { display: block; margin: 10px 0; padding: 8px 10px; border: 1px dashed var(--brand); border-radius: 8px; font: 400 11.5px/17px var(--font-mono); color: var(--brand); }
.annot b { font-weight: 600; }

/* ── Responsive ────────────────────────────────────────────────────────── */
.app[data-rail='mini'] { --rail-w: 60px; }
.app[data-rail='mini'] .rail-top { padding: 14px 8px 6px; }
.app[data-rail='mini'] .brand b, .app[data-rail='mini'] .jump span, .app[data-rail='mini'] .jump kbd, .app[data-rail='mini'] .nav a > span, .app[data-rail='mini'] .nav a .count, .app[data-rail='mini'] .nav a .ext, .app[data-rail='mini'] .nav-group > h3, .app[data-rail='mini'] .who span { display: none; }
.app[data-rail='mini'] .brand { justify-content: center; padding: 0; flex-direction: column; height: auto; gap: 10px; }
.app[data-rail='mini'] .brand .rail-toggle { margin: 0; }
.app[data-rail='mini'] .jump, .app[data-rail='mini'] .nav a, .app[data-rail='mini'] .who { justify-content: center; padding-left: 0; padding-right: 0; }
.app[data-rail='mini'] .nav-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.app[data-rail='mini'] .nav a .flag { position: absolute; margin: -14px 0 0 16px; }
.app[data-rail='mini'] .nav a { position: relative; }

@media (max-width: 1180px) {
  :root { --cap-w: 184px; }
  .page { padding: 24px 24px 96px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 1023px) {
  .app, .app[data-rail='mini'] { grid-template-columns: minmax(0, 1fr); --rail-w: 280px; }
  .rail { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform 180ms ease-out; box-shadow: var(--shadow-pop); }
  .app[data-drawer='open'] .rail { transform: none; }
  .app[data-rail='mini'] .brand b, .app[data-rail='mini'] .jump span, .app[data-rail='mini'] .jump kbd, .app[data-rail='mini'] .nav a > span, .app[data-rail='mini'] .nav a .count, .app[data-rail='mini'] .nav-group > h3, .app[data-rail='mini'] .who span { display: revert; }
  .rail-toggle { display: none !important; }
  .topbar .menu-btn { display: grid; }
  .ctx .ctx-btn[data-level='workspace'], .ctx .ctx-sep[data-for='workspace'] { display: none; }
  .svc { grid-template-columns: minmax(0, 1fr); }
  .capnav { display: none; }
  .cap-select, .cap-select.field { display: grid; margin-bottom: 18px; }
  .nav a, .capnav a { min-height: 40px; }
}
@media (max-width: 720px) {
  .page { padding: 20px 16px 96px; }
  .band { padding: 7px 16px; }
  .topbar { padding: 0 8px; }
  .ctx .ctx-btn[data-level='project'], .ctx .ctx-sep[data-for='project'] { display: none; }
  .ctx-btn { max-width: 150px; }
  .head { flex-wrap: wrap; }
  .head .aside { margin-left: 0; flex-basis: 100%; flex-wrap: wrap; }
  .head h1 { font-size: 20px; line-height: 26px; }
  .rows > * { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .rows p { grid-column: 1; }
  /* Tables become labelled records. Every cell keeps its column name. */
  .tbl.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl.stack tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 8px; border-bottom: 1px solid var(--line); }
  .tbl.stack td { display: block; padding: 0; border: 0; text-align: left; }
  .tbl.stack td.r { text-align: left; }
  .tbl.stack td:first-child { grid-column: 1; }
  .tbl.stack td[data-k='status'] { grid-column: 2; grid-row: 1; justify-self: end; }
  .tbl.stack td:not(:first-child):not([data-k='status']) { grid-column: 1 / -1; display: grid; grid-template-columns: 110px 1fr; font-size: 12.5px; }
  .tbl.stack td:not(:first-child):not([data-k='status'])::before { content: attr(data-label); color: var(--ink-2); }
  .tbl.stack td.go { display: none; }
  .log li { grid-template-columns: 1fr; gap: 0; padding: 4px 12px; }
  .dock { left: 10px; right: 10px; justify-content: space-between; border-radius: 12px; }
  .toolbar .select { flex: 1 1 140px; }
  .toolbar .tally { flex-basis: 100%; }
  .strip { grid-template-columns: 1fr 1fr; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .palette { top: 8vh; }
  .dock .lbl { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .st svg, .nav a[aria-current='page'], .tabs [aria-selected='true']::after { forced-color-adjust: auto; }
  .chart .bar { fill: Highlight; }
}

/* ── Additions ─────────────────────────────────────────────────────────── */
.brand a { color: var(--ink); border-radius: var(--r-1); }
.glyph.sm { width: 30px; height: 30px; border-radius: 8px; }
.glyph.sm .ic { width: 18px; height: 18px; }
.svc-cell { display: flex; align-items: center; gap: 12px; }
.tbl tr.grp th { padding: 22px 8px 7px; border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 500; color: var(--ink-2); text-align: left; }
.tbl tbody:first-of-type tr.grp th { padding-top: 12px; }
.tbl tr.grp:hover { background: none; }
.tbl thead + tbody tr.grp th { border-top: 0; }
@media (max-width: 720px) {
  .tbl.stack tr.grp { display: block; padding: 16px 8px 6px; }
  .tbl.stack tr.grp th { display: block; padding: 0; border: 0; }
}
.seg a { display: inline-flex; border-radius: 6px; }
.seg a:focus-visible { outline-offset: 0; }
.seg a button { pointer-events: none; }
nav.seg { flex-wrap: wrap; }
.rows > div > .st, .rows > div > .tag, .rows > div > .mono, .rows > div > .nm { justify-self: end; }
#page-title:focus, #page-title:focus-visible { outline: none; }
@media (max-width: 720px) { .tbl.stack td.go { display: none !important; } }
