/* Operator panel. Same paper-and-ink language as the customer panel (app.css),
   with its own layout. No inline styles anywhere: the CSP forbids them. */
:root {
  --bg: #f5f3ee;
  --card: #fffefb;
  --ink: #16181b;
  --muted: #6d7178;
  --line: #e3dfd6;
  --soft: #ece9e1;
  --ok: #0c9a68;
  --ok-soft: #cfeadf;
  --down: #d5432a;
  --down-soft: #f8ddd6;
  --wait: #b3791a;
  --wait-soft: #f3e4c4;
  --shadow: 0 1px 2px rgb(20 20 20 / 0.04), 0 8px 24px rgb(20 20 20 / 0.05);
  --lift: 0 2px 6px rgb(20 20 20 / 0.06), 0 24px 64px rgb(20 20 20 / 0.18);
  --serif: ui-serif, 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --rail: 232px;
}
/* Dark is the default everywhere; the theme button stores 'light' to switch. */
:root:not([data-theme='light']) {
  --bg: #0d0f11;
  --card: #15181b;
  --ink: #ecebe6;
  --muted: #8d9299;
  --line: #272b30;
  --soft: #1d2125;
  --ok: #2fd197;
  --ok-soft: #173a2e;
  --down: #ff6b4f;
  --down-soft: #45211a;
  --wait: #e0a941;
  --wait-soft: #3d3016;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.35);
  --lift: 0 2px 6px rgb(0 0 0 / 0.4), 0 24px 64px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}
:root[data-theme='light'] { color-scheme: light; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 20px 14px 16px; border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; font-family: var(--serif); font-size: 19px; letter-spacing: -0.01em; }
.brand small { display: block; font: 11px/1.2 var(--sans); color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.beat { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }
.beat::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid currentColor; color: var(--ok); opacity: 0; animation: beat 2.4s ease-out infinite; }
.beat.is-degraded, .beat.is-degraded::after { background: var(--wait); color: var(--wait); }
.beat.is-degraded::after, .beat.is-down::after { background: none; }
.beat.is-down, .beat.is-down::after { background: var(--down); color: var(--down); }
.beat.is-stale { background: var(--muted); }
.beat.is-stale::after { animation: none; }
@keyframes beat { 0% { transform: scale(0.5); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .beat::after { animation: none; } * { transition: none !important; scroll-behavior: auto !important; } }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; color: var(--muted);
  transition: background 0.12s, color 0.12s;
}
.nav button:hover { background: var(--soft); color: var(--ink); }
.nav button[aria-current='page'] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.nav svg { width: 17px; height: 17px; flex: none; }
.nav .count { margin-left: auto; font-size: 12px; padding: 0 7px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.nav .count.alert { background: var(--down-soft); color: var(--down); font-weight: 600; }
.nav kbd { margin-left: auto; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.rail-foot .who { color: var(--muted); }
.rail-foot .row { display: flex; gap: 6px; flex-wrap: wrap; }
kbd { font: 11px var(--mono); padding: 1px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; color: var(--muted); background: var(--card); }

.main { min-width: 0; padding: 0 clamp(16px, 3vw, 40px) 80px; }
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
}
.top h1 { font: 500 22px/1.2 var(--serif); letter-spacing: -0.01em; }
.finder {
  display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; width: min(340px, 40vw); padding: 7px 10px 7px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); font-size: 13.5px;
}
.finder:hover { border-color: var(--muted); }
.finder svg { width: 15px; height: 15px; flex: none; }
.live { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 1280px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 6px 13px; font-size: 13.5px; white-space: nowrap; transition: border-color 0.15s, background 0.15s;
}
.btn svg { width: 14px; height: 14px; flex: none; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--soft); }
.btn.danger { color: var(--down); }
.btn.danger.solid { background: var(--down); border-color: var(--down); color: #fff; }
.btn.sm { padding: 3px 10px; font-size: 12.5px; }
.btn[disabled] { opacity: 0.5; cursor: default; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.card > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 16px 18px 0; }
.card > header h2 { font: 500 16px/1.3 var(--serif); }
.card > header .muted { font-size: 12.5px; }
.card > header .end { margin-left: auto; }
.card > .body { padding: 14px 18px 18px; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.up { background: var(--ok); }
.dot.degraded { background: var(--wait); }
.dot.down { background: var(--down); }
.dot.waiting, .dot.paused, .dot.empty, .dot.unknown { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.dot.suspended { background: var(--muted); border-radius: 2px; }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ink); }
.tag.bad { background: var(--down-soft); color: var(--ink); }
.tag.warn { background: var(--wait-soft); color: var(--ink); }
.tag.ink { background: var(--ink); color: var(--bg); }

/* ------------------------------------------------------------------ pulse */
.hero { padding: 6px 0 4px; }
.hero .eyebrow { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.hero h2 { font: 400 clamp(26px, 3.6vw, 42px)/1.15 var(--serif); letter-spacing: -0.02em; max-width: 22em; text-wrap: balance; }
.hero h2 b { font-weight: 400; }
.hero h2 .bad { color: var(--down); }
.hero h2 .good { color: var(--ok); }
.hero h2 .warn { color: var(--wait); }
.hero p { margin-top: 10px; color: var(--muted); max-width: 60ch; }

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1240px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { padding: 14px 16px; display: grid; gap: 2px; position: relative; overflow: hidden; }
.kpi .label { font-size: 12.5px; color: var(--muted); }
.kpi .value { font: 400 30px/1.15 var(--serif); letter-spacing: -0.02em; }
.kpi .value small { font: 14px var(--sans); color: var(--muted); letter-spacing: 0; }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.kpi .spark { position: absolute; right: 10px; top: 12px; width: 76px; height: 28px; color: var(--muted); }
.meter { display: flex; gap: 2px; height: 6px; margin-top: 8px; border-radius: 3px; overflow: hidden; background: var(--soft); }
.meter i { display: block; min-width: 3px; border-radius: 3px; }
.meter .up { background: var(--ok); }
.meter .degraded { background: var(--wait); }
.meter .down { background: var(--down); }
.meter .waiting { background: var(--line); }

.mosaic { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.tile {
  display: grid; gap: 8px; align-content: start; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s; min-height: 84px;
}
.tile:hover { transform: translateY(-2px); border-color: var(--muted); box-shadow: var(--shadow); }
.tile.s-down { border-color: var(--down); background: color-mix(in srgb, var(--down-soft) 45%, var(--bg)); }
.tile.s-degraded { border-color: color-mix(in srgb, var(--wait) 60%, var(--line)); }
.tile.s-suspended { opacity: 0.55; }
.tile .name { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.tile .cells { display: flex; flex-wrap: wrap; gap: 3px; }
.tile .cells i { width: 10px; height: 10px; border-radius: 3px; background: var(--ok); }
.tile .cells i.degraded { background: var(--wait); }
.tile .cells i.down { background: var(--down); }
.tile .cells i.waiting { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.tile .foot { font-size: 11.5px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.list { display: grid; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 18px; border-top: 1px solid var(--line); }
button.item:hover, .item.clickable:hover { background: var(--soft); }
.list > .item:first-child { border-top: 0; }
.item .t { font-size: 13.5px; }
.item .d { font-size: 12.5px; color: var(--muted); }
.item .end { margin-left: auto; text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.item .clock { font-family: var(--mono); color: var(--down); }
.glyph { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--soft); color: var(--muted); flex: none; }
.glyph svg { width: 15px; height: 15px; }
.glyph.bad { background: var(--down-soft); color: var(--down); }
.glyph.warn { background: var(--wait-soft); color: var(--wait); }
.blank { padding: 26px 18px; text-align: center; color: var(--muted); }
.blank b { display: block; font: 400 18px var(--serif); color: var(--ink); margin-bottom: 2px; }

.isp .name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.isp { display: grid; grid-template-columns: minmax(120px, 1.3fr) 2fr auto; gap: 12px; align-items: center; padding: 9px 18px; border-top: 1px solid var(--line); font-size: 13px; }
.isp:first-child { border-top: 0; }
.isp .bar { display: flex; gap: 2px; height: 8px; }
.isp .bar i { display: block; border-radius: 4px; background: var(--ok); min-width: 4px; }
.isp .bar i.down { background: var(--down); }
.isp .bar i.rest { background: transparent; }
.isp .n { color: var(--muted); font-size: 12.5px; white-space: nowrap; text-align: right; }

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .bar { fill: var(--ink); }
.chart .zero { fill: var(--line); }
.chart .bar.bad { fill: var(--down); }
.chart g:hover .bar.bad { fill: var(--down); opacity: 0.75; }
.chart .hit { fill: transparent; }
.chart .hit:hover + .bar, .chart g:hover .bar { fill: var(--ok); }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font: 11px var(--sans); }
.spark path { fill: none; stroke: currentColor; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }

/* --------------------------------------------------------------- accounts */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); min-width: min(280px, 100%); }
.search:focus-within { border-color: var(--ink); }
.search input { border: 0; outline: 0; background: none; width: 100%; }
.search svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--muted); background: transparent; }
.chip:hover { border-color: var(--muted); color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip span { opacity: 0.65; margin-left: 5px; }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 14px; white-space: nowrap; border-bottom: 1px solid var(--line); }
th button { color: inherit; font: inherit; display: inline-flex; gap: 4px; align-items: center; }
th button:hover { color: var(--ink); }
th.num, td.num { text-align: right; }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--soft); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.sel { background: var(--soft); }
.acct { display: flex; align-items: center; gap: 9px; min-width: 0; }
.acct .email { max-width: 28ch; }
.health { display: grid; gap: 3px; min-width: 110px; }
.health .meter { margin: 0; }
.health small { font-size: 11.5px; color: var(--muted); }

/* ----------------------------------------------------------------- drawer */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgb(10 10 10 / 0.32); animation: fade 0.15s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 21; width: min(560px, 100vw); background: var(--bg); border-left: 1px solid var(--line);
  box-shadow: var(--lift); display: flex; flex-direction: column; animation: slide 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(0.98); opacity: 0; } }
.drawer > header { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.drawer > header h2 { font: 500 20px/1.25 var(--serif); overflow-wrap: anywhere; }
.drawer > header .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.drawer .scroll { overflow: hidden auto; padding: 18px 20px 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; }
.drawer .sect, .drawer .dev, .drawer .head > *, .drawer .lines > div > * { min-width: 0; }
.drawer .lines code, .drawer .lines .end, .drawer .head .end { flex: none; }
.x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; margin-left: auto; }
.x:hover { background: var(--soft); color: var(--ink); }
.x svg { width: 16px; height: 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 16px; }
.facts div span { display: block; font-size: 11.5px; color: var(--muted); }
.sect h3 { font: 500 12px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.sect h3 .end { margin-left: auto; text-transform: none; letter-spacing: 0; }
.secret { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.secret code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.dev { padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); display: grid; gap: 7px; }
.dev + .dev { margin-top: 8px; }
.dev .head { display: flex; align-items: center; gap: 8px; }
.dev .head .end { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.strip { position: relative; height: 8px; border-radius: 4px; background: var(--ok-soft); overflow: hidden; }
.strip.idle { background: var(--soft); }
.strip i { position: absolute; top: 0; bottom: 0; min-width: 2px; background: var(--down); }
.strip i.part { background: var(--wait); }
.lines { display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); }
.lines div { display: flex; align-items: center; gap: 7px; }
.lines .end { margin-left: auto; }
.timeline { display: grid; gap: 0; font-size: 13px; }
.timeline div { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; border-top: 1px dashed var(--line); }
.timeline div:first-child { border-top: 0; }
.timeline time { color: var(--muted); font-size: 12px; white-space: nowrap; min-width: 9.5em; }
textarea.note { width: 100%; min-height: 70px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 9px 11px; }
textarea.note:focus { outline: none; border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--down) 40%, var(--line)); border-radius: 12px; padding: 12px 13px; display: grid; gap: 10px; }
.danger-zone p { font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- dialogs */
.modal-wrap { position: fixed; inset: 0; z-index: 40; display: grid; place-items: start center; padding: 14vh 16px 16px; background: rgb(10 10 10 / 0.4); animation: fade 0.12s; }
.modal { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--lift); padding: 20px; display: grid; gap: 12px; animation: pop 0.16s; }
.modal h2 { font: 500 19px var(--serif); }
.modal p { color: var(--muted); font-size: 13.5px; }
.modal .err { color: var(--down); font-size: 13px; min-height: 1.2em; }
.modal .row { display: flex; justify-content: flex-end; gap: 8px; }
.field { display: block; }
.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field input { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 11px; }
.field input:focus { outline: none; border-color: var(--ink); }
.modal.wide { width: min(540px, 100%); }
.modal .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.modal .fields .full { grid-column: 1 / -1; }
.modal .row .push { margin-right: auto; }

.palette { width: min(600px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--lift); overflow: hidden; animation: pop 0.14s; }
.palette input { width: 100%; border: 0; outline: 0; background: none; padding: 16px 18px; font-size: 16px; border-bottom: 1px solid var(--line); }
.palette .results { max-height: min(52vh, 420px); overflow-y: auto; padding: 6px; }
.palette .group { padding: 8px 12px 4px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.palette .opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 10px; }
.palette .opt[aria-selected='true'] { background: var(--soft); }
.palette .opt .hint { margin-left: auto; font-size: 12px; color: var(--muted); }
.palette .opt svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.palette footer { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

.tip { position: fixed; z-index: 60; pointer-events: none; max-width: 280px; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 12px; line-height: 1.4; white-space: pre-line; box-shadow: var(--shadow); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 70; background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-size: 13.5px; box-shadow: var(--lift); animation: pop 0.16s; }
.toast.bad { background: var(--down); color: #fff; }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate .card { padding: 28px; max-width: 420px; display: grid; gap: 12px; text-align: center; justify-items: center; }
.gate h1 { font: 400 26px var(--serif); }
.gate p { color: var(--muted); }
.gate .signin { justify-items: stretch; text-align: start; width: 100%; }
.gate .signin h1, .gate .signin p { text-align: center; }
.gate .signin .err { min-height: 18px; color: var(--down); font-size: 13px; }
.gate .signin .btn { justify-content: center; text-align: center; }

.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 9px 18px; border-top: 1px solid var(--line); font-size: 13.5px; }
.check:first-child { border-top: 0; }
.check .dot { margin-top: 6px; }
.hbar { display: grid; grid-template-columns: 9em 1fr 3em; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.hbar .track { height: 8px; }
.hbar .track i { display: block; height: 100%; border-radius: 4px; background: var(--ink); min-width: 4px; }
.hbar .n { text-align: right; color: var(--muted); }

/* ----------------------------------------------------------------- mobile */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 10; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--line); background: var(--bg);
  }
  .rail .brand, .rail-foot, .nav .label, .nav kbd { display: none; }
  .nav { flex-direction: row; flex: 1; justify-content: space-around; }
  .nav button { width: auto; padding: 9px 14px; position: relative; }
  .nav .count { position: absolute; top: 0; right: 0; margin: 0; font-size: 10px; padding: 0 5px; }
  .nav .count:not(.alert) { display: none; }
  .main { padding-bottom: 96px; }
  .finder { width: auto; }
  .finder .label, .finder kbd, .live { display: none; }
  .top h1 { font-size: 19px; }
}

/* ------------------------------------------------------------------ plans */
.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hero .eyebrow svg { width: 14px; height: 14px; }
.modes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
@media (max-width: 1240px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { display: flex; flex-direction: column; gap: 6px; padding: 18px; position: relative; overflow: hidden; }
.plan::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--line); }
.plan.current::before { background: var(--ok); }
.plan .theme { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.plan .theme .tag { letter-spacing: 0; text-transform: none; }
.plan .theme .tags { display: flex; gap: 6px; }
.plan h3 { font: 400 28px/1.1 var(--serif); letter-spacing: -0.02em; margin-top: 6px; }
.plan .tagline { color: var(--muted); font-size: 13px; min-height: 2.6em; }
.plan .price { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.plan .price b { font: 400 34px/1 var(--serif); letter-spacing: -0.02em; }
.plan .price span, .plan .yearly { color: var(--muted); font-size: 12.5px; }
.plan .yearly { min-height: 1.5em; white-space: pre; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.plan .limits { padding: 12px 0; margin-top: 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13.5px; }
.plan .plus { font-size: 12px; color: var(--muted); margin-top: 8px; }
.plan .features { font-size: 13px; margin-top: 6px; }
.plan .features li { display: flex; gap: 8px; align-items: baseline; }
.plan .features .dot { position: relative; top: -1px; width: 7px; height: 7px; }
.plan footer { margin-top: auto; padding-top: 16px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.sharebar { flex: 1; height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.sharebar i { display: block; height: 100%; border-radius: 3px; background: var(--ink); }
.item.top { align-items: flex-start; }
.item .d.wrap { white-space: normal; }
.chip[disabled] { cursor: default; }
.chip[disabled]:not([aria-pressed='true']) { opacity: 0.45; }
.drawer .chips + .meter { margin: 10px 0 6px; }
.plan .cost { margin-top: 12px; font-size: 12px; color: var(--muted); }
.warnline { color: var(--wait); font-size: 13px; }
