/* Fortis styles ("Clarity"). Deployed automatically by GitHub Actions.
   Light grey page, white sidebar and cards with soft shadows, coloured headline tiles, charts on the dashboard.
   Colour:  ink #1a2233 · muted #5b6678 · page #f3f6fa · card #ffffff · rule #e6ebf2 · blue #1e6fd9 · green #0f8a66
            teal #0b7f8a · violet #6a4bd8 · amber #f2a33a · orange #e8804c · red #c7372e
   Type:    Plus Jakarta Sans (all text, tabular figures) · IBM Plex Mono (codes and references) */

@font-face { font-family: "Jakarta"; src: url("fonts/jakarta-var.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("fonts/jakarta-var-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #1a2233; --muted: #5b6678; --page: #f3f6fa; --sheet: #ffffff; --rule: #e6ebf2; --rule-strong: #cfd7e3; --zebra: #f7f9fc;
  --blue: #1e6fd9; --blue-ink: #ffffff; --blue-soft: #e9f1fc; --green: #0f8a66; --teal: #0b7f8a; --violet: #6a4bd8;
  --amber: #b26a00; --orange: #e8804c; --red: #c7372e; --red-soft: #fdecea; --ok: #0f7a5a;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --text: "Jakarta", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--text);
  --mono: "Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  /* names used by older screens */
  --folio: var(--page); --bg: var(--page); --surface: var(--sheet); --line: var(--rule); --accent: var(--blue); --accent-ink: var(--blue-ink);
  --bottle: var(--blue); --bottle-ink: var(--blue-ink); --bottle-soft: var(--blue-soft); --pencil: var(--red); --danger: var(--red); --row: var(--zebra);
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e6ebf3; --muted: #9aa6b8; --page: #0f141c; --sheet: #171e29; --rule: #263142; --rule-strong: #34425a; --zebra: #1b2330;
    --blue: #5b9cf0; --blue-ink: #0b1220; --blue-soft: #1a2a42; --red: #ff8a7f; --red-soft: #3a1f1d; --ok: #5fcf9f; --amber: #f2b350;
    --shadow: none; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.55 var(--text); font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { margin: 0 0 12px; line-height: 1.2; font-family: var(--display); letter-spacing: -.01em; }
h2 { font-size: 1.6rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }
h4 { font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 16px; }
a { color: var(--blue); text-underline-offset: 3px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .9em; word-break: break-all; }
.error { color: var(--red); min-height: 1.2em; margin: 8px 0 0; }
.ok { color: var(--ok); }
.neg { color: var(--red); }
::selection { background: var(--blue-soft); }

/* ---- Wordmark: a blue square with L, then the name ---- */
.wordmark { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; line-height: 1; }
.wordmark::before { content: "F"; width: 34px; height: 34px; border-radius: 10px; background: var(--blue); color: #fff;
  display: grid; place-items: center; font-size: 1rem; }

/* ---- Sign in ---- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--page); }
.card.auth-card { width: 100%; max-width: 420px; padding: 32px 28px 24px; }
.auth-card .wordmark { margin-bottom: 22px; }
.auth-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 18px; }
.secret { font-family: var(--mono); font-size: 1.05rem; letter-spacing: .1em; background: var(--zebra);
  border: 1px solid var(--rule); padding: 10px; border-radius: var(--radius-sm); word-break: break-all; }

/* ---- Shell: white sidebar + page ---- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.binder { background: var(--sheet); border-right: 1px solid var(--rule); padding: 22px 14px 24px; position: sticky; top: 0;
  height: 100vh; align-self: start; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; z-index: 5; }
.binder-mark { margin-left: 8px; }

.org { position: relative; }
.org-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px;
  background: var(--zebra); border: 1px solid var(--rule); color: var(--ink); text-align: left; }
.org-btn:hover { border-color: var(--rule-strong); }
.org-mark { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  font-weight: 800; font-size: 12px; letter-spacing: .02em; }
.org-mark.small-mark { width: 26px; height: 26px; border-radius: 7px; font-size: 11px; }
.org-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.org-eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
#org-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); }
.org-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--sheet); color: var(--ink);
  border-radius: 14px; border: 1px solid var(--rule); box-shadow: 0 16px 40px rgba(16, 24, 40, .16); padding: 8px; z-index: 20; min-width: 240px; }
.org-menu-head { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 4px 8px 6px; }
.org-menu ul { list-style: none; margin: 0; padding: 0; }
.org-item { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; border: 0; background: none;
  padding: 8px; border-radius: 10px; color: var(--ink); }
.org-item:hover { background: var(--zebra); }
.org-item.current { background: var(--blue-soft); font-weight: 700; }
.org-sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.org-manage { display: block; padding: 8px; margin-top: 6px; border-top: 1px solid var(--rule); font-size: 13.5px; }
.org-cell { display: flex; gap: 10px; align-items: center; }

#nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { margin: 14px 0 4px 14px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.nav-group:first-child { margin-top: 0; }
#nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 14px; border-radius: 12px; color: #46526a;
  text-decoration: none; font-weight: 600; }
#nav a svg, .tabbar svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#nav a:hover { background: var(--zebra); color: var(--ink); }
#nav a.active { background: var(--blue-soft); color: var(--blue); }
@media (prefers-color-scheme: dark) { #nav a { color: var(--muted); } }

.page { min-width: 0; display: flex; flex-direction: column; }
.strip { display: flex; align-items: center; gap: 14px; padding: 14px 32px; border-bottom: 1px solid var(--rule);
  background: var(--sheet); position: sticky; top: 0; z-index: 4; }
.strip-org { font-weight: 700; font-size: .95rem; display: none; }
.strip-spacer { margin-left: auto; }
.menu-btn { display: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--sheet); display: grid; place-items: center; font-weight: 700; flex: none; }
main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 26px 32px 72px; }
.tabbar { display: none; }

/* ---- Surfaces and controls ---- */
.card { background: var(--sheet); border: 1px solid transparent; border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .card { border-color: var(--rule); } }
label { display: block; margin: 0 0 12px; font-weight: 600; font-size: 13.5px; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 12px; font: 400 15px/1.4 var(--text);
  color: var(--ink); background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); }
input[type="checkbox"] { display: inline-block; width: auto; margin: 0 6px 0 0; accent-color: var(--blue); }
.check-label { display: flex; align-items: center; font-weight: 500; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, .org-btn:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px; }
button { font: 700 14px/1.2 var(--text); min-height: 40px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--rule-strong);
  background: var(--sheet); color: var(--ink); cursor: pointer; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
button.primary:hover { filter: brightness(1.07); }
button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover { border-color: var(--rule-strong); }
button.danger { color: var(--red); }
button.small { min-height: 32px; padding: 5px 11px; font-size: 12.5px; }
button.wide { width: 100%; min-height: 46px; margin-top: 4px; }
button:disabled { opacity: .5; cursor: not-allowed; }
details summary { cursor: pointer; font-weight: 700; }
fieldset { border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px 4px; margin: 4px 0 12px; }
legend { font-weight: 700; font-size: 13.5px; padding: 0 6px; }
.terms-row { align-items: end; }
.req { color: var(--red); }
textarea { resize: vertical; }
.logo-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 12px; }
.logo-box { width: 180px; height: 80px; border: 1px dashed var(--rule-strong); border-radius: 12px; display: grid; place-items: center; background: var(--zebra); overflow: hidden; }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
input[type="color"] { height: 42px; padding: 4px; }
.terms-label { flex: 1 1 220px; font-size: 13.5px; padding-bottom: 20px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 160px; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar h2 { margin: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 20px; }
section + section { margin-top: 22px; }

/* Headline figures */
.stat { padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; margin-top: 6px; }
a.stat-link { text-decoration: none; color: inherit; display: block; transition: transform .15s, box-shadow .15s; }
a.stat-link:hover, a.stat-link:focus-visible { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(16, 24, 40, .1); }
a.stat-link .small { color: var(--blue); font-weight: 700; margin-top: 6px; }
/* Coloured headline tiles (dashboard) */
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 8px; min-height: 116px; padding: 18px 20px; border-radius: var(--radius); color: #fff;
  text-decoration: none; transition: transform .15s, box-shadow .15s; }
.tile:hover, .tile:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 24, 40, .16); }
.tile .l { font-weight: 600; font-size: 14px; opacity: .95; }
.tile .v { font-weight: 800; font-size: 1.55rem; letter-spacing: -.01em; }
.tile .s { font-size: 12.5px; opacity: .92; }
.tile-blue { background: #1e6fd9; } .tile-green { background: #0f8a66; } .tile-teal { background: #0b7f8a; }
.tile-violet { background: #6a4bd8; } .tile-ink { background: #2b3648; } .tile-orange { background: #c4561e; }
.dash { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.dash > .wide { flex: 3 1 560px; min-width: 0; }
.dash table th, .dash table td { padding-left: 10px; padding-right: 10px; }
.dash table th:first-child, .dash table td:first-child { padding-left: 22px; }
.dash table th:last-child, .dash table td:last-child { padding-right: 22px; }
.dash > .narrow { flex: 1 1 300px; min-width: 0; }
.dash h3 { font-size: 1.1rem; margin: 0; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 150px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.donut-legend li { display: flex; align-items: center; gap: 8px; }
.donut-legend li span:nth-child(2) { flex: 1; }
.sw { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.mini-stats > div { background: var(--zebra); border-radius: 12px; padding: 12px 14px; }
.mini-stats span { display: block; font-size: 12.5px; color: var(--muted); }
.mini-stats b { font-weight: 800; }
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--red-soft); color: var(--red); font-weight: 700; margin-bottom: 12px; }
.alert.okay { background: #e4f5ee; color: var(--ok); }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--blue); color: var(--blue-ink); text-decoration: none; font-weight: 700; }
.btn.block { display: flex; width: 100%; }
td.hot { background: #fbe4e1; color: #9c2a22; }
@media (prefers-color-scheme: dark) { td.hot { background: #3a1f1d; color: #ffb3aa; } }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; background: var(--sheet); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .table-wrap, .kpi .table-wrap { box-shadow: none; border-radius: 0; }
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 700; background: var(--sheet); white-space: nowrap; }
tbody tr:hover td { background: var(--zebra); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.mono { font-size: 13px; }
tfoot td { font-weight: 800; border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); }
table.report tfoot td { border-bottom: 1px solid var(--ink); }
tr.sub td { background: var(--zebra); font-size: 13px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--zebra);
  border: 1px solid var(--rule); color: var(--muted); white-space: nowrap; }
.tag.rev { color: var(--red); background: var(--red-soft); border-color: transparent; }

.lines td { padding: 4px; border-bottom: 0; }
.lines tbody tr:hover td { background: transparent; }
.lines input, .lines select { margin: 0; }
.totals { display: flex; gap: 24px; justify-content: flex-end; margin: 12px 0; font-variant-numeric: tabular-nums; }
.diff-bad { color: var(--red); font-weight: 800; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--page);
  padding: 11px 18px; border-radius: 12px; max-width: calc(100% - 32px); font-weight: 700; box-shadow: 0 10px 28px rgba(0, 0, 0, .2); z-index: 30; }

/* ---- Reports ---- */
.report-hub { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.report-list { list-style: none; padding: 0; margin: 0; }
.report-list li { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.report-list li:last-child { border-bottom: 0; }
.report-head { margin: 8px 0 14px; }
article > h2, .report-head h2 { font-size: 1.45rem; }
table.report td, table.report th { padding: 8px 14px; }
tr.row-total td { font-weight: 800; border-top: 1px solid var(--ink); }
/* Final totals (Gross profit, Net profit, Total assets...) keep the accountant's double rule; subtotals a single rule. */
table.grand tr.row-total td { border-bottom: 3px double var(--ink); border-top-width: 1px; }
table.grand tr.row-total + tr.row-total td { border-top: 0; }
tr.row-sub td { color: var(--muted); font-style: italic; }
tr.row-heading td { font-weight: 800; background: var(--zebra); }
table.report.aligned { table-layout: fixed; width: 100%; min-width: calc(220px + var(--figs, 1) * 110px); }
table.report.aligned td, table.report.aligned th { overflow-wrap: anywhere; }
table.report.listing { min-width: 760px; }
table.report.listing td:first-child, table.report.listing th:first-child { white-space: nowrap; overflow-wrap: normal; }
a.drill { color: var(--blue); text-decoration: none; }
a.drill:hover, a.drill:focus-visible { text-decoration: underline; }
tr.row-link:hover td { background: var(--blue-soft); }
.row-total a.drill, tfoot a.drill { color: inherit; text-decoration: underline dotted; }
.charts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-bottom: 16px; }
.chart-card { margin: 0; padding: 16px 18px; }
.chart-card figcaption { font-weight: 800; margin-bottom: 6px; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .grid { stroke: var(--rule); stroke-width: 1; }
svg.chart .zero { stroke: var(--rule-strong); stroke-width: 1; }
svg.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--text); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.notes { margin-top: 12px; }
.ok-box { border-left: 4px solid var(--blue); }
hr.page-break { border: 0; border-top: 2px dashed var(--rule-strong); margin: 30px 0; }
.mobile-only { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Traffic lights and scorecard */
.light { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  white-space: nowrap; text-transform: uppercase; letter-spacing: .05em; background: color-mix(in srgb, currentColor 12%, transparent); }
.light i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.light-green { color: var(--ok); } .light-amber { color: var(--amber); } .light-red { color: var(--red); } .light-grey { color: var(--muted); }
.kpi-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.kpi { border: 1px solid var(--rule); border-top-width: 4px; border-radius: 12px; padding: 12px 14px; background: var(--sheet); }
.kpi-green { border-top-color: var(--ok); } .kpi-amber { border-top-color: var(--amber); } .kpi-red { border-top-color: var(--red); } .kpi-grey { border-top-color: var(--rule-strong); }
.kpi-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 12.5px; color: var(--muted); text-align: right; font-weight: 600; }
.kpi-value { font-size: 1.5rem; font-weight: 800; margin: 8px 0 4px; }
table.kpi-inputs { width: 100%; font-size: 12px; margin: 6px 0 8px; border-collapse: collapse; }
table.kpi-inputs td { padding: 2px 0; border: 0; }
table.kpi-inputs tr:hover td { background: transparent; }
.checks .check, .check { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; }

/* Search box in the top bar */
.gsearch { flex: 1 1 280px; max-width: 460px; }
.gsearch input { margin: 0; min-height: 42px; padding: 0 16px; border-radius: 12px; border-color: transparent; background: var(--page); }

/* In-page tabs (Bank) */
nav.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 18px 0 16px; padding: 4px; background: var(--sheet); border-radius: 12px; box-shadow: var(--shadow); }
nav.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 700; border-radius: 9px; }
nav.tabs a:hover { color: var(--ink); background: var(--zebra); }
nav.tabs a.active { color: var(--blue); background: var(--blue-soft); }

/* ---- Small screens: sidebar slides in, bottom tab bar ---- */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .binder { position: fixed; inset: 0 auto 0 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; }
  body.binder-open .binder { transform: none; box-shadow: 0 0 0 100vmax rgba(10, 16, 24, .45); }
  .menu-btn { display: none; }
  .strip { padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  .strip-org { display: block; flex: 1; }
  .gsearch { order: 3; flex: 1 1 100%; max-width: none; }
  main { padding: 18px 16px 96px; }
  .lines { min-width: 640px; }
  h2 { font-size: 1.35rem; }
  .mobile-only { display: inline-block; }
  form.folded { display: none; }
  td a, td.mono { white-space: nowrap; }
  th.num { white-space: normal; min-width: 7.5em; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { min-height: 0; padding: 14px 16px; }
  .tile .v { font-size: 1.1rem; } .tile .s { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--sheet); border-top: 1px solid var(--rule);
    padding: 4px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px;
    color: var(--muted); text-decoration: none; font: 700 11px var(--text); background: none; border: 0; padding: 0; }
  .tabbar a.active { color: var(--blue); }
  #toast { bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media print {
  .binder, .strip, .tabbar, .no-print, #toast { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; }
  main { max-width: none; padding: 0; }
  .card, .table-wrap { border: 0; padding: 0; box-shadow: none; }
  hr.page-break { break-after: page; border: 0; }
  table { font-size: 11px; }
  .charts { break-inside: avoid; }
  a.drill { color: inherit; }
}
