/* Components for the File Fixers pages. Colours, type and spacing come from tokens.css.
   No inline styles anywhere: the page security policy forbids them. */
@import url("tokens.css");

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-body)/1.55 var(--text); font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: var(--t-h1); margin: 0 0 var(--s3); }
h2 { font-size: var(--t-h2); margin: 0 0 var(--s3); }
h3 { font-size: var(--t-h3); margin: 0 0 var(--s2); }
a { color: inherit; text-decoration-color: var(--hl); text-decoration-thickness: 3px; text-underline-offset: 3px; }
button, select, input { font: inherit; color: inherit; }
b, strong { font-weight: 700; }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* the highlighter swipe: only ever behind something fixed, current or worth a look */
.mk, mark { background: var(--hl); color: var(--hl-ink); padding: 0 .22em; border-radius: 2px 7px 3px 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: var(--s5); padding-top: var(--s3); padding-bottom: var(--s3); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 21px/1 var(--display); letter-spacing: -.015em; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-mark .mk-hl { fill: var(--hl); }
.brand-mark .mk-tick { fill: none; stroke: var(--hl-ink); stroke-width: 3.4; stroke-linecap: square; }
.nav { display: flex; gap: var(--s1); flex-wrap: wrap; }
.nav a { padding: var(--s2) 10px; border-radius: var(--r-s); color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; }
.nav a:hover { color: var(--ink); background: var(--tint); }
.nav a[aria-current="page"] { color: var(--hl-ink); background: var(--hl); border-radius: 2px 9px 3px 8px; }
.private-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-small); font-weight: 600; color: var(--ok); }
.private-pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- hero ---------- */
.hero { padding: var(--s6) 0 var(--s2); }
.hero.split { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: var(--s7); align-items: start; padding-top: var(--s7); padding-bottom: var(--s5); }
.hero-copy { min-width: 0; }
.lede { color: var(--muted); font-size: var(--t-lede); margin: 0 0 var(--s5); max-width: 54ch; }
.hero-tight { padding-top: var(--s1); }

/* the drop zone is the one big highlighted thing on the page */
.drop { background: var(--hl); color: var(--hl-ink); border-radius: var(--r-l); padding: var(--s6) var(--s5); text-align: left; outline: 2px dashed var(--hl-ink); outline-offset: -9px; cursor: pointer; transition: outline-offset .16s ease; }
.drop.over { outline-style: solid; outline-offset: -4px; }
.drop:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.drop-icon { display: none; }
.drop-title { font: 700 var(--t-h2)/1.15 var(--display); margin: 0 0 var(--s1); }
.drop-sub { margin: 0 0 var(--s4); font-size: 15px; max-width: 52ch; }
.drop-links { margin: var(--s3) 0 0; font-size: 14px; }
.drop .btn { background: var(--hl-ink); color: #fff; border-color: var(--hl-ink); }
.drop .btn.secondary { background: transparent; color: var(--hl-ink); }
.drop .linkbtn { color: var(--hl-ink); font-weight: 700; }
.drop + .drop { margin-top: var(--s3); }
.drop-small { background: var(--tint); color: var(--ink); padding: var(--s5); outline-color: var(--line); }
.drop-small .drop-title { font-size: var(--t-h3); }
.drop-small .btn.secondary { color: var(--ink); border-color: var(--ink); }
/* two files needed (fuel and miles): one highlighted field holding two paper slots */
.drop-pair { display: grid; gap: var(--s2); background: var(--hl); padding: var(--s2); border-radius: var(--r-l); }
.drop-pair .drop { background: var(--bg); color: var(--ink); outline-color: var(--line); padding: var(--s5) var(--s4); border-radius: var(--r-m); }
.drop-pair .drop.over { outline-color: var(--ink); }
.drop-pair .drop + .drop { margin-top: 0; }
.drop-pair .drop-title { font-size: 20px; }
.drop-pair .drop .btn { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.drop-pair .drop .linkbtn { color: var(--ink); }
.quarter-row { margin: 0 0 var(--s3); }
.quarter-row label { font-weight: 700; }
.drop-note { margin: var(--s3) 0 0; }
.after-drop { margin-top: var(--s4); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); background: var(--btn); color: var(--btn-ink); border: 2px solid var(--btn); border-radius: var(--r-s); padding: 10px 20px; min-height: 48px; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.18); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.big { width: 100%; font-size: 17px; min-height: 54px; }
.btn.small { padding: 6px 14px; min-height: 40px; font-size: 14px; }
.btn.gap { margin-top: var(--s3); }
/* text buttons keep a finger-sized hit area (about 44px) without spreading the lines apart */
.linkbtn { display: inline-block; background: none; border: 0; padding: 11px 3px; margin: -7px 0; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; font-size: inherit; line-height: 1.4; }

/* ---------- before and after, from the sample files ---------- */
.demo { margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); overflow: hidden; }
.demo-cap { padding: var(--s3) var(--s4); font-size: var(--t-small); color: var(--muted); border-bottom: 1px solid var(--line); }
.demo-raw { background: var(--tint); padding: var(--s3) var(--s4); font: 12px/1.7 var(--raw); color: var(--muted); }
.demo-raw span { display: block; white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 1.4em; text-indent: -1.4em; }
.demo-label { margin: 0; padding: var(--s3) var(--s4) 0; font: 700 15px/1.3 var(--display); }
.demo table { font-size: var(--t-small); }
.demo th, .demo td { padding: 7px var(--s2); }
.demo th:first-child, .demo td:first-child { padding-left: var(--s4); }
.demo th:last-child, .demo td:last-child { padding-right: var(--s4); }
.demo td { overflow-wrap: break-word; }
.demo[data-demo="bank"] td:first-child { white-space: nowrap; }
.demo-proof { display: flex; gap: var(--s3); align-items: flex-start; margin: 0; padding: var(--s3) var(--s4) var(--s4); font-size: 14px; }
.demo-proof svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--ok); stroke-width: 3; }
.dbl { font-weight: 700; border-bottom: 4px double currentColor; white-space: nowrap; }

/* ---------- result sheets ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); margin: var(--s5) 0; overflow: hidden; }
.card-pad { padding: var(--s5); }
.card h2 { font-size: 20px; }

.verdict { display: flex; gap: var(--s4); align-items: flex-start; padding: var(--s5); }
.verdict .badge { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 22px/1 var(--text); flex: none; }
.verdict h2 { font-size: clamp(24px, 5vw, 32px); margin: 0 0 var(--s1); }
.verdict p { margin: 0; max-width: 70ch; }
.verdict.ok { background: var(--ok-wash); } .verdict.ok h2 { color: var(--ok); } .verdict.ok .badge { background: var(--ok); color: var(--bg); }
.verdict.warn { background: var(--sel-bg); } .verdict.warn .badge { background: var(--hl); color: var(--hl-ink); }
.verdict.bad { background: var(--bad-wash); } .verdict.bad h2 { color: var(--bad); } .verdict.bad .badge { background: var(--bad); color: var(--bg); }
@media (prefers-reduced-motion: no-preference) {
  .verdict .badge { animation: land .38s cubic-bezier(.2, 1.5, .4, 1) both; }
  @keyframes land { from { transform: scale(1.7) rotate(-14deg); opacity: 0; } to { transform: none; opacity: 1; } }
}

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s4) var(--s5); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.fact { min-width: 0; }
.fact .k { font-size: var(--t-small); color: var(--muted); }
.fact .v { font: 700 22px/1.2 var(--display); overflow-wrap: anywhere; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 9px var(--s3); text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: var(--t-small); font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--ink); }
td.num, th.num { text-align: right; white-space: nowrap; }
/* money out is ordinary: it gets a minus sign, not red. Red is only for problems. */
tr.flagged td { background: var(--sel-bg); }
tr.flagged td:first-child { box-shadow: inset 4px 0 0 var(--hl); }
.table-scroll { overflow-x: auto; }
.tie td:first-child { color: var(--muted); }
/* accounting convention: the figure we calculated sits on a double rule */
.tie tr.total td { color: var(--ink); font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 5px double var(--ink); }
.tie tr.bad td { color: var(--bad); font-weight: 700; }
.sumtable td:first-child { width: 44px; }
.sumtable tr.tot td { font-weight: 700; color: var(--ink); border-top: 2px solid var(--ink); }
.monthtable td:first-child { white-space: nowrap; }
.monthtable tr.tot td { font-weight: 700; color: var(--ink); border-top: 2px solid var(--ink); border-bottom: 5px double var(--ink); }

.locked-rows td { color: transparent; text-shadow: 0 0 9px var(--muted); user-select: none; }
.more-note { padding: var(--s3) var(--s4); background: var(--tint); font-size: 14px; text-align: center; font-weight: 700; }

/* ---------- checks and files ---------- */
.issues { margin: 0; padding: 0; list-style: none; }
.issues li { padding: var(--s3) var(--s2) var(--s3) 40px; position: relative; border-bottom: 1px solid var(--line); font-size: 15px; }
.issues li::before { content: "!"; position: absolute; left: var(--s1); top: 12px; width: 24px; height: 22px; border-radius: 2px 8px 3px 7px; background: var(--hl); color: var(--hl-ink); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.issues li.note::before { content: "i"; background: var(--tint); color: var(--muted); border-radius: 50%; width: 22px; }
.files { list-style: none; margin: 0; padding: 0; }
.files li { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); font-size: 15px; }
.files .dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.files .dot.ok { background: var(--ok); } .files .dot.warn { background: var(--hl); box-shadow: 0 0 0 1px var(--ink); } .files .dot.bad { background: var(--bad); }
.files .name { flex: 1 1 180px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.files .meta { color: var(--muted); font-size: var(--t-small); }
.files select { padding: 6px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); max-width: 100%; }

/* ---------- options, payment, download ---------- */
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin: 0 0 var(--s3); }
.formats label, .pack { border: 2px solid var(--line); border-radius: var(--r-s); padding: var(--s3); text-align: center; cursor: pointer; background: var(--surface); }
.formats label { font-weight: 700; font-size: 15px; }
.formats input, .pack input { position: absolute; opacity: 0; pointer-events: none; }
.formats label:has(input:checked), .pack:has(input:checked) { border-color: var(--sel-line); background: var(--sel-bg); }
.formats label:has(input:focus-visible), .pack:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.formats small { display: block; color: var(--muted); font-weight: 400; font-size: var(--t-small); }
.packs { display: flex; gap: var(--s2); margin-bottom: var(--s3); }
.pack { flex: 1; }
.pack b { display: block; font: 700 24px/1.2 var(--display); }
.pack span { color: var(--muted); font-size: var(--t-small); }
.buy-note { text-align: center; color: var(--muted); font-size: var(--t-small); margin: var(--s2) 0 0; }
.credits-chip { display: inline-block; background: var(--hl); color: var(--hl-ink); padding: 1px 9px; border-radius: 2px 8px 3px 7px; font-weight: 700; }
details { margin: var(--s2) 0 var(--s3); }
summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; padding: var(--s1) 0; }
details.card-pad { margin: 0; }
.opt-row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; padding: 6px 0; font-size: 15px; }
.opt-row select, .opt-row input[type="text"] { padding: 10px; min-height: 44px; border-radius: var(--r-s); border: 1.5px solid var(--line); background: var(--surface); max-width: 100%; }
.opt-row input[type="text"] { min-width: 0; width: 150px; }
.opt-row.card-pad { padding-left: var(--s5); padding-right: var(--s5); }
label.opt-row { flex-wrap: nowrap; align-items: flex-start; }
label.opt-row input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); }
label.opt-row input[type="text"] { margin-left: auto; }
.optlabel { min-width: 120px; }
.hint { color: var(--muted); font-size: var(--t-small); margin: var(--s2) 0 0; max-width: 72ch; }

/* ---------- how it works, prose, footer ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s5); margin: var(--s7) 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; color: var(--muted); border-top: 2px solid var(--ink); padding-top: var(--s3); }
.steps li::before { content: counter(s); display: block; font: 700 26px/1.1 var(--display); color: var(--ink); margin-bottom: var(--s1); }
.steps b { display: block; color: var(--ink); font: 700 var(--t-h3)/1.25 var(--display); margin-bottom: var(--s1); }
.prose { max-width: 68ch; margin-top: var(--s7); }
.prose h2 { margin: var(--s6) 0 var(--s2); }
.prose ul { padding-left: 20px; }
.prose li { margin: var(--s2) 0; }
.prose li, .prose p { color: var(--muted); }
.prose b { color: var(--ink); }
.site-footer { background: var(--tint); margin-top: var(--s8); padding: var(--s5) 0 var(--s7); color: var(--muted); font-size: var(--t-small); }
.site-footer p { margin: var(--s2) 0; max-width: 78ch; }

.notice { margin: 0; max-width: 58ch; padding: var(--s3) var(--s4); border-radius: var(--r-s); background: var(--tint); font-size: 15px; }
.progress { padding: var(--s5); text-align: center; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; margin-right: var(--s2); }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--btn); color: var(--btn-ink); padding: var(--s3) var(--s4); border-radius: var(--r-s); font-size: 14px; font-weight: 600; box-shadow: 0 10px 34px rgba(10, 12, 40, .28); z-index: 10; max-width: calc(100% - 32px); width: max-content; }
.dev-banner { background: var(--tint); color: var(--muted); font-size: 12px; text-align: center; padding: 5px var(--s3); }
[hidden] { display: none !important; }

/* ---------- landlord, IFTA and payment pieces ---------- */
.h2 { font-size: var(--t-h2); margin: var(--s5) 0 var(--s3); }
.props { list-style: none; margin: var(--s2) 0; padding: 0; }
.props li { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
#propForm { flex-wrap: nowrap; }
#propForm input { flex: 1; min-width: 0; width: auto; }
.rvlist { list-style: none; margin: 0; padding: 0; }
.rv { padding: var(--s4) var(--s5); border-top: 1px solid var(--line); }
.rv-top { display: flex; gap: var(--s3); align-items: baseline; }
.rv-date { color: var(--muted); font-size: var(--t-small); flex: none; }
.rv-desc { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.rv-amt { font: 700 18px/1.2 var(--display); flex: none; }
.rv-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--s2) 0; }
.chip { font-size: 12px; padding: 2px 9px; border-radius: 2px 8px 3px 7px; background: var(--hl); color: var(--hl-ink); font-weight: 700; }
.chip.possible-improvement, .chip.replacement, .chip.project-group { background: var(--bad-wash); color: var(--bad); }
.chip.mixed-use, .chip.small-item-candidate { background: var(--tint); color: var(--ink); }
.rv-controls { padding: var(--s1) 0; }
.rv-controls select { flex: 1 1 220px; min-width: 0; }
.rv-why { margin: var(--s1) 0 0; }
.pill-box { border-radius: var(--r-s); text-align: left; }
.keybox { word-break: break-all; font-family: var(--raw); font-size: 12px; }
.paid-wrap { padding-top: var(--s7); }
.paid-box { max-width: 520px; margin: 0 auto; text-align: center; }

/* terms and privacy: a detail Paul has not filled in yet stays obvious */
.blank { background: var(--bad-wash); color: var(--bad); font-weight: 700; padding: 0 4px; }
.prose h1 { margin-top: var(--s6); font-size: clamp(30px, 6vw, 40px); }

/* ---------- calendar ---------- */
.quick { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s2); }
.btn.secondary.on { background: var(--sel-bg); border-color: var(--sel-line); }
.datebox { display: inline-flex; align-items: center; gap: var(--s2); }
.datebox input { padding: 9px 10px; min-height: 44px; border-radius: var(--r-s); border: 1.5px solid var(--line); background: var(--surface); }
.formats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sheet { margin: 0 var(--s5) var(--s5); border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.sheet-title { font: 700 var(--t-h2)/1.2 var(--display); margin: 0; padding: var(--s4) var(--s4) var(--s3); }
.day { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--s3); padding: var(--s3) var(--s4); border-top: 1.5px solid var(--muted); }
.day-name b { display: block; font: 700 20px/1.2 var(--display); }
.day-name > span { color: var(--muted); font-size: var(--t-small); }
.day ul { list-style: none; margin: 0; padding: 0; }
.day li { display: grid; grid-template-columns: 170px minmax(0, 1fr); column-gap: var(--s3); font-size: 18px; padding-bottom: 3px; overflow-wrap: anywhere; }
.day li small { grid-column: 2; color: var(--muted); font-size: var(--t-small); }
.day li.none { display: block; color: var(--muted); }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .hero.split { grid-template-columns: minmax(0, 1fr); gap: var(--s5); padding-top: var(--s5); }
  /* the example has done its job once the person's own result is on screen */
  main:has(> #result:not([hidden])) .demo { display: none; }
}
@media (max-width: 620px) {
  .site-header .wrap { gap: var(--s2) var(--s3); }
  .nav { order: 3; width: 100%; }
  .nav a { flex: 1 1 30%; display: grid; place-items: center; text-align: center; font-size: 13px; line-height: 1.2; padding: 8px 4px; }
  .day { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
  .day-name { display: flex; align-items: baseline; gap: var(--s2); }
  .day li { grid-template-columns: minmax(0, 1fr); font-size: 17px; padding-bottom: var(--s2); }
  .day li small { grid-column: 1; }
  .sheet { margin: 0 var(--s3) var(--s3); }
  .datebox { flex: 1 1 140px; justify-content: space-between; }
  .formats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand { font-size: 19px; }
  .brand-mark { width: 28px; height: 28px; }
  .demo th:first-child, .demo td:first-child { padding-left: var(--s3); }
  .nav a:not([aria-current="page"]) { background: var(--tint); }
  .drop { padding: var(--s5) var(--s4); }
  .drop .btn { width: 100%; }
  h1 { margin-bottom: var(--s2); }
  .lede { margin-bottom: var(--s4); }
  .formats { grid-template-columns: minmax(0, 1fr); }
  .card-pad, .verdict { padding: var(--s4); }
  .verdict { gap: var(--s3); }
  .verdict .badge { width: 36px; height: 36px; font-size: 18px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--s4); }
  .fact .v { font-size: 19px; }
  .rv, .files li, .opt-row.card-pad { padding-left: var(--s4); padding-right: var(--s4); }
  th, td { padding: 8px 7px; }
  /* transaction preview: date and amount on one line, the description gets the full width below */
  .ledger, .ledger tbody { display: block; }
  .ledger thead { display: none; }
  .ledger tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "date in out" "desc desc desc"; row-gap: 2px; padding: 10px var(--s4); border-bottom: 1px solid var(--line); }
  .ledger td { display: block; border: 0; padding: 0; overflow-wrap: anywhere; }
  .ledger td:nth-child(1) { grid-area: date; color: var(--muted); font-size: var(--t-small); }
  .ledger td:nth-child(2) { grid-area: desc; }
  .ledger td:nth-child(3) { grid-area: in; font-weight: 700; color: var(--ok); }
  .ledger td:nth-child(4) { grid-area: out; font-weight: 700; }
  .ledger td:nth-child(3):not(:empty)::before { content: "+"; }
  .ledger td:nth-child(4):not(:empty)::before { content: "\2212"; }
  .ledger tr.flagged { background: var(--sel-bg); box-shadow: inset 4px 0 0 var(--hl); }
  .ledger tr.flagged td { background: transparent; box-shadow: none; }
  .ledger.locked-rows td::before { content: none; }

  /* summary tables: nothing hides off to the side. Title and main figure first, labelled figures below. */
  .stack, .stack tbody { display: block; }
  .stack thead { display: none; }
  .stack tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s3); row-gap: 5px; padding: 13px 0; border-bottom: 1px solid var(--line); }
  .stack tr::after { content: ""; order: 2; flex-basis: 100%; height: 0; }
  .stack tr td { display: block; order: 3; padding: 0; text-align: left; font-size: var(--t-small); font-weight: 400; color: var(--muted); }
  .stack.tie tr td, .stack.tie tr.tot td { border: 0; }
  .stack tr td:empty { display: none; }
  .stack tr td.ln { order: 1; width: 22px; flex: none; }
  .stack tr td.title { order: 1; flex: 1 1 0; min-width: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
  .stack tr td.sub { order: 1; flex: 1 1 0; font-size: 14px; }
  .stack tr td.key { order: 1; margin-left: auto; font-size: 16px; font-weight: 700; color: var(--ink); text-align: right; }
  .stack tr td[data-label]::before { content: attr(data-label) " "; font-weight: 400; color: var(--muted); }
  .stack tr.tot { border-top: 2px solid var(--ink); border-bottom: 5px double var(--ink); }
  .sumtable.stack tr.tot td.title { padding-left: 34px; }
}

/* ---------- utilities ---------- */
.pt0 { padding-top: 0; } .pb0 { padding-bottom: 0; } .pb6 { padding-bottom: 6px; }
.m0 { margin: 0; } .ml12 { margin-left: 12px; } .center { text-align: center; }
