/* 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;
  --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;
  }
}
: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;
}
* { 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: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; }
.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); }
.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; }

/* Private / pool switch on each account */
.vis { display: inline-flex; border: 2px solid var(--line); }
.vis button { font-family: var(--crt); font-size: 16px; text-transform: uppercase; padding: 0 8px; line-height: 1.3; color: var(--faint); }
.vis button + button { border-left: 2px solid var(--line); }
.vis button.on.private { background: var(--fg); color: var(--surface); }
.vis button.on.pool { background: var(--good); color: var(--screen); }
.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"] { 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); }
}
