@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-display: swap; src: url("../fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --navy: #0B124A;
  --navy-2: #1A2366;
  --lime: #7CA510;
  --lime-soft: #EEF5DC;
  --page: #F5F6F8;
  --surface: #FFFFFF;
  --ink: #1B2033;
  --muted: #5B6275;
  --rule: #E2E5EC;
  --amber: #B7791F;
  --amber-soft: #FBF1E0;
  --red: #B42318;
  --red-soft: #FDECEA;
  --radius-s: 6px;
  --radius-m: 10px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5; font-variant-numeric: tabular-nums;
}
a { color: var(--navy-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 3px; }
h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; color: var(--navy); margin: 0; }
h2 { font-size: 1.1rem; font-weight: 600; color: var(--navy); margin: 0 0 var(--s3); }
h3 { font-size: 0.95rem; font-weight: 600; margin: 0 0 var(--s2); }
p { margin: 0 0 var(--s3); max-width: 72ch; }
.muted { color: var(--muted); }
.small { font-size: 0.87rem; }
.num { text-align: right; white-space: nowrap; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--navy) 236px, var(--page) 236px); }
.side {
  background: var(--navy); color: #C9CDE3; padding: var(--s5) var(--s4);
  display: flex; flex-direction: column; gap: var(--s5); position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: var(--s3); color: #fff; text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand strong { display: block; font-size: 0.98rem; line-height: 1.2; }
.brand span { font-size: 0.8rem; color: #9BA1C4; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  color: #C9CDE3; text-decoration: none; padding: 7px 10px; border-radius: var(--radius-s);
  display: flex; justify-content: space-between; align-items: center; font-size: 0.95rem;
}
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav a.on { background: #fff; color: var(--navy); font-weight: 600; }
.nav .group { font-size: 0.8rem; color: #8187AE; margin: var(--s4) 10px var(--s1); }
.badge { background: var(--amber); color: #fff; border-radius: 999px; font-size: 0.75rem; padding: 1px 8px; font-weight: 600; }
.nav a.on .badge { background: var(--amber); }
.side-foot { margin-top: auto; font-size: 0.85rem; }
.side-foot form { margin: var(--s2) 0 0; }
.linkbtn { background: none; border: 0; color: #C9CDE3; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }

.main { padding: var(--s6) var(--s7) var(--s7); max-width: 1320px; width: 100%; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.head p { margin: var(--s1) 0 0; color: var(--muted); }
.section { margin-top: var(--s6); }

/* ---------- status line ---------- */
.status { display: flex; gap: var(--s5); flex-wrap: wrap; font-size: 0.9rem; color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--rule); }
.dot.ok { background: var(--lime); }
.dot.warn { background: var(--amber); }
.dot.bad { background: var(--red); }

/* ---------- notices ---------- */
.notice { border-left: 3px solid var(--amber); background: var(--amber-soft); padding: var(--s3) var(--s4); border-radius: 0 var(--radius-s) var(--radius-s) 0; margin-bottom: var(--s4); }
.notice.info { border-color: var(--navy-2); background: #EDEFF8; }
.notice.error { border-color: var(--red); background: var(--red-soft); }
.notice.ok { border-color: var(--lime); background: var(--lime-soft); }
.notice p { margin: 0; }
.flashes { margin-bottom: var(--s4); }

/* ---------- journey strip (signature) ---------- */
.journey {
  display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius-m); position: relative; overflow: hidden;
}
.stage { padding: var(--s5) var(--s5) var(--s4); position: relative; text-decoration: none; color: inherit; }
.stage + .stage { border-left: 1px solid var(--rule); }
.stage::after {
  content: ""; position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; background: var(--surface);
  border-top: 1px solid var(--rule); border-right: 1px solid var(--rule); transform: translateY(-50%) rotate(45deg); z-index: 1;
}
.stage:last-child::after { display: none; }
.stage .label { font-size: 0.88rem; color: var(--muted); }
.stage .count { font-size: 2.4rem; font-weight: 600; line-height: 1.1; color: var(--navy); margin: 2px 0; }
.stage .hint { font-size: 0.82rem; color: var(--muted); }
.stage.live .count { color: var(--lime); }
.stage:hover { background: #FAFBFC; }
.branch {
  display: flex; align-items: center; gap: var(--s3); margin: var(--s3) 0 0 calc(40% + 4px);
  font-size: 0.92rem;
}
.branch .elbow { width: 22px; height: 18px; border-left: 2px solid var(--amber); border-bottom: 2px solid var(--amber); border-bottom-left-radius: 8px; margin-top: -14px; }
.branch a { color: var(--amber); font-weight: 600; text-decoration: none; }
.branch a:hover { text-decoration: underline; }
.facts { display: flex; gap: var(--s6); flex-wrap: wrap; margin-top: var(--s5); }
.fact .v { font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.fact .k { font-size: 0.85rem; color: var(--muted); }

/* ---------- panels, grids ---------- */
.two { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--s5); }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: var(--s5); }
.panel.flush { padding: 0; }
.panel.flush h2 { padding: var(--s4) var(--s5) 0; }
.chart-box { position: relative; height: 240px; }
.chart-box.tall { height: 320px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.84rem; padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FAFBFC; }
td .sub { display: block; color: var(--muted); font-size: 0.84rem; }
.panel table th:first-child, .panel table td:first-child { padding-left: var(--s5); }
.panel table th:last-child, .panel table td:last-child { padding-right: var(--s5); }

.meter { height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; min-width: 90px; }
.meter span { display: block; height: 100%; background: var(--lime); }
.meter.warn span { background: var(--amber); }
.meter.bad span { background: var(--red); }

/* ---------- pills ---------- */
.pill { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #EDEFF5; color: var(--muted); white-space: nowrap; }
.pill.sent, .pill.ok { background: var(--lime-soft); color: #4D6A07; }
.pill.held_review, .pill.warn { background: var(--amber-soft); color: #8A5A12; }
.pill.queued, .pill.held_reference, .pill.in_batch, .pill.ready_to_send { background: #EDEFF8; color: var(--navy-2); }
.pill.replied, .pill.suppressed { background: #F1F2F5; color: var(--muted); }
.pill.bad, .pill.failed { background: var(--red-soft); color: var(--red); }

/* ---------- forms ---------- */
form.stack { display: grid; gap: var(--s4); max-width: 640px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s4); align-items: end; }
.nowrap { white-space: nowrap; }
label { display: grid; gap: 4px; font-size: 0.9rem; font-weight: 500; }
label .help { font-weight: 400; color: var(--muted); font-size: 0.84rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea, input[type=file] {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #CDD2DC; border-radius: var(--radius-s); padding: 8px 10px; width: 100%;
}
textarea { min-height: 60vh; font-size: 0.88rem; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--navy-2); outline: none; box-shadow: 0 0 0 3px rgba(26,35,102,0.12); }
.check { display: flex; gap: var(--s2); align-items: center; font-weight: 400; }
.check input { width: auto; }
.btn {
  font: inherit; font-weight: 600; border-radius: var(--radius-s); padding: 8px 14px; cursor: pointer;
  border: 1px solid var(--navy); background: var(--navy); color: #fff; text-decoration: none; display: inline-block; white-space: nowrap;
}
.btn:hover { background: var(--navy-2); color: #fff; }
.btn.quiet { background: #fff; color: var(--navy); border-color: #CDD2DC; }
.btn.quiet:hover { border-color: var(--navy); background: #fff; color: var(--navy); }
.btn.danger { background: #fff; color: var(--red); border-color: #F0B8B2; }
.btn.danger:hover { background: var(--red-soft); color: var(--red); }
.btn.small { padding: 4px 10px; font-size: 0.85rem; }
.actions { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.filters { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: end; margin-bottom: var(--s4); }
.filters label { min-width: 160px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: var(--s4); flex-wrap: wrap; }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--navy); border-color: var(--navy); font-weight: 600; }
.code { background: #EDEFF5; padding: 2px 6px; border-radius: 4px; font-size: 0.9rem; }
details summary { cursor: pointer; color: var(--navy-2); }
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px var(--s4); margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 0 0 var(--s3) var(--s4); border-left: 2px solid var(--rule); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.timeline li.done::before { background: var(--lime); }
.empty { padding: var(--s6); text-align: center; color: var(--muted); }
.empty p { margin: 0 auto var(--s3); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login .art { background: var(--navy); color: #fff; padding: var(--s7); display: flex; flex-direction: column; justify-content: space-between; }
.login .art img { width: 64px; }
.login .art h1 { color: #fff; font-size: 2.2rem; max-width: 16ch; margin-bottom: var(--s3); }
.login .art p { color: #B9BEDC; }
.login .form { display: grid; place-items: center; padding: var(--s6); }
.login form { width: min(360px, 100%); }

@media (max-width: 1000px) {
  .two { grid-template-columns: 1fr; }
  .journey { grid-template-columns: repeat(2, 1fr); }
  .stage::after { display: none; }
  .stage + .stage { border-left: 0; border-top: 1px solid var(--rule); }
  .branch { margin-left: 0; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; background: var(--page); }
  .side { position: static; height: auto; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav .group { display: none; }
  .main { padding: var(--s5) var(--s4); }
  .login { grid-template-columns: 1fr; }
  .login .art { padding: var(--s5); }
  dl.kv { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- v2 additions ---------- */
.side-search input {
  background: var(--navy-2); border: 1px solid #2B3580; color: #fff; padding: 7px 10px; font-size: 0.9rem;
}
.side-search input::placeholder { color: #8C92BA; }
.side-search input:focus { border-color: var(--lime); box-shadow: none; }
.badge.quiet { background: var(--navy-2); color: #fff; border: 1px solid #3B4592; }
.nav a.on .badge.quiet { background: var(--amber); border-color: var(--amber); }
.btn[disabled], .btn[disabled]:hover { opacity: 0.45; cursor: not-allowed; background: var(--navy); }
.btn.quiet[disabled], .btn.quiet[disabled]:hover { background: #fff; color: var(--navy); }

.attention { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: var(--s4) var(--s5); margin-bottom: var(--s5); }
.attention h2 { margin-bottom: var(--s2); }
.attention ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.attention li a { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: var(--s4); padding: 8px 12px; border-left: 3px solid var(--amber); text-decoration: none; color: var(--ink); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.attention li.bad a { border-color: var(--red); }
.attention li.info a { border-color: var(--navy-2); }
.attention li a:hover { background: #FAFBFC; }
.attention li span { color: var(--muted); font-size: 0.9rem; }

.range-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); margin-bottom: var(--s3); flex-wrap: wrap; }
.range-head h2 { margin: 0; }
.segmented { display: inline-flex; border: 1px solid #CDD2DC; border-radius: var(--radius-s); overflow: hidden; background: #fff; }
.segmented a { padding: 6px 12px; font-size: 0.88rem; text-decoration: none; color: var(--muted); }
.segmented a + a { border-left: 1px solid #CDD2DC; }
.segmented a.on { background: var(--navy); color: #fff; }

.facts.ledger { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); margin-top: 0; }
.facts.ledger .fact { padding: var(--s4) var(--s5); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.facts.ledger .fact:nth-child(4n) { border-right: 0; }
.facts.ledger .fact:nth-last-child(-n+4) { border-bottom: 0; }
.fact .of { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; padding-right: var(--s5); }
.panel-head h2 { padding-bottom: var(--s3); }

.check-col { width: 36px; padding-right: 0 !important; }
.check-col input { width: 16px; height: 16px; accent-color: var(--navy); }
.bulkbar { display: flex; align-items: center; gap: var(--s3); padding: 8px 12px; margin-bottom: var(--s3); border: 1px dashed #CDD2DC; border-radius: var(--radius-s); background: #fff; color: var(--muted); }
.bulkbar select { width: auto; min-width: 220px; padding: 5px 8px; }
.bulkbar.active { border-style: solid; border-color: var(--navy); color: var(--ink); background: #EDEFF8; }
.toggle-row { display: flex; justify-content: space-between; gap: var(--s2); align-items: center; margin-bottom: 6px; }
.toggle-row .linkbtn { color: var(--navy-2); }

.review-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); margin-bottom: var(--s4); flex-wrap: wrap; }
.review-head p { margin: 2px 0 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); align-items: start; }
.doc { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: var(--s3) var(--s4) var(--s4); position: sticky; top: var(--s4); max-height: calc(100vh - 32px); overflow: auto; }
.doc iframe { width: 100%; height: calc(100vh - 150px); min-height: 520px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: #F0F1F4; }
.doc-bar { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s2); }
.doc-tabs { margin-bottom: var(--s3); }
.doc table td, .doc table th { padding: 8px 6px; }
.doc table td:first-child, .doc table th:first-child { padding-left: 0; }
.doc table td:last-child, .doc table th:last-child { padding-right: 0; }
.doc tfoot td { border-top: 1px solid var(--navy); border-bottom: 0; }
.mark-input { width: 76px !important; text-align: right; padding: 5px 8px !important; }
.steps { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.steps li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 4px 0; border-bottom: 1px dotted var(--rule); }
.steps li small { grid-column: 1 / -1; color: var(--muted); }
.steps em { font-style: normal; font-size: 0.75rem; background: var(--lime-soft); color: #4D6A07; padding: 0 5px; border-radius: 4px; }
.marks-form label { font-weight: 500; }
.mail-preview { white-space: pre-wrap; font-family: inherit; font-size: 0.9rem; background: var(--page); border: 1px solid var(--rule); border-radius: var(--radius-s); padding: var(--s4); margin: 0; max-width: 70ch; }

@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .doc { position: static; max-height: none; }
  .facts.ledger { grid-template-columns: repeat(2, 1fr); }
  .facts.ledger .fact:nth-child(4n) { border-right: 1px solid var(--rule); }
  .facts.ledger .fact:nth-child(2n) { border-right: 0; }
  .facts.ledger .fact:nth-last-child(-n+4) { border-bottom: 1px solid var(--rule); }
  .facts.ledger .fact:nth-last-child(-n+2) { border-bottom: 0; }
  .attention li a { grid-template-columns: 1fr; gap: 2px; }
}
@media print {
  .side, .actions, .bulkbar, .filters, .tabs, .segmented { display: none !important; }
  .shell { display: block; background: none; }
  .main { padding: 0; }
  .panel, .journey, .facts.ledger { break-inside: avoid; }
}

/* grid and flex children must be allowed to shrink so wide tables scroll inside their panel */
.two > *, .split > *, .panel, .doc, .journey > *, .facts.ledger > * { min-width: 0; }
.table-wrap { max-width: 100%; }
@media (max-width: 760px) {
  .head { align-items: flex-start; }
  .journey { grid-template-columns: 1fr; }
  .facts.ledger { grid-template-columns: 1fr 1fr; }
  .filters label, .bulkbar select { min-width: 0; width: 100%; }
  .bulkbar { flex-wrap: wrap; }
  .panel table th:first-child, .panel table td:first-child { padding-left: var(--s3); }
  .panel table th:last-child, .panel table td:last-child { padding-right: var(--s3); }
  .panel { padding: var(--s4); }
  .panel.flush { padding: 0; }
  .side { gap: var(--s3); padding: var(--s3); }
  .side-foot { display: none; }
  .doc iframe { height: 70vh; min-height: 360px; }
  .attention li a { padding: 8px; }
}

.pages { height: calc(100vh - 150px); min-height: 520px; overflow-y: auto; background: #E9EBF0; border-radius: var(--radius-s); padding: var(--s3); display: grid; gap: var(--s3); align-content: start; }
.pages figure { margin: 0; }
.pages img { width: 100%; display: block; background: #fff; border-radius: 4px; box-shadow: 0 1px 2px rgba(11, 18, 74, 0.12); }
.pages figcaption { font-size: 0.78rem; color: var(--muted); text-align: center; margin-top: 4px; }
@media (max-width: 760px) { .pages { height: 70vh; min-height: 360px; } }

.menu-toggle { display: none; }
.side-menu { display: flex; flex-direction: column; gap: var(--s5); }
@media (max-width: 760px) {
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .side-menu { display: none; width: 100%; gap: var(--s3); }
  .side.open .side-menu { display: flex; }
  .menu-toggle { display: inline-block; background: var(--navy-2); color: #fff; border: 1px solid #3B4592; border-radius: var(--radius-s); padding: 6px 12px; font: inherit; font-weight: 600; }
  .brand img { width: 32px; height: 32px; }
}

/* ---------- v3 polish ---------- */
.nav a { position: relative; transition: background-color .12s ease; }
.nav a.on::before { content: ""; position: absolute; left: -16px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--lime); }
.panel, .journey, .attention, .facts.ledger { box-shadow: 0 1px 0 rgba(11, 18, 74, 0.03); }
h1 { font-size: 1.9rem; }
.eyebrow-date { margin: 0 0 2px; color: var(--muted); font-size: 0.9rem; }
.delta { font-size: 0.78rem; font-weight: 600; padding: 1px 6px; border-radius: 999px; vertical-align: 3px; background: #EEF0F4; color: var(--muted); }
.delta.up { background: var(--lime-soft); color: #4D6A07; }
.delta.down { background: var(--amber-soft); color: #8A5A12; }
.delta.up::before { content: "▲ "; font-size: 0.6rem; }
.delta.down::before { content: "▼ "; font-size: 0.6rem; }

.toasts { position: fixed; top: 16px; right: 16px; z-index: 50; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--rule); border-left: 4px solid var(--lime);
  border-radius: var(--radius-s); padding: 10px 12px; box-shadow: 0 6px 24px rgba(11, 18, 74, 0.14); animation: toast-in .2s ease-out; }
.toast.error { border-left-color: var(--red); }
.toast p { margin: 0; flex: 1; font-size: 0.92rem; }
.toast-close { background: none; border: 0; font-size: 1.2rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 2px; }
.toast.leaving { opacity: 0; transform: translateY(-6px); transition: all .35s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-color: #fff #fff transparent transparent; animation: spin .7s linear infinite; }
.btn.quiet.busy::after { border-color: var(--navy) var(--navy) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--navy); }
th.sortable::after { content: " ↕"; opacity: 0.35; font-size: 0.75rem; }
th[aria-sort="ascending"]::after { content: " ↑"; opacity: 1; }
th[aria-sort="descending"]::after { content: " ↓"; opacity: 1; }
.panel.flush thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }

.note { border-left: 2px solid var(--rule); padding: 2px 0 2px 10px; margin: 0 0 10px; }
.note p { margin: 2px 0 0; white-space: pre-wrap; }
.note-meta { font-size: 0.82rem; color: var(--muted); }
kbd { font-family: inherit; font-size: 0.75rem; border: 1px solid #CDD2DC; border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: #fff; }
.kbd-hint { margin-right: 8px; }

.error-page { max-width: 520px; margin: 12vh auto; padding: 0 24px; }
.error-page img { margin-bottom: 16px; }
.error-page h1 { margin-bottom: 8px; }
@media (max-width: 760px) { .kbd-hint { display: none; } .toasts { top: 8px; right: 8px; } }
@media (prefers-reduced-motion: reduce) { .btn.busy::after { animation: none; } }
