/* VeriDoc — Modernist (International Typographic / Bauhaus) theme.
   Flat colour, hard edges, thick rules, heavy grotesque type, one loud accent. */

:root,
:root[data-theme="light"] {
  --bg: #efede6;
  --surface: #ffffff;
  --ink: #0e0e0e;
  --ink-2: #55534d;
  --rule: #0e0e0e;
  --rule-soft: #cfccc1;
  --accent: #e5341d;
  --accent-ink: #ffffff;
  --blue: #1d3fbb;
  --yellow: #f2b705;
  --ok: #17703f;
  --danger: #c62817;
  --hover: #e5e2d8;
  --focus: #1d3fbb;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #111110;
  --surface: #1a1a18;
  --ink: #f1efe8;
  --ink-2: #a5a298;
  --rule: #f1efe8;
  --rule-soft: #3a3935;
  --accent: #ff5238;
  --accent-ink: #111110;
  --blue: #7b96ff;
  --yellow: #f7c531;
  --ok: #4cc48a;
  --danger: #ff6b57;
  --hover: #242422;
  --focus: #7b96ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
a { color: inherit; }
code, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.86em; }

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

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------- icons ---------- */
.ico { display: inline-flex; width: 20px; height: 20px; flex: none; }
.ico svg { width: 100%; height: 100%; }
.ico.sm { width: 16px; height: 16px; }
.ico.lg { width: 28px; height: 28px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 18px;
  background: var(--ink); color: var(--bg);
  border: 2px solid var(--ink); border-radius: 0;
  font: inherit; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; text-decoration: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: var(--bg); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn.block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  background: transparent; color: var(--ink);
  border: 2px solid transparent; border-radius: 0; cursor: pointer;
}
.icon-btn:hover { background: var(--ink); color: var(--bg); }
.icon-btn.danger:hover { background: var(--danger); }
.icon-btn.boxed { border-color: var(--ink); }

/* language (flags) + theme controls */
.tools { display: flex; align-items: center; gap: 6px; }
.flag-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  background: transparent; border: 2px solid transparent; cursor: pointer; opacity: 0.45;
}
.flag-btn svg { width: 26px; height: 17px; display: block; outline: 1px solid var(--rule-soft); }
.flag-btn:hover { opacity: 0.85; }
.flag-btn[aria-pressed="true"] { opacity: 1; border-color: var(--ink); }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field > label, .label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
}
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--rule); border-radius: 0;
  font: inherit;
}
/* Our own show/hide button replaces the browser-native one (Edge draws a second eye otherwise). */
input[type="password"]::-ms-reveal, input[type="password"]::-ms-clear { display: none; }
input.upper { text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
textarea { min-height: 96px; resize: vertical; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
input:read-only { background: var(--hover); color: var(--ink-2); }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; }
.hint { font-size: 12px; color: var(--ink-2); }
.pw { position: relative; }
.pw input { padding-right: 50px; }
.pw .icon-btn { position: absolute; right: 2px; top: 3px; width: 40px; height: 40px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 700; font-size: 13px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .box { width: 46px; height: 26px; border: 2px solid var(--ink); position: relative; flex: none; background: var(--surface); }
.switch .box::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: var(--ink); transition: transform 0.12s; }
.switch input:checked + .box { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .box::after { transform: translateX(20px); background: var(--accent-ink); }
.switch input:focus-visible + .box { outline: 3px solid var(--focus); outline-offset: 2px; }

.checks { border: 2px solid var(--rule); background: var(--surface); max-height: 240px; overflow-y: auto; }
.check { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--rule-soft); }
.check:last-child { border-bottom: 0; }
.check:hover { background: var(--hover); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { width: 20px; height: 20px; border: 2px solid var(--ink); flex: none; display: grid; place-items: center; background: var(--surface); }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box::after { content: ""; width: 10px; height: 6px; border-left: 3px solid var(--accent-ink); border-bottom: 3px solid var(--accent-ink); transform: rotate(-45deg) translate(1px, -1px); }
.check input:focus-visible + .box { outline: 3px solid var(--focus); outline-offset: 2px; }
.check b { letter-spacing: 0.04em; }
.check .sub { display: inline; margin-left: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 2px 8px; border: 2px solid var(--ink); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.chip.off { border-color: var(--rule-soft); color: var(--ink-2); text-decoration: line-through; }

.alert {
  padding: 12px 14px; margin-bottom: 18px;
  border: 2px solid var(--danger); color: var(--danger); font-weight: 600; font-size: 14px;
}
.alert.ok { border-color: var(--ok); color: var(--ok); }
.alert.info { border-color: var(--ink); color: var(--ink); }

/* ---------- auth screens ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1.1fr) minmax(360px, 1fr); }

.auth-art {
  position: relative; overflow: hidden; background: var(--accent); color: var(--accent-ink);
  padding: 40px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 320px;
}
.auth-art .shape { position: absolute; }
.auth-art .circle { width: 58%; aspect-ratio: 1; border-radius: 50%; background: var(--ink); right: -8%; top: 8%; }
.auth-art .square { width: 30%; aspect-ratio: 1; background: var(--yellow); left: 10%; top: 12%; }
.auth-art .tri { width: 34%; aspect-ratio: 1; background: var(--blue); left: 34%; top: 38%; clip-path: polygon(0 100%, 100% 100%, 50% 0); }
.auth-art .bar { height: 14px; width: 46%; background: var(--bg); left: 0; bottom: 34%; }
.wordmark { position: relative; font-size: clamp(56px, 9vw, 120px); font-weight: 900; letter-spacing: -0.06em; line-height: 0.85; }
.wordmark i { font-style: normal; color: var(--ink); }
.auth-art .eyebrow { position: relative; color: var(--accent-ink); margin-top: 18px; opacity: 0.9; }

.auth-panel { display: flex; flex-direction: column; padding: 24px 40px 40px; }
.auth-panel .tools { justify-content: flex-end; }
.auth-form { width: 100%; max-width: 400px; margin: auto; padding: 32px 0; }
.auth-form h1 { margin-bottom: 8px; }
.auth-form .lead { color: var(--ink-2); margin-bottom: 32px; }
.auth-form .links { margin-top: 22px; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 700; }
.auth-form .links a { text-underline-offset: 3px; }

/* ---------- app shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }

.side {
  border-right: 3px solid var(--rule); background: var(--bg);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand {
  display: block; padding: 24px 24px 20px; text-decoration: none;
  font-size: 34px; font-weight: 900; letter-spacing: -0.06em; line-height: 1;
  border-bottom: 3px solid var(--rule);
}
.brand i { font-style: normal; color: var(--accent); }
.nav { padding: 12px 0; flex: 1; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 14px; padding: 13px 24px; text-decoration: none;
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  border-left: 8px solid transparent;
}
.nav a .num { font-size: 11px; color: var(--ink-2); width: 18px; font-variant-numeric: tabular-nums; }
.nav a:hover { background: var(--hover); }
.nav a[aria-current="page"] { border-left-color: var(--accent); background: var(--ink); color: var(--bg); }
.nav a[aria-current="page"] .num { color: var(--accent); }

.side-foot { border-top: 3px solid var(--rule); padding: 16px 24px 20px; display: grid; gap: 14px; }
.who { min-width: 0; }
.who strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { display: block; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .tools { margin-left: -8px; }
.side-foot .spacer { flex: 1; }

.main { min-width: 0; padding: 40px 48px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 20px; margin-bottom: 28px; border-bottom: 3px solid var(--rule); }
.page-head .eyebrow { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 2px 8px; background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; }

/* ---------- dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border: 3px solid var(--rule); background: var(--surface); }
.stat { padding: 20px 22px 22px; border-right: 3px solid var(--rule); }
.stat:last-child { border-right: 0; }
.stat .n { font-size: clamp(56px, 8vw, 96px); font-weight: 900; letter-spacing: -0.06em; line-height: 0.95; margin: 10px 0 4px; font-variant-numeric: tabular-nums; }
.stat.hot { background: var(--accent); color: var(--accent-ink); }
.stat.hot .eyebrow { color: var(--accent-ink); }
.stat .status { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; margin-top: 22px; }
.quick { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.welcome { margin-bottom: 28px; font-size: 18px; color: var(--ink-2); max-width: 56ch; }
.welcome b { color: var(--ink); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border-top: 3px solid var(--rule); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th {
  text-align: left; padding: 12px 14px; font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; border-bottom: 2px solid var(--rule); white-space: nowrap;
}
td { padding: 14px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
tr:hover td { background: var(--hover); }
td.code { font-weight: 800; letter-spacing: 0.04em; white-space: nowrap; }
td.num { font-variant-numeric: tabular-nums; }
td.conn { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
td.actions { text-align: right; white-space: nowrap; }
.sub { display: block; font-size: 12px; color: var(--ink-2); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 2px solid currentColor; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.badge.ok { color: var(--ok); }
.badge.off { color: var(--ink-2); }
.badge.role { color: var(--blue); }
.badge.adv { color: var(--blue); margin-left: 10px; padding: 1px 6px; font-size: 10px; letter-spacing: 0.08em; vertical-align: 2px; }

.empty { padding: 56px 20px; text-align: center; border: 3px dashed var(--rule-soft); color: var(--ink-2); display: grid; justify-items: center; gap: 14px; }
.empty .ico { width: 44px; height: 44px; color: var(--ink); }

.panel { border-top: 3px solid var(--rule); background: var(--surface); padding: 28px; max-width: 720px; }
.panel + .panel { margin-top: 28px; }
.panel h2 { margin-bottom: 20px; }
.panel .btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.panel > .hint { margin-bottom: 20px; }
.panel table { min-width: 0; }
.panel th { border-bottom: 1px solid var(--rule-soft); width: 34%; vertical-align: top; }
.test-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--rule-soft); }
.test-row .field { margin: 0; flex: 1; min-width: 200px; }

th.right, td.right { text-align: right; }
td.right { font-variant-numeric: tabular-nums; white-space: nowrap; }

.filters { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: flex-end; margin-bottom: 20px; }
.filters .field { margin: 0; }
.filters .field.grow { flex: 1 1 280px; }
.filters .period { display: grid; grid-template-columns: minmax(130px, 1fr) 100px; gap: 8px; }
.search { position: relative; }
.search > .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ink-2); }
.search input { padding-left: 42px; padding-right: 48px; }
.search .icon-btn { position: absolute; right: 2px; top: 3px; }
.summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 12px 14px; border-top: 3px solid var(--rule); background: var(--surface); font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.summary .sum { font-variant-numeric: tabular-nums; }
/* Tabs share the bar equally and never scroll: a long label wraps instead (and the icons drop out on very narrow screens). */
.tabs { display: flex; gap: 0; border-bottom: 3px solid var(--rule); }
.tabs button { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 6px; line-height: 1.2; text-align: center; overflow-wrap: anywhere; background: transparent; color: var(--ink); font: inherit; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; border: 0; margin-bottom: -3px; cursor: pointer; }
.tabs button:hover { background: var(--hover); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.dlg-tabs { padding: 0; margin-top: 0; background: var(--surface); }
@media (max-width: 480px) {
  .tabs button { padding: 10px 3px; font-size: 11px; letter-spacing: 0.05em; }
  .tabs button .ico { display: none; }
}
@media (max-width: 360px) {
  .tabs button { font-size: 10px; letter-spacing: 0.02em; }
}
.dlg-panel[hidden] { display: none; }

dialog.dlg-wide { width: min(1000px, calc(100vw - 32px)); }
.spacer { flex: 1; }
a.icon-btn { text-decoration: none; color: var(--ink); }
a.icon-btn:hover { color: var(--bg); }
.qr-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.qr-chip:hover { background: var(--ink); color: var(--bg); }
.qr-chip.draft { border-style: dashed; }
.qr-chip.published { color: var(--ok); border-color: var(--ok); }
.qr-chip.published:hover { background: var(--ok); color: var(--bg); }
.qr-chip.revoked { color: var(--ink-2); border-color: var(--rule-soft); text-decoration: line-through; }
.badge.draft { color: var(--ink-2); border-style: dashed; }
.badge.revoked { color: var(--danger); }
.badge.warn { color: var(--danger); }
.badge.tiny { margin-left: 8px; padding: 1px 6px; font-size: 10px; }
.qr-cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.qr-side { display: grid; gap: 14px; }
.qr-side .field { margin: 0; }
.qr-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.qr-toolbar .page-no { font-weight: 800; letter-spacing: 0.08em; min-width: 72px; text-align: center; font-variant-numeric: tabular-nums; }
.qr-stage { position: relative; display: inline-block; max-width: 100%; border: 2px solid var(--rule); background: #fff; line-height: 0; user-select: none; touch-action: none; }
.qr-stage img { display: block; width: 100%; height: auto; max-width: 560px; }
.qr-drag { position: absolute; border: 2px dashed var(--accent); background: rgb(229 52 29 / 0.12); cursor: grab; display: grid; place-items: center; color: var(--accent); }
.qr-drag:active { cursor: grabbing; }
.qr-drag:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.qr-drag .ico { width: 55%; height: 55%; }
.qr-note { font-size: 13px; color: var(--ink-2); }
.qr-note.warn { color: var(--danger); font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; border-top: 2px solid var(--rule); }
.timeline li { display: flex; gap: 14px; padding: 8px 4px; border-bottom: 1px solid var(--rule-soft); font-size: 13px; flex-wrap: wrap; }
.timeline time { color: var(--ink-2); min-width: 150px; font-variant-numeric: tabular-nums; }
.timeline b { letter-spacing: 0.02em; }
.vtable td { vertical-align: top; }
.vtable .sub { margin-top: 2px; }
.section-title { margin: 22px 0 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
@media (max-width: 900px) { .qr-cols { grid-template-columns: minmax(0, 1fr); } }

.loading { padding: 40px 0; color: var(--ink-2); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 12px; }

/* ---------- modal ---------- */
dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0;
  background: var(--surface); color: var(--ink);
  border: 3px solid var(--rule); border-radius: 0; box-shadow: none;
}
dialog::backdrop { background: rgb(0 0 0 / 0.55); }
dialog .dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 14px 24px; border-bottom: 3px solid var(--rule); background: var(--accent); color: var(--accent-ink); }
dialog .dlg-head h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.1em; }
dialog .dlg-head .icon-btn { color: inherit; }
dialog .dlg-head .icon-btn:hover { background: var(--ink); color: var(--bg); }
/* The dialog itself never scrolls: header and footer stay put, the body takes what is left (and only scrolls if it must). */
dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog .dlg-head, dialog .dlg-foot { flex: none; }
dialog .dlg-body { flex: 1 1 auto; min-height: 0; padding: 24px; overflow-y: auto; }
/* History dialog: no scrolling of the body at all; the versions table and the activity list share the space. */
dialog .dlg-body.dlg-fit { display: flex; flex-direction: column; overflow: hidden; }
.dlg-fit > .fit-col { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.fit-col > * { flex: none; }
.fit-col > .table-wrap { flex: 0 1 auto; min-height: 96px; overflow-y: auto; }
.fit-col > .timeline { flex: 1 1 120px; min-height: 96px; max-height: none; }
dialog .dlg-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 16px 24px; border-top: 1px solid var(--rule-soft); }
dialog.confirm .dlg-head { background: var(--ink); color: var(--bg); }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 10px; z-index: 100; max-width: calc(100vw - 32px); }
.toast { padding: 14px 18px; background: var(--ink); color: var(--bg); border-left: 10px solid var(--ok); font-weight: 700; font-size: 14px; min-width: 240px; }
.toast.error { border-left-color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { min-height: 200px; padding: 20px 16px; }
  .wordmark { font-size: 64px; }
  .auth-art .bar { display: none; }
  .auth-panel { padding: 16px; }

  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 3px solid var(--rule); }
  .brand { padding: 16px; font-size: 28px; border-bottom: 0; }
  .nav { display: flex; flex: none; overflow-x: auto; overflow-y: hidden; padding: 0; border-top: 3px solid var(--rule); }
  .nav a { border-left: 0; border-bottom: 6px solid transparent; padding: 12px 16px; white-space: nowrap; }
  .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
  .side-foot { border-top: 3px solid var(--rule); padding: 10px 16px; grid-template-columns: 1fr auto; align-items: center; }
  .side-foot .tools { margin-left: 0; }
  .main { padding: 24px 16px 48px; }
  .grid-2 { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 3px solid var(--rule); }
  .stat:last-child { border-bottom: 0; }
  .panel { padding: 20px 16px; }
}

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