/* Pixel-terminal look, taken from the logo: a CRT demon in clay, ink,
   phosphor green and red. Square corners, hard offset shadows, a pixel
   display face; text and numbers in monospace. */
@font-face {
  font-family: "Pixelify Sans";
  src: url("/fonts/PixelifySans.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "VT323";
  src: url("/fonts/VT323-Regular.ttf") format("truetype");
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #f4ece2;
  --dots: #e4d6c6;
  --surface: #fffaf3;
  --sunken: #efe3d5;
  --line: #2b1d18;
  --hairline: #e6d8c8;
  --shadow: #2b1d18;
  --fg: #2b1d18;
  --dim: #6d5548;
  --faint: #a58d7f;
  --accent: #e2795a;
  --accent-hi: #f6b08f;
  --accent-lo: #b9533a;
  --good: #2f8f45;
  --warn: #b7830f;
  --bad: #d1342b;
  --track: #e6d8c8;
  --screen: #17110f;
  --phosphor: #7cf58a;
  /* The CLI product's own color in charts, apart from the status greens. */
  --cli: #3d7ea6;
  --pixel: "Pixelify Sans", ui-monospace, monospace;
  /* Figures and small caps labels: Pixelify's 5 reads as an S and its small C as an O. */
  --crt: "VT323", ui-monospace, monospace;
  --mono: "Maple Mono NF CN", "Maple Mono", ui-monospace, "SF Mono", Menlo, "PingFang SC", monospace;
}
/* Dark follows the system unless the header toggle picked a theme (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1a1412;
    --dots: #251c19;
    --surface: #221a17;
    --sunken: #2c221e;
    --line: #4a332b;
    --hairline: #33261f;
    --shadow: #0c0807;
    --fg: #f6e9df;
    --dim: #b49c8e;
    --faint: #7a6155;
    --good: #7cf58a;
    --warn: #ffd66b;
    --bad: #ff4d40;
    --track: #33261f;
    --cli: #6ec3e8;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a1412;
  --dots: #251c19;
  --surface: #221a17;
  --sunken: #2c221e;
  --line: #4a332b;
  --hairline: #33261f;
  --shadow: #0c0807;
  --fg: #f6e9df;
  --dim: #b49c8e;
  --faint: #7a6155;
  --good: #7cf58a;
  --warn: #ffd66b;
  --bad: #ff4d40;
  --track: #33261f;
  --cli: #6ec3e8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 8px 8px;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  padding: 28px 32px 48px;
  max-width: 1360px;
  margin: 0 auto;
}
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
button { font: inherit; color: var(--dim); background: none; border: none; cursor: pointer; padding: 1px 8px; white-space: nowrap; }
button:hover { color: var(--fg); background: var(--sunken); }
button.danger:hover { color: #fff; background: var(--bad); }
button:disabled { opacity: 0.5; cursor: default; }
/* Chunky pixel buttons: hard shadow, press to sink. */
.btn {
  font-family: var(--pixel); font-size: 15px; letter-spacing: 0.02em;
  color: var(--fg); background: var(--surface);
  border: 2px solid var(--line); padding: 5px 14px;
  box-shadow: 3px 3px 0 var(--shadow);
}
.btn:hover { background: var(--sunken); }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn.primary { background: var(--accent); color: #fff8f0; border-color: var(--shadow); }
.btn.primary:hover { background: var(--accent-lo); }
input, select {
  font: inherit; color: var(--fg); background: var(--surface);
  border: 2px solid var(--line); padding: 7px 10px; width: 100%; outline: none;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 3px 3px 0 var(--accent-lo); }
a { color: var(--accent); }

.good { color: var(--good); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.dim { color: var(--dim); }
.faint { color: var(--faint); }

/* Header */
header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-bottom: 26px; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo { width: 60px; height: 60px; image-rendering: pixelated; }
.title { font-family: var(--pixel); font-size: 32px; font-weight: 500; letter-spacing: 0.01em; line-height: 1; }
.title i { font-style: normal; color: var(--accent); margin-left: 3px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--dim); font-size: 12px; text-transform: lowercase; }
.live-dot { display: inline-block; width: 8px; height: 8px; background: var(--faint); margin-right: 6px; vertical-align: 0; }
.live-dot.on { background: var(--good); animation: blink 1.6s steps(1) infinite; }
.live-dot.off { background: var(--warn); }
.header-actions { margin-left: auto; display: flex; gap: 12px; }

/* Summary: a CRT screen in a clay shell, like the logo */
.summary {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--screen);
  border: 4px solid var(--accent);
  outline: 3px solid var(--shadow);
  box-shadow: 9px 9px 0 var(--shadow);
  margin: 0 0 30px 3px;
}
.summary::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
}
.stat { padding: 14px 20px 16px; border-left: 2px dashed #3a2b25; min-width: 0; }
.stat:first-child { border-left: none; }
.stat .label { color: var(--phosphor); font-family: var(--crt); font-size: 19px; line-height: 1.1; letter-spacing: 0.06em; text-transform: uppercase; }
.stat .value { color: #f6e9df; font-family: var(--crt); font-size: 44px; line-height: 1; margin: 2px 0 4px; }
.stat .value.good { color: var(--phosphor); }
.stat .sub { color: #8f7668; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Cards: pixel windows */
.card {
  background: var(--surface);
  border: 3px solid var(--line);
  box-shadow: 7px 7px 0 var(--shadow);
  margin: 0 0 30px 0;
}
.card-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  padding: 10px 18px; border-bottom: 3px solid var(--line); background: var(--sunken);
}
.card-head h2 { font-family: var(--pixel); font-size: 19px; font-weight: 500; color: var(--accent); }
.card-head h2::before { content: "▸ "; color: var(--fg); }
.card-head .dim { font-size: 12px; }
.scroll { overflow-x: auto; }

/* One row per account */
.acc {
  display: grid;
  /* Fixed widths: every row is its own grid, so columns must not depend on content. */
  grid-template-columns: var(--acc-cols, 12px 220px 76px 270px 270px minmax(100px, 1fr) 64px 72px);
  align-items: center;
  gap: 0 14px;
  padding: 9px 14px;
  border-top: 2px solid var(--hairline);
  min-width: 1100px;
  white-space: nowrap;
  position: relative;
}
.acc:first-child { border-top: none; }
.acc:hover { background: var(--sunken); }
.acc.off { opacity: 0.5; }
.acc .name { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
/* Actions float over the row's right end on hover instead of taking a column. */
.acc .actions {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: flex; gap: 2px; padding: 2px 4px 2px 28px;
  background: linear-gradient(to right, transparent, var(--sunken) 24px);
  opacity: 0; pointer-events: none;
}
.acc:hover .actions, .acc:focus-within .actions { opacity: 1; pointer-events: auto; }
.acc .actions button { border: 2px solid transparent; }
.acc .actions button:hover { border-color: var(--line); background: var(--surface); }
.acc .actions button.danger:hover { border-color: var(--bad); background: var(--bad); color: #fff; }
.acc:hover .pill.type, .acc:hover .pill.off { background: var(--surface); }
@media (hover: none) { .acc .actions { position: static; transform: none; opacity: 1; pointer-events: auto; background: none; padding: 0; } .acc { grid-template-columns: var(--acc-cols, 12px 220px 76px 270px 270px minmax(100px, 1fr) 64px 72px) auto; } }
.dot { width: 9px; height: 9px; display: inline-block; }
.dot.good { background: var(--good); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.dot.off { border: 2px solid var(--faint); }
.pill { display: inline-block; font-size: 11px; padding: 0 7px; border: 2px solid currentColor; text-transform: uppercase; letter-spacing: 0.04em; }
button.pill { background: none; font: inherit; font-size: 11px; cursor: pointer; }
button.pill:hover { background: var(--surface); }
.pill.type { color: var(--dim); border-color: var(--hairline); background: var(--sunken); }
.pill.good { color: var(--good); }
.pill.warn { color: var(--warn); }
.pill.bad { color: var(--bad); }
.pill.off { color: var(--faint); }

.window { display: grid; grid-template-columns: 20px 1fr 44px 36px; align-items: center; gap: 10px; }
.window .label { color: var(--faint); font-size: 11px; }
/* Health-bar segments: the mask cuts track and fill into blocks; the tick stays whole. */
.bar { position: relative; height: 12px; }
.bar .seg {
  position: absolute; inset: 0; background: var(--track);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px);
          mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px);
}
.bar .fill { position: absolute; inset: 0 auto 0 0; }
.bar .fill.good { background: var(--good); }
.bar .fill.warn { background: var(--warn); }
.bar .fill.bad { background: var(--bad); }
.bar .tick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--fg); opacity: 0.55; }
.window .pct { text-align: right; font-variant-numeric: tabular-nums; }
.window .reset { color: var(--faint); font-size: 11px; }
.add-row { border-top: 2px dashed var(--hairline); padding: 7px 10px; }
.add-row button { color: var(--accent); font-family: var(--pixel); font-size: 15px; }

/* Live requests, one line each */
.req {
  display: grid;
  /* Shares of the panel width, never of the content, so every row lines up and the row fills the panel. */
  /* Fixed lengths, not ch: the header's pixel font has a different ch than the rows' mono. */
  grid-template-columns: 72px 44px minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 0.8fr) minmax(0, 0.9fr);
  gap: 0 16px;
  padding: 5px 18px;
  border-top: 1px dashed var(--hairline);
  min-width: 960px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.req:hover { background: var(--sunken); }
/* Everyone's requests name the user too: give that column the room. */
.req-scroll.everyone .req { grid-template-columns: 72px 44px minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 3.6fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 0.7fr) minmax(0, 0.7fr) minmax(0, 0.8fr); min-width: 1120px; }
.req > span { overflow: hidden; text-overflow: ellipsis; }
.req .num { text-align: right; }
.req.head { font-family: var(--crt); color: var(--faint); font-size: 18px; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.06em; border-top: none; padding-top: 8px; padding-bottom: 8px; }
.req.head:hover { background: none; }
.req.head > span { font-family: var(--crt); }
/* Header and rows scroll in one box, so a scrollbar narrows both alike. */
.req-scroll { max-height: 560px; overflow: auto; }
.req-scroll .req.head { position: sticky; top: 0; z-index: 1; background: var(--surface); }

footer { color: var(--dim); font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
footer .dot { margin-right: 7px; }
#toast {
  position: fixed; right: 24px; bottom: 24px; max-width: 460px;
  background: var(--surface); border: 3px solid var(--line); box-shadow: 5px 5px 0 var(--shadow);
  padding: 9px 14px; display: none;
}

/* Add-account dialog: a terminal window in the logo's shell, like the summary screen */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; padding: 16px;
  display: none; align-items: center; justify-content: center;
  background-color: rgba(12, 8, 7, 0.62);
  background-image: radial-gradient(rgba(0, 0, 0, 0.35) 1px, transparent 1px);
  background-size: 4px 4px;
}
.modal {
  width: 560px; max-width: 100%;
  max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--surface);
  border: 4px solid var(--accent);
  outline: 3px solid var(--shadow);
  box-shadow: 12px 12px 0 var(--shadow);
}
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px 9px 14px;
  background: var(--screen);
  border-bottom: 3px solid var(--accent);
}
.modal-logo { width: 30px; height: 30px; image-rendering: pixelated; }
.modal-head h3 { font-family: var(--pixel); font-size: 20px; font-weight: 500; color: #f6e9df; flex: 1; }
.modal-close { font-family: var(--crt); font-size: 20px; color: #8f7668; padding: 0 6px; }
.modal-close:hover { color: var(--phosphor); background: none; }
.modal-body { padding: 20px 22px 22px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--line); margin-bottom: 20px; }
.tabs button { font-family: var(--crt); font-size: 20px; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 10px; color: var(--dim); }
.tabs button + button { border-left: 2px solid var(--line); }
.tabs button.active { background: var(--accent); color: #fff8f0; }
.hint { color: var(--dim); font-size: 12px; margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field label, .step label {
  display: block; margin-bottom: 4px;
  font-family: var(--crt); font-size: 18px; line-height: 1.1;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim);
}
.field label .faint { text-transform: none; letter-spacing: 0; }
/* Inputs are terminal command lines: dark screen, green prompt. */
.prompt { position: relative; flex: 1; }
.prompt::before {
  content: ">"; position: absolute; left: 10px; top: 50%; transform: translateY(-52%);
  font-family: var(--crt); font-size: 22px; color: var(--phosphor); pointer-events: none;
}
.modal input, .modal select, .prompt input {
  background: var(--screen); color: #f6e9df; border: 2px solid var(--line);
  font-family: var(--mono); font-size: 13px; padding: 8px 10px 8px 26px; width: 100%;
}
.modal select { padding-left: 10px; }
.modal input::placeholder, .prompt input::placeholder { color: #6f5a4f; }
.modal input:focus, .modal select:focus, .prompt input:focus { border-color: var(--accent); box-shadow: 3px 3px 0 var(--accent-lo); }
.row { display: flex; gap: 10px; align-items: stretch; }
.row.wrap { flex-wrap: wrap; }
.row.wrap .prompt { flex: 1 1 260px; }
.btn.block { width: 100%; }
.step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; margin-top: 18px; }
.step-no {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  font-family: var(--crt); font-size: 22px; color: #fff8f0; background: var(--accent);
  box-shadow: 3px 3px 0 var(--shadow);
}
.step > div { min-width: 0; }
.linkbox { margin-top: 12px; padding: 9px 12px; border: 2px dashed var(--line); background: var(--sunken); font-size: 12px; color: var(--dim); }
.linkbox a { word-break: break-all; }
.linkbox button { color: var(--accent); }
.note { color: var(--dim); background: var(--sunken); border-left: 4px solid var(--warn); padding: 9px 12px; margin-bottom: 16px; font-size: 12px; }
.note b { color: var(--warn); font-family: var(--crt); font-size: 17px; font-weight: 400; margin-right: 4px; }

@media (max-width: 760px) {
  body { padding: 20px 16px 32px; }
  .header-actions { margin-left: 0; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-left: none; border-top: 2px dashed #3a2b25; }
}
  

/* ── Console: navigation, views, forms ─────────────────────────────────── */
.app-header { margin-bottom: 18px; }
.who { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; }
.who .pill { font-size: 10px; }
/* Profile: the email-and-role button opens a small card with the profile and password form. */
.profile { position: relative; }
.profile-btn { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); padding-left: 6px; }
.profile-btn .profile-icon { display: block; flex: none; }
.profile-btn .role { font-family: var(--crt); font-size: 16px; line-height: 1; text-transform: uppercase; letter-spacing: 0.05em; color: var(--warn); }
.profile-btn .caret { color: var(--faint); font-size: 10px; }
.pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 40;
  width: 340px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 3px solid var(--line); box-shadow: 6px 6px 0 var(--shadow);
  padding: 14px 16px 12px; color: var(--fg); font-size: 13px;
}
.pop-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 2px solid var(--hairline); overflow-wrap: anywhere; }
.pop .kv { grid-template-columns: 120px 1fr; gap: 4px 12px; margin-bottom: 12px; }
.pop .kv > label { font-size: 16px; }
.pop-title { font-family: var(--pixel); font-size: 15px; color: var(--accent); margin: 12px 0 10px; padding-top: 12px; border-top: 2px solid var(--hairline); }
.pop-title .faint { font-family: var(--mono); font-size: 11px; margin-left: 6px; }
.theme-btn { min-width: 38px; padding-left: 0; padding-right: 0; }
nav.tabs-nav { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 26px; border: 3px solid var(--line); box-shadow: 5px 5px 0 var(--shadow); background: var(--surface); width: fit-content; max-width: 100%; }
nav.tabs-nav a {
  font-family: var(--crt); font-size: 21px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--dim); text-decoration: none; padding: 3px 16px; border-right: 2px solid var(--line);
}
nav.tabs-nav a:last-child { border-right: none; }
nav.tabs-nav a:hover { color: var(--fg); background: var(--sunken); }
nav.tabs-nav a.active { background: var(--accent); color: #fff8f0; }
nav.tabs-nav .sep { width: 6px; background: var(--line); }
nav.tabs-nav a.admin { color: var(--warn); }
nav.tabs-nav a.admin.active { color: #fff8f0; background: var(--accent-lo); }

.view-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 0 0 16px; }
.view-title h1 { font-family: var(--pixel); font-weight: 500; font-size: 26px; }
.view-title .dim { font-size: 12px; }
.view-title .spacer { flex: 1; }
.range { display: inline-flex; border: 2px solid var(--line); }
.range button { font-family: var(--crt); font-size: 18px; padding: 0 10px; }
.range button + button { border-left: 2px solid var(--line); }
.range button.active { background: var(--fg); color: var(--surface); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 30px; }
.card-body { padding: 16px 18px; }
.empty { padding: 22px 18px; color: var(--dim); }
.empty b { color: var(--fg); }

/* Daily usage: pixel columns */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding: 12px 18px 4px; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.chart .val { font-family: var(--crt); font-size: 15px; color: var(--dim); margin-bottom: 3px; white-space: nowrap; }
.chart .col.zero .val { color: var(--faint); }
.chart .stack { width: 100%; max-width: 44px; display: flex; flex-direction: column; justify-content: flex-end; }
.chart .stack span { display: block; width: 100%; }
.chart .read { background: var(--good); opacity: 0.85; }
.chart .fresh { background: var(--accent); }
.chart .col:hover .stack span { filter: brightness(1.15); }
.chart-axis { display: flex; gap: 6px; padding: 0 18px 12px; }
.chart-axis span { flex: 1; text-align: center; color: var(--faint); font-family: var(--crt); font-size: 15px; min-width: 0; overflow: hidden; }
.legend { display: flex; gap: 16px; font-size: 11px; color: var(--dim); }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; }

/* Generic one-line rows */
.tbl { display: grid; grid-template-columns: var(--cols); gap: 0 16px; padding: 7px 18px; border-top: 1px dashed var(--hairline); align-items: center; white-space: nowrap; min-width: var(--min, 0); }
.tbl > span { overflow: hidden; text-overflow: ellipsis; }
.tbl.head > span { font-family: var(--crt); }
.tbl.head { font-family: var(--crt); color: var(--faint); font-size: 18px; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.06em; border-top: none; }
.tbl:not(.head):hover { background: var(--sunken); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .row-actions { display: flex; gap: 4px; justify-content: flex-end; }
/* An email with marks after it: the email gives way, the marks always show. */
.tbl > .who { display: flex; align-items: center; gap: 6px; }
.tbl > .who > .email { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tbl > .who > .pill { flex: none; }
/* ··· menu on a table row (users): fixed to the viewport, above the table's scroll box */
.row-menu {
  position: fixed; z-index: 45; display: flex; flex-direction: column; min-width: 150px;
  background: var(--surface); border: 3px solid var(--line); box-shadow: 4px 4px 0 var(--shadow); padding: 4px;
}
.row-menu button { text-align: left; padding: 6px 10px; }
.row-menu button:not(.danger):hover { background: var(--sunken); }

/* Private / pool switch on each account */
.vis { justify-self: start; min-width: 72px; border: 2px solid var(--line); font-family: var(--crt); font-size: 16px; text-transform: uppercase; padding: 0 8px; line-height: 1.3; }
.vis.private { background: var(--fg); color: var(--surface); }
.vis.pool { background: var(--good); color: var(--screen); }
.vis:hover { filter: brightness(1.15); }
.acc .cost { text-align: right; padding-right: 12px; }

/* Getting started */
.checklist { list-style: none; counter-reset: step; }
.checklist li { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; padding: 10px 18px; border-top: 1px dashed var(--hairline); }
.checklist li:first-child { border-top: none; }
.checklist .step-no { box-shadow: 2px 2px 0 var(--shadow); }
.checklist li.done .step-no { background: var(--good); color: var(--screen); }
.checklist li.done .what { color: var(--dim); text-decoration: line-through; }

/* Code snippets and the one-time key */
.code {
  position: relative; background: var(--screen); color: #f6e9df; border: 2px solid var(--line);
  font-family: var(--mono); font-size: 12px; padding: 12px 14px; white-space: pre; overflow-x: auto; line-height: 1.7;
}
.code .p { color: var(--phosphor); }
.code .k { color: var(--accent-hi); }
.code .c { color: #8f7668; }
.copy { position: absolute; top: 6px; right: 6px; font-family: var(--crt); font-size: 16px; color: #8f7668; border: 2px solid #3a2b25; background: var(--screen); }
.copy:hover { color: var(--phosphor); background: var(--screen); }
.balance-body { display: grid; gap: 4px; }
.balance-value { font-family: var(--crt); font-size: 44px; line-height: 1; }
.balance-body .warn { font-size: 12px; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
button.link:hover { color: var(--accent); background: none; }
.history { border-top: 2px solid var(--line); padding-bottom: 6px; }
.history .tbl { padding-top: 5px; padding-bottom: 5px; }
.history .history-row.hidden { display: none; }
.history.open .history-row.hidden { display: grid; }
.history-more { padding: 6px 18px 0; }
.history-note { padding: 6px 18px 4px; font-size: 11px; }
.modal.wide { width: 820px; }
.history.only-topups .history-row[data-kind="usage"], .history.only-topups .history-row[data-kind="rebate"] { display: none; }
.modal-history { max-height: 50vh; overflow: auto; margin: 0 -22px; }
.modal-history .history { border-top: none; }
.reveal { border: 3px dashed var(--good); background: var(--sunken); padding: 14px 16px; margin-bottom: 16px; }
.reveal .key { font-family: var(--mono); font-size: 14px; word-break: break-all; color: var(--fg); margin: 6px 0 10px; }
.reveal .warn { font-size: 12px; }

/* Sign-in */
.auth { max-width: 460px; margin: 6vh auto 0; }
.auth .brand { justify-content: center; margin-bottom: 22px; }
.auth .modal-body { padding-top: 22px; }
.auth .switch { margin-top: 16px; text-align: center; font-size: 12px; color: var(--dim); }
.auth .switch a { cursor: pointer; }
.error-line { color: var(--bad); font-size: 12px; min-height: 1.4em; margin-top: 8px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; align-items: center; }
.kv > label { font-family: var(--crt); font-size: 18px; text-transform: uppercase; color: var(--dim); }
.toggle { display: inline-flex; border: 2px solid var(--line); justify-self: start; width: fit-content; }
.toggle button { font-family: var(--crt); font-size: 18px; text-transform: uppercase; padding: 1px 12px; }
.toggle button + button { border-left: 2px solid var(--line); }
.toggle button.on { background: var(--accent); color: #fff8f0; }

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); }
}

/* ── Admin dashboard ──────────────────────────────────────────────────────
   The public site's pixel-terminal look (site.css): pixel windows with hard
   shadows, CRT screens for the headline figures, VT323 for figures and small
   caps, monospace text. The --d-* names map onto the console's own tokens, so
   the dark theme follows them; app.js reads them for its charts. */
.dsh {
  --d-page: var(--bg); --d-surface: var(--surface); --d-sunken: var(--sunken); --d-rule: var(--line); --d-grid: var(--hairline);
  --d-ink: var(--fg); --d-ink-2: var(--dim); --d-ink-3: var(--faint);
  --d-api: var(--accent); --d-cli: var(--cli); --d-pos: var(--good); --d-neg: var(--bad); --d-warn: var(--warn);
  /* CRT screens are dark in both themes */
  --crt-fg: #f6e9df; --crt-dim: #8f7668; --crt-rule: #3a2b25; --crt-gold: #ffd66b; --crt-red: #ff4d40;
  font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--d-ink); font-variant-numeric: tabular-nums;
}
.dsh b { font-weight: 600; }
.dsh .muted { color: var(--d-ink-3); }
.dsh .t-pos { color: var(--d-pos); }
.dsh .t-neg { color: var(--d-neg); }
.dsh .t-warn { color: var(--d-warn); }

/* Head: what the page covers, filters */
.dsh-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 16px; }
.dsh-top p { color: var(--d-ink-2); font-size: 12px; }
.dsh-controls { margin-left: auto; display: flex; flex-wrap: wrap; gap: 14px; }
.dsh-seg { display: inline-flex; background: var(--d-surface); border: 2px solid var(--d-rule); box-shadow: 3px 3px 0 var(--shadow); }
.dsh-seg button { font-family: var(--crt); font-size: 18px; line-height: 1.2; letter-spacing: 0.05em; text-transform: uppercase; color: var(--d-ink-2); padding: 2px 12px; }
.dsh-seg button + button { border-left: 2px solid var(--d-rule); }
.dsh-seg button:hover { background: var(--d-sunken); color: var(--d-ink); }
.dsh-seg button.on { background: var(--accent); color: #fff8f0; }
.dsh-seg button:disabled { color: var(--d-ink-3); opacity: 0.45; cursor: not-allowed; }

/* Status line */
.dsh-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 14px; margin-bottom: 22px; background: var(--d-surface); border: 3px solid var(--d-rule); box-shadow: 5px 5px 0 var(--shadow); color: var(--d-ink-2); }
.dsh-status .s-state { display: inline-flex; align-items: center; gap: 9px; font-family: var(--crt); font-size: 19px; line-height: 1.1; letter-spacing: 0.06em; text-transform: uppercase; color: var(--d-ink); }
.dsh-status .s-dot { width: 9px; height: 9px; background: var(--d-pos); }
.dsh-status.warn .s-dot { background: var(--d-warn); }
.dsh-status.neg .s-dot { background: var(--d-neg); animation: blink 1.6s steps(1) infinite; }
.dsh-status .s-issues { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.dsh-chip { display: inline-block; font-size: 11px; line-height: 1.6; padding: 0 7px; border: 2px solid var(--d-grid); background: var(--d-sunken); color: var(--d-ink-2); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.dsh-chip.neg { border-color: currentColor; background: none; color: var(--d-neg); }
.dsh-chip.warn { border-color: currentColor; background: none; color: var(--d-warn); }

/* The pool: its runway on a CRT screen, and its accounts' weeks as one bar */
.dsh-pool { display: grid; gap: 24px; margin-bottom: 28px; }
.pl-lead {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 40px; padding: 24px 26px;
  background: var(--screen); color: var(--crt-fg);
  border: 4px solid var(--accent); outline: 3px solid var(--shadow); box-shadow: 9px 9px 0 var(--shadow); margin-left: 3px;
}
.pl-lead::after, .dsh-kpis::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
}
.pl-label { color: var(--phosphor); font-family: var(--crt); font-size: 19px; line-height: 1.1; letter-spacing: 0.06em; text-transform: uppercase; }
.pl-value { font-family: var(--crt); font-size: 76px; font-weight: 400; line-height: 0.95; margin: 8px 0 10px; font-variant-numeric: tabular-nums; }
.pl-main { min-width: 0; }
.pl-lead.warn .pl-value, .pl-lead.warn .pl-spark { color: var(--crt-gold); }
.pl-lead.warn .pl-value { text-shadow: 0 0 18px rgba(255, 214, 107, 0.25); }
.pl-lead.neg .pl-value, .pl-lead.neg .pl-spark { color: var(--crt-red); }
.pl-lead.neg .pl-value { text-shadow: 0 0 18px rgba(255, 77, 64, 0.3); }
/* The runway's last 24 hours: a thin line from a zero baseline, details on hover */
/* Its caption sits on the line of the pace copy beside it */
.pl-spark { position: relative; z-index: 1; flex: 1 1 320px; max-width: 520px; align-self: flex-end; }
.ps-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-family: var(--crt); font-size: 13px; color: var(--crt-dim); letter-spacing: 0.05em; text-transform: uppercase; }
.ps-plot { position: relative; height: 50px; }
.ps-plot svg { display: block; width: 100%; height: 56px; overflow: visible; }
.ps-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: miter; vector-effect: non-scaling-stroke; }
.ps-area { fill: currentColor; opacity: 0.08; }
.ps-dot { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; pointer-events: none; }
.ps-col { position: absolute; top: 0; bottom: 0; transform: translateX(-50%); }
.ps-col:hover::before { content: ''; position: absolute; left: 50%; top: var(--y); width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: currentColor; }
.ps-col:hover::after, .pb-seg:hover::after, .pb-seg:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 5;
  padding: 6px 10px; background: var(--surface); color: var(--fg); border: 3px solid var(--line); box-shadow: 4px 4px 0 var(--shadow);
  font-family: var(--mono); font-size: 12px; line-height: 1.5; white-space: pre; pointer-events: none;
}
.ps-ruler { position: relative; height: 16px; margin-top: 4px; }
.ps-tick { position: absolute; transform: translateX(-50%); font-family: var(--crt); font-size: 13px; line-height: 1; color: var(--crt-dim); letter-spacing: 0.04em; white-space: nowrap; }
.ps-tick:first-child { transform: none; left: 0 !important; }
.ps-tick:last-child { transform: none; left: auto !important; right: 0; }
.pl-sub { font-size: 12px; line-height: 1.5; color: var(--crt-dim); }
.pl-facts { display: grid; gap: 4px; font-size: 12px; color: var(--crt-dim); }
.pl-facts b { color: var(--crt-fg); }
.pl-fact-hero { margin-bottom: 6px; }
.pl-fact-label { color: var(--phosphor); font-family: var(--crt); font-size: 15px; line-height: 1.1; letter-spacing: 0.05em; text-transform: uppercase; }
.pl-fact-val { font-family: var(--crt); font-size: 38px; line-height: 1; color: var(--crt-fg); text-shadow: 0 0 12px rgba(124, 245, 138, 0.25); font-variant-numeric: tabular-nums; }
/* The pool as one bar: a block per account, as long as its week used. The bar
   spans the card; its label and the legend share the line under it. */
.pl-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 18px; padding: 14px 20px; background: var(--d-surface); border: 3px solid var(--d-rule); box-shadow: 7px 7px 0 var(--shadow); }
.pb-label { grid-row: 2; font-family: var(--crt); font-size: 18px; line-height: 1.1; letter-spacing: 0.05em; text-transform: uppercase; color: var(--d-ink-2); }
.pb-track, .pl-bar > .dsh-empty { grid-row: 1; grid-column: 1 / -1; }
.pb-track { display: flex; gap: 3px; height: 30px; padding: 3px; border: 2px solid var(--d-rule); background: var(--track); }
.pb-seg { position: relative; min-width: 6px; height: 100%; cursor: default; outline: none; }
.pb-seg:hover, .pb-seg:focus-visible { filter: brightness(0.9); }
.pb-legend { grid-row: 2; grid-column: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 14px; font-size: 12px; color: var(--d-ink-2); }

/* Headline figures, each for the period: the console's CRT band */
.dsh-kpis {
  position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--screen); border: 4px solid var(--accent); outline: 3px solid var(--shadow); box-shadow: 9px 9px 0 var(--shadow); margin-left: 3px;
}
.dsh-kpi { display: flex; flex-direction: column; padding: 14px 20px 10px; border-left: 2px dashed var(--crt-rule); min-width: 0; color: var(--crt-fg); }
.dsh-kpi:first-child { border-left: none; }
.dsh-kpi .k-label { color: var(--phosphor); font-family: var(--crt); font-size: 17px; line-height: 1.1; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsh-kpi .k-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; font-family: var(--crt); font-size: 44px; font-weight: 400; line-height: 1; margin: 4px 0 4px; }
.dsh-kpi .k-value .t-warn { color: var(--crt-gold); }
.dsh-kpi .k-value .t-neg { color: var(--crt-red); }
.dsh-kpi .k-sub { margin-bottom: 8px; font-size: 11px; color: var(--crt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsh-kpi .k-spark { position: relative; z-index: 1; height: 34px; margin-top: auto; }
.dsh-kpi .k-live { display: flex; align-items: center; gap: 5px; margin: -4px 0 8px; font-size: 11px; color: var(--crt-dim); white-space: nowrap; }
.dsh-kpi .k-live b { color: var(--crt-fg); }
.dsh-kpi .k-live i { width: 7px; height: 7px; background: var(--crt-dim); }
.dsh-kpi .k-live.on i { background: var(--phosphor); animation: blink 1.6s steps(1) infinite; }
.dsh-delta { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--d-ink-3); white-space: nowrap; }
.dsh-delta.pos { color: var(--d-pos); }
.dsh-delta.neg { color: var(--d-neg); }
.dsh-kpi .dsh-delta { color: var(--crt-dim); }
.dsh-kpi .dsh-delta.pos { color: var(--phosphor); }
.dsh-kpi .dsh-delta.neg { color: var(--crt-red); }

/* Tokens: today, yesterday, the last hour or the period */
.dsh-tokens { margin-bottom: 22px; }
.tf-row, .dsh-strip { display: grid; background: var(--d-surface); border: 3px solid var(--d-rule); box-shadow: 7px 7px 0 var(--shadow); }
.tf-row { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 22px; }
.tf { padding: 12px 18px 12px; border-left: 2px dashed var(--d-grid); min-width: 0; }
.tf:first-child { border-left: none; }
.tf-label, .dsh-strip .sl { font-family: var(--crt); font-size: 16px; line-height: 1.1; letter-spacing: 0.02em; text-transform: uppercase; color: var(--d-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; margin: 4px 0 4px; font-family: var(--crt); font-size: 38px; font-weight: 400; line-height: 1; }
.tf-sub { font-size: 11.5px; color: var(--d-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Sections and the 12-column grid */
.dsh-sec { margin-top: 44px; }
.dsh-sec > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-bottom: 8px; margin-bottom: 20px; border-bottom: 3px solid var(--d-rule); }
.dsh-sec .idx { font-family: var(--crt); font-size: 22px; line-height: 1; color: var(--accent); }
.dsh-sec h2 { font-family: var(--pixel); font-size: 26px; font-weight: 500; line-height: 1.15; }
.dsh-sec > header p { color: var(--d-ink-2); font-size: 12px; }
.dsh-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.dsh-grid + .dsh-grid { margin-top: 24px; }
.dsh-grid:empty { display: none; }
.dsh .c4 { grid-column: span 4; }
.dsh .c5 { grid-column: span 5; }
.dsh .c6 { grid-column: span 6; }
.dsh .c7 { grid-column: span 7; }
.dsh .c8 { grid-column: span 8; }
.dsh .c12 { grid-column: span 12; }
/* Cards: pixel windows with a title bar */
.dsh-card { display: flex; flex-direction: column; min-width: 0; padding: 14px 18px 16px; background: var(--d-surface); border: 3px solid var(--d-rule); box-shadow: 7px 7px 0 var(--shadow); }
.dc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: -14px -18px 14px; padding: 8px 18px; background: var(--d-sunken); border-bottom: 3px solid var(--d-rule); }
.dc-head h3 { font-family: var(--pixel); font-size: 19px; font-weight: 500; line-height: 1.3; color: var(--accent); }
.dc-head h3::before { content: "▸ "; color: var(--d-ink); }
.dc-note { color: var(--d-ink-2); font-size: 12px; }
.dc-legend { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-left: auto; font-size: 12px; color: var(--d-ink-2); }
.dc-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; background: var(--c); }
.dc-legend i.line { width: 14px; height: 3px; vertical-align: 3px; }
.dc-legend i.dashed { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }
.dc-chart { width: 100%; flex: 1 1 auto; }
.dsh-empty { padding: 18px 0; color: var(--d-ink-2); }

/* Key-value lists, levers, callouts */
.kv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 2px dashed var(--d-grid); }
.kv-row:first-child { border-top: none; padding-top: 0; }
.kv-row > span { color: var(--d-ink-2); }
.kv-row > b { font-family: var(--crt); font-size: 21px; font-weight: 400; line-height: 1.1; }
.kv-row.big b { font-size: 30px; }
.kv-gap { height: 12px; }
.kv-gap + .kv-row { border-top: none; }
.dsh .sw { display: inline-block; width: 10px; height: 10px; margin-right: 7px; }
.dsh-lever { padding: 10px 0; border-top: 2px dashed var(--d-grid); }
.dsh-lever:first-child { border-top: none; padding-top: 0; }
.lv-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lv-top .lv-value { margin-left: auto; }
.lv-name { font-weight: 600; white-space: nowrap; }
.lv-value { font-family: var(--crt); font-size: 32px; font-weight: 400; line-height: 1; }
.lv-meter { position: relative; height: 10px; margin: 6px 0; border: 2px solid var(--d-rule); background: var(--track); }
.lv-meter span { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.lv-meter b { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1px; background: var(--d-ink); }
.lv-note { font-size: 12px; color: var(--d-ink-2); }
.lv-spark { flex: 1; max-width: 140px; height: 22px; margin: 0 10px; align-self: center; }
.dsh-callout, .dsh-risk { padding: 9px 12px; border: 2px solid var(--d-grid); border-left: 5px solid var(--d-ink-3); background: var(--d-sunken); color: var(--d-ink-2); font-size: 12px; }
.dsh-callout { margin-top: 12px; }
.dsh-callout.warn, .dsh-risk.warn { border-left-color: var(--d-warn); }
.dsh-risk { margin-bottom: 10px; }
.dsh-risk b { font-family: var(--crt); font-size: 22px; font-weight: 400; color: var(--d-ink); }

/* The bridge's steps, in words */
.wf-notes { margin-top: 10px; border-top: 2px dashed var(--d-grid); }
.wf-notes > div { display: grid; grid-template-columns: 130px 80px 120px minmax(0, 1fr); gap: 0 12px; align-items: baseline; padding: 5px 0; border-bottom: 2px dashed var(--d-grid); font-size: 12px; }
.wf-notes > div:last-child { border-bottom: none; }
.wf-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.wf-name i { width: 10px; height: 10px; }
.wf-notes b { text-align: right; font-family: var(--crt); font-size: 18px; font-weight: 400; }
.wf-share { color: var(--d-ink-3); }
.wf-what { color: var(--d-ink-2); }

/* Funnel, contact list, token mix */
.f-row + .f-row { margin-top: 12px; }
.f-top { display: flex; justify-content: space-between; align-items: baseline; color: var(--d-ink-2); }
.f-top b { font-family: var(--crt); font-size: 28px; font-weight: 400; line-height: 1; color: var(--d-ink); }
.f-bar { height: 12px; margin: 4px 0; border: 2px solid var(--d-rule); background: var(--track); }
.f-bar span { display: block; height: 100%; background: var(--accent); }
.f-note { font-size: 12px; color: var(--d-ink-2); }
.dsh-list .li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; padding: 7px 0; border-top: 2px dashed var(--d-grid); }
.dsh-list .li:first-child { border-top: none; padding-top: 0; }
.dsh-list .who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsh-list .what { grid-column: 1 / -1; font-size: 12px; color: var(--d-ink-2); }
.dsh-stack { display: flex; height: 12px; margin: 2px 0 12px; border: 2px solid var(--d-rule); background: var(--track); overflow: hidden; }

/* Tables */
.dsh-scroll { overflow-x: auto; margin: 0 -6px; }
.dsh-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dsh-table th { padding: 0 6px 4px; text-align: left; font-family: var(--crt); font-size: 16px; font-weight: 400; letter-spacing: 0.05em; text-transform: uppercase; color: var(--d-ink-2); border-bottom: 2px dashed var(--d-rule); white-space: nowrap; }
.dsh-table td { padding: 6px 6px; border-bottom: 2px solid var(--d-grid); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.dsh-table td.wide { max-width: 640px; width: 100%; }
.dsh-table tr:last-child td { border-bottom: none; }
.dsh-table tbody tr:hover td { background: var(--d-sunken); }
.dsh-table .r { text-align: right; }
.dsh .st { display: inline-flex; align-items: center; gap: 7px; }
.dsh .st i { width: 8px; height: 8px; }
.dsh .mbar { position: relative; display: inline-block; width: 56px; height: 10px; margin-right: 6px; border: 2px solid var(--d-rule); background: var(--track); vertical-align: -1px; overflow: hidden; }
.dsh .mbar span, .dsh .mbar em { position: absolute; inset: 0 auto 0 0; }
.dsh .mbar em { background: repeating-linear-gradient(135deg, var(--d-ink-3) 0 2px, transparent 2px 4px); opacity: 0.6; }

/* Service figures */
.dsh-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 24px; }
.dsh-strip > div { padding: 12px 16px; border-left: 2px dashed var(--d-grid); min-width: 0; }
.dsh-strip > div:first-child { border-left: none; }
.dsh-strip .sv { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-family: var(--crt); font-size: 32px; font-weight: 400; line-height: 1.1; }
.dsh-strip .sv .dsh-delta { font-family: var(--mono); font-size: 13px; font-weight: 500; margin-left: auto; align-self: flex-end; padding-bottom: 2px; }
.dsh-strip .sv .dsh-delta.pos { color: var(--d-pos); }
.dsh-strip .sv .dsh-delta.neg { color: var(--d-neg); }
.dsh-strip .ss { font-size: 11.5px; color: var(--d-ink-2); }

/* Chart tooltips (drawn inside .dsh) */
.dsh .dt-head { margin-bottom: 4px; font-family: var(--crt); font-size: 18px; letter-spacing: 0.04em; }
.dsh .dt-row { display: flex; align-items: baseline; justify-content: space-between; gap: 22px; }
.dsh .dt-row b { font-family: var(--crt); font-size: 17px; font-weight: 400; letter-spacing: 0.04em; }
.dsh .dt-row i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; }
.dsh .dt-note { color: var(--d-ink-2); max-width: 260px; white-space: normal; margin-top: 2px; }

@media (max-width: 1180px) {
  .tf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tf:nth-child(3) { border-left: none; }
  .tf:nth-child(n + 3) { border-top: 2px dashed var(--d-grid); }
  .dsh-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dsh-kpi:nth-child(4) { border-left: none; }
  .dsh-kpi:nth-child(n + 4) { border-top: 2px dashed var(--crt-rule); }
  .dsh-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dsh-strip > div:nth-child(4) { border-left: none; }
  .dsh-strip > div:nth-child(n + 4) { border-top: 2px dashed var(--d-grid); }
}
@media (max-width: 960px) {
  .pl-lead { flex-wrap: wrap; }
  .dsh .c4, .dsh .c5, .dsh .c6, .dsh .c7, .dsh .c8 { grid-column: span 12; }
}
@media (max-width: 640px) {
  .pl-value { font-size: 56px; }
  .dsh-kpis, .dsh-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tf-row { grid-template-columns: minmax(0, 1fr); }
  .wf-notes > div { grid-template-columns: minmax(0, 1fr) auto auto; }
  .wf-what { grid-column: 1 / -1; }
  .tf { border-left: none; }
  .tf + .tf { border-top: 2px dashed var(--d-grid); }
  .dsh-kpi, .dsh-strip > div { border-left: none; border-top: 2px dashed var(--crt-rule); }
  .dsh-strip > div { border-top-color: var(--d-grid); }
}

/* A kept request, whole (Firewall → Request / Samples) */
.evidence-pre { max-height: 55vh; overflow: auto; margin: 14px 0 0; padding: 12px; font-size: 12px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; background: var(--d-sunken, rgba(0,0,0,0.25)); border: 2px solid var(--d-grid, rgba(255,255,255,0.1)); }

/* Weight slider for Gateway mine account preference */
.weight-slider-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.weight-slider { -webkit-appearance: none; appearance: none; width: 220px; height: 8px; background: var(--track); border: 2px solid var(--line); outline: none; cursor: pointer; }
.weight-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; background: var(--accent); border: 2px solid var(--line); cursor: pointer; box-shadow: 2px 2px 0 var(--shadow); }
.weight-slider::-moz-range-thumb { width: 18px; height: 18px; background: var(--accent); border: 2px solid var(--line); cursor: pointer; box-shadow: 2px 2px 0 var(--shadow); }

