/* PreQ · Workplace Wayfinding
   Graphite sign blades, frosted glass, brushed brass for the one live thing.
   One motion law: 420ms, slight overshoot. */

@font-face { font-family: "PreQ Sign"; src: local("Bahnschrift"); font-weight: 300 700; font-stretch: 75% 100%; }

:root {
  --graphite: #1e2328;
  --graphite-2: #262c32;
  --graphite-3: #323940;
  --graphite-line: #3c444c;
  --rail-text: #e7e9e6;
  --rail-dim: #a9b0b6;

  --ground: #f3f4f1;
  --ground-2: #e9ebe7;
  --pane: #fbfbfa;
  --line: #d9ddd7;
  --line-2: #c9cec7;
  --frame: #b9bfb8;
  --ink: #1b1f23;
  --ink-2: #454d55;
  --ink-3: #5f676e;

  --brass: #b08d57;
  --brass-deep: #7f6235;
  --brass-light: #e3d2b1;
  --brass-glow: rgba(176, 141, 87, .35);

  --auto: #2e7d5b;   --auto-bg: #e3efe8;
  --check: #c98a1b;  --check-ink: #8a5d0c; --check-bg: #f7ecd5;
  --suggest: #b5603f; --suggest-bg: #f5e3da;
  --manual: #49525a; --manual-bg: #ffffff;
  --table: #3f6f97;  --table-bg: #e2ebf3;
  --bad: #b3372b;

  --sign: "PreQ Sign", "Bahnschrift", "DIN Alternate", "Segoe UI", sans-serif;
  --text: var(--sign);   /* one face: Bahnschrift, the DIN signage face Windows ships (recorded in the surface brief) */
  --glass: url("../img/glass-grain.png") 0 0 / 256px 256px repeat, #f8f9f6;

  --law: 420ms;
  --overshoot: cubic-bezier(.34, 1.24, .64, 1);
  --out: cubic-bezier(.23, 1, .32, 1);
  --inout: cubic-bezier(.77, 0, .175, 1);

  --r: 14px;
  --shadow: 0 1px 2px rgba(30, 35, 40, .06), 0 8px 24px -12px rgba(30, 35, 40, .18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 15px/1.5 var(--text); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--brass-light); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.sprite { position: absolute; }
svg { width: 18px; height: 18px; flex: none; }
h1, h2, h3 { font-family: var(--sign); font-weight: 600; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ shell */
/* one graphite bar across the top: the sign over the door; the page below gets the full width */
.shell { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; }
.rail {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 32px;
  background: var(--graphite); color: var(--rail-text); padding: 12px clamp(24px, 3.2vw, 52px);
  font-family: var(--sign);
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand img { width: 30px; height: auto; border-radius: 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 20px; font-weight: 700; letter-spacing: .01em; }
.brand-text span { font-size: 12px; color: var(--rail-dim); font-stretch: 87%; }

.nav { display: flex; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 10px;
  color: var(--rail-dim); text-decoration: none; font-size: 15.5px; white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}
.nav a:hover { background: var(--graphite-2); color: var(--rail-text); }
.nav a[aria-current="page"] { background: var(--graphite-3); color: #fff; }
.nav a[aria-current="page"] svg { color: var(--brass-light); }

/* the route: a floor directory of sign blades */
.route { position: relative; grid-column: 1 / -1; padding-top: 4px; }
/* square-cut slats hung side by side on a mounting spine; a step-number column, a pictogram per step,
   and an arrival tick once a step is passed */
.route-list { list-style: none; margin: 0; padding: 7px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; position: relative; counter-reset: step; }
.route-list::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 2px; background: var(--graphite-line); }
.blade {
  position: relative; display: grid; grid-template-columns: 20px 20px minmax(0, 1fr); column-gap: 10px; align-items: center;
  padding: 9px 12px 9px 10px; border-radius: 2px; background: var(--graphite-2); color: var(--rail-dim);
  border-top: 1px solid var(--graphite-line); counter-increment: step; min-width: 0;
  transition: background-color var(--law) var(--out), color var(--law) var(--out), border-color var(--law) var(--out);
}
.blade::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font-size: 12.5px; font-weight: 600; font-stretch: 87%; color: #7c858c; }
.blade svg { grid-row: span 2; width: 18px; height: 18px; opacity: .6; transition: transform var(--law) var(--overshoot), opacity 200ms ease, color 200ms ease; }
.blade .tick { display: none; }
.blade-name { font-size: 15px; font-weight: 600; color: inherit; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blade-meta { font-size: 12.5px; font-stretch: 87%; color: #8c949b; transition: color 200ms ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blade.is-active { background: #fff; color: var(--ink); }
.blade.is-active::before { color: var(--brass-deep); }
.blade.is-active svg { color: var(--ink); opacity: 1; }
.blade.is-active .blade-meta { color: var(--ink-3); }
.blade.is-done { color: var(--rail-text); }
.blade.is-done .pict { display: none; }
.blade.is-done .tick { display: block; color: #8fd3b0; opacity: 1; animation: stamp var(--law) var(--overshoot) both; }
.blade.is-done .blade-meta { color: var(--rail-dim); }
.blade.lit { animation: lit var(--law) var(--out); }
@keyframes lit { 40% { background: #4a4234; } }

.rail-foot { grid-column: 3; display: flex; align-items: center; gap: 22px; }
.kb-mini { display: flex; gap: 18px; margin: 0; padding: 0 22px 0 0; border-right: 1px solid var(--graphite-line); }
.kb-mini div { display: flex; flex-direction: column-reverse; }
.kb-mini dt { font-size: 11.5px; color: var(--rail-dim); font-stretch: 87%; }
.kb-mini dd { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.1; color: #fff; }
.rail-note { font-size: 12.5px; color: var(--rail-dim); display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.rail-note-bad { color: #f1b3ab; align-items: flex-start; white-space: normal; max-width: 420px; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-ok { background: #6cc79a; box-shadow: 0 0 0 3px rgba(108, 199, 154, .18); }
.dot-bad { background: #e86a5c; margin-top: 5px; }

/* ------------------------------------------------------------------ main */
.main { padding: 34px clamp(24px, 3.2vw, 52px) 48px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 26px; }
.topbar h1 { font-size: clamp(30px, 2.6vw, 40px); line-height: 1.1; }
.sub { color: var(--ink-2); margin-top: 8px; max-width: 64ch; font-size: 16px; text-wrap: pretty; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 44px; padding: 0 18px;
  border-radius: 11px; border: 1px solid transparent; font: 500 15.5px/1 var(--sign); cursor: pointer;
  text-decoration: none; white-space: nowrap; user-select: none;
  transition: transform 160ms var(--out), background-color 160ms ease, border-color 160ms ease, box-shadow 200ms ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--graphite); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: #2c333a; }
.btn-quiet { background: var(--pane); color: var(--ink); border-color: var(--line-2); }
.btn-quiet:hover { border-color: var(--ink-3); }
.btn-brass { background: var(--brass); color: #1b160e; }
.btn-brass:hover { background: #bd9a62; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ------------------------------------------------------------------ the glass door */
.door { display: grid; grid-template-columns: minmax(0, 1fr); }
.door-main { display: grid; }
/* a pane of acid-etched office glass in a thin graphite frame; the heading is lettered on it like door vinyl */
.pane {
  position: relative; min-height: 440px; border-radius: 4px; overflow: hidden; isolation: isolate;
  background: var(--glass);
  border: 1px solid var(--frame); box-shadow: inset 0 0 0 6px rgba(255,255,255,.55), inset 0 0 0 7px rgba(30,35,40,.08), 0 1px 0 rgba(30,35,40,.08);
  display: grid; align-items: end; text-align: left;
  transition: box-shadow 300ms var(--out), transform 300ms var(--out);
}
/* manifestation band: the dotted strip on office glass, at eye level, above the lettering */
.manifest { position: absolute; inset: 64px 0 auto; height: 52px; display: grid; gap: 5px; pointer-events: none; z-index: -1; }
.manifest span {
  display: block; height: 14px;
  background-image: radial-gradient(circle, rgba(127,98,53,.42) 0 2.4px, transparent 2.9px);
  background-size: 15px 14px; background-position: 7px 0;
}
.manifest span:nth-child(2) { background-position: 0 0; opacity: .6; }
.manifest span:nth-child(3) { background-position: 7px 0; opacity: .3; }

.trace { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.trace rect { width: calc(100% - 2px); height: calc(100% - 2px); fill: none; stroke: var(--brass); stroke-width: 2; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset var(--law) var(--out); }
.pane.is-over { box-shadow: inset 0 0 0 6px rgba(255,255,255,.55), 0 0 0 6px var(--brass-glow); transform: scale(1.006); }
.pane.is-over .trace rect { stroke-dashoffset: 0; }

.door-copy { display: grid; justify-items: start; gap: 12px; padding: 40px 44px 44px; max-width: 620px; }
.door-copy h2 { font-size: clamp(34px, 3.4vw, 46px); font-weight: 600; font-stretch: 87%; line-height: 1.02; letter-spacing: -.005em; color: var(--graphite); }
.door-copy p { color: var(--ink-2); max-width: 46ch; }
.door-actions { display: flex; gap: 10px; margin-top: 8px; }
.door-error { color: var(--bad); font-weight: 500; }
.pane.is-leaving { animation: leave 520ms var(--inout) forwards; }
@keyframes leave { to { transform: scale(.97) translateY(-8px); opacity: 0; filter: blur(4px); } }

.door > *, .work-grid > *, .kgrid > * { min-width: 0; }
/* what PreQ knows: one strip of figures under a brass rule, beneath the glass */
.knows { margin: 14px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 12px; border-top: 1px solid var(--brass); }
.knows div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 1px; }
.knows dt { color: var(--ink-3); font-size: 13px; line-height: 1.25; }
.knows dd { margin: 0; font: 600 24px/1.1 var(--sign); }
select {
  flex: 1; min-width: 0; width: 100%; text-overflow: ellipsis; height: 44px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--pane);
  padding: 0 12px; font: 14.5px var(--text); color: var(--ink);
}

/* ------------------------------------------------------------------ the work board */
.work { position: relative; }
.progress { position: sticky; top: 0; z-index: 5; height: 3px; margin: -14px 0 14px; background: var(--ground-2); border-radius: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brass-deep), var(--brass), #e8d3a6); box-shadow: 0 0 12px var(--brass-glow); transition: width 600ms var(--out); }
.work.is-done .progress span { background: var(--auto); box-shadow: none; }

.work-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.board { position: relative; background: var(--glass); border: 1px solid var(--frame); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); overflow: hidden; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.file-chip { display: inline-flex; align-items: center; gap: 8px; font: 600 15.5px var(--sign); min-width: 0; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-status { color: var(--ink-3); font-size: 14px; white-space: nowrap; flex: none; }
.board-status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); margin-right: 8px; vertical-align: 1px; }
.work.is-done .board-status::before { background: var(--auto); }

.tabs { display: flex; gap: 6px; padding: 12px 16px 0; overflow-x: auto; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 9px 9px 0 0;
  border: 1px solid transparent; border-bottom: 0; background: transparent; color: var(--ink-2);
  font: 500 14.5px var(--sign); cursor: pointer; white-space: nowrap;
  animation: blade-in var(--law) var(--overshoot) both; animation-delay: calc(var(--i, 0) * 70ms);
}
.tab b { font-weight: 600; font-size: 12.5px; padding: 1px 7px; border-radius: 99px; background: var(--ground-2); color: var(--ink-2); }
.tab[aria-selected="true"] { background: rgba(255,255,255,.55); border-color: var(--line-2); color: var(--ink); }
.tab:hover { color: var(--ink); }
@keyframes blade-in { from { opacity: 0; transform: translateX(-14px); filter: blur(3px); } }

.filters { display: flex; gap: 6px; padding: 12px 16px; background: rgba(255,255,255,.55); border-top: 1px solid var(--line); flex-wrap: wrap; }
.filters button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--pane); font: 500 14px var(--sign); color: var(--ink-2); cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--out); }
.filters button:active { transform: scale(.97); }
.filters button[aria-pressed="true"] { background: var(--graphite); color: #fff; border-color: var(--graphite); }

.rows { background: transparent; border-top: 1px solid var(--line); min-height: 380px; max-height: calc(100vh - 230px); overflow-y: auto; padding: 6px 0 18px; }
.row {
  display: grid; grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1fr) 104px 34px; gap: 14px; align-items: start;
  padding: 13px 20px; border-bottom: 1px solid var(--line); background: transparent; position: relative;
  animation: row-in var(--law) var(--out) both; cursor: pointer;
  transition: background-color 200ms ease;
}
.row:hover { background: rgba(255,255,255,.65); }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); filter: blur(2px); } }
.row .cell { font: 500 13px var(--sign); color: var(--ink-3); padding-top: 2px; letter-spacing: .02em; }
.q-text, .a-text, .lens-q, .lens-proof p, .lens-a { overflow-wrap: anywhere; }
.q-text { font-size: 14.5px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.q-sec { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.a-text { font-size: 14.5px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 21px; }
.a-proof { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.a-proof:empty { display: none; }
.row.is-pending .q-text { color: var(--ink-3); }
.row.is-pending .a-text::before { content: ""; display: block; height: 1px; margin-top: 10px; background: repeating-linear-gradient(90deg, var(--line-2) 0 3px, transparent 3px 7px); }
.row.is-suggest .a-text, .row.is-manual .a-text, .row.is-skip .a-text { color: var(--ink-3); font-style: italic; }
.row.is-current { background: #fff; }
.row.is-current::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(227,210,177,.55), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: sweep 700ms var(--out); }
@keyframes sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* the etch: answers are revealed by a moving brass light, sharpening as they land */
.etch.is-etching { animation: etch 720ms var(--out) both; position: relative; }
@keyframes etch {
  0% { clip-path: inset(0 100% 0 0); filter: blur(3px); opacity: .4; }
  60% { filter: blur(.4px); opacity: 1; }
  100% { clip-path: inset(0 0 0 0); filter: blur(0); }
}
.a .etch.is-etching::after, .lens-a.is-etching::after {
  content: ""; position: absolute; top: -2px; bottom: -2px; width: 34px; left: 0;
  background: linear-gradient(90deg, transparent, rgba(214,182,121,.75), transparent);
  animation: light 720ms var(--out) both; pointer-events: none;
}
@keyframes light { from { transform: translateX(-40px); } to { transform: translateX(var(--w, 420px)); opacity: 0; } }

/* status plates: stamped on, never removed */
.plate { justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; font: 600 12.5px var(--sign); letter-spacing: .02em; white-space: nowrap; border: 1px solid transparent; }
.plate:empty { visibility: hidden; }
.plate svg { width: 14px; height: 14px; }
.plate.stamp { animation: stamp var(--law) var(--overshoot) both; }
@keyframes stamp { from { opacity: 0; transform: scale(1.35) rotate(-4deg); } }
.p-auto { background: var(--auto-bg); color: var(--auto); }
.p-check { background: var(--check-bg); color: var(--check-ink); }
.p-suggest { background: var(--suggest-bg); color: #8d4428; }
.p-manual { background: var(--manual-bg); color: var(--manual); border-color: var(--line-2); }
.p-table { background: var(--table-bg); color: #2c5577; }
.p-skip { background: transparent; color: var(--ink-3); border-color: var(--line); }

/* confidence: one ranked mark (four ascending bars) */
.conf, .confidence { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; padding-top: 4px; }
.conf i, .confidence i { display: block; width: 4px; border-radius: 1px; background: var(--line-2); transform-origin: bottom; transition: background-color 300ms ease, transform var(--law) var(--overshoot); }
.conf i:nth-child(1), .confidence i:nth-child(1) { height: 5px; }
.conf i:nth-child(2), .confidence i:nth-child(2) { height: 9px; }
.conf i:nth-child(3), .confidence i:nth-child(3) { height: 13px; }
.conf i:nth-child(4), .confidence i:nth-child(4) { height: 17px; }
[data-level="1"] i:nth-child(-n+1), [data-level="2"] i:nth-child(-n+2), [data-level="3"] i:nth-child(-n+3), [data-level="4"] i:nth-child(-n+4) { background: var(--ink-2); }
/* brass only for the live thing: the row being matched now, and the lens */
.row.is-current .conf[data-level="1"] i:nth-child(-n+1), .row.is-current .conf[data-level="2"] i:nth-child(-n+2), .row.is-current .conf[data-level="3"] i:nth-child(-n+3), .row.is-current .conf[data-level="4"] i:nth-child(-n+4),
.lens [data-level="1"] i:nth-child(-n+1), .lens [data-level="2"] i:nth-child(-n+2), .lens [data-level="3"] i:nth-child(-n+3), .lens [data-level="4"] i:nth-child(-n+4) { background: var(--brass); }

.row .detail { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; padding: 12px 0 4px; border-top: 1px dashed var(--line-2); margin-top: 6px; font-size: 13.5px; animation: row-in 300ms var(--out); cursor: auto; }
.detail dt { color: var(--ink-3); font: 500 12.5px var(--sign); }
.detail dd { margin: 2px 0 0; color: var(--ink); word-break: break-word; }
.detail .wide { grid-column: 1 / -1; }
.detail table { width: 100%; border-collapse: collapse; font-size: 13px; }
.detail td { padding: 3px 8px 3px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.detail td:first-child { color: var(--ink-3); width: 56px; }

.beam { position: absolute; left: 0; right: 0; top: 0; height: 120px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(227,210,177,.35) 70%, rgba(176,141,87,.6) 99%, transparent);
}
.beam.is-scanning { animation: scan 1500ms var(--inout) 2; }
@keyframes scan { 0% { transform: translateY(-120px); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(620px); opacity: 0; } }

.empty-note { padding: 40px 20px; text-align: center; color: var(--ink-3); }

/* ------------------------------------------------------------------ the lens */
.lens { position: sticky; top: 18px; display: grid; gap: 16px; }
.lens-live, .tally, .done { background: var(--pane); border: 1px solid var(--frame); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.lens-live { padding: 20px; display: grid; gap: 10px; overflow: hidden; position: relative; }
.lens-q { font: 600 19px/1.3 var(--sign); min-height: 50px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.lens-q.swap { animation: qswap 380ms var(--out); }
@keyframes qswap { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }
.lens-proof { padding: 12px 14px; border-radius: 11px; background: var(--ground); display: grid; gap: 4px; }
.cap { font: 500 12.5px var(--sign); color: var(--ink-3); }
.lens-proof p { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.key { justify-self: start; font: 500 12.5px var(--sign); color: var(--brass-deep); letter-spacing: .02em; }
.confidence { height: 22px; align-items: flex-end; }
.confidence span { margin-left: 8px; font: 500 13px var(--sign); color: var(--ink-3); }
.lens-a { font-size: 15px; color: var(--ink); min-height: 46px; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line); background: #fff; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.lens-a.muted { color: var(--ink-3); font-style: italic; }

.tally { list-style: none; margin: 0; padding: 8px 8px; display: grid; }
.tally li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 9px; font-size: 14.5px; color: var(--ink-2); }
.tally b { font: 600 19px var(--sign); color: var(--ink); min-width: 3ch; text-align: right; display: inline-block; }
.tally b.bump { animation: bump var(--law) var(--overshoot); }
@keyframes bump { 40% { transform: translateY(-3px) scale(1.18); color: var(--brass-deep); } }
.pip { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.pip-auto { background: var(--auto); } .pip-check { background: var(--check); } .pip-suggest { background: var(--suggest); }
.pip-manual { background: #fff; box-shadow: inset 0 0 0 2px var(--manual); } .pip-table { background: var(--table); }

.done { padding: 22px; display: grid; gap: 14px; animation: rise var(--law) var(--overshoot) both; }
@keyframes rise { from { transform: translateY(12px); } }
.done h2 { font-size: 24px; }
.done p { color: var(--ink-2); }
.spread { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--ground-2); gap: 2px; }
.spread i { display: block; height: 100%; transform-origin: left; animation: grow 900ms var(--out) both; }
@keyframes grow { from { transform: scaleX(0); } }
.done-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.problems { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; color: var(--check-ink); }
.problems li { display: flex; gap: 8px; }
.problems svg { width: 15px; height: 15px; margin-top: 2px; }

.work.is-done .lens-live { display: none; }
.work.is-finale .board::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(227,210,177,.55) 48%, rgba(255,255,255,.7) 50%, transparent 66%);
  background-size: 250% 100%; animation: finale 1400ms var(--inout) both;
}
@keyframes finale { from { background-position: 120% 0; } to { background-position: -40% 0; } }

/* ------------------------------------------------------------------ history & knowledge */
.sheet { background: var(--pane); border: 1px solid var(--frame); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); overflow: hidden; }
.sheet .scroll { overflow-x: auto; }
.kgrid table.grid th, .kgrid table.grid td { padding-left: 16px; padding-right: 16px; }
.kgrid td .state { margin-left: 6px; }
.sheet + .sheet { margin-top: 22px; }
.sheet-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.sheet-head h2 { font-size: 20px; }
.sheet-head p { color: var(--ink-3); font-size: 14px; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th { text-align: left; font: 500 13px var(--sign); color: var(--ink-3); padding: 10px 22px; background: var(--ground); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid td { padding: 12px 22px; border-bottom: 1px solid var(--line); font-size: 14.5px; vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid td.num, table.grid th.num { text-align: right; }
.mini-spread { display: flex; width: 160px; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--ground-2); }
.mini-spread i { display: block; }
.link { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.link:hover { text-decoration-color: var(--ink-2); }
.state { font: 600 12.5px var(--sign); padding: 3px 9px; border-radius: 6px; }
.state-done { background: var(--auto-bg); color: var(--auto); }
.state-error { background: #f6dedb; color: var(--bad); }
.state-running { background: var(--check-bg); color: var(--check-ink); }
.dl { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); text-decoration: none; font: 500 14px var(--sign); padding: 6px 10px; border-radius: 8px; }
.dl:hover { background: var(--ground-2); color: var(--ink); }
.dl svg { width: 16px; height: 16px; }

.kgrid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 22px; background: var(--pane); border: 1px solid var(--frame); border-radius: 4px; overflow: hidden; }
.stats div { padding: 20px 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; }
.stats div:last-child { border-right: 0; }
.stats dt { color: var(--ink-3); font-size: 14px; }
.stats dd { margin: 0; font: 600 34px/1.1 var(--sign); }
.bars { list-style: none; margin: 0; padding: 14px 22px 20px; display: grid; gap: 9px; }
.bars li { display: grid; grid-template-columns: 110px 1fr 40px; gap: 12px; align-items: center; font-size: 14px; }
.bars span.track { height: 10px; border-radius: 99px; background: var(--ground-2); overflow: hidden; }
.bars span.track i { display: block; height: 100%; background: var(--graphite); border-radius: 99px; transform-origin: left; animation: grow 900ms var(--out) both; animation-delay: calc(var(--i, 0) * 45ms); }
.bars b { text-align: right; font: 600 14px var(--sign); }
.turnover { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding: 22px 18px 14px; }
.turnover div { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.turnover i { display: block; width: 100%; max-width: 46px; background: var(--graphite); border-radius: 3px 3px 1px 1px; transform-origin: bottom; animation: rise-bar 900ms var(--overshoot) both; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes rise-bar { from { transform: scaleY(0); } }
.turnover b { font: 600 13px var(--sign); }
.turnover span { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.sheet-foot { padding: 12px 22px 16px; color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--line); }
.empty { padding: 48px 22px; text-align: center; color: var(--ink-2); display: grid; gap: 14px; justify-items: center; }

/* ------------------------------------------------------------------ review: the filled workbook */
.topbar-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.xl td, .xl th { scroll-margin: 60px; }
.btn-sq { width: 44px; padding: 0; }
.btn-sq svg { transform: rotate(180deg); }

/* the page is the sheet: one slim toolbar, then the workbook to the bottom of the window */
/* the sheet runs edge to edge: only the toolbar keeps a margin */
.page-review .main { padding: 10px 0 0; }
.page-review .rv-bar { padding: 0 clamp(12px, 1.4vw, 24px); }
.page-review .xl-book { border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
@media (min-width: 901px) {
  .page-review .shell { height: 100vh; min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
  .page-review .main { display: flex; flex-direction: column; min-height: 0; }
  .page-review .rv-grid { flex: 1; min-height: 0; }
  .page-review .xl-book { height: 100%; display: flex; flex-direction: column; }
  .page-review .xl-scroll { flex: 1; height: auto; min-height: 0; }
}
.rv-bar { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 10px; }
.rv-bar .btn { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 14px; gap: 6px; }
.rv-bar .btn svg { width: 16px; height: 16px; }
.rv-bar .btn-sq { width: 32px; padding: 0; }
.rv-back { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--ink-2); flex: none; transition: background-color 160ms ease, color 160ms ease; }
.rv-back:hover { background: var(--ground-2); color: var(--ink); }
@media (min-width: 1181px) { .rv-keys, .rv-step { flex: none; } }
.rv-bar .rv-title { font-size: 17px; line-height: 1.2; flex: 1 1 0; min-width: 6ch; max-width: 34ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.key-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--pane); color: var(--ink); font: 500 13px var(--sign); cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms var(--out);
}
.key-chip:active { transform: scale(.97); }
.key-chip b { font-weight: 600; color: var(--ink-2); }
.key-chip:hover { border-color: var(--ink-3); }
/* the status you are stepping through */
.key-chip[aria-pressed="true"] { background: #fff; border-color: var(--graphite); box-shadow: inset 0 0 0 1px var(--graphite); }
.key-chip[disabled] { opacity: .45; cursor: default; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.k-auto .swatch { background: var(--auto-bg); box-shadow: inset 0 0 0 1.5px var(--auto); }
.k-check .swatch { background: var(--check-bg); box-shadow: inset 0 0 0 1.5px var(--check); }
.k-suggest .swatch { background: repeating-linear-gradient(135deg, var(--suggest-bg) 0 3px, #fff 3px 6px); box-shadow: inset 0 0 0 1.5px var(--suggest); }
.k-manual .swatch { background: #fff; outline: 1.5px dashed var(--manual); outline-offset: -1.5px; }
.k-table .swatch { background: var(--table-bg); box-shadow: inset 0 0 0 1.5px var(--table); }
.rv-step { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.rv-step span { color: var(--ink-2); font-size: 13px; margin-right: 4px; white-space: nowrap; }

.rv-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.rv-grid > * { min-width: 0; }
.xl-book { background: var(--glass); border: 1px solid var(--frame); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); overflow: hidden; }
.xl-bar { display: flex; align-items: flex-end; gap: 12px; border-bottom: 1px solid var(--line-2); padding-right: 12px; }
.xl-tabs { padding: 12px 16px 0; flex: 1; min-width: 0; }
.xl-zoom { display: flex; align-items: center; gap: 4px; padding-bottom: 8px; flex: none; }
.xl-zoom button { height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--pane); color: var(--ink-2); font: 500 13px var(--sign); cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--out); }
.xl-zoom button:active { transform: scale(.97); }
.xl-zoom button[aria-pressed="true"] { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.xl-zoom span { min-width: 4ch; text-align: right; font: 500 12.5px var(--sign); color: var(--ink-3); }
.xl-zoom .xl-full { margin-left: 6px; }
.xl-hint { flex: none; align-self: center; display: flex; align-items: center; gap: 6px; max-width: 52ch; padding: 0 4px; font-size: 13px; color: var(--ink-3); }
.xl-hint svg { width: 15px; height: 15px; }
.xl-hint span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xl-hint[data-tone="ok"] { color: var(--auto); }
.xl-hint[data-tone="warn"], .xl-hint[data-tone="bad"] { color: var(--bad); }
.xl-hint[data-tone="warn"] span, .xl-hint[data-tone="bad"] span { white-space: normal; }
.rv-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }

/* changed by a person: a brass corner while unsaved, a quiet graphite one once saved */
.xl td.ed-pending, .xl td.ed-saved { position: relative; }
.xl td.ed-pending::after, .xl td.ed-saved::after { content: ""; position: absolute; left: 0; top: 0; border-style: solid; border-width: 9px 9px 0 0; border-color: var(--brass) transparent transparent transparent; }
.xl td.ed-pending { background-color: #fbf3e2; }
.xl td.ed-saved::after { border-top-color: var(--graphite); }
.xl td.is-editing { white-space: pre-wrap; overflow: visible; background: #fff !important; box-shadow: inset 0 0 0 2px var(--brass) !important; outline: 3px solid var(--brass-glow) !important; outline-offset: 0; cursor: text; z-index: 4; position: relative; }
.xl td.is-editing .flag { display: none; }
.xl tbody td { cursor: cell; }
/* full screen: the workbook alone on the screen */
.xl-book:fullscreen { display: flex; flex-direction: column; border: 0; border-radius: 0; background: var(--ground); }
.xl-book:fullscreen .xl-scroll { flex: 1; height: auto; min-height: 0; }
.xl-tabs .tab { animation: none; }
.xl-tabs .tab b { background: var(--check-bg); color: var(--check-ink); }
/* the sheet takes the rest of the window under the bar, the title and the key */
.xl-scroll { overflow: auto; height: max(420px, calc(100vh - 290px)); background: #fff; }
.xl-scroll:focus-visible { outline-offset: -2px; }

/* the sheet itself: Excel's grid, quiet, so the marked cells carry the colour */
table.xl { --z: 1; border-collapse: separate; border-spacing: 0; table-layout: fixed; width: max-content; font: calc(13px * var(--z))/1.35 var(--sign); color: var(--ink); }
.xl th, .xl td { border-right: 1px solid #e4e7e2; border-bottom: 1px solid #e4e7e2; padding: calc(3px * var(--z)) calc(6px * var(--z)); vertical-align: top; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xl td.wr, .xl td.mk { white-space: pre-wrap; overflow-wrap: anywhere; }
.xl td.b { font-weight: 700; }
.xl thead th { position: sticky; top: 0; z-index: 2; background: var(--ground-2); color: var(--ink-3); font-weight: 500; font-size: max(10px, calc(12px * var(--z))); text-align: center; padding: 4px 0; border-bottom-color: var(--line-2); }
.xl tbody th { position: sticky; left: 0; z-index: 1; background: var(--ground-2); color: var(--ink-3); font-weight: 500; font-size: max(10px, calc(12px * var(--z))); text-align: center; padding: 3px 0; border-right-color: var(--line-2); }
.xl .xl-corner { left: 0; z-index: 3; }

.xl td.mk { position: relative; cursor: pointer; transition: box-shadow 160ms ease, background-color 160ms ease; }
.xl td.mk .flag { position: absolute; top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 8px 8px 0; border-color: transparent var(--fc, var(--ink-3)) transparent transparent; }
.xl td.m-auto { background: var(--auto-bg); box-shadow: inset 0 0 0 1px rgba(46,125,91,.35); --fc: var(--auto); }
.xl td.m-check { background: var(--check-bg); box-shadow: inset 0 0 0 1.5px var(--check); --fc: var(--check); }
.xl td.m-suggest { background: repeating-linear-gradient(135deg, var(--suggest-bg) 0 4px, #fff 4px 9px); box-shadow: inset 0 0 0 1.5px var(--suggest); --fc: var(--suggest); }
.xl td.m-manual { background: #fff; outline: 1.5px dashed var(--manual); outline-offset: -3px; --fc: var(--manual); }
.xl td.m-table { background: var(--table-bg); box-shadow: inset 0 0 0 1px rgba(63,111,151,.3); --fc: var(--table); }
.xl td.mk:hover { box-shadow: inset 0 0 0 2px var(--ink-2); }
.xl .ghost { font-style: italic; color: var(--ink-3); }
.xl td.m-suggest .ghost { color: #8d4428; }
/* the selected cell is the live thing: brass */
.xl td.mk.is-sel { box-shadow: inset 0 0 0 2.5px var(--brass); outline: 3px solid var(--brass-glow); outline-offset: 0; z-index: 1; }
.xl.off-auto td.m-auto, .xl.off-check td.m-check, .xl.off-suggest td.m-suggest, .xl.off-manual td.m-manual, .xl.off-table td.m-table {
  background: transparent; box-shadow: none; outline: 0; --fc: transparent;
}
.xl.off-suggest td.m-suggest .ghost, .xl.off-manual td.m-manual .ghost { visibility: hidden; }
@media (max-width: 1180px) {
  .rv-step { margin-left: 0; width: 100%; }
}
@media (max-width: 900px) {
  .xl-scroll { height: 70vh; min-height: 300px; }
}

/* ------------------------------------------------------------------ signed-in person, in the top bar */
.rail-user { display: flex; align-items: center; gap: 10px; padding-left: 22px; border-left: 1px solid var(--graphite-line); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--graphite-3); color: var(--brass-light); font: 600 12.5px/1 var(--sign); letter-spacing: .04em;
  box-shadow: inset 0 0 0 1px var(--graphite-line);
}
.who { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.who strong { font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; }
.who span { font-size: 11.5px; color: var(--rail-dim); font-stretch: 87%; }
.rail-user form { margin: 0; }
.signout {
  height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--graphite-line); background: transparent;
  color: var(--rail-dim); font: 500 13px/1 var(--sign); cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.signout:hover { color: #fff; border-color: #5a636b; background: var(--graphite-2); }
.muted { color: var(--ink-3); }

/* ------------------------------------------------------------------ the gate: sign in / create an account */
/* the same graphite sign as the top bar, hung as a full-height blade beside a pane of office glass */
.page-auth { min-height: 100vh; }
.gate { display: grid; grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr); min-height: 100vh; }
.gate > * { min-width: 0; }
.gate-sign {
  background: var(--graphite); color: var(--rail-text); display: grid; grid-template-rows: auto 1fr auto; gap: 40px;
  padding: clamp(28px, 4vw, 56px);
}
.gate-sign .brand img { width: 34px; }
.gate-say { align-self: center; max-width: 30ch; }
.gate-say h1 { font-size: clamp(30px, 3vw, 44px); line-height: 1.08; color: #fff; }
.gate-say p { margin-top: 18px; color: var(--rail-dim); font-size: 16px; line-height: 1.55; max-width: 40ch; text-wrap: pretty; }
.gate-steps { list-style: none; margin: 0; padding: 7px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; position: relative; }
.gate-steps::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 2px; background: var(--graphite-line); }
.gate-steps li {
  display: grid; gap: 2px; padding: 9px 10px; background: var(--graphite-2); border-top: 1px solid var(--graphite-line);
  border-radius: 2px; font-size: 13.5px; font-weight: 600; color: var(--rail-text); min-width: 0;
}
.gate-steps b { font-size: 12px; font-stretch: 87%; color: #7c858c; }
.gate-steps li:last-child { background: #fff; color: var(--ink); }
.gate-steps li:last-child b { color: var(--brass-deep); }

.gate-pane { background: var(--glass); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: clamp(24px, 5vw, 72px) clamp(18px, 4vw, 56px); }
.gate-card {
  width: min(100%, 460px); background: var(--pane); border: 1px solid var(--frame); border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), var(--shadow); padding: 28px clamp(20px, 3vw, 34px) 26px;
}
.gate-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 26px; background: var(--ground-2); border-radius: 10px; }
.gate-tabs a {
  text-align: center; padding: 8px 10px; border-radius: 7px; color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500;
  transition: background-color 160ms ease, color 160ms ease;
}
.gate-tabs a:hover { color: var(--ink); }
.gate-tabs a[aria-current="page"] { background: var(--pane); color: var(--ink); box-shadow: 0 1px 2px rgba(30,35,40,.12); }
.gate-card h2 { font-size: 26px; line-height: 1.15; }
.gate-sub { color: var(--ink-2); margin-top: 6px; font-size: 15px; text-wrap: pretty; }
.gate-error {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 11px 13px; border-radius: 8px;
  background: #f6dedb; color: #7d241b; font-size: 14.5px; line-height: 1.4;
}
.gate-error svg { color: var(--bad); margin-top: 1px; }
.gate-form { display: grid; gap: 16px; margin-top: 22px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field input {
  height: 44px; width: 100%; padding: 0 13px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff;
  color: var(--ink); font: 400 15.5px var(--sign); transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field input:hover { border-color: var(--frame); }
.field input:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-glow); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { margin-top: -8px; font-size: 13px; color: var(--ink-3); }
.check { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--graphite); margin: 0; }
.gate-go { width: 100%; margin-top: 4px; }
.gate-alt { text-align: center; font-size: 14.5px; color: var(--ink-3); }
.gate-alt a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .gate { grid-template-columns: 1fr; }
  .gate-sign { gap: 22px; padding: 22px 18px 18px; }
  .gate-say h1 { font-size: 26px; }
  .gate-say p { font-size: 15px; margin-top: 10px; }
  .gate-steps { display: none; }
  .gate-pane { place-items: start center; }
}
@media (max-width: 480px) { .field-pair { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .kb-mini { display: none; }
  .blade-meta { display: none; }
  .blade svg { grid-row: auto; }
  .blade::before { grid-row: auto; }
  .work-grid { grid-template-columns: 1fr; }
  .lens { position: static; grid-template-columns: 1fr 1fr; order: -1; }
  .done { align-self: stretch; }
  .kgrid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .main { padding: 22px 16px 40px; }
  .topbar { flex-wrap: wrap; align-items: flex-start; }
  .board-head { flex-wrap: wrap; }
  .row { padding: 12px 14px; gap: 10px; }
  .rail { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px 16px; }
  .nav { overflow-x: auto; }
  .nav a { padding: 8px 10px; gap: 8px; font-size: 15px; }
  .rail-foot { grid-column: auto; justify-content: flex-end; }
  .rail-foot .rail-note, .rail-foot .kb-mini { display: none; }
  .rail-user .who { display: none; }
  /* the five steps stay signposted on a phone: a compact strip of numbered slats */
  .route-list { gap: 3px; padding-top: 0; }
  .route-list::before { display: none; }
  .blade { grid-template-columns: 1fr; padding: 7px 6px; row-gap: 2px; }
  .blade::before { grid-row: auto; font-size: 11.5px; }
  .blade svg, .blade-meta { display: none !important; }
  .blade-name { font-size: 12px; line-height: 1.2; font-weight: 500; white-space: normal; }
  .pane { min-height: 400px; }
  .manifest { inset: 40px 0 auto; }
  .door-copy { padding: 28px 22px 26px; }
  .knows { grid-template-columns: 1fr 1fr; }
  .door { grid-template-columns: 1fr; }
  .lens { grid-template-columns: 1fr; }
  .done { order: -1; }
  .row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .row .a { grid-column: 2 / -1; grid-row: 2; }
  .row .conf { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 120ms !important; }
  .beam { display: none; }
}
