/* EventLog Reporter — no framework, no build step.
   Deployed by copying files onto a VPS, so everything is plain CSS. */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #1b1f24;
  --ink-2: #5b6470;
  --border: #e1e5ea;
  --accent: #2f6df6;
  --accent-ink: #ffffff;

  --critical: #b3001b;
  --error: #d0430f;
  --warning: #9a6700;
  --notice: #37618f;
  --ok: #1a7f46;
  --new: #6d28d9;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --sidebar-w: 216px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171c;
    --surface: #1b1f26;
    --surface-2: #20252d;
    --ink: #e8ecf1;
    --ink-2: #99a3b0;
    --border: #2c333d;
    --accent: #5b8dff;

    --critical: #ff6b7e;
    --error: #ff9057;
    --warning: #e3b341;
    --notice: #7bb0ff;
    --ok: #52d68a;
    --new: #b98cff;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

/* The `hidden` attribute is how every panel in this app is shown and hidden, and
   its default `display: none` loses to any rule that sets display - which the
   overlays and the layout containers all do. Without this the drawer and the
   device editor render over the sign-in screen on first paint. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 19px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 10px; letter-spacing: -.01em; }

.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.error { color: var(--critical); }
.spacer { flex: 1; }

button {
  font: inherit;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
button:hover { filter: brightness(1.07); }
button.ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
button.ghost:hover { background: var(--surface-2); }
button.small { padding: 4px 9px; font-size: 12px; }
button:disabled { opacity: .5; cursor: not-allowed; }

input, select {
  font: inherit;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* ── Sign in ─────────────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 28px;
  width: min(400px, 100%);
  display: grid;
  gap: 13px;
}
.auth-mark { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.auth-card label { display: grid; gap: 5px; font-size: 13px; color: var(--ink-2); }
.auth-card button { margin-top: 6px; padding: 10px; }

/* ── Shell ───────────────────────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 10px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px 18px; font-size: 13px; line-height: 1.25; color: var(--ink-2);
}
.brand strong { color: var(--ink); font-size: 15px; letter-spacing: -.01em; }
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ok); flex: 0 0 auto;
}

nav { display: grid; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: transparent; color: var(--ink-2);
  border: none; border-radius: 8px; padding: 8px 10px;
  font-size: 13.5px;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); filter: none; }
.nav-item.active { background: var(--accent); color: var(--accent-ink); }
.nav-item .ico { width: 16px; text-align: center; opacity: .85; }
.nav-badge {
  margin-left: auto; background: var(--critical); color: #fff;
  border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 600;
}
.nav-item.active .nav-badge { background: rgba(255, 255, 255, .25); }

.sidebar-foot {
  margin-top: auto; padding: 12px 8px 0;
  border-top: 1px solid var(--border);
  display: grid; gap: 8px;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 22px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.title-wrap { display: grid; }
.controls { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

main { padding: 20px 22px 48px; }
.view { display: grid; gap: 16px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); gap: 10px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 14px; box-shadow: var(--shadow);
}
.card .n { font-size: 23px; font-weight: 640; letter-spacing: -.02em; }
.card .k { font-size: 12px; color: var(--ink-2); margin-top: 1px; }
.card.critical .n { color: var(--critical); }
.card.error .n { color: var(--error); }
.card.warning .n { color: var(--warning); }
.card.ok .n { color: var(--ok); }

/* Health strip: one row that answers "is the estate actually collecting?" */
.health-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.health-tile {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--ok);
  border-radius: var(--radius); padding: 11px 13px; box-shadow: var(--shadow);
  display: grid; gap: 2px;
}
.health-tile.bad { border-left-color: var(--critical); }
.health-tile.warn { border-left-color: var(--warning); }
.health-tile .v { font-size: 18px; font-weight: 640; }
.health-tile .l { font-size: 12px; color: var(--ink-2); }

/* ── Panels ──────────────────────────────────────────────────────────────── */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.panel.bad { border-left: 3px solid var(--critical); }
.panel ul { margin: 8px 0 0; padding-left: 18px; }
.panel li { margin: 3px 0; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }

.client-head {
  font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-2); margin: 18px 0 8px; font-weight: 600;
}
.site-head {
  font-size: 12px; color: var(--ink-2); margin: 12px 0 6px 2px;
  display: flex; align-items: center; gap: 7px;
}
.site-head::before { content: "└"; opacity: .5; }

.empty {
  padding: 34px; text-align: center; color: var(--ink-2);
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
}

/* ── Device sections ─────────────────────────────────────────────────────── */
details.device {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 8px; overflow: hidden;
}
details.device > summary {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 11px 14px; cursor: pointer; list-style: none;
}
details.device > summary::-webkit-details-marker { display: none; }
details.device > summary:hover { background: var(--surface-2); }
details.device[open] > summary { border-bottom: 1px solid var(--border); }
.device-body { padding: 12px 14px; }

.device-row {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 13px; margin-bottom: 7px;
}
.device-row.retired { opacity: .55; }
.device-row .id { font-weight: 600; }

/* ── Pills ───────────────────────────────────────────────────────────────── */
.pill {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  border: 1px solid currentColor;
}
.pill.critical, .pill.never { color: var(--critical); }
.pill.error   { color: var(--error); }
.pill.warning, .pill.late { color: var(--warning); }
.pill.notice  { color: var(--notice); }
.pill.debug   { color: var(--ink-2); }
.pill.ok      { color: var(--ok); }
.pill.new     { color: var(--new); }
.pill.reboot  { color: var(--notice); }
.pill.silent  { color: var(--critical); }
.pill.retired { color: var(--ink-2); }

/* ── Device log browser ──────────────────────────────────────────────────── */
.dl-bar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 10px 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.dl-bar input[type="search"] { min-width: 220px; flex: 1; }

/* List above, detail below. The split is fixed to the viewport so the detail
   pane stays put while the list scrolls under it - scrolling a long list and
   losing the message you were reading is the thing that makes a log viewer
   unusable. */
.dl-split { display: grid; grid-template-rows: minmax(200px, 1fr) minmax(180px, 40vh); gap: 10px; height: calc(100vh - 210px); }
.dl-list, .dl-detail {
  overflow: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.dl-list table { font-size: 12.5px; }
.dl-list thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dl-list tbody tr { cursor: pointer; }
.dl-list tbody tr:hover { background: var(--surface-2); }
.dl-list tbody tr.sel { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.dl-detail { padding: 14px; }
.dl-detail .body {
  white-space: pre-wrap; font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px; margin-top: 10px; line-height: 1.55;
}
.dl-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; }
.dl-meta div { font-size: 12px; }
.dl-meta .k { color: var(--ink-2); display: block; }

@media (max-width: 860px) {
  .dl-split { height: auto; grid-template-rows: 55vh 45vh; }
}

/* ── Segmented control ───────────────────────────────────────────────────── */
.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
}
.seg-btn {
  background: transparent; color: var(--ink-2);
  border: none; border-radius: 7px; padding: 5px 12px; font-size: 13px;
}
.seg-btn:hover { background: var(--surface); color: var(--ink); filter: none; }
.seg-btn.active { background: var(--accent); color: var(--accent-ink); }

/* Clients a signature was seen at. Scanning "how many places" matters more than
   reading the names, so they stay compact and wrap rather than truncating. */
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2);
  white-space: nowrap;
}
.chip.multi { border-color: var(--warning); color: var(--warning); font-weight: 600; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-2); padding: 7px 9px; border-bottom: 1px solid var(--border); font-weight: 600;
}
td { padding: 8px 9px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.when { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.msg { max-width: 560px; color: var(--ink-2); }

.linkish { color: var(--accent); cursor: pointer; font-weight: 600; }
.linkish:hover { text-decoration: underline; }

.fix {
  margin-top: 7px; padding: 8px 10px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink);
}
.fix .action { margin-top: 4px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; }

.reboots { display: grid; gap: 5px; margin-bottom: 11px; }
.reboots .reboot {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 7px 10px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.reboots .reboot.unexpected { border-color: var(--critical); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.device-form { display: grid; gap: 11px; }
.device-form label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.form-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

pre.key {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 11px; overflow-x: auto;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px;
  user-select: all;
}
code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: 12.5px;
}

/* ── Drawer and modal ────────────────────────────────────────────────────── */
.drawer { position: fixed; inset: 0; background: rgba(8, 12, 18, .45); display: flex; z-index: 50; }
.drawer-panel {
  margin-left: auto; width: min(760px, 100%); height: 100%; overflow-y: auto;
  background: var(--surface); border-left: 1px solid var(--border); padding: 18px;
}
.modal-panel {
  margin: auto; width: min(460px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px; box-shadow: var(--shadow);
}
.drawer header, .modal-panel header {
  display: flex; align-items: flex-start; gap: 12px;
  padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border);
}
.drawer header > div:first-child, .modal-panel header > div:first-child { flex: 1; }

/* ── Narrow screens ──────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%; flex: none; height: auto; position: static;
    flex-direction: row; align-items: center; gap: 10px;
    overflow-x: auto; padding: 10px 12px;
  }
  .brand { padding: 0 8px 0 0; white-space: nowrap; }
  nav { grid-auto-flow: column; gap: 4px; }
  .nav-item { white-space: nowrap; }
  .sidebar-foot { margin: 0 0 0 auto; border: none; padding: 0; grid-auto-flow: column; align-items: center; }
  main, .topbar { padding-left: 14px; padding-right: 14px; }
  .msg { max-width: none; }
}

/* ── Charts ──────────────────────────────────────────────────────────────────
   Hand-rolled SVG, themed from the same variables as everything else so the
   charts follow the light/dark switch without a second palette to keep in sync.
   See the comment above CHART_COLOURS in app.js for why there is no library. */

.chart-panel { margin: 14px 0; }
.chart-panel h3 {
  margin: 0 0 4px; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2);
}
.chart-panel p.small { margin: 0 0 12px; }

/* Two side by side on a wide screen, stacked on a narrow one. A chart squeezed
   below about 380px stops being readable, so it takes the full width instead. */
.chart-pair {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 14px; align-items: start;
}
.chart-pair .chart-panel { margin: 0; }

.chart svg {
  width: 100%; height: 220px; display: block; overflow: visible;
}
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-axis { fill: var(--ink-2); font-size: 11px; font-family: inherit; }
.chart-hit { cursor: crosshair; }
.chart-hit:hover { fill: var(--ink); fill-opacity: .05; }

.chart-legend {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px;
  font-size: 12px; color: var(--ink-2);
}
.chart-key { display: inline-flex; align-items: center; gap: 5px; }
.chart-key i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.chart-empty, .chart-loading {
  padding: 22px; text-align: center; color: var(--ink-2); font-size: 13px;
  border: 1px dashed var(--border); border-radius: var(--radius);
}

/* Ranking bars. Plain HTML rather than SVG - the labels are device ids and
   provider names, and the browser wraps and truncates text better than I can. */
.rank { display: flex; flex-direction: column; gap: 7px; }
.rank-row {
  display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto;
  gap: 10px; align-items: center; font-size: 13px;
}
.rank-label {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; flex-direction: column; line-height: 1.25;
}
.rank-sub { font-size: 11px; color: var(--ink-2); }
.rank-track { background: var(--surface-2); border-radius: 3px; height: 16px; overflow: hidden; }
.rank-bar { height: 100%; border-radius: 3px; min-width: 2px; transition: width .2s ease; }
.rank-n { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 12px; }

@media (max-width: 560px) {
  .rank-row { grid-template-columns: minmax(80px, 46%) 1fr auto; font-size: 12px; }
  .chart svg { height: 180px; }
}

/* ── Storage stop banner ─────────────────────────────────────────────────────
   Loud on purpose. The condition it reports is otherwise invisible: every page
   still works and every chart still draws, they simply stop gaining new data. */
.banner-stop {
  background: var(--critical); color: #fff;
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px;
  box-shadow: var(--shadow); line-height: 1.45;
}
.banner-stop strong { font-size: 15px; letter-spacing: .01em; }
.banner-stop .banner-detail { margin-top: 6px; font-size: 13px; }
.banner-stop .banner-detail.muted { color: rgba(255, 255, 255, .8); }
.brand .dot.dot-stopped { background: var(--critical) !important; }

/* Warning tier: filling up, but still collecting. Deliberately a different
   colour from the stop banner - the same red at thirty days and at zero teaches
   people to ignore both. */
.banner-warn {
  background: var(--warning); color: #fff;
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px;
  box-shadow: var(--shadow); line-height: 1.45;
}
.banner-warn strong { font-size: 15px; }
.banner-warn .banner-detail { margin-top: 6px; font-size: 13px; }
.banner-warn .banner-detail.muted { color: rgba(255, 255, 255, .82); }
.brand .dot.dot-warning { background: var(--warning) !important; }

/* ── Triage ──────────────────────────────────────────────────────────────── */
table.triage td { vertical-align: top; }
table.triage td .muted.small { margin-top: 2px; max-width: 46ch; }

.btn-tiny {
  font: inherit; font-size: 12px; padding: 3px 8px; margin: 0 3px 3px 0;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--ink);
  border-radius: 6px; cursor: pointer;
}
.btn-tiny:hover { border-color: var(--accent); color: var(--accent); }
.btn-tiny:disabled { opacity: .5; cursor: default; }

.pill {
  display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2);
}
.pill.ok  { background: var(--ok); border-color: var(--ok); color: #fff; }
.pill.bad { background: var(--error); border-color: var(--error); color: #fff; }

/* A verdict is a decision worth a moment's attention, so it gets a dialog
   rather than an inline control that can be clicked by accident. */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10, 14, 20, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(16, 24, 40, .28);
  padding: 20px; width: min(560px, 100%); max-height: 86vh; overflow: auto;
}
.modal h3 { margin: 0 0 2px; font-size: 16px; }
.modal label { display: block; margin: 14px 0 5px; font-size: 13px; font-weight: 600; }
.modal textarea {
  width: 100%; font: inherit; font-size: 13px; padding: 8px 10px; resize: vertical;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--surface-2); color: var(--ink);
}
.modal textarea.needed { border-color: var(--error); }

.scope-box { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.scope-opt { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 7px; font-weight: 400; font-size: 13px; }
.scope-opt input { margin-top: 3px; }
.scope-others {
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  margin: 2px 0 0 24px; font-size: 13px;
}
.scope-others label { display: inline-flex; gap: 5px; align-items: center; margin: 0; font-weight: 400; }

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.btn {
  font: inherit; font-size: 13px; padding: 7px 14px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--ink);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:disabled { opacity: .55; cursor: default; }

/* Line charts. A disk emptying is one continuous quantity, not thirty separate
   events, so it gets a line and a projection rather than bars. */
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart-area { fill: var(--accent); fill-opacity: .10; stroke: none; }
.chart-projection { fill: none; stroke: var(--critical); stroke-width: 2; stroke-dasharray: 6 4; }
.chart-floor { stroke: var(--critical); stroke-width: 1.5; stroke-dasharray: 3 3; }

/* ── Background loading ───────────────────────────────────────────────────── */

/*
 * The "building" state.
 *
 * A spinner on its own says "wait" and nothing else, which is how a fifty-three
 * second build became indistinguishable from a hung page. This one always sits
 * next to a sentence saying how long it took last time and that nothing else is
 * blocked, because those are the two things that decide whether you wait.
 */
.empty.building {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 36px 16px;
}

.spin {
  width: 22px;
  height: 22px;
  margin-bottom: 8px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 820ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Respect a stated preference for less motion: the sentence carries the
   meaning, so the animation is decoration we can simply drop. */
@media (prefers-reduced-motion: reduce) {
  .spin { animation: none; border-top-color: var(--border); opacity: .5; }
}

/* A panel being quietly refreshed behind what you are reading. Deliberately
   understated - the data under it is real and still worth reading. */
.refreshing { position: relative; }
.refreshing::after {
  content: 'refreshing…';
  position: absolute;
  top: 6px; right: 10px;
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: .02em;
}

/* A row that is the point of the table it is in — an account that was being
   guessed and then had a credential accepted. Tinted rather than merely
   badged, because on a long table a badge is something you have to be already
   looking at the right line to notice. */
tr.row-critical > td {
  background: color-mix(in srgb, var(--critical) 12%, transparent);
}
tr.row-critical > td:first-child {
  box-shadow: inset 3px 0 0 var(--critical);
}
