/* ---- base ---------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { font: 400 var(--fs-14)/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--fs-20); font-weight: 600; }
h2 { font-size: var(--fs-16); font-weight: 600; }
h3 { font-size: var(--fs-13); font-weight: 600; }
a { color: var(--accent); text-underline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.small { font-size: var(--fs-12); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon.sm { width: 14px; height: 14px; }

/* ---- app bar (dark ledger header) ---------------------------------------------------------- */
.appbar { position: sticky; top: 0; z-index: 20; height: 52px; display: flex; align-items: stretch; gap: var(--s-5); padding: 0 var(--s-5);
  background: #1c1e20; color: #e9e7e2; border-bottom: 1px solid #000; }
:root[data-theme="dark"] .appbar { background: #0c0d0e; }
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; color: inherit; text-decoration: none; }
.wordmark .co { font-family: var(--mono); font-size: var(--fs-12); font-weight: 500; padding: 1px 6px; border: 1px solid #5a5e63; border-radius: var(--r-sm); color: #cfcdc7; }
.tabs { display: flex; align-items: stretch; gap: 2px; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 0 14px; color: #bdbab3; text-decoration: none; font-weight: 500; border-bottom: 3px solid transparent; border-top: 3px solid transparent; }
.tabs a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.tabs a[aria-current="page"] { color: #fff; border-bottom-color: #66b8ca; }
.tabs .n { font-family: var(--mono); font-size: var(--fs-12); color: #1c1e20; background: #e2b660; padding: 0 6px; border-radius: 999px; }
.appbar .right { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.sys { font-size: var(--fs-12); color: #bdbab3; display: flex; align-items: center; gap: 6px; padding: 0 var(--s-2); }
.sys::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #87c48f; }
.sys.bad { color: #f6b3a5; }
.sys.bad::before { background: #f0907b; }
.barbtn { height: 34px; min-width: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: var(--r); background: none; color: #d8d6d0; cursor: pointer; }
.barbtn:hover, .barbtn[aria-expanded="true"] { background: rgba(255, 255, 255, .08); color: #fff; }
.barbtn[aria-current="page"] { border-color: #5a5e63; color: #fff; }
.initials { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-12); font-weight: 600; background: #3a3e43; color: #e9e7e2; }

/* ---- page ---------------------------------------------------------------------------------- */
.page { padding: var(--s-5) var(--s-6) var(--s-7); display: flex; flex-direction: column; gap: var(--s-5); }
.page.fill { height: calc(100vh - 52px); padding-bottom: var(--s-5); overflow: hidden; }
.page-head { display: flex; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; }
.page-head .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.page-head .eyebrow { font-size: var(--fs-12); color: var(--muted); }
.page-head .tools { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.banner { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); background: var(--review-tint); border: 1px solid var(--review); border-radius: var(--r-2); }
.banner > .icon { color: var(--review); margin-top: 2px; }
.banner .actions { margin-left: auto; display: flex; gap: var(--s-2); }
.banner.warn { background: var(--warn-tint); border-color: var(--warn); }
.banner.warn > .icon { color: var(--warn); }

/* ---- controls ------------------------------------------------------------------------------ */
.btn { height: 34px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--r);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.quiet { border-color: transparent; background: none; color: var(--ink-2); }
.btn.quiet:hover { background: var(--surface-3); color: var(--ink); }
.btn.sm { height: 28px; padding: 0 10px; font-size: var(--fs-13); }
.btn.sq { width: 34px; padding: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.key { font: 500 var(--fs-11)/1 var(--mono); padding: 2px 4px; border: 1px solid currentColor; opacity: .7; }
.week { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); background: var(--surface); height: 34px; border-radius: var(--r); overflow: hidden; }
.week button { width: 34px; border: 0; background: none; cursor: pointer; color: var(--ink-2); }
.week button:hover { background: var(--surface-3); }
.week .label { display: flex; align-items: center; padding: 0 var(--s-3); border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-weight: 600; white-space: nowrap; }
.seg-tabs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.seg-tabs button { height: 32px; padding: 0 12px; border: 0; border-right: 1px solid var(--line); background: none; color: var(--ink-2); cursor: pointer; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; }
.seg-tabs button:last-child { border-right: 0; }
.seg-tabs button:hover { background: var(--surface-3); color: var(--ink); }
.seg-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.seg-tabs .n { font-family: var(--mono); font-size: var(--fs-12); }
.field { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--muted); }
.field input { border: 0; outline: none; background: none; width: 220px; color: var(--ink); }
.field:focus-within { box-shadow: var(--focus); }
/* Focus inside a group that clips its corners (the week arrows, segmented buttons, the decision choices): drawn inside
   the control, so the group's overflow doesn't cut it off. A pressed (dark) one gets a light edge inside the ring. */
.week .wk-btn:focus-visible, .week button:focus-visible, .seg-tabs button:focus-visible, .seg-tabs a:focus-visible, .choices button:focus-visible { box-shadow: var(--focus-inset); }
.seg-tabs [aria-pressed="true"]:focus-visible, .seg-tabs [aria-current="page"]:focus-visible, .choices button[aria-pressed="true"]:focus-visible { box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 4px var(--surface); }

/* ---- sheets (surfaces) --------------------------------------------------------------------- */
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; }
.sheet-head { display: flex; align-items: center; gap: var(--s-3); padding: 10px var(--s-4); border-bottom: 1px solid var(--line); min-height: 48px; }
.sheet-head .tools { margin-left: auto; display: flex; gap: var(--s-2); align-items: center; }
.sheet-body { padding: var(--s-4); }

/* ---- the one number that matters (home) ---------------------------------------------------- */
.hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3) var(--s-6); align-items: end; padding: var(--s-5) var(--s-5) var(--s-4); }
.hero .big { font: 600 var(--fs-40)/1 var(--font); letter-spacing: -.02em; }
.hero .big small { font-size: var(--fs-16); font-weight: 500; color: var(--ink-2); letter-spacing: 0; margin-left: 8px; }
.hero .bar { height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-3); position: relative; }
.hero .bar > i { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.hero .bar-label { display: flex; justify-content: space-between; font-size: var(--fs-12); color: var(--ink-2); margin-bottom: 6px; }
.facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: var(--s-2); padding-top: var(--s-3); }
.facts > div { padding: 0 var(--s-5) 0 0; margin-right: var(--s-5); border-right: 1px solid var(--line); }
.facts > div:last-child { border-right: 0; }
.facts .k { font-size: var(--fs-12); color: var(--ink-2); }
.facts .v { font: 500 var(--fs-16)/1.3 var(--mono); }
.facts .v.sans { font-family: var(--font); }
.review-text { color: var(--review); font-weight: 600; }

/* ---- status marks (square + text, never colour alone) -------------------------------------- */
.mark { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; white-space: nowrap; }
.mark::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--line-strong); }
.mark.review { color: var(--review); } .mark.review::before { background: var(--review); }
.mark.ok { color: var(--ok); } .mark.ok::before { background: var(--ok); }
.mark.warn { color: var(--warn); } .mark.warn::before { background: var(--warn); }
.mark.info { color: var(--info); } .mark.info::before { background: var(--info); }
.mark.hollow::before { background: none; border: 1.5px solid currentColor; }
.mark.none { color: var(--muted); } .mark.none::before { display: none; }
.tag { display: inline-block; font: 500 var(--fs-11)/1 var(--mono); padding: 3px 6px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }

/* ---- ledger tables ------------------------------------------------------------------------- */
.scroll { overflow: auto; }
table.ledger { width: 100%; border-collapse: separate; border-spacing: 0; }
.ledger th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-12); font-weight: 600; text-align: left;
  padding: 0 var(--s-3); height: 34px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.ledger thead tr.groups th { height: 26px; top: 0; border-bottom: 1px solid var(--line); text-align: center; font-weight: 500; color: var(--muted); letter-spacing: .04em; font-size: var(--fs-11); text-transform: uppercase; }
.ledger thead tr.groups + tr th { top: 26px; }
.ledger th.g, .ledger td.g { border-left: 1px solid var(--line); }
.ledger th.r, .ledger td.r { text-align: right; }
.ledger th button.sort { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.ledger th button.sort:focus-visible { box-shadow: var(--focus-inset); }
.def { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; cursor: help; }
.ledger td { padding: 0 var(--s-3); height: var(--row-h); border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.ledger td.num { font-size: var(--fs-13); }
.ledger td.stack { padding-top: var(--stack-pad); padding-bottom: var(--stack-pad); line-height: var(--stack-lh); }
.ledger td .sub { display: block; font-size: var(--sub-fs); color: var(--muted); }
.ledger td.num .sub { font-family: var(--mono); }
.ledger tbody tr { cursor: pointer; }
.ledger tbody tr:hover td { background: var(--surface-2); }
.ledger tbody tr[aria-current="true"] td { background: var(--accent-tint); }
.ledger tbody tr[aria-current="true"] td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
/* A focused row has a ring of its own (drawn inside its cells, so the table's box doesn't clip it), so it reads apart
   from the selected one; the selected row keeps its tint and bar when focused too. */
.ledger tbody tr:focus-visible { outline: none; }
.ledger tbody tr:focus-visible td { background: var(--surface-2); box-shadow: inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.ledger tbody tr:focus-visible td:first-child { box-shadow: inset 2px 0 0 var(--accent), inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.ledger tbody tr:focus-visible td:last-child { box-shadow: inset -2px 0 0 var(--accent), inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.ledger tbody tr[aria-current="true"]:focus-visible td { background: var(--accent-tint); }
.ledger tbody tr[aria-current="true"]:focus-visible td:first-child { box-shadow: inset 4px 0 0 var(--accent), inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.ledger tbody tr.quiet td { color: var(--muted); font-size: var(--fs-13); height: var(--row-quiet-h); }
.ledger tbody tr:last-child td { border-bottom: 0; }
.ledger td.flag { background: var(--review-tint) !important; color: var(--review); font-weight: 600; }
.bar-inline { display: inline-flex; align-items: center; gap: 8px; }
.bar-inline .bar { width: 80px; height: 5px; border-radius: 3px; overflow: hidden; background: var(--surface-3); position: relative; }
.bar-inline .bar > i { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.bar-inline .bar.done > i { background: var(--ok); }
.pager { display: flex; align-items: center; gap: var(--s-2); padding: 8px var(--s-4); border-top: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-13); }
.pager .tools { margin-left: auto; display: flex; gap: 4px; }

/* ---- findings page ------------------------------------------------------------------------- */
.finding-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: var(--s-5); align-items: start; }
.finding-group h2 { display: flex; align-items: baseline; gap: var(--s-2); }
.finding-group h2 .n { font: 500 var(--fs-13) var(--mono); color: var(--muted); }
.finding-group > p { color: var(--ink-2); font-size: var(--fs-13); margin: 2px 0 var(--s-3); }
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s-4); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.items li .what { font-weight: 600; }
.items li .detail { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--fs-13); }
.items li a { font-size: var(--fs-13); white-space: nowrap; }

/* ---- tech week ----------------------------------------------------------------------------- */
.ledger-strip { display: flex; flex-wrap: wrap; align-items: stretch; }
.ledger-strip .m { padding: 10px var(--s-5); border-right: 1px solid var(--line); }
.ledger-strip .m .k { font-size: var(--fs-12); color: var(--ink-2); }
.ledger-strip .m .v { font: 500 var(--fs-16)/1.3 var(--mono); }
.ledger-strip .notes { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px var(--s-4); align-items: center; padding: 10px var(--s-4); font-size: var(--fs-13); color: var(--ink-2); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) clamp(440px, 42%, 700px); gap: var(--s-4); }
.page.fill .split { flex: 1; min-height: 0; }
.page.fill .split > .sheet { min-height: 0; overflow: auto; }
.daypanel { display: flex; flex-direction: column; overflow: hidden; }
.dp-head { display: flex; align-items: center; gap: var(--s-3); padding: 10px var(--s-4); border-bottom: 1px solid var(--line); }
.dp-head .tools { margin-left: auto; display: flex; gap: 2px; }
.dp-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.dp-sec { padding: var(--s-4); border-bottom: 1px solid var(--line); }
.dp-sec:last-child { border-bottom: 0; }
.dp-sec > h3 { display: flex; gap: var(--s-2); align-items: baseline; margin-bottom: var(--s-3); }
.dp-sec > h3 .n { font: 400 var(--fs-12) var(--mono); color: var(--muted); }
.verdict { padding: var(--s-4); border-bottom: 1px solid var(--line); }
.verdict.review { background: var(--review-tint); }
.verdict.ok { background: var(--ok-tint); }
.verdict .lead { font-size: var(--fs-16); font-weight: 500; line-height: 1.4; }
.verdict .lead + .lead { margin-top: 2px; }
.verdict .fine { margin-top: 6px; font-size: var(--fs-12); color: var(--ink-2); }
.figures { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.figures > div { padding: 10px var(--s-4); border-right: 1px solid var(--line); }
.figures > div:last-child { border-right: 0; }
.figures .k { font-size: var(--fs-12); color: var(--ink-2); }
.figures .v { font: 500 var(--fs-14)/1.4 var(--mono); }
.figures .v.flag { color: var(--review); font-weight: 600; }
.reason-grid { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px var(--s-3); }
.reason-grid dt { font-weight: 600; }
.reason-grid dd { margin: 0; }
.reason-grid .sev { grid-column: 1; }
.reason-grid .t { font-weight: 600; }
.reason-grid .min { font: 400 var(--fs-12) var(--mono); color: var(--muted); text-align: right; }
.reason-grid .d { grid-column: 2 / 4; color: var(--ink-2); font-size: var(--fs-13); padding-bottom: 6px; border-bottom: 1px dotted var(--line); }
details.fold > summary { cursor: pointer; list-style: none; color: var(--ink-2); font-size: var(--fs-13); display: inline-flex; gap: 6px; align-items: center; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .chev, details.entry > summary .chev { transition: transform .12s; }
details.fold[open] > summary .chev, details.entry[open] > summary .chev { transform: rotate(90deg); }
.entries { border-top: 1px solid var(--line); }
details.entry { border-bottom: 1px solid var(--line); }
details.entry > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 14px 98px minmax(0, 1fr) auto; gap: 2px var(--s-3); align-items: center; padding: 8px 2px; }
details.entry > summary::-webkit-details-marker { display: none; }
details.entry > summary:hover { background: var(--surface-2); }
details.entry .wo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.entry .why { grid-column: 3 / 5; color: var(--ink-2); font-size: var(--fs-13); white-space: normal; }
details.entry .stops { padding: 0 0 10px 30px; }
table.mini { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
.mini td { padding: 4px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.mini td.num { white-space: nowrap; text-align: right; font-size: var(--fs-12); }
.mini td.when { white-space: nowrap; color: var(--ink-2); font: 400 var(--fs-12) var(--mono); }

/* timeline */
.tl { display: flex; flex-direction: column; gap: 5px; }
.tl .lane { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: var(--s-2); }
.tl .lane > span { font-size: var(--fs-12); color: var(--ink-2); }
.tl .track { position: relative; height: 22px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); }
.tl .seg { position: absolute; top: -1px; height: 22px; border-radius: 3px; color: #fff; font: 500 var(--fs-11)/22px var(--font); padding: 0 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 3px; border: 0; cursor: default; }
.tl .seg:focus-visible { box-shadow: var(--focus); z-index: 2; }
.tl .seg.site { background: var(--seg-site); } .tl .seg.customer { background: var(--seg-customer); } .tl .seg.supply { background: var(--seg-supply); }
.tl .seg.other { background: var(--seg-other); } .tl .seg.home { background: var(--seg-home); } .tl .seg.entry { background: var(--seg-entry); }
.tl .seg.gps { background: var(--seg-gps); color: var(--seg-gps-text); border: 1px solid var(--seg-gps-line); line-height: 20px; }
.tl .axis { position: relative; height: 16px; margin-left: 80px; }
.tl .axis span { position: absolute; transform: translateX(-50%); font: 400 var(--fs-11) var(--mono); color: var(--muted); }
.tl .legend { display: flex; flex-wrap: wrap; gap: 4px var(--s-4); font-size: var(--fs-12); color: var(--ink-2); }
.tl .legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* decision */
.decide { border-top: 1px solid var(--line-strong); background: var(--surface-2); padding: var(--s-3) var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); }
.decide .row { display: flex; gap: var(--s-2); align-items: center; }
.choices { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.choices button { height: 32px; padding: 0 12px; border: 0; border-right: 1px solid var(--line); background: none; color: var(--ink-2); cursor: pointer; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; }
.choices button:last-child { border-right: 0; }
.choices button:hover { background: var(--surface-3); color: var(--ink); }
.choices button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.decide input[type="text"] { flex: 1; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); }
.decide .meta { font-size: var(--fs-12); color: var(--muted); display: flex; gap: var(--s-3); }

/* settings */
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.subnav { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.subnav a { padding: 7px 14px; color: var(--ink-2); text-decoration: none; font-weight: 500; margin-left: -1px; border-left: 2px solid transparent; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="page"] { color: var(--ink); border-left-color: var(--accent); font-weight: 600; }
.kv { display: grid; grid-template-columns: 220px 1fr; }
.kv > div { padding: 12px var(--s-4); border-bottom: 1px solid var(--line); }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.kv .k { color: var(--ink-2); }
.switch { display: inline-block; width: 30px; height: 16px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong); position: relative; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on::after { left: 16px; background: var(--accent-ink); }

/* overlays and states */
.empty { padding: var(--s-7) var(--s-5); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); max-width: 560px; }
.empty .lead { font-size: var(--fs-20); font-weight: 600; }
.empty p { color: var(--ink-2); }
.sk { display: block; height: 10px; border-radius: var(--r-sm); background: var(--surface-3); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.toast { position: fixed; bottom: var(--s-5); left: 50%; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: var(--s-4);
  background: var(--ink); color: var(--surface); padding: 10px 12px 10px 16px; border-radius: var(--r-2); font-weight: 500; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.toast button { background: none; border: 0; color: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.popover { position: fixed; z-index: 40; max-width: 300px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 10px 12px;
  font-size: var(--fs-13); color: var(--ink); box-shadow: 0 4px 14px rgba(0, 0, 0, .14); }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 240px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: var(--r-2); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); padding: 4px; }
.menu .label { padding: 8px 10px 4px; font-size: var(--fs-12); color: var(--muted); }
.menu button { width: 100%; display: flex; gap: var(--s-2); align-items: center; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; cursor: pointer; text-align: left; color: var(--ink); }
.menu button:hover:not([disabled]) { background: var(--surface-3); }
.menu button[aria-checked="true"]::after { content: "\2713"; margin-left: auto; color: var(--accent); }
.menu button[disabled] { color: var(--muted); cursor: not-allowed; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.anchor { position: relative; display: flex; align-items: center; }

@media (max-width: 1280px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .page.fill { height: auto; overflow: visible; }
  .page { padding: var(--s-4); }
}
