/* ══════════════════════════════════════════════════════════════════════
   Coframe Ops — monitoring console design system
   Single source of tokens + components for:
     index.html (overview) · alert.html · rules.html · history.html

   Posture: serious operations console. Cool neutral canvas, hairline
   borders, one sans family + mono for IDs/numerics, compact 14px
   dashboard density. ONE accent (cobalt) used at most twice per screen —
   the primary action and the active nav rail. All other color is
   semantic status: crit / warn / ok / idle.
   ══════════════════════════════════════════════════════════════════════ */

/* ─── tokens ────────────────────────────────────────────────────────── */
:root {
  --bg:        oklch(97.6% 0.003 255);
  --surface:   oklch(100% 0 0);
  --surface-2: oklch(98.4% 0.003 255);
  --fg:        oklch(21% 0.016 258);
  --muted:     oklch(52% 0.013 258);
  --border:    oklch(91.5% 0.005 258);
  --accent:    oklch(52% 0.172 262);

  /* semantic status — not the accent budget */
  --crit: oklch(55% 0.196 25);
  --warn: oklch(62% 0.140 68);
  --ok:   oklch(56% 0.122 158);
  --idle: oklch(62% 0.010 258);

  /* derived — do not hand-author new tints */
  --accent-soft: color-mix(in oklch, var(--accent) 12%, transparent);
  --crit-soft:   color-mix(in oklch, var(--crit) 12%, transparent);
  --warn-soft:   color-mix(in oklch, var(--warn) 15%, transparent);
  --ok-soft:     color-mix(in oklch, var(--ok) 13%, transparent);
  --fg-soft:     color-mix(in oklch, var(--fg) 5%, transparent);
  --fg-hairline: color-mix(in oklch, var(--fg) 9%, transparent);

  --font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;

  --fs-body: 14px;
  --fs-meta: 12px;
  --fs-micro: 11px;

  --gap-xs: 6px;
  --gap-sm: 10px;
  --gap-md: 16px;
  --gap-lg: 24px;
  --gap-xl: 36px;

  --radius: 8px;
  --radius-sm: 5px;
  --sidebar: 228px;
  --content: 1680px;

  /* native controls (select popups, scrollbars, caret) follow the theme */
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg:        oklch(19% 0.012 258);
  --surface:   oklch(23% 0.013 258);
  --surface-2: oklch(21% 0.012 258);
  --fg:        oklch(95% 0.005 258);
  --muted:     oklch(68% 0.011 258);
  --border:    oklch(31% 0.012 258);
  --accent:    oklch(68% 0.150 262);

  --crit: oklch(68% 0.175 25);
  --warn: oklch(76% 0.135 72);
  --ok:   oklch(72% 0.135 158);
  --idle: oklch(52% 0.010 258);
}

/* ─── reset & base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/* 44px engineering grid in negative space only — panels are opaque */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, var(--fg) 1px, transparent 1px),
    linear-gradient(to bottom, var(--fg) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.035;
}
/* [hidden] must beat component display rules (.btn is inline-flex, etc.) */
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
/* `color: inherit` matters as much as `font: inherit` — without it a <button>
   falls back to the UA's buttontext, which reads far too dark on the dark
   canvas (the posture-cell values on Overview were hit by exactly this). */
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ─── type helpers ──────────────────────────────────────────────────── */
.num   { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.mono  { font-family: var(--font-mono); }
.meta  { font-size: var(--fs-meta); color: var(--muted); }
.micro { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.h-page { font-size: 22px; font-weight: 640; letter-spacing: -0.015em; line-height: 1.2; }
.h-sec  { font-size: 15px; font-weight: 620; letter-spacing: -0.01em; }
.h-sub  { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; }

/* ─── console shell ─────────────────────────────────────────────────── */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--gap-md) 0;
}
.brand { display: flex; align-items: center; gap: 9px; padding: 2px var(--gap-md) var(--gap-lg); }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; flex: none; }
/* mark sits on the accent tile — --bg inverts correctly in both themes */
.brand-mark svg { width: 15px; height: 15px; color: var(--bg); }
.brand-name { font-size: 14px; font-weight: 640; letter-spacing: -0.015em; }
.brand-name span { color: var(--muted); font-weight: 480; }

.nav-group { padding: 0 var(--gap-sm); }
.nav-label { padding: var(--gap-md) 6px var(--gap-xs); }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px; margin-bottom: 1px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--muted);
  border-left: 2px solid transparent;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-item svg { width: 15px; height: 15px; flex: none; opacity: 0.85; }
.nav-item:hover { background: var(--fg-soft); color: var(--fg); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); font-weight: 560; }
.nav-item .count { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--muted); }
.nav-item.active .count { color: var(--accent); }
.nav-item .count.crit { color: var(--crit); font-weight: 600; }

.sidebar-foot { margin-top: auto; padding: var(--gap-md) var(--gap-md) 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--gap-sm); }
.scope-line { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-meta); color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 8;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding-block: 14px;
  display: flex; align-items: center; gap: var(--gap-md); flex-wrap: wrap;
}
.topbar .spacer { flex: 1 1 auto; }
/* full-bleed chrome, centred content column on ultrawide displays —
   the padding does the centring so the topbar rule still spans the screen */
.topbar, .content { padding-inline: max(var(--gap-lg), calc((100% - var(--content)) / 2)); }
.content { padding-block: var(--gap-lg); width: 100%; }
.content > * + * { margin-top: var(--gap-md); }

.crumb { display: flex; align-items: center; gap: 7px; font-size: var(--fs-meta); color: var(--muted); margin-bottom: 3px; }
.crumb a:hover { color: var(--accent); }

/* ─── live indicator ────────────────────────────────────────────────── */
.live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--muted); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2.6s ease-out infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklch, var(--ok) 55%, transparent); }
  70%  { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ─── controls ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--fg);
  font-size: 13px; font-weight: 520; white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.05s ease;
}
.btn:hover { border-color: color-mix(in oklch, var(--fg) 32%, transparent); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--surface); }
[data-theme="dark"] .btn-primary { color: oklch(19% 0.012 258); }
.btn-primary:hover { background: color-mix(in oklch, var(--accent) 88%, black); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); padding-inline: 8px; }
.btn-ghost:hover { background: var(--fg-soft); color: var(--fg); border-color: transparent; }
.btn-danger { color: var(--crit); border-color: color-mix(in oklch, var(--crit) 35%, transparent); background: transparent; }
.btn-danger:hover { background: var(--crit-soft); border-color: var(--crit); }
.btn-sm { padding: 4px 9px; font-size: var(--fs-meta); border-radius: 4px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px; }
.seg button {
  padding: 4px 10px; border: 0; background: transparent; color: var(--muted);
  font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.03em;
  border-radius: 3px; transition: background 0.12s ease, color 0.12s ease;
}
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px var(--fg-soft); }

.chips { display: flex; gap: var(--gap-xs); flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  font-size: var(--fs-meta); transition: all 0.12s ease;
}
.chip:hover { color: var(--fg); border-color: color-mix(in oklch, var(--fg) 28%, transparent); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 520; }
.chip .n { font-family: var(--font-mono); font-size: var(--fs-micro); opacity: 0.75; }

.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 9px; width: 14px; height: 14px; color: var(--muted); pointer-events: none; }
.input, .select, .textarea {
  width: 100%; padding: 7px 11px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--fg); font-size: 13px;
}
.search .input { padding-left: 29px; min-width: 240px; }
.input::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 72px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px; background-size: 5px 5px; background-repeat: no-repeat; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: var(--fs-meta); color: var(--muted); font-weight: 520; }
.hint { font-size: var(--fs-micro); color: var(--muted); font-family: var(--font-mono); }

.switch { position: relative; width: 32px; height: 18px; border-radius: 999px; background: var(--border); border: 0; padding: 0; flex: none; transition: background 0.16s ease; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); transition: transform 0.16s ease; box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(14px); }

.range { -webkit-appearance: none; appearance: none; width: 100%; height: 3px; border-radius: 999px; background: var(--border); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--fg); border: 2px solid var(--surface); box-shadow: 0 1px 3px var(--fg-soft); cursor: pointer; }
.range::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: var(--fg); border: 2px solid var(--surface); cursor: pointer; }

/* ─── panel ─────────────────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: var(--gap-sm); padding: 12px var(--gap-md); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.panel-head .spacer { flex: 1 1 auto; }
.panel-body { padding: var(--gap-md); }
.panel-body.tight { padding: 0; }
.panel-foot { padding: 10px var(--gap-md); border-top: 1px solid var(--border); background: var(--surface-2); font-size: var(--fs-meta); color: var(--muted); display: flex; align-items: center; gap: var(--gap-sm); }

/* ─── status atoms ──────────────────────────────────────────────────── */
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); flex: none; }
.dot.crit { background: var(--crit); }
.dot.warn { background: var(--warn); }
.dot.ok   { background: var(--ok); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px; border-radius: 4px;
  font-family: var(--font-mono); font-size: var(--fs-micro);
  letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
}
.badge.crit { color: var(--crit); background: var(--crit-soft); }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.badge.ok   { color: var(--ok);   background: var(--ok-soft); }
.badge.idle { color: var(--muted); background: var(--fg-soft); }
.badge.plane { color: var(--muted); background: transparent; border-color: var(--border); text-transform: none; letter-spacing: 0.02em; font-weight: 500; }

.state { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-meta); color: var(--muted); white-space: nowrap; }
.state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state.firing  { color: var(--crit); font-weight: 560; }
.state.acked   { color: var(--warn); }
.state.snoozed { color: var(--muted); }
.state.resolved{ color: var(--ok); }

.delta { font-family: var(--font-mono); font-size: var(--fs-meta); font-variant-numeric: tabular-nums; }
.delta.up   { color: var(--crit); }
.delta.down { color: var(--ok); }
.delta.flat { color: var(--muted); }

/* ─── posture strip ─────────────────────────────────────────────────── */
.posture { display: grid; grid-template-columns: repeat(4, 1fr); }
.posture-cell {
  padding: var(--gap-md); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 9px;
  text-align: left; background: transparent; border-top: 0; border-bottom: 0; border-left: 0;
  transition: background 0.12s ease;
}
.posture-cell:last-child { border-right: 0; }
.posture-cell:hover { background: var(--surface-2); }
.posture-cell[aria-pressed="true"] { background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--fg); }
.posture-head { display: flex; align-items: center; gap: 7px; }
.posture-val { font-family: var(--font-mono); font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1; font-weight: 500; }
.posture-val .unit { font-size: 13px; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.posture-sub { display: flex; align-items: baseline; gap: 8px; font-size: var(--fs-meta); color: var(--muted); }
.spark { width: 100%; height: 26px; overflow: visible; }
.spark path { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* ─── data path ─────────────────────────────────────────────────────── */
.path { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.path-stage { position: relative; padding: var(--gap-md) var(--gap-md) var(--gap-md) 22px; border-right: 1px solid var(--border); }
.path-stage:first-child { padding-left: var(--gap-md); }
.path-stage:last-child { border-right: 0; }
.path-stage::before {
  content: ''; position: absolute; left: -1px; top: 50%; width: 13px; height: 13px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--surface); border-right: 1px solid var(--border); border-top: 1px solid var(--border);
}
.path-stage:first-child::before { display: none; }
.path-stage.break::before { border-color: var(--crit); }
.path-name { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.path-val { font-family: var(--font-mono); font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.path-bar { height: 3px; border-radius: 999px; background: var(--fg-hairline); margin-top: 9px; overflow: hidden; }
.path-bar i { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.path-stage.break .path-bar i { background: var(--crit); }
.path-stage.warnstage .path-bar i { background: var(--warn); }
.path-loss { font-size: var(--fs-micro); font-family: var(--font-mono); color: var(--muted); margin-top: 5px; display: block; }
.path-stage.break .path-loss { color: var(--crit); font-weight: 600; }

/* ─── incident feed ─────────────────────────────────────────────────── */
.feed { display: flex; flex-direction: column; }
.feed-row {
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr) 132px 96px 84px 108px;
  gap: 0 var(--gap-md);
  align-items: center;
  padding: 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}
.feed-row:last-child { border-bottom: 0; }
.feed-row:hover { background: var(--surface-2); }
.feed-row.is-hidden { display: none; }
.feed-row.is-muted { opacity: 0.5; }
.sev-rail { align-self: stretch; background: var(--idle); }
.sev-rail.crit { background: var(--crit); }
.sev-rail.warn { background: var(--warn); }
.feed-cell { padding-block: 13px; min-width: 0; }
.feed-title { display: block; font-size: 13.5px; font-weight: 560; letter-spacing: -0.005em; margin-bottom: 4px; }
.feed-row:hover .feed-title { color: var(--accent); }
.feed-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-meta); color: var(--muted); }
.feed-sub .id { font-family: var(--font-mono); font-size: var(--fs-micro); }
.feed-actions { display: flex; gap: 5px; justify-content: flex-end; padding-right: var(--gap-md); opacity: 0; transition: opacity 0.12s ease; }
.feed-row:hover .feed-actions, .feed-row:focus-within .feed-actions { opacity: 1; }
.feed-head {
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr) 132px 96px 84px 108px;
  gap: 0 var(--gap-md);
  padding-block: 8px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.feed-head span { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* blast radius meter */
.blast { display: flex; flex-direction: column; gap: 5px; }
.blast-line { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-family: var(--font-mono); font-size: var(--fs-meta); font-variant-numeric: tabular-nums; }
.blast-line b { font-weight: 600; font-size: 13px; }
/* the share always takes its own line so the cell never rags */
.blast-line .muted { flex: 1 0 100%; font-size: var(--fs-micro); }
.blast-bar { height: 3px; background: var(--fg-hairline); border-radius: 999px; overflow: hidden; }
.blast-bar i { display: block; height: 100%; background: var(--muted); border-radius: 999px; }
.blast-bar i.crit { background: var(--crit); }
.blast-bar i.warn { background: var(--warn); }

/* ─── side rail lists ───────────────────────────────────────────────── */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: var(--gap-sm); padding: 11px var(--gap-md); border-bottom: 1px solid var(--border); transition: background 0.12s ease; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface-2); }
.list-main { min-width: 0; flex: 1; }
.list-title { font-size: 13px; font-weight: 520; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-title.mono { font-family: var(--font-mono); font-size: var(--fs-meta); }
.list-sub { font-size: var(--fs-micro); color: var(--muted); font-family: var(--font-mono); }
.list-val { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* version rollout stacked bar */
.stack-bar { display: flex; height: 26px; border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.stack-bar i { display: block; height: 100%; }
.stack-key { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.stack-key-row { display: flex; align-items: center; gap: 8px; font-size: var(--fs-meta); }
.stack-key-row .sw { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.stack-key-row .k { font-family: var(--font-mono); }
.stack-key-row .v { margin-left: auto; font-family: var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }

/* ─── tables ────────────────────────────────────────────────────────── */
.ds-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ds-table th, .ds-table td { padding: 10px var(--gap-md); text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ds-table thead th { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--surface-2); }
.ds-table tbody tr:last-child td { border-bottom: 0; }
.ds-table tbody tr:hover { background: var(--surface-2); }
.ds-table .num-col { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.ds-table tr.is-off td { opacity: 0.45; }

/* ─── charts ────────────────────────────────────────────────────────── */
.chart { width: 100%; height: 190px; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .thresh { stroke: var(--crit); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.chart .series { fill: none; stroke: var(--fg); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart .series.accent { stroke: var(--accent); }
.chart .breach { fill: var(--crit-soft); }
.chart .axis-lab { font-family: var(--font-mono); font-size: 9px; fill: var(--muted); }

/* ─── timeline ──────────────────────────────────────────────────────── */
.tl { position: relative; padding-left: 22px; }
.tl::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.tl-item { position: relative; padding-bottom: var(--gap-md); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -22px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border);
}
.tl-item.crit::before { border-color: var(--crit); }
.tl-item.warn::before { border-color: var(--warn); }
.tl-item.ok::before   { border-color: var(--ok); }
.tl-item.now::before  { border-color: var(--accent); background: var(--accent); }
.tl-time { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--muted); }
.tl-title { font-size: 13px; font-weight: 540; margin: 1px 0 2px; }
.tl-body { font-size: var(--fs-meta); color: var(--muted); }

/* ─── history: day bars + heatmap ───────────────────────────────────── */
.day-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: var(--gap-md); padding: 12px var(--gap-md); border-bottom: 1px solid var(--border); }
.day-row:last-child { border-bottom: 0; }
.day-stamp { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--muted); padding-top: 2px; }
.dur-bar { display: grid; grid-template-columns: minmax(0, 1fr) 168px 64px; gap: var(--gap-md); align-items: center; padding: 5px 0; }
.dur-track { position: relative; height: 8px; background: var(--fg-hairline); border-radius: 999px; overflow: hidden; }
.dur-track i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; }
.dur-track i.crit { background: var(--crit); }
.dur-track i.warn { background: var(--warn); }
.dur-label { font-size: var(--fs-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.heat { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 10px var(--gap-md); align-items: center; }
.heat-lane { display: grid; grid-template-columns: repeat(45, 1fr); gap: 2px; }
.heat-cell { aspect-ratio: 1; border-radius: 2px; background: var(--fg-hairline); }
.heat-cell.l1 { background: color-mix(in oklch, var(--warn) 30%, transparent); }
.heat-cell.l2 { background: color-mix(in oklch, var(--warn) 65%, transparent); }
.heat-cell.l3 { background: color-mix(in oklch, var(--crit) 60%, transparent); }
.heat-cell.l4 { background: var(--crit); }
.heat-name { font-size: var(--fs-meta); color: var(--muted); }

/* ─── misc ──────────────────────────────────────────────────────────── */
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap-md); align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-md); }
.rail { display: flex; flex-direction: column; gap: var(--gap-md); }
.kv { display: grid; grid-template-columns: 106px minmax(0, 1fr); gap: 8px var(--gap-md); font-size: 13px; }
.kv dt { color: var(--muted); font-size: var(--fs-meta); }
.kv dd { margin: 0; }
.callout { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface-2); font-size: 13px; }
.callout.crit { border-color: color-mix(in oklch, var(--crit) 40%, transparent); background: var(--crit-soft); }
.code { font-family: var(--font-mono); font-size: var(--fs-meta); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; overflow-x: auto; white-space: pre; }
.empty { padding: var(--gap-xl) var(--gap-md); text-align: center; color: var(--muted); font-size: 13px; }

.toast-host { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px;
  background: var(--fg); color: var(--bg);
  padding: 9px 14px; border-radius: 999px; font-size: 13px;
  box-shadow: 0 6px 20px color-mix(in oklch, var(--fg) 22%, transparent);
  animation: rise 0.2s ease-out;
}
.toast .undo { color: inherit; text-decoration: underline; opacity: 0.75; background: none; border: 0; padding: 0; font-size: var(--fs-meta); pointer-events: auto; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ─── responsive (desktop-first console, degrades to laptop/tablet) ─── */
@media (max-width: 1280px) {
  .grid-main { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed-row, .feed-head { grid-template-columns: 3px minmax(0, 1fr) 118px 88px 108px; }
  .feed-row .col-state, .feed-head .col-state { display: none; }
}
@media (max-width: 1024px) {
  :root { --sidebar: 60px; }
  .brand-name, .nav-label, .nav-item span:not(.count), .sidebar-foot .scope-line span:first-child { display: none; }
  .nav-item { justify-content: center; }
  .posture, .path { grid-template-columns: repeat(2, 1fr); }
  .posture-cell:nth-child(2), .path-stage:nth-child(2) { border-right: 0; }
  .posture-cell, .path-stage { border-bottom: 1px solid var(--border); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .feed-row, .feed-head { grid-template-columns: 3px minmax(0, 1fr) 108px 96px; }
  .feed-row .col-age, .feed-head .col-age { display: none; }
  .heat-lane { grid-template-columns: repeat(30, 1fr); }
  /* wide data tables scroll inside their panel rather than the page */
  .panel:has(> .ds-table) { overflow-x: auto; }
  .ds-table { min-width: 720px; }
}
@media print {
  .sidebar, .topbar, .feed-actions, .toast-host { display: none; }
  .shell { grid-template-columns: 1fr; }
  body::before { display: none; }
}

/* ═══ project switcher (rendered by js/ops.js on every page) ═════════ */
.proj { position: relative; padding: 0 var(--gap-sm) var(--gap-sm); }
.proj-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--fg);
  font-size: 13px; text-align: left;
}
.proj-btn:hover { border-color: color-mix(in oklch, var(--fg) 28%, transparent); }
.proj-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 540; }
.proj-count { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--muted); }
.proj-chev { width: 12px; height: 12px; flex: none; color: var(--muted); transition: transform 0.14s ease; }
.proj-btn[aria-expanded="true"] .proj-chev { transform: rotate(180deg); }
.proj-menu {
  position: absolute; z-index: 20; left: var(--gap-sm); right: var(--gap-sm); top: calc(100% - 4px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px color-mix(in oklch, var(--fg) 16%, transparent);
  overflow: hidden;
}
.proj-menu[hidden] { display: none; }
.proj-search { padding: 8px; border-bottom: 1px solid var(--border); }
.proj-search .input { padding: 5px 9px; font-size: var(--fs-meta); }
.proj-list { max-height: 268px; overflow-y: auto; padding: 4px; }
.proj-item {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--fg);
  font-size: 13px; text-align: left;
}
.proj-item:hover { background: var(--surface-2); }
.proj-item[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 560; }
.proj-item .pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: var(--fs-meta); }
.proj-empty { padding: 14px 10px; text-align: center; color: var(--muted); font-size: var(--fs-meta); }

/* ═══ LCP monitoring ════════════════════════════════════════════════ */
.posture.three { grid-template-columns: repeat(3, 1fr); }
/* uniform scaling — non-uniform would stretch the axis <text> */
.chart-lg { width: 100%; aspect-ratio: 880 / 300; height: auto; overflow: visible; display: block; }
.chart-lg .grid-line { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-lg .budget { stroke: var(--crit); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.chart-lg .lbl { font-family: var(--font-mono); font-size: 9px; fill: var(--muted); }
.chart-lg .ser { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-lg .cross { stroke: var(--fg); stroke-width: 1; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; opacity: 0.5; }
.chart-lg .hit { fill: transparent; }

.legend { display: flex; flex-wrap: wrap; gap: var(--gap-xs); }
.legend-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--fg);
  font-size: var(--fs-meta);
}
.legend-item:hover { border-color: color-mix(in oklch, var(--fg) 28%, transparent); }
.legend-item[aria-pressed="false"] { opacity: 0.42; }
.legend-item[disabled] { opacity: 0.42; pointer-events: none; font-style: italic; }
.legend-swatch { width: 16px; height: 0; border-top-width: 2px; border-top-style: solid; flex: none; }
.legend-swatch.dashed { border-top-style: dashed; }

.readout { display: grid; grid-template-columns: 108px repeat(3, minmax(0, 1fr)); gap: var(--gap-md); align-items: baseline; padding: 10px var(--gap-md); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.readout-cell .rl { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); display: block; }
.readout-cell .rv { font-family: var(--font-mono); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.quota { height: 5px; border-radius: 999px; background: var(--fg-hairline); overflow: hidden; margin-top: 8px; }
.quota i { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.quota i.warn { background: var(--warn); }

.gap-bar { position: relative; height: 6px; border-radius: 999px; background: var(--fg-hairline); overflow: hidden; }
.gap-bar i { position: absolute; top: 0; bottom: 0; border-radius: 999px; }

@media (max-width: 1280px) {
  .readout { grid-template-columns: 92px repeat(3, minmax(0, 1fr)); gap: var(--gap-sm); }
}
@media (max-width: 1024px) {
  .posture.three { grid-template-columns: 1fr; }
  .readout { grid-template-columns: 1fr 1fr; }
}

/* ═══ SDK errors — grouped issues + detail drawer ═══════════════════ */
.issue-head {
  display: grid; grid-template-columns: 3px minmax(0,1fr) 168px 128px 116px 104px;
  gap: 0 var(--gap-md); padding: 8px var(--gap-md) 8px 0;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.issue-head span { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.issue-row {
  display: grid; grid-template-columns: 3px minmax(0,1fr) 168px 128px 116px 104px;
  gap: 0 var(--gap-md); align-items: center;
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background 0.12s ease;
}
.issue-row:last-child { border-bottom: 0; }
.issue-row:hover { background: var(--surface-2); }
.issue-row.is-hidden { display: none; }
.issue-row.is-muted { opacity: 0.5; }
.issue-row[aria-expanded="true"] { background: var(--accent-soft); }
.issue-cell { padding-block: 12px; min-width: 0; }
.issue-title { display: block; font-family: var(--font-mono); font-size: 13px; font-weight: 560; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.issue-row:hover .issue-title { color: var(--accent); }
.issue-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: var(--fs-meta); color: var(--muted); }
.issue-sub .fp { font-family: var(--font-mono); font-size: var(--fs-micro); padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; }

.count-cell { display: flex; align-items: center; gap: 10px; }
.count-val { font-family: var(--font-mono); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.count-spark { width: 76px; height: 22px; flex: none; overflow: visible; }
.count-spark path { fill: none; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* code frame — renders a minified/one-liner error legibly */
.codeframe { font-family: var(--font-mono); font-size: var(--fs-meta); line-height: 1.7; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow-x: auto; }
.codeframe .cf-line { display: grid; grid-template-columns: 30px 1fr; }
.codeframe .cf-ln { text-align: right; padding: 0 10px; color: var(--muted); border-right: 1px solid var(--border); user-select: none; }
.codeframe .cf-src { padding: 0 12px; white-space: pre; }
.codeframe .cf-line.hot { background: var(--crit-soft); }
.codeframe .cf-line.hot .cf-ln { color: var(--crit); }

/* breakdown bars (by version / browser / store) */
.bd { display: flex; flex-direction: column; gap: 9px; }
.bd-row { display: grid; grid-template-columns: 120px minmax(0,1fr) 52px; gap: 10px; align-items: center; }
.bd-label { font-family: var(--font-mono); font-size: var(--fs-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-track { height: 7px; border-radius: 999px; background: var(--fg-hairline); overflow: hidden; }
.bd-track i { display: block; height: 100%; border-radius: 999px; background: var(--muted); }
.bd-track i.crit { background: var(--crit); }
.bd-track i.warn { background: var(--warn); }
.bd-val { font-family: var(--font-mono); font-size: var(--fs-meta); font-variant-numeric: tabular-nums; text-align: right; color: var(--muted); }

/* detail drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: 30; background: color-mix(in oklch, var(--fg) 32%, transparent); opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; z-index: 31; height: 100vh; width: min(560px, 94vw);
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px color-mix(in oklch, var(--fg) 14%, transparent);
  transform: translateX(100%); transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { padding: var(--gap-md) var(--gap-lg); border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: var(--gap-md); }
.drawer-head .spacer { flex: 1; }
.drawer-title { font-family: var(--font-mono); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--gap-lg); display: flex; flex-direction: column; gap: var(--gap-lg); }
.drawer-body > section { display: flex; flex-direction: column; gap: var(--gap-sm); }
.drawer-close { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); flex: none; }
.drawer-close:hover { color: var(--fg); border-color: color-mix(in oklch, var(--fg) 30%, transparent); }
.drawer-foot { padding: 12px var(--gap-lg); border-top: 1px solid var(--border); background: var(--surface-2); display: flex; gap: var(--gap-sm); }

.stat-inline { display: flex; gap: var(--gap-lg); flex-wrap: wrap; }
.stat-inline > div { display: flex; flex-direction: column; gap: 2px; }
.stat-inline .sv { font-family: var(--font-mono); font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-inline .sl { font-size: var(--fs-micro); color: var(--muted); font-family: var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; }

@media (max-width: 1280px) {
  .issue-head, .issue-row { grid-template-columns: 3px minmax(0,1fr) 148px 108px 92px; }
  .issue-head .col-last, .issue-row .col-last { display: none; }
}
@media (max-width: 1024px) {
  .issue-head, .issue-row { grid-template-columns: 3px minmax(0,1fr) 120px 96px; }
  .issue-head .col-stores, .issue-row .col-stores { display: none; }
  .bd-row { grid-template-columns: 96px minmax(0,1fr) 48px; }
}

/* ═══ Live checks — synthetic probes + console capture ══════════════ */
/* probe result rows — compact, fit the 320px rail (master list; click selects) */
.probe-row {
  display: grid; grid-template-columns: 3px minmax(0,1fr) auto;
  gap: 0 var(--gap-sm); align-items: center;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.12s ease;
}
.probe-row:last-child { border-bottom: 0; }
.probe-row:hover { background: var(--surface-2); }
.probe-row[aria-selected="true"] { background: var(--accent-soft); }
.probe-row[aria-selected="true"] .probe-name { color: var(--accent); }
.probe-cell { padding-block: 10px; min-width: 0; }
.probe-cell:last-child { padding-right: var(--gap-md); }
.probe-name { font-family: var(--font-mono); font-size: 13px; font-weight: 540; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.probe-sub { font-size: var(--fs-micro); color: var(--muted); font-family: var(--font-mono); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.probe-tags { display: flex; gap: 4px; justify-content: flex-end; }
.probe-tags .t { font-family: var(--font-mono); font-size: var(--fs-micro); font-variant-numeric: tabular-nums; padding: 1px 5px; border-radius: 3px; }
.probe-tags .t.err { color: var(--crit); background: var(--crit-soft); }
.probe-tags .t.warn { color: var(--warn); background: var(--warn-soft); }
.probe-tags .t.zero { color: var(--muted); background: var(--fg-soft); }

/* console capture — the hero: a classified terminal readout */
.cap { font-family: var(--font-mono); font-size: var(--fs-meta); line-height: 1.5; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.cap-scroll { max-height: 420px; overflow-y: auto; }
.cap-line {
  display: grid; grid-template-columns: 20px 66px 88px minmax(0,1fr);
  gap: 10px; align-items: baseline;
  padding: 5px var(--gap-md); border-bottom: 1px solid var(--border);
}
.cap-line:last-child { border-bottom: 0; }
.cap-line.other { opacity: 0.42; }              /* non-Coframe lines recede */
.cap-line.coframe.err { background: var(--crit-soft); }
.cap-line.coframe.warn { background: var(--warn-soft); }
.cap-gutter { justify-self: center; }
.cap-gutter .dot { width: 6px; height: 6px; }
.cap-time { color: var(--muted); font-size: var(--fs-micro); white-space: nowrap; }
.cap-src {
  font-size: var(--fs-micro); letter-spacing: 0.04em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 3px; border: 1px solid var(--border);
  color: var(--muted); white-space: nowrap; text-align: center;
}
.cap-src.coframe { color: var(--fg); border-color: color-mix(in oklch, var(--fg) 30%, transparent); font-weight: 600; }
.cap-msg { white-space: pre-wrap; word-break: break-word; }
.cap-line.coframe.err .cap-msg { color: var(--crit); }
.cap-line.coframe.warn .cap-msg { color: var(--warn); }
.cap-meta { display: flex; gap: var(--gap-lg); flex-wrap: wrap; padding: 10px var(--gap-md); border-bottom: 1px solid var(--border); background: var(--surface); }
.cap-meta > div { display: flex; flex-direction: column; gap: 1px; }
.cap-meta .k { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.cap-meta .v { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }

@media (max-width: 1280px) {
  .grid-main.checks { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .cap-line { grid-template-columns: 18px 88px minmax(0,1fr); }
  .cap-line .cap-time { display: none; }
}

/* ═══ Live checks — project → URL tree in the results rail ══════════ */
.probe-group {
  display: grid; grid-template-columns: 14px minmax(0,1fr) auto; gap: 0 8px; align-items: center;
  padding: 9px var(--gap-md); border-bottom: 1px solid var(--border);
  background: var(--surface-2); cursor: pointer;
}
.probe-group:hover { background: var(--fg-soft); }
.pg-caret { width: 11px; height: 11px; color: var(--muted); transition: transform 0.15s ease; }
.probe-group[aria-expanded="false"] .pg-caret { transform: rotate(-90deg); }
.pg-main { display: flex; align-items: center; gap: 7px; min-width: 0; }
.pg-name { font-family: var(--font-mono); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-roll { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--muted); white-space: nowrap; }
.probe-urls[hidden] { display: none; }
/* url rows reuse .probe-row; indent under their project header */
.probe-urls .probe-row { grid-template-columns: 3px minmax(0,1fr) auto; }
.probe-urls .probe-row .probe-cell:nth-child(2) { padding-left: 6px; }
.probe-group.is-off { opacity: 0.5; }

/* ═══ Live checks — balance the master/detail columns ══════════════ */
/* the capture panel stretches to its column height so there is no bare
   void beside the results tree; the terminal grows to fill instead. */
.grid-main.checks { align-items: stretch; }
.panel.grow { display: flex; flex-direction: column; }
.panel.grow .cap { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 260px; }
.panel.grow .cap-scroll { flex: 1 1 auto; max-height: none; }
/* keep captured lines readable-wide, not stretched edge to edge */
.cap-line .cap-msg { max-width: 92ch; }

/* ═══ Live checks — topbar URL switcher ════════════════════════════ */
.url-switch { display: flex; align-items: center; gap: var(--gap-sm); }
.url-switch .micro { color: var(--muted); }
.url-switch .select { width: auto; min-width: 130px; max-width: 260px; font-family: var(--font-mono); font-size: 13px; }

/* URL toolbar row under the topbar — right-aligned */
.content-toolbar { display: flex; justify-content: flex-end; align-items: center; }

/* ═══ Variant Monitoring ═══════════════════════════════════════════ */
.var-head, .var-row {
  display: grid; grid-template-columns: 3px minmax(0,1fr) 150px 132px 120px 96px;
  gap: 0 var(--gap-md); align-items: center;
}
.var-head { padding: 8px var(--gap-md) 8px 0; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.var-head span { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.var-row { border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.12s ease; }
.var-row:last-child { border-bottom: 0; }
.var-row:hover { background: var(--surface-2); }
.var-row.is-hidden { display: none; }
.var-row[aria-selected="true"] { background: var(--accent-soft); }
.var-cell { padding-block: 12px; min-width: 0; }
.var-name { display: block; font-size: 13.5px; font-weight: 560; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.var-row:hover .var-name { color: var(--accent); }
.var-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: var(--fs-meta); color: var(--muted); }
.var-sub .sel { font-family: var(--font-mono); font-size: var(--fs-micro); padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

/* render-rate meter */
.rate { display: flex; flex-direction: column; gap: 5px; }
.rate-line { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-mono); font-size: var(--fs-meta); font-variant-numeric: tabular-nums; }
.rate-line b { font-size: 13px; font-weight: 600; }
.rate-bar { height: 3px; background: var(--fg-hairline); border-radius: 999px; overflow: hidden; }
.rate-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ok); }
.rate-bar i.warn { background: var(--warn); }
.rate-bar i.crit { background: var(--crit); }

/* failure-mode chips (the 3 render failure types) */
.fmodes { display: flex; gap: 4px; flex-wrap: wrap; }
.fmode {
  font-family: var(--font-mono); font-size: var(--fs-micro); font-variant-numeric: tabular-nums;
  padding: 1px 6px; border-radius: 3px; white-space: nowrap;
}
.fmode.nf   { color: var(--crit); background: var(--crit-soft); }
.fmode.js   { color: var(--warn); background: var(--warn-soft); }
.fmode.mr   { color: var(--muted); background: var(--fg-soft); }
.fmode.zero { color: var(--muted); background: transparent; border: 1px solid var(--border); }

/* render funnel (assigned → matched → rendered → exposed) */
.funnel { display: grid; grid-template-columns: repeat(4, 1fr); }
.funnel-step { position: relative; padding: var(--gap-md) var(--gap-md) var(--gap-md) 22px; border-right: 1px solid var(--border); }
.funnel-step:first-child { padding-left: var(--gap-md); }
.funnel-step:last-child { border-right: 0; }
.funnel-step::before {
  content: ''; position: absolute; left: -1px; top: 50%; width: 13px; height: 13px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--surface); border-right: 1px solid var(--border); border-top: 1px solid var(--border);
}
.funnel-step:first-child::before { display: none; }
.funnel-step.break::before { border-color: var(--crit); }
.funnel-name { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.funnel-val { font-family: var(--font-mono); font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.funnel-bar { height: 3px; border-radius: 999px; background: var(--fg-hairline); margin-top: 9px; overflow: hidden; }
.funnel-bar i { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.funnel-step.break .funnel-bar i { background: var(--crit); }
.funnel-step.warnstep .funnel-bar i { background: var(--warn); }
.funnel-loss { font-size: var(--fs-micro); font-family: var(--font-mono); color: var(--muted); margin-top: 5px; display: block; }
.funnel-step.break .funnel-loss { color: var(--crit); font-weight: 600; }

@media (max-width: 1280px) {
  .var-head, .var-row { grid-template-columns: 3px minmax(0,1fr) 132px 118px 96px; }
  .var-head .col-last, .var-row .col-last { display: none; }
}
@media (max-width: 1024px) {
  .var-head, .var-row { grid-template-columns: 3px minmax(0,1fr) 118px 96px; }
  .var-head .col-modes, .var-row .col-modes { display: none; }
  .funnel { grid-template-columns: repeat(2, 1fr); }
  .funnel-step:nth-child(2) { border-right: 0; }
  .funnel-step { border-bottom: 1px solid var(--border); }
}

/* ═══ Project settings — per-project job schedules ═════════════════ */
.job-head, .job-row {
  display: grid; grid-template-columns: 3px minmax(0,1fr) 178px 104px 128px 132px;
  gap: 0 var(--gap-md); align-items: center;
}
.job-head { padding: 8px var(--gap-md) 8px 0; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.job-head span { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.job-row { border-bottom: 1px solid var(--border); transition: background 0.12s ease; }
.job-row:last-child { border-bottom: 0; }
.job-row:hover { background: var(--surface-2); }
.job-row.is-off { opacity: 0.5; }
.job-cell { padding-block: 13px; min-width: 0; }
.job-cell:last-child { padding-right: var(--gap-md); }
.job-name { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 560; letter-spacing: -0.005em; }
.job-desc { font-size: var(--fs-meta); color: var(--muted); margin-top: 4px; }
.job-desc .mono { font-size: var(--fs-micro); }
.job-row .select { width: 100%; font-family: var(--font-mono); font-size: 13px; }

/* inherited vs overridden */
.ov { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-micro); font-family: var(--font-mono); letter-spacing: 0.03em; white-space: nowrap; }
.ov.inherit { color: var(--muted); }
.ov.override { color: var(--accent); font-weight: 600; }
.ov-reset { background: none; border: 0; padding: 0; font: inherit; font-size: var(--fs-micro); color: var(--muted); text-decoration: underline; }
.ov-reset:hover { color: var(--fg); }

/* cost / budget meter */
.budget { display: flex; flex-direction: column; gap: 7px; }
.budget-line { display: flex; align-items: baseline; justify-content: space-between; gap: var(--gap-sm); }
.budget-track { height: 6px; border-radius: 999px; background: var(--fg-hairline); overflow: hidden; }
.budget-track i { display: block; height: 100%; border-radius: 999px; background: var(--ok); transition: width 0.2s ease, background 0.2s ease; }
.budget-track i.warn { background: var(--warn); }
.budget-track i.crit { background: var(--crit); }

/* per-project override summary rows */
.ovp-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: var(--gap-sm); align-items: center; padding: 10px var(--gap-md); border-bottom: 1px solid var(--border); }
.ovp-row:last-child { border-bottom: 0; }
.ovp-row:hover { background: var(--surface-2); }
.ovp-name { font-family: var(--font-mono); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovp-sub { font-size: var(--fs-micro); color: var(--muted); font-family: var(--font-mono); margin-top: 3px; }

@media (max-width: 1280px) {
  .job-head, .job-row { grid-template-columns: 3px minmax(0,1fr) 160px 92px 128px; }
  .job-head .col-next, .job-row .col-next { display: none; }
}
@media (max-width: 1024px) {
  .job-head, .job-row { grid-template-columns: 3px minmax(0,1fr) 150px; }
  .job-head .col-runs, .job-row .col-runs,
  .job-head .col-src, .job-row .col-src { display: none; }
}

/* ═══ SDK version chip — staleness is semantic, not accent ═════════ */
.sdk-chip {
  font-family: var(--font-mono); font-size: var(--fs-micro); font-variant-numeric: tabular-nums;
  padding: 1px 6px; border-radius: 3px; white-space: nowrap;
  color: var(--muted); border: 1px solid var(--border);
}
/* on the release train: quiet. behind it: increasingly loud. */
.sdk-latest { color: var(--ok);    background: var(--ok-soft);   border-color: transparent; }
.sdk-near   { color: var(--muted); background: var(--fg-soft);   border-color: transparent; }
.sdk-stale  { color: var(--warn);  background: var(--warn-soft); border-color: transparent; }
.sdk-old    { color: var(--crit);  background: var(--crit-soft); border-color: transparent; font-weight: 600; }

/* ═══ SDK Versions — error-type × version matrix ═══════════════════ */
.mx-head, .mx-row {
  display: grid;
  grid-template-columns: 3px minmax(0,1fr) repeat(var(--mx-cols, 5), 72px) 176px;
  gap: 0 var(--gap-sm); align-items: center;
}
.mx-head { padding: 8px var(--gap-md) 8px 0; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mx-head span { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.mx-head .mx-v { text-align: center; letter-spacing: 0; text-transform: none; }
.mx-head .mx-v.is-latest { color: var(--ok); font-weight: 600; }
.mx-row { border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.12s ease; }
.mx-row:last-child { border-bottom: 0; }
.mx-row:hover { background: var(--surface-2); }
.mx-row[aria-selected="true"] { background: var(--accent-soft); }
.mx-cell { padding-block: 11px; min-width: 0; }
.mx-name { font-family: var(--font-mono); font-size: 13px; font-weight: 540; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-sub { font-size: var(--fs-micro); color: var(--muted); margin-top: 3px; }

/* a rate cell: number over a saturation block, so a bad column is visible at a glance */
.mx-rate {
  text-align: center; font-family: var(--font-mono); font-size: var(--fs-meta);
  font-variant-numeric: tabular-nums; padding: 5px 2px; border-radius: 4px;
}
.mx-rate.r0 { color: var(--muted); }                                        /* absent */
.mx-rate.r1 { color: var(--fg); background: var(--fg-soft); }
.mx-rate.r2 { color: var(--warn); background: var(--warn-soft); }
.mx-rate.r3 { color: var(--crit); background: var(--crit-soft); font-weight: 600; }

/* the verdict is the point of the page */
.verdict { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-meta); white-space: nowrap; }
.verdict::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.verdict.fix     { color: var(--crit); font-weight: 560; }   /* every version → ours */
.verdict.regress { color: var(--warn); font-weight: 560; }   /* newest only → we shipped it */
.verdict.update  { color: var(--ok); }                       /* old only → client should upgrade */
.verdict.env     { color: var(--muted); }                    /* merchant/browser, not version */

/* version cohort rows */
.vc-row { display: grid; grid-template-columns: 3px 96px minmax(0,1fr) 108px 104px 120px; gap: 0 var(--gap-md); align-items: center; border-bottom: 1px solid var(--border); }
.vc-row:last-child { border-bottom: 0; }
.vc-row:hover { background: var(--surface-2); }
.vc-cell { padding-block: 12px; min-width: 0; }
.vc-ver { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.vc-bar { height: 6px; border-radius: 999px; background: var(--fg-hairline); overflow: hidden; }
.vc-bar i { display: block; height: 100%; border-radius: 999px; background: var(--muted); }
.vc-bar i.ok { background: var(--ok); }
.vc-bar i.warn { background: var(--warn); }
.vc-bar i.crit { background: var(--crit); }

@media (max-width: 1400px) {
  .mx-head, .mx-row { grid-template-columns: 3px minmax(0,1fr) repeat(var(--mx-cols,5), 60px) 150px; }
}
@media (max-width: 1100px) {
  .mx-head .mx-verdict, .mx-row .mx-verdict { display: none; }
  .vc-row { grid-template-columns: 3px 88px minmax(0,1fr) 96px; }
  .vc-row .vc-hide { display: none; }
}

/* ═══ Projects — monitoring registry ═══════════════════════════════ */
/* switcher footer: the projects you cannot see from here */
.proj-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap-sm);
  padding: 9px 12px; border-top: 1px solid var(--border); background: var(--surface-2);
  font-size: var(--fs-micro); font-family: var(--font-mono); color: var(--muted);
}
.proj-foot:hover { color: var(--fg); }
.proj-foot-cta { color: var(--accent); }

/* the honest banner: are you looking at live data or the fixture */
.src-line { display: flex; align-items: center; gap: var(--gap-sm); flex-wrap: wrap; }
.src-tag {
  font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.05em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 3px;
}
.src-tag.live   { color: var(--ok);   background: var(--ok-soft); }
.src-tag.sample { color: var(--warn); background: var(--warn-soft); }

.pr-head, .pr-row {
  display: grid;
  grid-template-columns: 28px 3px minmax(0, 1fr) 92px 104px 96px 108px 52px;
  gap: 0 var(--gap-md); align-items: center;
}
.pr-head { padding-block: 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.pr-head span {
  font-family: var(--font-mono); font-size: var(--fs-micro);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.pr-head > :first-child, .pr-row > :first-child { padding-left: var(--gap-md); }
.pr-head > :last-child, .pr-row > :last-child { padding-right: var(--gap-md); justify-self: end; }
.pr-row { border-bottom: 1px solid var(--border); transition: background 0.12s ease; }
.pr-row:last-child { border-bottom: 0; }
.pr-row:hover { background: var(--surface-2); }
.pr-row.is-hidden { display: none; }
.pr-row.off { opacity: 0.58; }
.pr-row.off:hover { opacity: 1; }
.pr-rail { align-self: stretch; background: var(--idle); }
.pr-rail.crit { background: var(--crit); }
.pr-rail.warn { background: var(--warn); }
.pr-rail.ok   { background: var(--ok); }
.pr-cell { padding-block: 11px; min-width: 0; }
.pr-name { font-family: var(--font-mono); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-sub { display: flex; align-items: center; gap: 7px; margin-top: 3px; font-size: var(--fs-micro); color: var(--muted); }
.pr-num { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.pr-num.zero { color: var(--muted); }
.pr-why {
  font-size: var(--fs-micro); font-family: var(--font-mono);
  color: var(--warn); background: var(--warn-soft);
  padding: 1px 6px; border-radius: 3px; white-space: nowrap;
}

/* toggle — the one control on this page, so it gets a real switch */
.switch {
  position: relative; width: 34px; height: 20px; flex: none;
  border-radius: 999px; border: 1px solid var(--border); background: var(--fg-hairline);
  padding: 0; transition: background 0.14s ease, border-color 0.14s ease;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted); transition: transform 0.14s ease, background 0.14s ease;
}
.switch[aria-checked="true"] { background: var(--ok); border-color: transparent; }
.switch[aria-checked="true"]::after { transform: translateX(14px); background: var(--surface); }
.switch:disabled { opacity: 0.5; cursor: default; }

/* bulk bar appears only with a selection */
.bulk {
  display: flex; align-items: center; gap: var(--gap-md); flex-wrap: wrap;
  padding: 10px var(--gap-md); border-bottom: 1px solid var(--border);
  background: var(--accent-soft);
}
.bulk-count { font-size: 13px; font-weight: 560; }

@media (max-width: 1180px) {
  .pr-head, .pr-row { grid-template-columns: 28px 3px minmax(0, 1fr) 92px 104px 108px 52px; }
  .pr-head .pr-hide, .pr-row .pr-hide { display: none; }
}
@media (max-width: 900px) {
  .pr-head, .pr-row { grid-template-columns: 28px 3px minmax(0, 1fr) 104px 52px; }
  .pr-head .pr-hide2, .pr-row .pr-hide2 { display: none; }
}

/* ═══ Settings — Coframe core credentials ══════════════════════════
   A secret lives on this screen, so the components are built to make the
   write-only rule visible: there is no element that can render a full key,
   only .cred-mask, which takes a prefix/suffix pair.                      */
.set-row {
  display: grid; grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--gap-md) var(--gap-xl);
  padding: var(--gap-md); border-bottom: 1px solid var(--border);
}
.set-row:last-child { border-bottom: 0; }
.set-label { font-size: 13.5px; font-weight: 560; letter-spacing: -0.005em; }
.set-help { margin-top: 5px; font-size: var(--fs-meta); color: var(--muted); }
.set-help code { font-family: var(--font-mono); font-size: var(--fs-micro); }
.set-control { display: flex; flex-direction: column; gap: var(--gap-sm); align-items: flex-start; }
.set-actions { display: flex; gap: var(--gap-xs); flex-wrap: wrap; }

/* the only representation of a stored key the UI can produce */
.cred-mask {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.01em;
}
.cred-mask .ell { color: var(--muted); }
.cred-set { font-size: var(--fs-micro); font-family: var(--font-mono); color: var(--muted); }

.key-input { display: flex; gap: var(--gap-xs); width: 100%; max-width: 420px; }
.key-input .input { font-family: var(--font-mono); font-size: 13px; }
.set-err { font-size: var(--fs-meta); color: var(--crit); }

/* which credential actually answers a request right now */
.prec { display: flex; flex-direction: column; }
.prec-row {
  display: grid; grid-template-columns: 7px minmax(0, 1fr) 96px;
  align-items: center; gap: var(--gap-sm) var(--gap-md);
  padding: 12px var(--gap-md); border-bottom: 1px solid var(--border);
}
.prec-row:last-child { border-bottom: 0; }
.prec-row.standby { opacity: 0.72; }
.prec-name { font-family: var(--font-mono); font-size: 13px; }
.prec-note { display: block; margin-top: 3px; font-size: var(--fs-meta); color: var(--muted); }
.prec-tag {
  justify-self: end;
  font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted);
}
.prec-tag.on { color: var(--ok); }

/* verification readout — a result, not a toast */
.vfy { display: flex; align-items: flex-start; gap: var(--gap-sm); padding: var(--gap-md); }
.vfy-body { min-width: 0; flex: 1; }
.vfy-title { font-size: 13.5px; font-weight: 560; }
.vfy-detail { margin-top: 4px; font-size: var(--fs-meta); color: var(--muted); }
.vfy-orgs { display: flex; gap: var(--gap-xs); flex-wrap: wrap; margin-top: var(--gap-sm); }
.vfy-orgs span {
  font-family: var(--font-mono); font-size: var(--fs-micro);
  padding: 2px 7px; border-radius: 3px; background: var(--fg-soft); color: var(--muted);
}

/* audit rail */
.aud-row { display: grid; grid-template-columns: 7px minmax(0, 1fr); gap: var(--gap-sm); padding: 10px var(--gap-md); border-bottom: 1px solid var(--border); }
.aud-row:last-child { border-bottom: 0; }
.aud-act { font-size: var(--fs-meta); font-weight: 520; }
.aud-meta { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--muted); }

@media (max-width: 900px) {
  .set-row { grid-template-columns: minmax(0, 1fr); gap: var(--gap-sm); }
}

/* ═══ Sign-in ══════════════════════════════════════════════════════
   Same split logic as the console shell: an opaque surface panel on the
   left (the thing you act on), the 44px engineering grid breathing in the
   negative space on the right. Nothing tenant-scoped renders before auth —
   A single bounded card centred on the engineering grid. The card is the
   point: an opaque surface with a real edge is what keeps the copy from
   floating in the middle of a 1,200px void.                               */
.auth {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--gap-md);
  padding: var(--gap-xl) var(--gap-lg);
}
.auth-card {
  width: min(100%, 424px);
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 36px 30px;
  /* the one shadow outside dropdowns — it lifts the card off the grid */
  box-shadow: 0 14px 34px color-mix(in oklch, black 8%, transparent);
}
[data-theme="dark"] .auth-card { box-shadow: 0 14px 40px color-mix(in oklch, black 40%, transparent); }
.auth-title { font-size: 24px; font-weight: 640; letter-spacing: -0.02em; margin: var(--gap-lg) 0 7px; }
.auth-sub { color: var(--muted); font-size: 13.5px; }
.auth-card .brand { padding: 0; }
/* square icon-only button — the label is carried by aria-label + title */
.btn-icon { width: 30px; height: 30px; padding: 0; justify-content: center; flex: none; }
.btn-icon svg { width: 15px; height: 15px; }
/* footer sits outside the card so the card stays a single clean object */
.auth-foot {
  width: min(100%, 424px);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gap-md); flex-wrap: wrap;
  padding-inline: 2px;
}

/* "Sign in with Google" — light + dark per Google's branding guidelines.
   These literals are the ONLY hardcoded colors in the system and must stay
   exact; the four-colour G below is a stand-in for the official asset. */
.gbtn {
  width: 100%; min-height: 44px; margin-top: var(--gap-lg);
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 0 16px; border-radius: var(--radius);
  background: #ffffff; color: #1f1f1f; border: 1px solid #747775;
  font-family: 'Roboto', var(--font-body); font-size: 14px; font-weight: 500;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.gbtn:hover { background: #f7f8f8; box-shadow: 0 1px 3px color-mix(in oklch, black 12%, transparent); }
.gbtn:disabled { cursor: default; opacity: 0.66; box-shadow: none; }
.gbtn svg { width: 18px; height: 18px; flex: none; }
[data-theme="dark"] .gbtn { background: #131314; color: #e3e3e3; border-color: #8e918f; }
[data-theme="dark"] .gbtn:hover { background: #1c1d1f; }

.spin {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }

/* rejected account — semantic crit, never the accent */
.auth-notice {
  margin-top: var(--gap-lg); padding: 12px 14px;
  border: 1px solid color-mix(in oklch, var(--crit) 32%, transparent);
  background: var(--crit-soft); border-radius: var(--radius-sm);
  font-size: 13px;
}
.auth-notice b { font-weight: 600; }
.auth-notice .addr { display: block; margin-top: 3px; font-family: var(--font-mono); font-size: var(--fs-meta); word-break: break-all; }

.auth-help { margin-top: var(--gap-lg); border-top: 1px solid var(--border); padding-top: var(--gap-md); }
.auth-help-toggle {
  display: flex; align-items: center; gap: 6px; padding: 0;
  border: 0; background: none; color: var(--muted); font-size: var(--fs-meta);
}
.auth-help-toggle:hover { color: var(--fg); }
.auth-help-toggle svg { width: 12px; height: 12px; transition: transform 0.14s ease; }
.auth-help-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.auth-help-body { margin-top: var(--gap-sm); font-size: var(--fs-meta); color: var(--muted); }
.auth-help-body ul { margin: 0; padding-left: 15px; display: flex; flex-direction: column; gap: 5px; }
.auth-help-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 480px) {
  .auth { padding: var(--gap-lg) var(--gap-md); }
  .auth-card { padding: 28px 24px 24px; }
}
