/* ═══════════════════════════════════════════════════════════════════════════
   WAVELOOP ADMIN — Lucian Labs look G
   The borderless operator console. Console's job, grown up: surfaces part by
   TONE and space rather than lines, controls fill instead of outline, and a
   state is a change of fill. Finlandica carries everything a person reads.

   Shipped on waveloop.app/admin. Source of truth for these values:
   waveloop/web/public/admin/index.html (inline <style>) + admin/console.css.

   Spec:  https://lucianlabs.ca/branding/waveloop-admin.md
   Rules: https://lucianlabs.ca/branding/AGENT.md

   Class names are generalised from the console's. The originals are kept as
   aliases at the bottom, so a page written against the console still works.
   ═══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Micro 5';
  src: url('https://ds.lucianlabs.ca/fonts/Micro5-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Finlandica';
  src: url('https://ds.lucianlabs.ca/fonts/Finlandica.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Inconsolata';
  src: url('https://ds.lucianlabs.ca/fonts/Inconsolata-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inconsolata';
  src: url('https://ds.lucianlabs.ca/fonts/Inconsolata-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  /* ink */
  --ink: rgb(236 239 245);
  --muted: rgb(170 177 192);
  --faint: rgb(170 177 192 / 60%);

  /* surfaces — each one a step of tone, never a line */
  --navy: rgb(20 25 32);
  --bg: var(--navy);
  --s1: rgb(24 30 40 / 88%);        /* a pane: one step up from the page */
  --s2: rgb(31 38 50 / 92%);        /* a tile inside it */
  --s3: rgb(39 47 61);              /* hover, raised */
  --well: rgb(8 11 16 / 70%);       /* fields sit IN the surface */
  --sunk: rgb(0 0 0 / 22%);         /* detail and quote blocks */
  --panel: var(--s2);
  --line: rgb(255 255 255 / 10%);   /* tracks and chart furniture only */

  /* signals */
  --accent: rgb(57 127 217);
  --accent-hi: rgb(126 183 255);
  --gold: #ffa40a;                  /* numbers, the primary action */
  --hot: rgb(236 84 96);
  --good: rgb(74 190 130);

  /* fills — the look's whole vocabulary of state */
  --fill-1: rgb(255 255 255 / 2.5%);  /* a row */
  --fill-2: rgb(255 255 255 / 4%);    /* a header band */
  --fill-3: rgb(255 255 255 / 5%);    /* a row, hovered */
  --fill-btn: rgb(255 255 255 / 7%);
  --fill-btn-hi: rgb(255 255 255 / 13%);
  --fill-on: rgb(57 127 217 / 26%);
  --fill-tab-on: rgb(57 127 217 / 22%);
  --tint-accent: rgb(57 127 217 / 17%);
  --tint-gold: rgb(255 164 10 / 15%);
  --tint-hot: rgb(236 84 96 / 16%);
  --tint-good: rgb(74 190 130 / 15%);

  /* type */
  --title: 'Micro 5', monospace;                       /* wordmark + product names */
  --head: 'Finlandica', system-ui, sans-serif;
  --body: 'Finlandica', system-ui, sans-serif;
  --mono: 'Inconsolata', ui-monospace, Menlo, monospace; /* only what you'd copy */

  --radius: 0;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0 !important;
}

html { -webkit-text-size-adjust: 100%; }

body {
  background:
    radial-gradient(circle at 10% 0%, rgb(63 95 145 / 30%), transparent 42%),
    radial-gradient(circle at 90% 0%, rgb(131 77 22 / 20%), transparent 36%),
    linear-gradient(165deg, rgb(9 12 17), var(--navy) 55%, rgb(12 15 21));
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: calc(28px + env(safe-area-inset-top)) 18px 90px;
  overflow-x: hidden;
}

.wrap { width: 100%; max-width: 1040px; }
.wrap.wide { max-width: 1240px; }

/* The one ring in the look: keyboard focus. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── type ─────────────────────────────────────────────────────────────────
   A label is small, bold, tracked capitals — every key, column head, caption,
   tab and chip. Nothing in this look is under 11px. */

.label,
.stat .l,
.ticker .t .k,
.field > label,
th,
.legend {
  font-family: var(--body);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-family: var(--head);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Section headings are sentence case, with a small tracked number beside. */
h2 {
  font-family: var(--head);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 44px 0 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
}
h2 .n {
  color: var(--accent-hi);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}
h3 {
  font-family: var(--head);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
  color: var(--ink);
}

p { font-size: 14.5px; line-height: 1.65; color: var(--muted); }
p b, .sub b { color: var(--ink); font-weight: 650; }
.sub {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
  margin: -6px 0 14px;
  max-width: 74ch;
}
code, .mono { font-family: var(--mono); font-size: 13.5px; color: var(--gold); }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.hidden { display: none !important; }

a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--gold); }

/* ── header ───────────────────────────────────────────────────────────── */

.hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.wordmark { font-family: var(--title); font-size: clamp(22px, 6vw, 30px); line-height: 1; }
.wordmark a { color: inherit; text-decoration: none; }
.wordmark a:hover { color: var(--accent-hi); }
.pgtag {
  font-family: var(--body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--gold);
}
.hdr .right { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hdr .hstat { font-size: 12.5px; color: var(--muted); padding: 0 6px; }
.hdr nav a,
.navlink {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--body);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  padding: 8px 11px;
  background: rgb(255 255 255 / 5%);
  transition: background 0.15s, color 0.15s;
}
.hdr nav a:hover,
.navlink:hover { color: var(--ink); background: var(--fill-btn-hi); }
.hdr nav a.on,
.navlink.on { color: var(--accent-hi); background: var(--fill-tab-on); }
.hdr nav { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── surfaces ─────────────────────────────────────────────────────────── */

.pane { background: var(--s1); padding: 22px; }
.card { background: var(--s1); padding: 20px; }
.tile { background: var(--s2); padding: 16px 18px; }
.sunk { background: var(--sunk); padding: 14px 16px; }

.grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cols { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── numbers: stats and the ticker ────────────────────────────────────── */

.stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { flex: 1 1 160px; background: var(--s2); padding: 16px 18px; }
.stat .n {
  font-family: var(--head);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--gold);
  display: block;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stat .n.blue { color: var(--accent-hi); }
.stat .n.red { color: var(--hot); }
.stat .n.green { color: var(--good); }
.stat .n.dim { color: var(--muted); }
.stat .l { display: block; margin-top: 8px; }
.stat .h { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.45; }

/* The ticker is the page's headline row: bigger numbers, one step up. */
.ticker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ticker .t { flex: 1 1 200px; padding: 18px 20px; background: var(--s1); }
.ticker .t .v {
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--gold);
  display: block;
  font-variant-numeric: tabular-nums;
}
.ticker .t .v.green { color: var(--good); }
.ticker .t .v.blue { color: var(--accent-hi); }
.ticker .t .v.dim { color: var(--muted); }
.ticker .t .k { display: block; margin-top: 10px; }
.ticker .t .h { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

/* ── tables: zebra, no rules ──────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--body);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
th { text-align: left; font-size: 11px; padding: 9px 12px; background: var(--fill-2); white-space: nowrap; }
th.r, td.r { text-align: right; }
td { padding: 10px 12px; color: var(--ink); }
tr:nth-child(even) > td { background: var(--fill-1); }
tbody tr:hover > td { background: var(--fill-3); }
td.mut { color: var(--muted); }
.tbl-scroll { overflow-x: auto; }

/* ── rows: a list that parts by tone ──────────────────────────────────── */

.rows > .row + .row { margin-top: 4px; }
.row {
  padding: 11px 14px;
  background: var(--fill-1);
  transition: background 0.15s;
}
.row:hover { background: rgb(255 255 255 / 4.5%); }
.row .l1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row .l2 { margin-top: 6px; }
.row .end { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; }
.row.off .key { color: var(--muted); text-decoration: line-through; }
.key { font-family: var(--mono); font-size: 14px; color: var(--ink); }

/* ── chips: a fill of the state's colour, text in that colour ─────────── */

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--fill-btn);
  padding: 4px 8px 3px;
  vertical-align: middle;
  white-space: nowrap;
  border: 0;
}
.chip.good { color: var(--good); background: var(--tint-good); }
.chip.warn { color: var(--gold); background: var(--tint-gold); }
.chip.bad { color: var(--hot); background: var(--tint-hot); }
.chip.info { color: var(--accent-hi); background: rgb(57 127 217 / 18%); }
.chip.ink { color: var(--ink); }

/* a chip that is also a control */
button.chip, .chip[role='button'] { cursor: pointer; transition: background 0.15s, color 0.15s; }
button.chip:hover { color: var(--ink); background: rgb(57 127 217 / 30%); }
button.chip.on { color: var(--gold); background: rgb(255 164 10 / 18%); }

/* a bigger, quieter chip for filters and pickers */
.gchip {
  font-family: var(--body);
  font-weight: 650;
  font-size: 13px;
  padding: 7px 12px;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  background: rgb(255 255 255 / 6%);
  transition: color 0.12s, background 0.12s;
}
.gchip:hover { color: var(--ink); background: var(--fill-btn-hi); }
.gchip .n { color: var(--gold); margin-left: 7px; font-variant-numeric: tabular-nums; }
.gchip.sel { color: var(--accent-hi); background: var(--fill-tab-on); }

/* ── buttons: fills, never outlines ───────────────────────────────────── */

.btn {
  background: var(--fill-btn);
  border: 0;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--body);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  padding: 9px 14px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--fill-btn-hi); color: var(--gold); }
.btn.on { background: var(--fill-on); color: var(--accent-hi); }
.btn.big { font-size: 12px; padding: 11px 16px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:disabled:hover { background: var(--fill-btn); color: var(--ink); }

/* The primary action is the only gold fill on the page. */
.btn.primary { background: var(--gold); color: rgb(24 16 4); padding: 11px 20px; }
.btn.primary:hover { background: rgb(255 185 64); color: rgb(24 16 4); }
.btn.danger:hover { color: var(--hot); }
.btn.done { color: var(--good); background: rgb(74 190 130 / 14%); }

.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── tabs: a segmented control sunk into a well ───────────────────────── */

.tabs { display: flex; gap: 4px; margin: 0 0 10px; padding: 4px; background: var(--well); }
.tab {
  flex: 1;
  cursor: pointer;
  border: 0;
  font-family: var(--body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  background: transparent;
  padding: 12px 8px;
  text-align: center;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.tab:hover { color: var(--ink); background: var(--fill-3); }
.tab.on { color: var(--accent-hi); background: var(--fill-tab-on); }

/* ── fields: they sit IN the surface ──────────────────────────────────── */

.field { flex: 1 1 200px; }
.field > label { display: block; margin-bottom: 10px; }
.field > label .v {
  color: var(--gold);
  float: right;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.in {
  width: 100%;
  background: var(--well);
  color: var(--ink);
  border: 0;
  font-family: var(--body);
  font-size: 14.5px;
  padding: 11px 13px;
  transition: background 0.15s;
}
.in::placeholder { color: var(--faint); }
.in:focus { outline: none; background: rgb(4 6 10 / 88%); }
.in:focus-visible { outline: 2px solid rgb(57 127 217 / 75%); outline-offset: 0; }
textarea.in { font-family: var(--mono); font-size: 13.5px; line-height: 1.55; resize: vertical; }
/* on a phone a field is 16px or the browser zooms the page on focus */
@media (pointer: coarse) { .in { font-size: 16px; } }

/* an inline field inside a row */
.inl {
  background: var(--fill-3);
  border: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 13.5px;
  padding: 6px 9px;
  min-width: 120px;
  transition: background 0.15s, color 0.3s;
}
.inl::placeholder { color: var(--faint); }
.inl:focus { outline: none; background: var(--fill-btn-hi); }
.inl.saved { background: rgb(255 164 10 / 18%); }

/* a checkbox is a well square; on is an accent fill with a dark inner square */
.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: var(--well);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.check input:checked + .box { background: var(--accent); }
.check input:checked + .box::after { content: ''; width: 7px; height: 7px; background: rgb(9 12 17); }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }

input[type='range'] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 22px;
  cursor: pointer;
}
input[type='range']::-webkit-slider-runnable-track { height: 4px; background: rgb(255 255 255 / 12%); }
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 20px;
  background: var(--gold);
  margin-top: -8px;
}
input[type='range']::-moz-range-track { height: 4px; background: rgb(255 255 255 / 12%); }
input[type='range']::-moz-range-thumb { width: 14px; height: 20px; background: var(--gold); border: 0; }

/* ── a verdict: a tinted block whose label carries the state ──────────── */

.verdict { padding: 16px 18px; background: rgb(255 164 10 / 9%); margin: 14px 0; }
.verdict.bad { background: rgb(236 84 96 / 11%); }
.verdict.good { background: rgb(74 190 130 / 10%); }
.verdict h3 {
  font-family: var(--head);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.verdict.bad h3 { color: var(--hot); }
.verdict.good h3 { color: var(--good); }
.verdict p { font-size: 14.5px; color: var(--ink); }

/* ── numbered steps ───────────────────────────────────────────────────── */

.steps { counter-reset: s; }
.step { position: relative; padding: 14px 0 14px 54px; }
.step + .step { margin-top: 4px; }
.step::before {
  counter-increment: s;
  content: counter(s);
  position: absolute;
  left: 0;
  top: 13px;
  width: 36px;
  height: 36px;
  background: rgb(255 164 10 / 14%);
  color: var(--gold);
  font-family: var(--head);
  font-weight: 700;
  font-size: 17px;
  display: grid;
  place-items: center;
}
.step h4 {
  font-family: var(--head);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.step .why { font-size: 14px; color: var(--muted); line-height: 1.6; margin-top: 4px; }

/* ── loading: a bar that occupies the space the value will take ───────── */

@keyframes wl-pulse { 0%, 100% { opacity: 0.30; } 50% { opacity: 0.68; } }
.skel {
  display: inline-block;
  height: 1em;
  min-width: 3.2em;
  vertical-align: middle;
  background: rgb(255 255 255 / 14%);
  animation: wl-pulse 1.15s ease-in-out infinite;
}
.skel.wide { min-width: 7em; }

/* ── modal: a raised fill and a big soft shadow ───────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  background: rgb(4 6 10 / 78%);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  width: 100%;
  max-width: 440px;
  background: rgb(26 32 43);
  padding: 20px;
  box-shadow: 0 30px 80px rgb(0 0 0 / 60%);
}
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.modal-title { font-family: var(--mono); font-size: 14px; color: var(--gold); word-break: break-all; }
.modal-head .btn { margin-left: auto; }

/* ── the side rail: parts by tone and a soft shadow ───────────────────── */

.rail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgb(13 17 23 / 97%), rgb(17 22 30 / 97%));
  box-shadow: -30px 0 60px rgb(0 0 0 / 30%);
  backdrop-filter: blur(8px);
}
.rail-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 18px 16px 12px; }
.rail-head h3 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--gold);
}
.rail-head .count { font-size: 12.5px; color: var(--muted); }
.rail-head .sp { margin-left: auto; display: flex; gap: 4px; }
.rail-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 0 20px; }
.rail-foot { background: var(--sunk); padding: 10px 16px; font-size: 12px; color: var(--muted); }
.qgroup {
  font-family: var(--body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent-hi);
  padding: 18px 16px 6px;
}
.qgroup span { color: var(--muted); }
.qitem { margin: 4px 10px 0; padding: 11px 12px; background: rgb(255 255 255 / 3%); transition: background 0.15s; }
.qitem:hover, .qitem.open { background: rgb(255 255 255 / 5.5%); }
.qitem .top { display: flex; gap: 8px; align-items: baseline; cursor: pointer; }
.qitem .top:hover .t { color: var(--gold); }
.qitem .t { font-size: 14px; line-height: 1.45; color: var(--ink); }
.qitem.open .t { color: var(--gold); }
.qitem .meta { font-size: 12px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.qitem .detail {
  display: none;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 10px;
  padding: 10px 12px;
  background: rgb(0 0 0 / 24%);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}
.qitem.open .detail { display: block; }
.qitem.qdone .t { text-decoration: line-through; color: var(--muted); }

/* ── chart furniture — the only place a line is allowed ───────────────── */

.ax { stroke: rgb(255 255 255 / 14%); stroke-width: 1; }
.gr { stroke: rgb(255 255 255 / 6%); stroke-width: 1; }
.lbl { font-family: var(--body); font-size: 10.5px; fill: var(--muted); }
.lbl.big { font-size: 12px; fill: var(--ink); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: 11px; }
.legend i { display: inline-block; width: 16px; height: 4px; vertical-align: middle; margin-right: 7px; }
.spark { width: 78px; height: 18px; display: block; }
.spark polyline { fill: none; stroke: var(--gold); stroke-width: 1.5; }

/* ── the foot ─────────────────────────────────────────────────────────── */

.foot { margin-top: 48px; font-family: var(--body); font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--gold); }
.err { color: var(--hot); font-family: var(--body); font-size: 14px; margin-top: 12px; line-height: 1.6; }
.note { font-size: 13px; color: var(--muted); }

/* ── phone ────────────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  body { padding: calc(20px + env(safe-area-inset-top)) 12px 70px; }
  .pane { padding: 16px; }
  h2 { font-size: 20px; margin: 34px 0 12px; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 2px; }
  .tab { flex: 0 0 auto; font-size: 11.5px; padding: 12px 14px; }
  .row .end { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skel { animation: none; opacity: 0.5; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ── aliases ──────────────────────────────────────────────────────────────
   The console's own class names, so a page written against
   waveloop.app/admin renders unchanged under this stylesheet. */

.zap { composes: btn; }
.zap {
  background: var(--fill-btn); border: 0; cursor: pointer; color: var(--ink);
  font-family: var(--body); font-weight: 700; font-size: 11.5px; letter-spacing: 0.12em;
  padding: 9px 14px; text-decoration: none; display: inline-block;
  transition: background 0.15s, color 0.15s;
}
.zap:hover { background: var(--fill-btn-hi); color: var(--gold); }
.zap.on { background: var(--fill-on); color: var(--accent-hi); }
.trow { padding: 11px 14px; background: var(--fill-1); transition: background 0.15s; }
.trow + .trow { margin-top: 4px; }
.trow:hover { background: rgb(255 255 255 / 4.5%); }
.basis {
  font-family: var(--body); font-weight: 700; font-size: 10.5px; letter-spacing: 0.12em;
  padding: 4px 8px 3px; vertical-align: middle; color: var(--muted); background: var(--fill-btn);
}
.basis.verified { color: var(--good); background: var(--tint-good); }
.basis.modelled { color: var(--gold); background: rgb(255 164 10 / 14%); }
.basis.unavailable { color: var(--hot); background: var(--tint-hot); }

/* ── Console compatibility ────────────────────────────────────────────────
   Pages written against console.css (look A) swap one stylesheet link and
   land here. Same class names, this look's values: the hairlines become tone,
   the outlines become fills, Micro 5 headings become Finlandica. */

:root {
  --gap: 1rem;
  --line-soft: rgb(255 255 255 / 6%);
  --bg-deep: rgb(9 12 17);
  --panel-solid: rgb(26 32 43);
  --accent-2: var(--gold);
  --font-display: var(--head);
  --font-body: var(--body);
  --font-mono: var(--mono);
}

.page { width: 100%; max-width: 1100px; margin: 0 auto; }
.section { margin-top: 2.5rem; }
.section:first-of-type { margin-top: 2rem; }
.section-copy { font-size: 14.5px; line-height: 1.65; color: var(--muted); margin: 0.4rem 0 1.25rem; max-width: 74ch; }

/* a divider was a hairline; here it is space */
.divider { height: 0; border: 0; margin: 2rem 0; }

/* console's outlined cards become tone; its accent edges become tints */
.card { background: var(--s1); padding: 20px; }
.card--armed { background: rgb(57 127 217 / 12%); }
.card--live { background: rgb(255 164 10 / 10%); }
.card > h3 { margin-bottom: 0.5rem; }
.card > p { margin: 0.5rem 0 0; }

.tagline { margin: 0.4rem 0 0; font-size: 15px; color: var(--muted); }
.overline { font-family: var(--body); font-weight: 700; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.faint { color: var(--faint); }
.readout { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.badge { display: inline-block; font-family: var(--body); font-weight: 700; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-hi); }

/* console's outlined button is this look's fill */
.button {
  display: inline-block;
  padding: 9px 14px;
  border: 0;
  background: var(--fill-btn);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.button:hover { background: var(--fill-btn-hi); color: var(--gold); }
.button.primary { background: var(--gold); color: rgb(24 16 4); padding: 11px 20px; }
.button.primary:hover { background: rgb(255 185 64); color: rgb(24 16 4); }
.button.armed { background: var(--fill-on); color: var(--accent-hi); }
.button.ghost { background: transparent; color: var(--muted); }
.button.ghost:hover { background: var(--fill-btn); color: var(--ink); }
.button:disabled { opacity: 0.5; cursor: default; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* a tag is a chip */
.tag {
  display: inline-block;
  padding: 4px 8px 3px;
  border: 0;
  background: var(--fill-btn);
  color: var(--muted);
  font-family: var(--body);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tag.good { color: var(--good); background: var(--tint-good); }
.tag.bad { color: var(--hot); background: var(--tint-hot); }
.tag.warn { color: var(--gold); background: var(--tint-gold); }

/* the site nav is a row of filled links */
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--body);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  padding: 8px 11px;
  background: rgb(255 255 255 / 5%);
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { color: var(--ink); background: var(--fill-btn-hi); }
.nav a.on { color: var(--accent-hi); background: var(--fill-tab-on); }

.text-link { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 2px; }
.text-link:hover { color: var(--gold); }
.text-link--muted { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.text-link--muted:hover { color: var(--gold); }

.field-label { display: block; margin-bottom: 10px; font-family: var(--body); font-weight: 700; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.input-field {
  width: 100%;
  background: var(--well);
  color: var(--ink);
  border: 0;
  font-family: var(--body);
  font-size: 14.5px;
  padding: 11px 13px;
  transition: background 0.15s;
}
.input-field::placeholder { color: var(--faint); }
.input-field:focus { outline: none; background: rgb(4 6 10 / 88%); }

/* the footer parts by space, not a rule */
.site-footer { margin-top: 48px; font-family: var(--body); font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold); }

/* the waveloop device tokens, remapped onto this look — pages that read
   --wl-* (the devlog stream, the labs exhibits) keep working and land here */
:root {
  --wl-bg: var(--navy);
  --wl-bg-deep: rgb(9 12 17);
  --wl-surface: var(--s2);
  --wl-surface-lift: var(--s3);
  --wl-line: rgb(255 255 255 / 10%);
  --wl-line-soft: rgb(255 255 255 / 6%);
  --wl-text: var(--ink);
  --wl-muted: var(--muted);
  --wl-foam: var(--ink);
  --wl-teal: var(--accent);
  --wl-cyan: var(--accent-hi);
  --wl-gold: var(--gold);
  --wl-gold-hi: rgb(255 185 64);
  --wl-blue: var(--accent);
  --wl-blue-hi: var(--accent-hi);
  --wl-violet: rgb(140 46 191);
  --wl-violet-hi: rgb(191 122 230);
  --wl-orange: var(--gold);
  --wl-rec: var(--hot);
  --wl-accent: var(--accent);
  --wl-accent-hi: var(--accent-hi);
  --wl-font-head: var(--head);
  --wl-font-body: var(--body);
  --wl-font-mono: var(--mono);
  --wl-gap: 0.75rem;
  --wl-pad: 1rem;
  --wl-page: 1100px;
}

/* the Field Notes ink scale, remapped — pages lifted from look D land here */
:root {
  --bright: #ffffff;
  --strong: var(--ink);
  --soft: var(--muted);
  --dim: var(--faint);
  --ghost: rgb(255 255 255 / 22%);
  --chip: var(--fill-btn);
  --glow: rgb(255 164 10 / 25%);
  --glow-2: rgb(126 183 255 / 20%);
}
