/* Iridium: one stylesheet for the console and the admin dashboard.
   Geist + Geist Mono. Warm neutrals; ink for primary actions; one deep green accent.
   Color is reserved for meaning: green = healthy/usage, ochre = attention, terracotta = failure, slate = paused. */
:root {
  --bg: #f8f7f4; --surface: #ffffff; --surface-2: #f3f1ed; --surface-3: #eceae4;
  --border: #e8e5df; --border-strong: #d9d5cd; --hairline: rgb(31 30 28 / .06);
  --text: #191817; --text-2: #4b4844; --muted: #8b867f; --faint: #b8b3ab;
  --ink: #191817; --on-ink: #f8f7f4;
  --accent: #2d5b4d; --accent-2: #3f7a67; --accent-soft: #e4ece8;
  --good: #3a7357; --good-soft: #e5eee8; --warn: #9a6a23; --warn-soft: #f4ecdc;
  --bad: #a5463a; --bad-soft: #f5e6e2; --info: #4b6687; --info-soft: #e7ecf2;
  --code-bg: #171615; --code-text: #e8e5df; --code-dim: #8b867f; --code-border: #2a2826;
  --shadow-sm: 0 1px 0 rgb(255 255 255 / .6) inset, 0 1px 2px rgb(31 30 28 / .04);
  --shadow: 0 1px 2px rgb(31 30 28 / .04), 0 8px 24px -12px rgb(31 30 28 / .10);
  --radius: 12px; --radius-sm: 8px;
  --font: "Geist", "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111110; --surface: #171716; --surface-2: #1c1c1a; --surface-3: #252422;
  --border: #282725; --border-strong: #383633; --hairline: rgb(255 255 255 / .05);
  --text: #edebe7; --text-2: #c4c0b9; --muted: #8d8881; --faint: #5c5853;
  --ink: #edebe7; --on-ink: #141413;
  --accent: #8dbba7; --accent-2: #a6cbbb; --accent-soft: #1b2722;
  --good: #8dbba7; --good-soft: #1a2520; --warn: #d4ab66; --warn-soft: #29221a;
  --bad: #d98c7e; --bad-soft: #2c1d1a; --info: #98aecb; --info-soft: #1c222b;
  --code-bg: #0d0d0c; --code-border: #262523;
  --shadow-sm: 0 1px 0 rgb(255 255 255 / .03) inset; --shadow: 0 8px 24px -12px rgb(0 0 0 / .5);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #111110; --surface: #171716; --surface-2: #1c1c1a; --surface-3: #252422;
  --border: #282725; --border-strong: #383633; --hairline: rgb(255 255 255 / .05);
  --text: #edebe7; --text-2: #c4c0b9; --muted: #8d8881; --faint: #5c5853;
  --ink: #edebe7; --on-ink: #141413;
  --accent: #8dbba7; --accent-2: #a6cbbb; --accent-soft: #1b2722;
  --good: #8dbba7; --good-soft: #1a2520; --warn: #d4ab66; --warn-soft: #29221a;
  --bad: #d98c7e; --bad-soft: #2c1d1a; --info: #98aecb; --info-soft: #1c222b;
  --code-bg: #0d0d0c; --code-border: #262523;
  --shadow-sm: 0 1px 0 rgb(255 255 255 / .03) inset; --shadow: 0 8px 24px -12px rgb(0 0 0 / .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font-size: 26px; line-height: 1.15; letter-spacing: -0.035em; }
h2 { font-size: 17px; letter-spacing: -0.02em; }
h3 { font-size: 13.5px; letter-spacing: -0.01em; }
p { margin: 0; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; font-feature-settings: "zero" 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* eyebrow labels: small, mono, uppercase: the "intentful" structural type */
.eyebrow { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kbd { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: 4px; border: 1px solid var(--border-strong);
  border-bottom-width: 2px; font: 500 10.5px var(--mono); color: var(--muted); background: var(--surface); }

/* ---------- shell ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 22px; height: 60px; padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--hairline); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.025em; color: var(--text); text-decoration: none; white-space: nowrap; }
.logo { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--ink); color: var(--on-ink);
  font: 600 12.5px/1 var(--font); box-shadow: 0 0 0 1px var(--hairline); }
.nav { display: flex; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 7px; color: var(--muted); font-weight: 500;
  font-size: 13.5px; white-space: nowrap; text-decoration: none; transition: color .12s, background .12s; }
.nav a:hover { color: var(--text); background: var(--surface-3); }
.nav a.active { color: var(--text); background: var(--surface); box-shadow: 0 0 0 1px var(--border), var(--shadow-sm); }
.nav .nav-label { margin: 16px 10px 6px; }
.nav .nav-label:first-child { margin-top: 4px; }
.spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); white-space: nowrap; font-size: 13px; }
main { max-width: 1080px; margin: 0 auto; padding: 44px 32px 96px; }

body.authed { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
body.authed .topbar { position: sticky; top: 0; height: 100vh; flex-direction: column; align-items: stretch; gap: 18px;
  padding: 18px 12px; border-bottom: 0; border-right: 1px solid var(--border); background: var(--surface-2); backdrop-filter: none; }
body.authed .brand { padding: 4px 8px 8px; }
body.authed .nav { flex-direction: column; }
body.authed .who { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 8px 2px; border-top: 1px solid var(--border); white-space: normal; }
body.authed .who .email { overflow: hidden; text-overflow: ellipsis; color: var(--text-2); font-size: 12.5px; }
body.authed main { margin: 0; max-width: 1140px; padding: 44px 56px 96px; }
@media (max-width: 900px) {
  body.authed { display: block; }
  body.authed .topbar { height: auto; flex-direction: row; align-items: center; padding: 10px 16px; gap: 12px; border-right: 0;
    border-bottom: 1px solid var(--border); overflow-x: auto; }
  body.authed .nav { flex-direction: row; } body.authed .nav .nav-label { display: none; }
  body.authed .who { flex-direction: row; border-top: 0; padding: 0; } body.authed .who .email { display: none; }
  body.authed main, main { padding: 24px 16px 64px; }
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head .eyebrow { margin-bottom: 10px; }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 62ch; font-size: 14px; }
.grid { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--border); }
.card-head p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.stat { display: flex; flex-direction: column; }
.stat .label { display: flex; align-items: center; gap: 8px; }
.stat .value { font-size: 30px; font-weight: 550; letter-spacing: -0.045em; margin-top: 14px; font-variant-numeric: tabular-nums; line-height: 1; }
.stat .value .unit { color: var(--muted); font-size: 15px; font-weight: 450; letter-spacing: -0.02em; margin-left: 2px; }
.stat .sub { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 500 13px var(--font); letter-spacing: -0.005em; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink);
  box-shadow: 0 1px 0 rgb(255 255 255 / .12) inset, 0 1px 2px rgb(0 0 0 / .2); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); }
.btn.primary .kbd { background: transparent; color: color-mix(in srgb, var(--on-ink) 60%, transparent); border-color: color-mix(in srgb, var(--on-ink) 25%, transparent); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 9px; }
.btn.block { width: 100%; }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: 14px var(--font); box-shadow: var(--shadow-sm);
  transition: border-color .12s, box-shadow .12s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { height: auto; padding: 14px 16px; font-family: var(--mono); font-size: 13px; line-height: 1.7; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text-2); box-shadow: 0 0 0 4px var(--surface-3); }
label.field { display: flex; flex-direction: column; gap: 7px; font-weight: 500; font-size: 13px; color: var(--text-2); }
label.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; color: var(--text-2); }
input[type=checkbox] { accent-color: var(--ink); width: 15px; height: 15px; }
.tabs { align-self: flex-start; display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.tabs button { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted); font: 500 13px var(--font); cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border), var(--shadow-sm); }

/* ---------- status ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px 0 7px; border-radius: 999px;
  font: 500 12px var(--font); background: var(--surface-2); color: var(--text-2); white-space: nowrap; box-shadow: inset 0 0 0 1px var(--border); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 18%, transparent); }
.pill.good { background: var(--good-soft); color: var(--good); box-shadow: none; }
.pill.warn { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.pill.bad { background: var(--bad-soft); color: var(--bad); box-shadow: none; }
.pill.info { background: var(--info-soft); color: var(--info); box-shadow: none; }
.pill.plain::before { display: none; }
.badge { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 5px;
  font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.badge.accent { color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding: 11px 22px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
td { padding: 13px 22px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
td:first-child { color: var(--text); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .1s; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.id { font: 12.5px var(--mono); color: var(--text); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty svg.i { width: 22px; height: 22px; color: var(--faint); }

/* ---------- code ---------- */
.code { position: relative; background: var(--code-bg); color: var(--code-text); border-radius: var(--radius-sm);
  padding: 16px 18px; overflow-x: auto; border: 1px solid var(--code-border); box-shadow: var(--shadow); }
.code pre { margin: 0; white-space: pre; line-height: 1.75; }
.code.wrap pre { white-space: pre-wrap; overflow-wrap: anywhere; padding-right: 64px; }
.code .dim { color: var(--code-dim); }
.code .copy { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px;
  border-radius: 6px; border: 1px solid #34322f; background: #22211f; color: #d9d5ce; font: 500 12px var(--font); cursor: pointer; }
.code .copy:hover { background: #2c2a27; }
.secret { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; border-radius: 8px; background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-strong); font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.secret span { flex: 1; }

/* ---------- terminal (landing) ---------- */
.term { background: var(--code-bg); border: 1px solid var(--code-border); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px -30px rgb(0 0 0 / .45); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--code-border); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3835; }
.term-bar span { margin-left: 8px; font: 500 11.5px var(--mono); color: var(--code-dim); }
.term-body { padding: 16px 18px; font: 12.5px/1.8 var(--mono); color: var(--code-text); min-height: 248px; }
.hero.hero-beta { grid-template-columns: 1.05fr 1fr; align-items: stretch; }
@media (max-width: 900px) { .hero.hero-beta { grid-template-columns: minmax(0, 1fr); } }
.term.lg { display: flex; flex-direction: column; }
.hero-beta h1 .soft { display: block; }
.term.lg .term-body { display: flex; flex-direction: column; }
.term-top { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--code-border); display: grid; gap: 8px; font-size: 13px; }
.meter-row { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; }
.meter-track { height: 12px; display: block; position: relative; box-shadow: inset 0 0 0 1px var(--code-border); border-radius: 2px; overflow: hidden; }
.meter-fill { position: absolute; inset: 2px auto 2px 2px; width: 0; animation: meter-fill 1.1s ease-out forwards;
  background: repeating-linear-gradient(90deg, #8dbba7 0 2px, transparent 2px 5px); }
.meter-fill.err { background: repeating-linear-gradient(90deg, #d98c7e 0 2px, transparent 2px 5px); }
.meter-fill.warn { background: repeating-linear-gradient(90deg, #d4ab66 0 2px, transparent 2px 5px); }
@keyframes meter-fill { to { width: calc(var(--w) - 4px); } }  /* "For agents." on its own line */
.term.lg .term-bar { padding: 14px 16px; } .term.lg .term-bar span { font-size: 12.5px; }
.term.lg .term-body { flex: 1; padding: 18px 24px; font-size: 13px; line-height: 1.75; min-height: 420px; }
.term-body .ok { color: #8dbba7; } .term-body .err { color: #d98c7e; } .term-body .dim { color: var(--code-dim); }
.term-body .line { opacity: 0; animation: appear .25s ease-out forwards; }
@keyframes appear { to { opacity: 1; } }

/* ---------- meter + charts ---------- */
.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > div { height: 100%; border-radius: 999px; background: var(--accent); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.meter.warn > div { background: var(--warn); }
.meter.bad > div { background: var(--bad); }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--accent); opacity: .82; transition: opacity .1s; }
.chart .bar:hover { opacity: 1; }
.chart .grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 3; }
.chart text { fill: var(--muted); font: 10.5px var(--mono); }
.tooltip { position: fixed; pointer-events: none; z-index: 50; padding: 6px 9px; border-radius: 7px; font: 12px var(--mono);
  background: var(--ink); color: var(--on-ink); white-space: nowrap; box-shadow: var(--shadow); }

/* ---------- diagnostics ---------- */
.diags { display: flex; flex-direction: column; gap: 4px; }
.diag { display: grid; grid-template-columns: 52px 60px 1fr; gap: 10px; padding: 8px 12px; border-radius: 7px;
  background: var(--surface-2); font: 12.5px/1.6 var(--mono); white-space: pre-wrap; box-shadow: inset 2px 0 0 var(--border-strong); }
.diag .pos { color: var(--muted); }
.diag.error { box-shadow: inset 2px 0 0 var(--bad); } .diag.error .sev { color: var(--bad); }
.diag.warning { box-shadow: inset 2px 0 0 var(--warn); } .diag.warning .sev { color: var(--warn); }
.diag.info { box-shadow: inset 2px 0 0 var(--info); } .diag.info .sev { color: var(--info); }
.verdict { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 9px; font-weight: 550; letter-spacing: -0.01em; }
.verdict .meta { margin-left: auto; font: 12px var(--mono); font-weight: 400; opacity: .85; }
.verdict.good { background: var(--good-soft); color: var(--good); }
.verdict.warn { background: var(--warn-soft); color: var(--warn); }
.verdict.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- landing ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding: 64px 0 40px; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 16px; } }
.hero > *, .features > *, .grid > * { min-width: 0; }  /* let columns shrink below their content on phones */
.hero h1 { font-size: 52px; line-height: 1.02; letter-spacing: -0.05em; font-weight: 600; }
.hero h1 .soft { color: var(--muted); }
.hero .lede { color: var(--text-2); font-size: 16.5px; line-height: 1.6; margin-top: 20px; max-width: 46ch; letter-spacing: -0.01em; }
.hero .cta { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
@media (max-width: 900px) { .hero h1 { font-size: 36px; } }
.section { padding: 40px 0; border-top: 1px solid var(--border); }
.section > .eyebrow { margin-bottom: 18px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.feature { padding: 4px 24px 4px 0; }
.feature + .feature { padding-left: 24px; border-left: 1px solid var(--border); }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; gap: 20px; } .feature + .feature { padding-left: 0; border-left: 0; } }
.feature .k { font-size: 28px; font-weight: 550; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.feature .t { font-weight: 550; margin-top: 10px; letter-spacing: -0.01em; }
.feature .d { color: var(--muted); font-size: 13.5px; margin-top: 4px; line-height: 1.55; }
.compare { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 240px 1fr 72px; gap: 16px; align-items: center; font-size: 13px; }
.bar-row .lbl { color: var(--text-2); }
.bar-row .lbl small { display: block; color: var(--muted); font-size: 11.5px; }
.bar-row .track { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 999px; background: var(--faint); }
.bar-row.us .fill { background: var(--accent); }
.bar-row.us .lbl { color: var(--text); font-weight: 550; }
.bar-row .val { text-align: right; font: 13px var(--mono); color: var(--text-2); font-variant-numeric: tabular-nums; }
.bar-row .val .gain { display: block; font: 500 11px var(--mono); color: var(--accent); margin-top: 2px; }
.bar-row.us .val { color: var(--text); }
.bar-row { grid-template-columns: 220px 1fr 92px; }
@media (max-width: 900px) { .bar-row { grid-template-columns: 1fr 64px; } .bar-row .track { grid-column: 1 / -1; grid-row: 2; } }
.auth-card { position: relative; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .stats { grid-template-columns: minmax(0, 1fr); } }
.stat-card { position: relative; overflow: hidden; padding: 24px 26px 22px; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg)); }
.auth-card { position: relative; overflow: hidden; }
.stat-card::before, .auth-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--accent), transparent 80%); }
.stat-card .k { font-size: 46px; font-weight: 600; letter-spacing: -0.055em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card .k .u { font-size: 22px; font-weight: 550; letter-spacing: -0.02em; color: var(--accent); margin-left: 5px; }
.stat-card .t { color: var(--muted); font-size: 13.5px; margin-top: 12px; }
.theme-toggle { margin-left: auto; background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.theme-toggle:hover { color: var(--text); }
.foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; gap: 18px; color: var(--muted); font-size: 12.5px; }

/* ---------- toasts, dialogs, misc ---------- */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--on-ink);
  max-width: 400px; font-size: 13px; box-shadow: var(--shadow); animation: rise .2s cubic-bezier(.2,.8,.2,1); }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
dialog { border: 1px solid var(--border); border-radius: 14px; padding: 0; background: var(--surface); color: var(--text);
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / .3); width: min(480px, calc(100vw - 32px)); }
dialog::backdrop { background: rgb(17 17 16 / .32); backdrop-filter: blur(4px); }
dialog .dlg-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
dialog .dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 14px 14px; }
.spinner { width: 13px; height: 13px; border-radius: 50%; border: 1.6px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px var(--good-soft); } }
