/* Fonts are served from this site, so nothing is fetched from anywhere else. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/ibm-plex-sans-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-600-normal.woff2) format("woff2"); }

:root {
  /* Layout idea: a bench label. Paper panels on a grey mat, ink-black type, one signal-yellow scan bar, stage colours used as stamps. */
  --bg: #EAEAE4;
  --surface: #FFFFFF;
  --ink: #15171C;
  --muted: #5A606C;
  --line: #D2D3CB;
  --accent: #FFC400;
  --on-accent: #15171C;
  --ok: #17753F;
  --warn: #9A5204;
  --stop: #C02519;
  --st-purchased: #566072;
  --st-received: #1B5CCB;
  --st-packed: #6A3FC2;
  --st-sold: #BF400B;
  --st-shipped: #17753F;
  --st-out: #747A86;
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-code: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111215; --surface: #1B1D22; --ink: #F0EFEA; --muted: #A2A7B2; --line: #353840;
    --accent: #FFC400; --on-accent: #15171C; --ok: #4CC683; --warn: #F0A840; --stop: #FF7265;
    --st-purchased: #9AA3B5; --st-received: #6CA0FF; --st-packed: #AE8CFF; --st-sold: #FF9156; --st-shipped: #4CC683; --st-out: #8B909B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111215; --surface: #1B1D22; --ink: #F0EFEA; --muted: #A2A7B2; --line: #353840;
  --accent: #FFC400; --on-accent: #15171C; --ok: #4CC683; --warn: #F0A840; --stop: #FF7265;
  --st-purchased: #9AA3B5; --st-received: #6CA0FF; --st-packed: #AE8CFF; --st-sold: #FF9156; --st-shipped: #4CC683; --st-out: #8B909B;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 15px/1.45 var(--font-body);
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, p { margin: 0; }
h2, h3 { text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- frame ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--ink); color: var(--surface);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 8px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { flex: none; width: 14px; height: 22px; background: var(--accent); border-radius: 2px; box-shadow: 4px 0 0 -1px var(--ink), 7px 0 0 -1px var(--accent); }
.brand h1 { font: 700 19px/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; white-space: nowrap; }
.conn { display: inline-flex; align-items: center; gap: 6px; }
.conn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.conn[data-state="live"]::before { background: #4CC683; }
.conn[data-state="stale"]::before { background: #F0A840; }
.conn[data-state="off"]::before { background: #FF7265; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; max-width: 16ch; padding: 5px 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid color-mix(in srgb, var(--surface) 35%, transparent); border-radius: var(--r); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: " \25BE"; opacity: .7; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; display: grid; gap: 2px; padding: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 24px rgba(0, 0, 0, .28); }
.menu-list p { padding: 6px 10px; font-size: 12px; color: var(--muted); white-space: normal; }
.menu-list button { text-align: left; padding: 10px; background: none; border: 0; border-radius: 4px; cursor: pointer; font-size: 14px; }
.menu-list button:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }

.tabs { display: flex; gap: 2px; padding: 0 12px; max-width: 1180px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 12px 8px; text-decoration: none;
  font: 600 15px/1 var(--font-display); letter-spacing: .05em; text-transform: uppercase;
  color: color-mix(in srgb, var(--surface) 72%, var(--ink));
  border-bottom: 3px solid transparent;
}
.tabs a b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font: 600 11px/1 var(--font-code); border: 1.5px solid currentColor; }
.tabs a[aria-current="page"] { color: var(--surface); border-bottom-color: var(--accent); }
.tabs a[aria-current="page"] b { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

@media (max-width: 560px) {
  .menu > summary { max-width: 11ch; }
  .top-row { padding: 9px 12px 6px; }
  .tabs { padding: 0 4px; gap: 0; }
  .tabs a { flex: 1 1 auto; justify-content: center; padding: 9px 5px 8px; font-size: 14px; letter-spacing: .03em; }
  .tabs a b { display: none; }
}
main { max-width: 1180px; margin: 0 auto; padding: 16px 16px 96px; }
.view { display: grid; gap: 14px; }
.station { max-width: 760px; margin: 0 auto; width: 100%; }

.banner { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: grid; gap: 8px; }
.banner:not(:empty) { padding-top: 12px; }
.note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 9px 12px; border-radius: var(--r); font-size: 14px;
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--muted);
}
.note[data-tone="warn"] { border-left-color: var(--warn); }
.note[data-tone="stop"] { border-left-color: var(--stop); }
.note[data-tone="sample"] { border-left-color: var(--st-packed); }
.note > span { flex: 1 1 240px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 9px 15px; border-radius: var(--r);
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--surface);
  font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { background: color-mix(in srgb, var(--ink) 86%, var(--surface)); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-accent { background: var(--accent); color: var(--on-accent); border-color: color-mix(in srgb, var(--accent) 70%, var(--on-accent)); }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 88%, var(--on-accent)); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.btn-danger { background: transparent; color: var(--stop); border-color: var(--stop); }
.btn-danger:hover { background: color-mix(in srgb, var(--stop) 10%, transparent); }
.btn-small { min-height: 34px; padding: 5px 10px; font-size: 13px; }
.btn .ico { width: 20px; height: 20px; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.filebtn { display: inline-flex; }
.filebtn:focus-within .btn { outline: 3px solid var(--accent); outline-offset: 2px; }

input[type="text"], input[type="password"], input[type="search"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 10px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent); }
textarea { min-height: 120px; resize: vertical; font-family: var(--font-code); font-size: 13px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span, .label { font: 600 12px/1.2 var(--font-display); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.fgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.fgrid .wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- station head and scan bar ---------- */
.station-head { display: flex; gap: 12px; align-items: baseline; }
.station-head .step { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--surface); font: 600 15px/1 var(--font-code); transform: translateY(3px); }
.station-head h2 { font: 700 26px/1.1 var(--font-display); letter-spacing: .02em; text-transform: uppercase; }
.station-head p { color: var(--muted); font-size: 14px; margin-top: 2px; max-width: 62ch; }

.scan {
  display: grid; gap: 10px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-left: 8px solid var(--accent); border-radius: var(--r);
}
.scan-row { display: flex; gap: 8px; }
.scan-in {
  flex: 1; min-width: 0; min-height: 56px !important; padding: 8px 12px !important;
  font: 600 22px/1.2 var(--font-code) !important; letter-spacing: .02em; text-transform: uppercase;
}
.scan-in::placeholder { font: 400 15px var(--font-body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.scan-row .btn { min-height: 56px; }
.scan-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.scan-tools .spacer { flex: 1; }
.scan-tools select { width: auto; min-height: 36px; padding: 4px 8px; }
.scan-hint { font-size: 13px; color: var(--muted); }
.cam-only { display: none; }
@media (pointer: coarse) { .cam-only { display: inline-flex; } }
body.no-photo .needs-photo, body.no-ask .needs-ask { display: none !important; }
details > summary { cursor: pointer; }
body:not(.no-photo) .photo-off { display: none; }

/* ---------- verdict: the answer to a scan ---------- */
.out:empty { display: none; }
.verdict {
  --tone: var(--muted);
  display: grid; gap: 10px; padding: 14px 16px;
  background: color-mix(in srgb, var(--tone) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--tone) 40%, var(--surface));
  border-left: 8px solid var(--tone); border-radius: var(--r);
}
.verdict[data-tone="ok"] { --tone: var(--ok); }
.verdict[data-tone="warn"] { --tone: var(--warn); }
.verdict[data-tone="stop"] { --tone: var(--stop); }
.verdict[data-tone="info"] { --tone: var(--st-received); }
.verdict-word { font: 700 30px/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; color: var(--tone); }
.verdict p { font-size: 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.facts b { color: var(--ink); font-weight: 600; }
.choices { display: grid; gap: 6px; }
.choice {
  display: grid; gap: 2px; text-align: left; width: 100%; padding: 9px 12px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r);
}
.choice:hover { border-color: var(--ink); }
.choice small { color: var(--muted); }

.slab { display: grid; gap: 3px; min-width: 0; }
.slab-id { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.grader { font: 700 12px/1 var(--font-display); letter-spacing: .08em; padding: 4px 6px 3px; border-radius: 3px; background: var(--ink); color: var(--surface); }
.cert { font: 600 15px/1.1 var(--font-code); font-variant-numeric: tabular-nums; letter-spacing: .02em; overflow-wrap: anywhere; }
.cert.pending { font: 500 13px var(--font-body); color: var(--muted); letter-spacing: 0; font-style: italic; }
.grade { font: 600 12px/1 var(--font-code); padding: 3px 6px; border: 1.5px solid var(--ink); border-radius: 3px; }
.slab-card { font-size: 14px; overflow-wrap: anywhere; }
.slab-big .cert { font-size: 28px; }
.slab-big .grader { font-size: 15px; padding: 6px 8px 5px; }
.slab-big .grade { font-size: 16px; padding: 5px 8px; }
.slab-big .slab-card { font-size: 16px; }
.code { font: 600 14px/1.1 var(--font-code); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.code-big { font-size: 22px; }
.tag-sample { font: 700 10px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; padding: 3px 5px 2px; border-radius: 3px; color: var(--st-packed); border: 1px solid var(--st-packed); }

.pill {
  --c: var(--st-out);
  display: inline-flex; align-items: center; white-space: nowrap;
  font: 700 12px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 7px 4px; border-radius: 3px;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 38%, var(--surface));
}
.pill[data-stage="purchased"] { --c: var(--st-purchased); }
.pill[data-stage="received"] { --c: var(--st-received); }
.pill[data-stage="packed"] { --c: var(--st-packed); }
.pill[data-stage="sold"] { --c: var(--st-sold); }
.pill[data-stage="shipped"] { --c: var(--st-shipped); }
.pill[data-flag] { --c: var(--stop); }

/* ---------- panels and lists ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 10px; min-width: 0; }
.panel > h3, .panel-head h3 { font: 700 16px/1.2 var(--font-display); letter-spacing: .06em; text-transform: uppercase; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.panel-head .count { font: 600 13px var(--font-code); color: var(--muted); }
.empty { color: var(--muted); font-size: 14px; padding: 4px 0; }
.tally { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.tally b { color: var(--ink); font: 600 14px var(--font-code); }

.rows { display: grid; }
.row {
  display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr) auto minmax(0, 190px) 86px;
  gap: 4px 12px; align-items: center; width: 100%; text-align: left;
  padding: 9px 4px; background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer;
}
.row:first-child { border-top: 0; }
.row:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.row .where { font-size: 13px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.row .age { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.row .late { color: var(--stop); font-weight: 600; }
.row .slab-card { font-size: 14px; }
.row-pills { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) {
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row .slab-card { grid-column: 1 / -1; grid-row: 2; }
  .row .where { grid-column: 1; grid-row: 3; }
  .row .age { grid-column: 2; grid-row: 3; }
}
.mini { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.mini:first-child { border-top: 0; }
.mini .grow { flex: 1 1 200px; min-width: 0; }
.mini .muted, .muted { color: var(--muted); }

/* ---------- board ---------- */
.pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tile {
  --c: var(--st-out);
  display: grid; gap: 2px; text-align: left; padding: 11px 12px 10px; cursor: pointer; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: var(--r);
}
.tile:hover, .tile[aria-pressed="true"] { border-color: var(--c); }
.tile[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--c); }
.tile .step { font: 600 11px/1 var(--font-code); color: var(--muted); }
.tile .num { font: 700 36px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.tile .lab { font: 700 14px/1.1 var(--font-display); letter-spacing: .07em; text-transform: uppercase; color: var(--c); }
.tile .sub { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.tile[data-stage="purchased"] { --c: var(--st-purchased); }
.tile[data-stage="received"] { --c: var(--st-received); }
.tile[data-stage="packed"] { --c: var(--st-packed); }
.tile[data-stage="sold"] { --c: var(--st-sold); }
.tile[data-stage="shipped"] { --c: var(--st-shipped); }
@media (max-width: 720px) {
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe .tile:last-child { grid-column: 1 / -1; }
  .tile .num { font-size: 30px; }
}
.split { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.attn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 4px; background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; }
.attn:first-child { border-top: 0; }
.attn:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.attn .n { flex: none; min-width: 34px; text-align: right; font: 700 20px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.attn[data-tone="stop"] .n { color: var(--stop); }
.attn[data-tone="warn"] .n { color: var(--warn); }
.attn span:last-child { font-size: 14px; }
table.series { width: 100%; border-collapse: collapse; font-size: 14px; }
table.series th { font: 600 12px/1.2 var(--font-display); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 4px 6px; }
table.series td { padding: 7px 6px; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
table.series th:first-child, table.series td:first-child { text-align: left; }
.scroll-x { overflow-x: auto; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 270px); gap: 8px; }
@media (max-width: 720px) { .filters { grid-template-columns: minmax(0, 1fr); } }
details.panel > summary { cursor: pointer; font: 700 16px/1.2 var(--font-display); letter-spacing: .06em; text-transform: uppercase; }
details.panel[open] > summary { margin-bottom: 4px; }
.tool { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.tool h4 { margin: 0; font: 600 14px var(--font-body); }
.tool p { font-size: 13px; color: var(--muted); max-width: 70ch; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline input[type="number"] { width: 84px; }
.inline input[type="text"] { width: auto; flex: 1 1 180px; }
.meter { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 12%, var(--surface)); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ok); }
.meter[data-tone="warn"] i { background: var(--warn); }
.meter[data-tone="stop"] i { background: var(--stop); }

/* ---------- buy drafts, packages ---------- */
.draft { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-left: 5px solid var(--st-purchased); border-radius: var(--r); background: var(--surface); }
.draft[data-state="dup"] { border-left-color: var(--warn); }
.draft[data-state="off"] { opacity: .55; }
.draft-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; font-size: 13px; }
.draft-status { color: var(--muted); }
.draft[data-state="dup"] .draft-status { color: var(--warn); font-weight: 600; }
.pkg-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; }
.pkg-item:first-child { border-top: 0; }
.pkg-item input { flex: none; width: 22px; height: 22px; accent-color: var(--ok); }
.pkg-item[data-on="true"] .slab-card { color: var(--muted); }

/* ---------- record drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end; background: rgba(10, 11, 14, .5); }
.sheet { width: min(540px, 100%); height: 100%; overflow-y: auto; background: var(--bg); padding: 16px; display: grid; gap: 12px; align-content: start; box-shadow: -8px 0 30px rgba(0, 0, 0, .25); }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kv { display: grid; grid-template-columns: minmax(110px, 34%) minmax(0, 1fr); gap: 5px 10px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 12px 20px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 1.5px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline b { font: 700 13px var(--font-display); letter-spacing: .06em; text-transform: uppercase; }
.timeline .muted { display: block; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.thumbs img { width: 100%; max-width: 320px; height: auto; border-radius: 4px; border: 1px solid var(--line); display: block; }

/* ---------- transient ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: 14px; z-index: 60; display: grid; justify-items: center; gap: 6px; padding: 0 16px; pointer-events: none; }
.toast { max-width: 560px; padding: 10px 14px; border-radius: var(--r); background: var(--ink); color: var(--surface); font-size: 14px; border-left: 6px solid var(--muted); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.toast[data-tone="ok"] { border-left-color: #4CC683; }
.toast[data-tone="warn"] { border-left-color: #F0A840; }
.toast[data-tone="stop"] { border-left-color: #FF7265; }
.busy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 16px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.busy::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--on-accent) 25%, transparent); border-top-color: var(--on-accent); animation: spin .8s linear infinite; }
.busy .btn { min-height: 32px; padding: 3px 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .busy::before { animation: none; } }

/* ---------- signing in ---------- */
body.gated .tabs, body.gated main, body.gated .banner, body.gated .menu { display: none; }
.gate { max-width: 440px; margin: 0 auto; padding: 28px 16px 72px; }
.gate-card { display: grid; gap: 12px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--accent); border-radius: var(--r); }
.gate-card h2 { font: 700 24px/1.1 var(--font-display); letter-spacing: .03em; text-transform: uppercase; }
.gate-card p { font-size: 14px; color: var(--muted); }
.gate-err { color: var(--stop) !important; font-weight: 600; font-size: 14px; }
.gate-err:empty { display: none; }

/* ---------- what each kind of account sees ---------- */
body:not(.is-admin) .admin-only { display: none !important; }
body.is-viewer .staff-only { display: none !important; }

/* ---------- live camera ---------- */
.cam { display: grid; gap: 8px; }
.cam-view { position: relative; background: #000; border-radius: var(--r); overflow: hidden; }
.cam-view video { display: block; width: 100%; max-height: min(54vh, 430px); object-fit: cover; }
.cam-aim { position: absolute; inset: 12% 7%; border: 2px solid rgba(255, 255, 255, .8); border-radius: 10px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .2); pointer-events: none; }
.cam-view[data-hit] .cam-aim { border-color: var(--accent); border-width: 5px; }
.cam-view[data-hit="ok"] .cam-aim { border-color: #4CC683; }
.cam-view[data-hit="warn"] .cam-aim { border-color: #F0A840; }
.cam-view[data-hit="stop"] .cam-aim { border-color: #FF7265; }
.cam-chip { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); max-width: 92%; padding: 5px 10px; border-radius: 4px; background: var(--accent); color: var(--on-accent); font: 600 14px var(--font-code); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-chip[data-tone] { font: 700 17px/1.1 var(--font-display); letter-spacing: .05em; text-transform: uppercase; padding: 8px 12px; }
.cam-chip[data-tone=""] { font: 600 14px var(--font-code); letter-spacing: 0; text-transform: none; padding: 5px 10px; }
.cam-chip[data-tone="ok"] { background: #17753F; color: #fff; }
.cam-chip[data-tone="warn"] { background: #9A5204; color: #fff; }
.cam-chip[data-tone="stop"] { background: #C02519; color: #fff; }
.cam-chip[data-tone="info"] { background: #1B5CCB; color: #fff; }
.cam-status { font-size: 13px; color: var(--muted); }
.cam-status[data-tone="stop"] { color: var(--stop); font-weight: 600; }
.cam-status[data-tone="warn"] { color: var(--warn); }
.btn[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--ink); }
.btn-ghost[aria-pressed="true"] { background: color-mix(in srgb, var(--ink) 12%, transparent); box-shadow: none; border-color: var(--ink); }
