/* Kigali Balance: one stylesheet for the regulator dashboard and the provenance passport.
   Quiet by intent: one typeface, a neutral palette, colour reserved for data and status. */

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --surface: #f6f6f4;
  --ink: #1b1f24;
  --ink-2: #434a54;
  --muted: #6a717c;
  --rule: #e5e5e1;
  --rule-strong: #cdccc6;
  --accent: #1d5fae;
  --accent-soft: #e8f0fa;
  --focus: #1d5fae;

  --ok: #17784d;
  --ok-soft: #e7f4ed;
  --warn: #9a5800;
  --warn-soft: #fbf1e0;
  --bad: #b3261e;
  --bad-soft: #fbeceb;

  /* data colours (provenance class) */
  --c-virgin: #8b8a84;
  --c-recovered: #1baf7a;
  --c-reclaimed: #2a78d6;
  --c-quarantine: #eb6834;
  --c-loss: #c9c6be;
  /* gas swatches */
  --g-404a: #e07a2e;
  --g-134a: #5aa6d8;
  --g-410a: #d06c8c;

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 10px;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #131518;
    --surface: #1b1e22;
    --ink: #e7e9ec;
    --ink-2: #c2c7ce;
    --muted: #8c939d;
    --rule: #2a2e33;
    --rule-strong: #3b4047;
    --accent: #78aef5;
    --accent-soft: #1b2a3d;
    --focus: #78aef5;
    --ok: #4cc28a;
    --ok-soft: #15291f;
    --warn: #e0a24a;
    --warn-soft: #2d2415;
    --bad: #f07a70;
    --bad-soft: #321a19;
    --c-virgin: #8a8881;
    --c-recovered: #199e70;
    --c-reclaimed: #3987e5;
    --c-quarantine: #d95926;
    --c-loss: #3c4046;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #131518;
  --surface: #1b1e22;
  --ink: #e7e9ec;
  --ink-2: #c2c7ce;
  --muted: #8c939d;
  --rule: #2a2e33;
  --rule-strong: #3b4047;
  --accent: #78aef5;
  --accent-soft: #1b2a3d;
  --focus: #78aef5;
  --ok: #4cc28a;
  --ok-soft: #15291f;
  --warn: #e0a24a;
  --warn-soft: #2d2415;
  --bad: #f07a70;
  --bad-soft: #321a19;
  --c-virgin: #8a8881;
  --c-recovered: #199e70;
  --c-reclaimed: #3987e5;
  --c-quarantine: #d95926;
  --c-loss: #3c4046;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
button, input, select { font: inherit; color: inherit; }
svg text { font-family: var(--sans); }
.num, td.num, .val { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.spacer { flex: 1; }
[hidden] { display: none !important; }

.page { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 64px; }

/* ---------------------------------------------------------------- site header and footer */
.site { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; display: block; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); padding: 6px 10px; border-radius: 6px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--surface); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); }
.nav .short { display: none; }
.tool { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.tool:hover { color: var(--ink); background: var(--surface); }

.site-foot { border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
.site-foot-inner { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 40px; display: grid; gap: 8px; }
.site-foot p { max-width: 760px; }

/* ---------------------------------------------------------------- page intro */
.intro { padding: 44px 0 28px; }
.intro h1, .intro .lede { max-width: 760px; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; font-weight: 500; }
.badge.live { background: var(--ok-soft); color: var(--ok); }
h1 { font-size: clamp(26px, 3.2vw, 32px); }
.lede { margin-top: 12px; color: var(--ink-2); font-size: 16.5px; line-height: 1.6; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; color: var(--muted); font-size: 13.5px; }

/* ---------------------------------------------------------------- headline numbers */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius); }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 18px 20px 20px; border-left: 1px solid var(--rule); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat .k { color: var(--muted); font-size: 13.5px; }
.stat .v { margin-top: 6px; font-size: 26px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .v small { margin-left: 5px; font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.stat .n { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* ---------------------------------------------------------------- sticky sub-navigation and filter */
.subnav { position: sticky; top: 0; z-index: 20; margin-top: 32px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--rule); }
.subnav-inner { display: flex; align-items: center; gap: 16px; min-height: 54px; }
.subnav .links { display: flex; flex-wrap: nowrap; margin: 0; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.subnav .links::-webkit-scrollbar { display: none; }
.subnav .links a { color: var(--muted); font-size: 14px; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.subnav .links a:hover { color: var(--ink); background: var(--surface); text-decoration: none; }
.subnav .links a.on { color: var(--ink); font-weight: 500; }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface); border-radius: 8px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 6px; font-size: 13.5px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--rule), 0 1px 2px rgb(0 0 0 / .06); }
.sw { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------------------------------------------------------------- sections */
.sec { padding: 48px 0 8px; scroll-margin-top: 64px; }
.sec + .sec { border-top: 1px solid var(--rule); margin-top: 40px; }
.sec-head { max-width: 760px; margin-bottom: 22px; }
.sec-head h2 { font-size: 20px; }
.summary { margin-top: 8px; color: var(--ink-2); }
.summary strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.textbtn { border: 0; background: none; padding: 4px 0; color: var(--accent); cursor: pointer; font-size: 14px; }
.textbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.note { margin-top: 14px; color: var(--muted); font-size: 13.5px; max-width: 780px; }
.cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; }

/* legends */
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.legend i.line { width: 14px; height: 2px; border-radius: 1px; }

/* charts */
.chart { position: relative; margin-top: 14px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart.scroll-x { overflow-x: auto; }
.chart path[tabindex]:focus { outline: none; }

.tooltip { position: fixed; z-index: 50; pointer-events: none; opacity: 0; transition: opacity .12s; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; padding: 8px 11px; font-size: 13px; line-height: 1.45; box-shadow: 0 6px 20px rgb(0 0 0 / .1); max-width: 300px; }
.tooltip.on { opacity: 1; }
.tooltip .row { display: flex; align-items: center; gap: 8px; }
.tooltip .key { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.ledger td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger tbody tr:hover td { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.ledger .r { text-align: right; }
.ledger td.r { font-variant-numeric: tabular-nums; }
.ledger td.mono, .ledger td .mono, .ledger td.num { white-space: nowrap; }
.tagline { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tagline i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* status: a coloured dot and words, nothing louder */
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status.ok { color: var(--ok); }
.status.high, .status.blocked { color: var(--bad); }
.status.review { color: var(--warn); }
.status.watch { color: var(--muted); }
.ledger .status { white-space: nowrap; }

/* ---------------------------------------------------------------- balance */
.balance { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
table.books { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.books th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 14px 0 6px; }
.books tbody:first-child tr:first-child th { padding-top: 0; }
.books td { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.books td.v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 16px; }
.books tr.sum td { border-bottom: 0; border-top: 1px solid var(--ink); font-weight: 600; padding-top: 10px; }
.verdict { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; color: var(--ink-2); }
.verdict .status { font-weight: 500; font-size: 14.5px; margin-bottom: 8px; }
.verdict p + p { margin-top: 8px; }

/* ---------------------------------------------------------------- refusals */
.refusals { list-style: none; margin: 0; padding: 0; }
.refusals li { display: grid; grid-template-columns: 38px minmax(0, 1fr) 34px; grid-template-areas: "code what n" "code bar bar"; gap: 6px 10px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.refusals li:first-child { padding-top: 0; }
.refusals .code { grid-area: code; color: var(--muted); font-size: 13px; padding-top: 1px; }
.refusals .what { grid-area: what; font-size: 14px; }
.refusals .n { grid-area: n; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.refusals .bar { grid-area: bar; height: 4px; background: var(--surface); border-radius: 2px; overflow: hidden; }
.refusals .bar b { display: block; height: 100%; background: var(--bad); opacity: .65; border-radius: 2px; }

/* ---------------------------------------------------------------- AI review queue */
.dossiers { border-top: 1px solid var(--rule); }
.dossier { border-bottom: 1px solid var(--rule); }
.dossier summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; padding: 14px 8px; border-radius: 6px; }
.dossier summary::-webkit-details-marker { display: none; }
.dossier summary:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.dossier .who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.dossier .who b { font-weight: 600; font-family: var(--mono); font-size: 14px; }
.dossier .who span { color: var(--muted); font-size: 13.5px; }
.dossier .side { display: flex; align-items: center; gap: 14px; }
.dossier .score { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13.5px; }
.dossier .chev { color: var(--muted); transition: transform .15s; display: inline-grid; }
.dossier[open] .chev { transform: rotate(90deg); }
.dossier .why { grid-column: 1 / -1; color: var(--ink-2); font-size: 14px; }
.dossier .body { padding: 0 8px 18px; color: var(--ink-2); font-size: 13.5px; display: grid; gap: 6px; }
.dossier .body ul { margin: 0; padding-left: 18px; }
.dossier .hash { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- live chain */
.readout { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border: 1px solid var(--rule); border-radius: var(--radius); }
.readout div { padding: 14px 18px; border-left: 1px solid var(--rule); }
.readout div:first-child { border-left: 0; }
.readout dt { color: var(--muted); font-size: 13px; }
.readout dd { margin: 4px 0 0; font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.readout dd small { font-size: 13px; font-weight: 400; color: var(--muted); }
.event-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 14px; }
.links a { display: inline-flex; align-items: center; gap: 5px; }
.live-state { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.live-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--rule-strong); }
.live-state.on { color: var(--ok); }
.live-state.on i { background: var(--ok); }
.live-state.wait i { background: var(--warn); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------------------------------------------------------------- passport: lookup */
.lookup { margin-top: 26px; }
.lookup label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 6px; }
.lookup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.field { height: 40px; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--paper); padding: 0 12px; }
.field:hover { border-color: var(--muted); }
.field:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-soft); }
input.field { width: 140px; font-variant-numeric: tabular-nums; }
select.field { cursor: pointer; }
.btn { height: 40px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--ink); color: var(--paper); font-weight: 500; cursor: pointer; }
.btn:hover { opacity: .88; }
.examples { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 13.5px; color: var(--muted); }
.examples a { padding: 3px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-2); }
.examples a:hover { border-color: var(--rule-strong); color: var(--ink); text-decoration: none; background: var(--surface); }
.examples a[aria-current="true"] { border-color: var(--ink-2); color: var(--ink); }
.hint { margin-top: 8px; font-size: 13px; color: var(--bad); }
.hint:empty { display: none; }

/* ---------------------------------------------------------------- passport: summary card */
.passport { display: grid; grid-template-columns: minmax(0, 1fr) 190px; margin-top: 8px; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.passport .main { padding: 26px 28px 24px; }
.passport .side { padding: 26px 22px 24px; border-left: 1px solid var(--rule); display: grid; align-content: start; justify-items: center; gap: 12px; background: var(--surface); }
.passport .kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--ink-2); font-size: 13.5px; }
.passport h2 { margin-top: 10px; font-size: 28px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.passport h2 small { font-size: 17px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.passport .say { margin-top: 10px; color: var(--ink-2); max-width: 640px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; gap: 12px 36px; margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 2px 0 0; font-size: 14.5px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; text-align: center; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.qr { width: 120px; height: 120px; padding: 8px; background: #fff; border-radius: 8px; border: 1px solid var(--rule); }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-cap { color: var(--muted); font-size: 12.5px; text-align: center; }

/* ---------------------------------------------------------------- passport: detail blocks */
.pp-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; margin-top: 44px; align-items: start; }
.pp-block h2 { font-size: 18px; }
.pp-block .sub { margin-top: 4px; color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.pp-block + .pp-block { margin-top: 40px; }
.pp-wide { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--rule); }

/* lineage tree */
.tree { list-style: none; margin: 0; padding: 0; }
.tree .tree { margin: 2px 0 4px 4px; padding-left: 20px; border-left: 2px solid var(--rule); }
.node { padding: 10px 0; }
.node .t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.node .t b, .node .t a { font-weight: 600; }
.node .t .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--rule-strong)); flex: none; }
.node .t span { color: var(--ink-2); font-size: 14px; }
.node .d { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.node.unit { background: var(--surface); border-radius: 8px; padding: 12px 14px; margin: 4px 0 8px; }
.node.unit .t b { font-family: var(--mono); font-size: 14px; }
.edge { color: var(--muted); font-size: 12.5px; padding-top: 8px; }
.edge + .node { padding-top: 2px; }
.edge + .node.unit { margin-top: 6px; padding-top: 12px; }

/* checks */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 18px 34px minmax(0, 1fr); gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); }
.checks li:first-child { padding-top: 0; }
.checks li svg { color: var(--ok); margin-top: 3px; }
.checks .code { color: var(--muted); font-size: 13px; padding-top: 1px; }

.alertbox { border-radius: var(--radius); padding: 14px 16px; background: var(--warn-soft); color: var(--ink-2); font-size: 14px; display: grid; gap: 6px; }
.alertbox + .alertbox { margin-top: 10px; }
.alertbox.high { background: var(--bad-soft); }
.alertbox .h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.alertbox .h b { font-family: var(--mono); font-size: 13.5px; color: var(--ink); }
.empty { margin-top: 12px; padding: 20px 22px; border: 1px dashed var(--rule-strong); border-radius: var(--radius); color: var(--ink-2); }
.loading { margin-top: 12px; padding: 20px 0; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .stat:nth-child(3) { border-left: 0; }
  .stats .stat:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .stats.three { grid-template-columns: 1fr; }
  .stats.three .stat { border-left: 0; }
  .stats.three .stat + .stat { border-top: 1px solid var(--rule); }
  .balance, .cols, .pp-grid { grid-template-columns: 1fr; gap: 32px; }
  .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout div:nth-child(3) { border-left: 0; }
  .readout div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .site-inner { gap: 12px; height: 56px; }
  .brand b { display: none; }
  .nav .full { display: none; }
  .nav .short { display: inline; }
  .intro { padding: 30px 0 22px; }
  .lede { font-size: 15.5px; }
  .stat { padding: 14px 14px 16px; }
  .stat .v { font-size: 21px; }
  .subnav-inner { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 0; }
  .subnav .seg { align-self: flex-start; }
  .sec { padding-top: 36px; }
  .sec + .sec { margin-top: 28px; }
  .passport { grid-template-columns: 1fr; }
  .passport .main { padding: 22px 18px 20px; }
  .passport .side { border-left: 0; border-top: 1px solid var(--rule); grid-template-columns: auto 1fr; justify-items: start; align-items: center; padding: 16px 18px; }
  .passport .side .pill { grid-column: 1 / -1; }
  .qr { width: 92px; height: 92px; }
  .qr-cap { text-align: left; }
  .passport h2 { font-size: 24px; }
  .dossier summary { grid-template-columns: 1fr; }
  input.field { width: 100px; flex: none; }
  select.field { flex: 1; min-width: 0; }
  .lookup-row .btn { flex: 1 0 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site, .subnav, .tool, .lookup, .site-foot { display: none; }
  body { font-size: 12px; }
}
