/* Justice for Originals.
   The page is one desktop: a dark vaporwave field with the court machine on it, silver windows
   over the top, and a taskbar that is the navigation. Every colour below was measured off the
   reference picture in art/ref/ (tools/refmeasure.mjs prints the numbers). */

@font-face {
  font-family: "Pixelify";
  src: url("/fonts/pixelify-sans.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-display: swap;
}
@font-face { font-family: "Sofia"; src: url("/fonts/sofia-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sofia"; src: url("/fonts/sofia-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Mono"; src: url("/fonts/mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Mono"; src: url("/fonts/mono-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* measured off art/ref/vaporwave-desktop.jpg */
  --field: #00001c;
  --field-2: #25001f;
  --face: #d2d2d2;
  --face-2: #c0babe;
  --face-3: #e4e2e6;
  --bevel-light: #ffffff;
  --bevel-mid: #8d8a93;
  --bevel-dark: #35303c;
  --bar: #0155ec;
  --bar-2: #0a2ea8;
  --bar-ink: #ffffff;
  --ink: #0b0a12;
  --ink-2: #413c4a;
  --ink-3: #5d5768;
  --cyan: #04b5e1;
  --cyan-lit: #7df1ff;
  --pink: #fe8be4;
  --magenta: #ff2bd1;
  --purple: #c171fe;
  --close: #ff4d63;
  --green: #0d6b28;

  --desk-max: 1180px;
  --gutter: 24px;
  --bar-h: 36px;
  --task-h: 52px;

  --t-display: 28px;
  --t-head: 20px;
  --t-title: 16px;
  --t-body: 15px;
  --t-label: 14px;
  --t-value: 16px;
  --track: 0.08em;
}

* { box-sizing: border-box; }

html { background: var(--field); }

body {
  margin: 0;
  padding: 0 0 var(--task-h);
  background: transparent;
  color: #e8e6f5;
  font: 400 var(--t-body)/1.6 "Sofia", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---- the desktop ------------------------------------------------------------------------ */

.desk {
  position: relative;
  min-height: calc(100vh - var(--task-h));
}
/* The wallpaper is a wallpaper: it fills the glass and stays there while the windows move over it.
   A layer of its own, so the picture is never stretched by how tall the page happens to be. */
.desk::before,
.desk::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
}
.desk::before {
  background: var(--field) url("/img/desk-wallpaper.png") 50% 0 / cover no-repeat;
}
.desk::after {
  background: linear-gradient(180deg, rgba(0,0,28,.40) 0%, rgba(0,0,28,.26) 20%, rgba(0,0,28,.60) 52%, rgba(0,0,28,.90) 100%);
}
.desk-inner {
  position: relative;
  z-index: 1;
  width: min(var(--desk-max), 100% - (var(--gutter) * 2));
  margin: 0 auto;
  padding: clamp(26px, 3.4vw, 60px) 0 40px;
}

/* ---- masthead --------------------------------------------------------------------------- */

/* one group under the logo, every part of it on one baseline (his review, 2026-10-27) */
.masthead {
  margin: 0 0 16px;
}
.wordmark {
  display: block;
  margin: 0 0 6px;
  line-height: 0;
}
.wordmark img {
  display: block;
  width: clamp(176px, 19vw, 258px);
  height: auto;
  image-rendering: pixelated;
}
.wordmark-tail {
  color: var(--cyan-lit);
  text-transform: none;
  font: 400 18px/1 "Pixelify", monospace;
  letter-spacing: 0.02em;
  text-shadow: 0 0 14px rgba(4, 181, 225, .55);
}
.masthead-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin: 0;
  font: 400 var(--t-label)/1.4 "Mono", ui-monospace, monospace;
  color: #bfc6ff;
  letter-spacing: var(--track);
  text-transform: uppercase;
}
.masthead-line .sep { color: var(--purple); }
.chip {
  display: inline-block;
  padding: 8px 16px;
  background: var(--magenta);
  color: #16001a;
  font-family: "Pixelify", monospace;
  font-size: var(--t-title);
  letter-spacing: 0.02em;
}

/* ---- window chrome ---------------------------------------------------------------------- */

.win {
  position: relative;
  background: var(--face);
  border: 2px solid;
  border-color: var(--face-3) var(--bevel-dark) var(--bevel-dark) var(--face-3);
  box-shadow:
    inset 1px 1px 0 var(--bevel-light),
    inset -1px -1px 0 var(--bevel-mid),
    -3px 0 0 rgba(4, 181, 225, .20),
    3px 0 0 rgba(255, 43, 209, .18),
    0 10px 26px rgba(0, 0, 0, .45);
  color: var(--ink);
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--bar-h);
  padding: 8px 16px;
  background: linear-gradient(90deg, var(--bar) 0%, var(--bar-2) 100%);
  color: var(--bar-ink);
  user-select: none;
}
.win-bar[data-drag] { cursor: grab; }
.win-bar[data-drag]:active { cursor: grabbing; }
.win-ico { display: block; width: 16px; height: 16px; image-rendering: pixelated; flex: none; }
.win-title {
  flex: 1 1 auto;
  min-width: 0;
  font: 400 var(--t-title)/1.2 "Pixelify", monospace;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: -1px 0 rgba(4, 181, 225, .9), 1px 0 rgba(255, 43, 209, .75);
}
.win-x {
  flex: none;
  width: 20px;
  height: 18px;
  padding: 0;
  background: var(--close);
  border: 2px solid;
  border-color: #ffd4da #8e1f2c #8e1f2c #ffd4da;
  color: #2a0007;
  font: 400 13px/14px "Pixelify", monospace;
  cursor: pointer;
}
.win-x::after { content: "x"; }
.win-x:active { border-color: #8e1f2c #ffd4da #ffd4da #8e1f2c; }
.win-body { padding: 18px 20px 20px; }

/* keys: the raised buttons of the picture */
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  background: var(--face);
  border: 2px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  box-shadow: inset 1px 1px 0 var(--face-3), inset -1px -1px 0 var(--bevel-mid);
  color: var(--ink);
  font: 400 var(--t-title)/1.2 "Pixelify", monospace;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .08s ease, filter .12s ease;
}
.key:hover { filter: brightness(1.06); }
.key:active {
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
  box-shadow: inset 1px 1px 0 var(--bevel-mid);
  transform: translate(1px, 1px);
}
.key:focus-visible { outline: 2px dotted var(--ink); outline-offset: -6px; }
.key[disabled] { color: var(--ink-3); opacity: .74; cursor: not-allowed; }
.key--default { box-shadow: inset 0 0 0 1px var(--ink), inset 2px 2px 0 var(--face-3), inset -2px -2px 0 var(--bevel-mid); }
.key--primary { min-height: 48px; background: var(--face-3); }

/* ---- the grid of the first screen -------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: 336px minmax(0, 1fr);
  grid-template-areas:
    "stack docket"
    "sys   verdict";
  gap: 22px;
  align-items: start;
}
.stack { grid-area: stack; position: relative; }
.win--docket { grid-area: docket; }
.win--sys { grid-area: sys; }
.win--verdict { grid-area: verdict; }

/* the accusation, three deep: one copy looks exactly like the one before it */
.win--alert .win-bar { background: linear-gradient(90deg, var(--bar) 0%, #3b2bd6 100%); }
.alert-body { display: flex; gap: 16px; align-items: flex-start; min-height: 118px; }
.alert-icon { width: 48px; height: 48px; image-rendering: pixelated; flex: none; }
.alert-text p { margin: 0; font-size: var(--t-body); line-height: 1.55; }
.alert-text strong { font-weight: 600; }
.win-keys {
  display: flex;
  gap: 12px;
  padding: 0 20px 20px;
}
.win-keys .key { flex: 1 1 0; }

/* ---- readouts ---------------------------------------------------------------------------- */

.readouts {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
/* Four cards of ONE system (his review, 2026-10-27: a dark one beside three light ones read as an
   inconsistency). Same chrome, same height, one line of label each; the countdown is told apart by
   being the only value that ticks, and by its size. */
.readout {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 14px 20px;
  background: var(--face-3);
  border: 2px solid;
  border-color: var(--bevel-mid) var(--bevel-light) var(--bevel-light) var(--bevel-mid);
  min-height: 74px;
  justify-content: center;
}
.readout--wide { padding: 14px 30px; }
.readout-label {
  font: 400 12px/1.4 "Mono", ui-monospace, monospace;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.readout-value {
  font: 400 20px/1.2 "Pixelify", monospace;
  color: var(--ink);
}
.readout-value--big {
  font-size: var(--t-display);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

/* ---- tables ------------------------------------------------------------------------------ */

.table-wrap {
  max-height: clamp(176px, 26vh, 360px);
  overflow: auto;
  background: var(--face-3);
  border: 2px solid;
  border-color: var(--bevel-mid) var(--bevel-light) var(--bevel-light) var(--bevel-mid);
}
.table { width: 100%; border-collapse: collapse; font-size: var(--t-body); }
.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--face-2);
  text-align: left;
  font: 400 12px/1.2 "Mono", ui-monospace, monospace;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 11px 16px;
  border-bottom: 2px solid var(--bevel-mid);
  white-space: nowrap;
}
.table th:first-child, .table td:first-child { padding-left: 18px; }
.table th:last-child, .table td:last-child { padding-right: 18px; }
.table th.num, .table td.num { text-align: right; white-space: nowrap; }
.table td {
  padding: 11px 16px;
  border-bottom: 1px solid #c3c1c7;
  vertical-align: middle;
}
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: #cfe0ff; }
.table tbody tr:focus-visible { outline: 2px dotted var(--ink); outline-offset: -2px; }
.table td.empty, .table td.wait { padding: 22px 18px; color: var(--ink-2); cursor: default; text-align: center; }
/* six column heads over one sentence read as a broken table: with nothing to list, there are no
   columns to name (his review, 2026-10-27) */
.table--empty thead { display: none; }
.coin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.coin img {
  width: 24px;
  height: 24px;
  flex: none;
  background: var(--face-2);
  object-fit: cover;
  image-rendering: pixelated;
}
.coin b { font-weight: 600; }
.mono { font-family: "Mono", ui-monospace, monospace; font-size: var(--t-label); }
.tag {
  display: inline-block;
  padding: 7px 16px;
  font: 400 12px/1.4 "Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--face-2);
  color: var(--ink-2);
  border: 1px solid var(--bevel-mid);
}
.tag--copy { background: var(--magenta); color: #190019; border-color: #7d0063; }
.tag--doubtful { background: #ffe08a; color: #3a2a00; border-color: #8a6a00; }
.tag--bought { background: #9cf0b2; color: #052c12; border-color: #1d6b35; }

.foot-note {
  margin: 14px 0 0;
  font-size: var(--t-label);
  color: var(--ink-2);
}

/* ---- properties window -------------------------------------------------------------------- */

.props { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0 0 16px; }
.props dt { font: 400 12px/1.6 "Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: var(--track); color: var(--ink-2); }
.props dd { margin: 0; font-size: var(--t-body); font-weight: 600; }
.field-label, .split-label {
  margin: 0 0 8px;
  font: 400 12px/1.4 "Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: var(--track);
  color: var(--ink-2);
}
.split-label { margin-top: 18px; }
.field-row { display: flex; gap: 10px; align-items: stretch; }
.field {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 16px;
  background: var(--face-3);
  border: 2px solid;
  border-color: var(--bevel-mid) var(--bevel-light) var(--bevel-light) var(--bevel-mid);
  font: 400 var(--t-value)/1.5 "Mono", ui-monospace, monospace;
  color: var(--ink);
  overflow-wrap: anywhere;
  user-select: all;
}
.field--empty { color: var(--ink-3); }
.links {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.links .key { justify-content: flex-start; min-height: 52px; }
.links .key img { width: 20px; height: 20px; flex: none; }
.splits { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.splits li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: var(--t-body);
}
.splits b { font: 400 var(--t-title)/1.2 "Pixelify", monospace; }

/* ---- verdict log --------------------------------------------------------------------------- */

.verdict-head { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: baseline; margin: 0 0 14px; }
.verdict-head h3 { margin: 0; font: 400 var(--t-head)/1.2 "Pixelify", monospace; }
.buys { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; align-content: start; overflow: auto; }
.buys li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 9px 16px;
  background: var(--face-3);
  font-size: var(--t-body);
}
.buys a { color: #0a3bbd; }
.empty { margin: 0; color: var(--ink-2); font-size: var(--t-body); }
.wait-line { display: flex; align-items: center; gap: 10px; }

/* ---- links and text ------------------------------------------------------------------------ */

a { color: #0a3bbd; }
a:hover { color: #06288a; }
.desk-inner a.ghost { color: var(--cyan-lit); }

/* ---- taskbar ---------------------------------------------------------------------------- */

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--task-h);
  padding: 4px 8px;
  background: var(--face-2);
  border-top: 2px solid var(--bevel-light);
  box-shadow: 0 -8px 22px rgba(0, 0, 0, .5);
}
.taskbar .key { min-height: 40px; padding: 8px 16px; font-size: var(--t-title); }
.key--start { font-weight: 700; }
.task-buttons { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.task-buttons .key {
  justify-content: flex-start;
  flex: 0 1 215px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.task-buttons .key span { overflow: hidden; text-overflow: ellipsis; }
.task-buttons .key[aria-pressed="true"] {
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
  box-shadow: inset 1px 1px 0 var(--bevel-mid);
  background: var(--face-3);
}
.tray {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  background: var(--face-2);
  border: 2px solid;
  border-color: var(--bevel-mid) var(--bevel-light) var(--bevel-light) var(--bevel-mid);
}
.tray-label { font: 400 12px/1.2 "Mono", ui-monospace, monospace; letter-spacing: var(--track); color: var(--ink-2); }
.tray-clock { font: 400 var(--t-value)/1.2 "Mono", ui-monospace, monospace; color: var(--ink); font-variant-numeric: tabular-nums; }

.start-menu {
  position: fixed;
  left: 8px;
  bottom: calc(var(--task-h) + 6px);
  z-index: 70;
  width: 272px;
  background: var(--face);
  border: 2px solid;
  border-color: var(--face-3) var(--bevel-dark) var(--bevel-dark) var(--face-3);
  box-shadow: inset 1px 1px 0 var(--bevel-light), 0 12px 30px rgba(0, 0, 0, .55);
  padding: 8px;
}
.start-head {
  margin: 0 0 8px;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--bar) 0%, var(--bar-2) 100%);
  color: var(--bar-ink);
  font: 400 var(--t-title)/1.2 "Pixelify", monospace;
  text-shadow: -1px 0 rgba(4, 181, 225, .9), 1px 0 rgba(255, 43, 209, .75);
}
.start-menu ul { list-style: none; margin: 0; padding: 0; }
.start-menu li + li { margin-top: 2px; }
.start-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 8px 16px;
  background: none;
  border: 0;
  color: var(--ink);
  font: 400 var(--t-title)/1.2 "Pixelify", monospace;
  text-align: left;
  cursor: pointer;
}
.start-menu button img { width: 16px; height: 16px; image-rendering: pixelated; }
.start-menu button:hover, .start-menu button:focus-visible { background: var(--bar); color: var(--bar-ink); outline: none; }

/* ---- floating windows --------------------------------------------------------------------- */

/* the floats layer is anchored to the document origin: without top/left its children would be
   placed from wherever the empty div happens to sit, which is under the whole desk */
.floats { position: absolute; top: 0; left: 0; width: 100%; height: 0; }
.win--float {
  position: absolute;
  z-index: 40;
  width: min(760px, calc(100vw - 32px));
}
.win--float .win-body { max-height: min(62vh, 560px); overflow: auto; }

/* ---- case window ---------------------------------------------------------------------------- */

.case-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.case-side { background: var(--face-3); border: 2px solid; border-color: var(--bevel-mid) var(--bevel-light) var(--bevel-light) var(--bevel-mid); padding: 16px 18px; }
.case-side h4 { margin: 0 0 12px; font: 400 var(--t-title)/1.2 "Pixelify", monospace; letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-2); }
.case-art { position: relative; width: 100%; aspect-ratio: 1 / 1; background: var(--face-2); margin-bottom: 12px; }
.case-art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.case-art .stamp {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 39%;
  aspect-ratio: 2004 / 424;
  display: grid;
  place-items: center;
  background: url("/img/stamp-convicted.png") 50% 50% / 100% 100% no-repeat;
}
.case-art .stamp span {
  font: 400 clamp(15px, 2.4vw, 24px)/1 "Pixelify", monospace;
  color: #ff2bd1;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}
.case-rows { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: var(--t-body); }
.case-rows dt { font: 400 12px/1.6 "Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: var(--track); color: var(--ink-2); }
.case-rows dd { margin: 0; overflow-wrap: anywhere; }
.evidence { margin-top: 18px; }
.evidence h4 { margin: 0 0 10px; font: 400 var(--t-head)/1.2 "Pixelify", monospace; }
.fold-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: var(--face-3);
  border: 2px solid;
  border-color: var(--bevel-mid) var(--bevel-light) var(--bevel-light) var(--bevel-mid);
  margin-bottom: 10px;
  font-family: "Mono", ui-monospace, monospace;
  font-size: var(--t-value);
}
.fold-row .arrow { color: var(--ink-2); }
.fold-row em { font-style: normal; color: var(--green); font-weight: 700; }

/* ---- forms ------------------------------------------------------------------------------------ */

.form-row { display: grid; gap: 8px; margin-bottom: 14px; }
.form-row label { font: 400 12px/1.4 "Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: var(--track); color: var(--ink-2); }
.form-row input {
  width: 100%;
  padding: 12px 16px;
  background: var(--face-3);
  border: 2px solid;
  border-color: var(--bevel-mid) var(--bevel-light) var(--bevel-light) var(--bevel-mid);
  font: 400 var(--t-value)/1.4 "Mono", ui-monospace, monospace;
  color: var(--ink);
}
.form-row input::placeholder { color: var(--ink-3); }
.form-keys { display: flex; gap: 12px; flex-wrap: wrap; }
.result {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--face-3);
  border: 2px solid;
  border-color: var(--bevel-mid) var(--bevel-light) var(--bevel-light) var(--bevel-mid);
  font-size: var(--t-body);
}
.result--bad { background: #ffd9de; border-color: #a33 #ffecef #ffecef #a33; }
.result--good { background: #d7f5de; border-color: #2a7 #eafbee #eafbee #2a7; }

/* ---- steps -------------------------------------------------------------------------------------- */

.steps { list-style: none; counter-reset: s; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 18px;
  background: var(--face-3);
  border: 2px solid;
  border-color: var(--bevel-light) var(--bevel-mid) var(--bevel-mid) var(--bevel-light);
  font-size: var(--t-body);
}
.steps li::before {
  content: counter(s);
  font: 400 24px/1 "Pixelify", monospace;
  color: var(--bar);
}
.rule-list { margin: 0; padding-left: 22px; font-size: var(--t-body); }
.block-head { margin: 22px 0 10px; font: 400 var(--t-head)/1.2 "Pixelify", monospace; }
.rule-list li { margin-bottom: 6px; }

/* ---- phone ------------------------------------------------------------------------------------- */

/* four cards in one row need about 700 px of window body; under that they go two by two, which is
   still four equal cards and never a half empty row */
@media (max-width: 1200px) {
  .readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  :root { --gutter: 16px; --t-display: 34px; }
  .desk-inner { padding-top: 24px; }
  .desk::before { background-size: 190% auto; background-position: 50% 0; }
  .desk::after { background: linear-gradient(180deg, rgba(0,0,28,.74) 0%, rgba(0,0,28,.86) 38%, rgba(0,0,28,.95) 100%); }
  .grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "docket" "stack" "verdict" "sys";
    gap: 18px;
  }
  .masthead { flex-direction: column; align-items: flex-start; gap: 10px; min-height: 0; }
  .masthead-line { margin-bottom: 0; flex-wrap: wrap; }
  .readouts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .readout--wide { grid-column: 1 / -1; }
  .case-pair { grid-template-columns: minmax(0, 1fr); }
  .links { grid-template-columns: minmax(0, 1fr); }
  .task-buttons { display: none; }
  .win--float { width: calc(100vw - 32px); }
  .table-wrap { max-height: 420px; }
  .stack { padding-top: 80px; }
}

@media (max-width: 620px) {
  :root { --t-display: 26px; }
  .wordmark { flex-direction: column; align-items: flex-start; gap: 2px; }
  .wordmark img { width: clamp(150px, 44vw, 196px); }
  /* the day is already in the docket's own title bar: on a phone it does not need a second line */
  .masthead-line #chipDay, .masthead-line .sep { display: none; }
  .wordmark-tail { padding-bottom: 0; font-size: 17px; }
  .masthead-line .sep { display: none; }
  .masthead-line { font-size: 14px; gap: 6px 12px; }
  .wordmark { margin-bottom: 4px; }

  /* the readouts become a status list: one row each, label left, number right */
  .readouts { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .readout {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    min-height: 0;
    padding: 10px 22px;
  }
  .readout--wide { flex-direction: column; align-items: flex-start; padding: 14px 26px; }
  .readout-value--big { font-size: 26px; }
  .chip { padding: 8px 16px; font-size: 14px; }
  .readout-label { white-space: nowrap; }
  .readout--wide .readout-label { white-space: normal; }
  .table-wrap { max-height: 27vh; overflow: auto; }
  .win-body { padding: 16px; }
  .win-keys { padding: 0 16px 16px; flex-direction: column; }

  /* the table stops being a table: one card a case, which is what a phone can hold */
  .table-wrap { background: none; border: 0; }
  .table thead { display: none; }
  .table, .table tbody { display: block; }
  .table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 14px;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: var(--face-3);
    border: 2px solid;
    border-color: var(--bevel-light) var(--bevel-mid) var(--bevel-mid) var(--bevel-light);
  }
  .table tbody td {
    display: block;
    padding: 0;
    border: 0;
    text-align: left;
  }
  .table tbody td:first-child, .table tbody td:last-child { padding: 0; }
  .table td[data-k="evidence"], .table td[data-k="age"] { display: none; }
  .table td[data-k="wearing"]::before,
  .table td[data-k="volume"]::before {
    content: attr(data-k) " ";
    font: 400 12px/1.4 "Mono", ui-monospace, monospace;
    letter-spacing: var(--track);
    text-transform: uppercase;
    color: var(--ink-2);
  }
  .table td[data-k="verdict"] { grid-row: 1; grid-column: 2; text-align: right; }
  .buys li { grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; }
  .buys li > span:last-child { text-align: right; }
  .buys li .coin { grid-column: 1 / -1; }
  .table td[data-k="volume"] { grid-row: 2; grid-column: 2; text-align: right; }
  .table td[data-k="volume"]::before { display: block; }
  .table td.empty, .table td.wait { grid-column: 1 / -1; }
}

/* a very wide monitor is still a desktop: the column grows a little so the page is not a stamp in
   the middle of 3000 px of wallpaper, but it never grows on the widths he measures (1366 to 1920) */
@media (min-width: 2100px) {
  :root { --desk-max: 1460px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---- the two windows that close the desk keep one height ------------------------------------- */

/* the two windows that close the desk keep one height, and the verdict's list GROWS to fill its
   own, so an equal height is never an empty half */
.win--sys, .win--verdict { align-self: stretch; display: flex; flex-direction: column; }
.win--sys .win-body, .win--verdict .win-body { flex: 1 1 auto; }
.win--verdict .win-body { display: flex; flex-direction: column; min-height: 0; }
/* with no verdict to list there is nothing to fill a stretched window with, and a half empty box is
   worse than two windows of different heights on a desktop */
.win--verdict:has(.empty) { align-self: start; }
.win--verdict .buys { flex: 1 1 auto; min-height: 120px; }

/* ---- the accusation changing: the glitch of the reference, once, on the card ------------------ */

@keyframes og-glitch {
  0%   { transform: translate3d(0, 0, 0); filter: none; }
  18%  { transform: translate3d(-3px, 0, 0); filter: hue-rotate(18deg) saturate(1.3); }
  34%  { transform: translate3d(3px, 0, 0); }
  52%  { transform: translate3d(-1px, 0, 0); }
  100% { transform: translate3d(0, 0, 0); filter: none; }
}
.stack-card.glitch { animation: og-glitch .28s steps(4) 1; }

/* the counter that replaced the two ghost windows */
.alert-count {
  margin: 0;
  padding: 0 20px 12px;
  font: 400 12px/1.4 "Mono", ui-monospace, monospace;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--ink-2);
}
.key[disabled] { cursor: not-allowed; }
