/* Snapfiled — hand-written CSS, no framework.
   Read on a phone in daylight, one-handed, by someone wearing gloves.
   Order: tokens, base, layout, chrome, components, utilities, dark, print. */

/* ── tokens ─────────────────────────────────────────────────────────────── */

:root {
  --ink: #152430;
  --ink-2: #43596b;
  --ink-3: #6a7f8f;
  --paper: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --line: #d6dee5;
  --line-strong: #b8c5ce;

  --brand: #12304a;
  --brand-ink: #ffffff;
  --brand-soft: #e4edf5;
  --accent: #c8811a;
  --accent-soft: #fdf1dd;

  --good: #17734a;
  --good-soft: #e2f3ea;
  --attn: #9a6408;
  --attn-soft: #fdf1dd;
  --bad: #a12222;
  --bad-soft: #fbe7e7;
  --mute: #5d6c78;
  --mute-soft: #e8ecef;

  --radius: 10px;
  --radius-lg: 14px;
  --tap: 44px;
  --gap: 16px;
  --shadow: 0 1px 2px rgba(21, 36, 48, 0.08), 0 4px 14px rgba(21, 36, 48, 0.06);
  --shadow-lift: 0 2px 6px rgba(21, 36, 48, 0.1), 0 10px 28px rgba(21, 36, 48, 0.12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --max: 1120px;
  --max-narrow: 620px;
}

/* ── base ───────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0 0 0.4em;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }

p { margin: 0 0 0.9em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--accent); }

code, pre, .mono { font-family: var(--mono); font-size: 0.9em; }
pre {
  overflow-x: auto;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
}

img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 18px;
  background: var(--brand);
  color: var(--brand-ink);
  z-index: 50;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ── page frame ─────────────────────────────────────────────────────────── */

.main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 16px 64px;
}
.main-wide { max-width: 1400px; }
.narrow { max-width: var(--max-narrow); margin: 0 auto; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
}
.page-title { margin: 0; }
.page-sub { margin: 4px 0 0; color: var(--ink-2); font-size: 0.95rem; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--ink-2);
  text-decoration: none;
}
.back-link:hover { color: var(--brand); text-decoration: underline; }

/* ── top bar ────────────────────────────────────────────────────────────── */

.topbar {
  background: var(--brand);
  color: var(--brand-ink);
  padding-top: env(safe-area-inset-top);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-height: var(--tap);
  flex: 1;
  min-width: 0;
}
.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 7px;
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--brand);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 700; letter-spacing: -0.01em; }
.brand-org {
  font-size: 0.78rem;
  opacity: 0.75;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-capture {
  flex: none;
  gap: 8px;
  background: var(--accent);
  border-color: var(--accent);
  color: #1d1403;
  font-weight: 650;
}
.btn-capture:hover { background: #d9902a; border-color: #d9902a; color: #1d1403; }
.btn-capture-icon {
  width: 18px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 4px;
  position: relative;
}
.btn-capture-icon::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  flex: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  color: inherit;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 8px 10px;
}
.nav.is-open { display: flex; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 12px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-weight: 550;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav-link.is-active { background: rgba(255, 255, 255, 0.16); color: #fff; }
.nav-count {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 11px;
  background: var(--accent);
  color: #1d1403;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}
.nav-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding: 8px 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.nav-who {
  font-size: 0.85rem;
  opacity: 0.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-logout { margin: 0; }
.nav-account .btn-quiet { color: rgba(255, 255, 255, 0.85); border-color: rgba(255, 255, 255, 0.3); }
.nav-account .btn-quiet:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.topbar-bare { background: var(--brand); }

@media (min-width: 760px) {
  .topbar-inner { padding: 8px 16px; }
  .nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 16px 8px;
    border-top: 0;
  }
  .nav-toggle { display: none; }
  .nav-account {
    margin: 0 0 0 auto;
    padding: 0 0 0 12px;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
  }
}

/* ── footer ─────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-bottom: env(safe-area-inset-bottom);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-3);
}
.footer-inner a { color: var(--ink-2); }
.footer-sep { opacity: 0.5; }

/* ── buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 60ms ease;
}
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
}
.btn-primary:hover { background: #1b4368; border-color: #1b4368; color: var(--brand-ink); }

.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #8b1c1c; border-color: #8b1c1c; color: #fff; }

.btn-quiet { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-quiet:hover { background: var(--surface-2); }

.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 0.86rem; }
.btn-lg { min-height: 54px; padding: 14px 24px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }

.btn[disabled],
.btn.is-disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* ── cards ──────────────────────────────────────────────────────────────── */

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: var(--gap);
  overflow: hidden;
}
.card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px 0;
}
.card-title { margin: 0; font-size: 1.05rem; }
.card-sub { margin: 3px 0 0; color: var(--ink-3); font-size: 0.9rem; }
.card-actions { display: flex; gap: 8px; flex: none; }
.card-body { padding: 16px 18px; }
.card-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.card-link { text-decoration: none; color: inherit; }
.card-link:hover { box-shadow: var(--shadow-lift); border-color: var(--line-strong); }

.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.stack > * + * { margin-top: 14px; }

/* ── stats ──────────────────────────────────────────────────────────────── */

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
}
a.stat:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.stat-value { font-size: 2rem; font-weight: 680; letter-spacing: -0.02em; line-height: 1.1; }
.stat-label { font-size: 0.85rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-attn .stat-value { color: var(--attn); }
.stat-bad .stat-value { color: var(--bad); }
.stat-good .stat-value { color: var(--good); }

/* ── forms ──────────────────────────────────────────────────────────────── */

.field { margin-bottom: 16px; }
.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 620;
  color: var(--ink-2);
}
.field-flag {
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--attn-soft);
  color: var(--attn);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.input {
  display: block;
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  /* 16px minimum or iOS zooms the whole page on focus. */
  font: inherit;
  font-size: 16px;
}
.input:focus { border-color: var(--brand); }
textarea.input { min-height: 96px; resize: vertical; }
select.input { appearance: none; background-image: none; }
.field-help { margin: 6px 0 0; font-size: 0.83rem; color: var(--ink-3); }
.field-error { margin: 6px 0 0; font-size: 0.85rem; font-weight: 600; color: var(--bad); }
.field.has-error .input { border-color: var(--bad); }
.field.is-uncertain .input { border-color: var(--attn); background: var(--attn-soft); }

.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--brand); }

.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > .field { flex: 1 1 200px; margin-bottom: 16px; }
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

/* ── tables ─────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table caption { text-align: left; padding: 10px 14px; color: var(--ink-3); font-size: 0.85rem; }
.table th,
.table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  background: var(--surface-2);
  white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.row-link { cursor: pointer; }
.ta-right { text-align: right; }
.ta-center { text-align: center; }

@media (max-width: 620px) {
  .col-secondary { display: none; }
  .table th, .table td { padding: 10px; }
}

/* ── badges ─────────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
  background: var(--mute-soft);
  color: var(--mute);
}
.badge-good { background: var(--good-soft); color: var(--good); }
.badge-attn { background: var(--attn-soft); color: var(--attn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-wait { background: var(--brand-soft); color: var(--brand); }

/* ── alerts ─────────────────────────────────────────────────────────────── */

.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.94rem;
}
.alert-body { flex: 1; min-width: 0; }
.alert-title { display: block; margin-bottom: 2px; }
.alert-info { border-left-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.alert-success { border-left-color: var(--good); background: var(--good-soft); color: var(--good); }
.alert-warn { border-left-color: var(--attn); background: var(--attn-soft); color: var(--attn); }
.alert-error { border-left-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.alert a { color: inherit; }
.alert-close {
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}
.alert-close:hover { opacity: 1; }

/* ── confidence bar ─────────────────────────────────────────────────────── */

/* Widths are classes, not inline styles, so the page needs no
   `style-src 'unsafe-inline'` to render them. */
.conf { display: inline-flex; align-items: center; gap: 8px; }
.conf-track {
  display: block;
  width: 72px;
  height: 8px;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
}
.conf-fill { display: block; height: 100%; border-radius: 4px; background: var(--mute); }
.conf-good { background: var(--good); }
.conf-attn { background: var(--attn); }
.conf-bad { background: var(--bad); }
.conf-num { font-size: 0.8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.lv-0  { width: 0; }
.lv-1  { width: 5%; }
.lv-2  { width: 10%; }
.lv-3  { width: 15%; }
.lv-4  { width: 20%; }
.lv-5  { width: 25%; }
.lv-6  { width: 30%; }
.lv-7  { width: 35%; }
.lv-8  { width: 40%; }
.lv-9  { width: 45%; }
.lv-10 { width: 50%; }
.lv-11 { width: 55%; }
.lv-12 { width: 60%; }
.lv-13 { width: 65%; }
.lv-14 { width: 70%; }
.lv-15 { width: 75%; }
.lv-16 { width: 80%; }
.lv-17 { width: 85%; }
.lv-18 { width: 90%; }
.lv-19 { width: 95%; }
.lv-20 { width: 100%; }

/* ── empty state ────────────────────────────────────────────────────────── */

.empty {
  text-align: center;
  padding: 48px 20px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}
.empty-icon {
  width: 48px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid var(--line-strong);
  border-radius: 8px;
  position: relative;
}
.empty-icon::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 3px solid var(--line-strong);
  border-radius: 50%;
}
.empty[data-icon="check"] .empty-icon,
.empty[data-icon="inbox"] .empty-icon { border-radius: 4px; }
.empty[data-icon="check"] .empty-icon::after { border-radius: 4px; }
.empty-title { margin: 0 0 6px; font-size: 1.1rem; }
.empty-msg { color: var(--ink-3); max-width: 42ch; margin: 0 auto 18px; }
.empty-action { display: flex; justify-content: center; gap: 10px; }

/* ── detail list ────────────────────────────────────────────────────────── */

.details { display: grid; gap: 0; margin: 0; }
.detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.detail:last-child { border-bottom: 0; }
.detail-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); }
.detail-value { margin: 0; overflow-wrap: anywhere; }
.detail.is-uncertain { background: var(--attn-soft); margin: 0 -8px; padding: 10px 8px; }

@media (min-width: 640px) {
  .detail { grid-template-columns: 190px 1fr; gap: 12px; align-items: baseline; }
}

/* ── pagination ─────────────────────────────────────────────────────────── */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.pager-count { font-size: 0.86rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ── capture / upload ───────────────────────────────────────────────────── */

.dropzone {
  display: block;
  padding: 28px 20px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
}
.dropzone.is-active { border-color: var(--brand); background: var(--brand-soft); }

.preview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  margin-top: 14px;
}
.preview {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

.progress {
  height: 10px;
  margin-top: 14px;
  border-radius: 5px;
  background: var(--surface-2);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: var(--brand);
  transition: width 160ms linear;
}
.progress[hidden] { display: none; }

.photo-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
}
.photo-frame img { display: block; width: 100%; }

/* ── toast ──────────────────────────────────────────────────────────────── */

.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 60;
  width: min(92vw, 460px);
}
.toast {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-lift);
  font-size: 0.92rem;
}
.toast-bad { background: var(--bad); }

/* ── utilities ──────────────────────────────────────────────────────────── */

.muted { color: var(--ink-3); }
.small { font-size: 0.86rem; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.mt-0 { margin-top: 0; }
.mt { margin-top: 14px; }
.mb-0 { margin-bottom: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.is-busy { opacity: 0.55; pointer-events: none; }
.is-done { opacity: 0.4; }

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

/* ── dark ───────────────────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eef3;
    --ink-2: #b3c2ce;
    --ink-3: #8a9aa8;
    --paper: #0e1519;
    --surface: #161f26;
    --surface-2: #1f2a33;
    --line: #2b3944;
    --line-strong: #3d4f5c;

    --brand: #6fb0e8;
    --brand-ink: #06131d;
    --brand-soft: #172c3e;
    --accent: #e8a53f;
    --accent-soft: #33280f;

    --good: #6ed7a3;
    --good-soft: #12301f;
    --attn: #e8bb63;
    --attn-soft: #33280f;
    --bad: #f18a8a;
    --bad-soft: #35191a;
    --mute: #9aa9b5;
    --mute-soft: #212c34;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.3);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.5), 0 10px 28px rgba(0, 0, 0, 0.45);
  }

  /* The bar keeps its own dark ground so it does not glow at night. */
  .topbar,
  .topbar-bare { background: #0b1620; color: #e8eef3; }
  .brand-mark { box-shadow: inset 0 0 0 4px #0b1620; }
  .btn-primary { color: #06131d; }
  .btn-primary:hover { background: #8cc2f2; border-color: #8cc2f2; color: #06131d; }
  .btn-capture { color: #1d1403; }
  .toast { background: #2b3944; }
}

/* ── print ──────────────────────────────────────────────────────────────── */

@media print {
  :root {
    --paper: #fff;
    --surface: #fff;
    --surface-2: #fff;
    --line: #999;
    --ink: #000;
    --ink-2: #333;
    --ink-3: #555;
  }
  body { font-size: 11pt; background: #fff; }
  .topbar,
  .footer,
  .nav,
  .pager,
  .page-head-actions,
  .card-actions,
  .card-foot,
  .btn,
  .toast-host,
  .skip-link,
  .alert-close { display: none !important; }
  .main { max-width: none; padding: 0; }
  .card {
    border: 1px solid #999;
    box-shadow: none;
    break-inside: avoid;
    margin-bottom: 12pt;
  }
  .table { border: 1px solid #999; }
  .table th { background: #eee !important; color: #000; }
  .detail { break-inside: avoid; }
  .badge { border: 1px solid #999; background: #fff !important; color: #000 !important; }
  .conf-track { border: 1px solid #999; }
  .photo-frame img { max-height: 4in; width: auto; }
  a[href^="/"]::after,
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
