[hidden] { display: none !important; }
:root {
  --bg: #f6f5f1; --card: #ffffff; --ink: #1d2327; --muted: #4a5560; --line: #c9ced3;
  --accent: #0b5c63; --accent-ink: #ffffff; --danger: #9b1c1c; --warn-bg: #fff4d6; --ok-bg: #e3f3e8; --err-bg: #fde8e8; --info-bg: #e6eef7;
  --focus: #1a4fd6;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; font-size: 1rem; overflow-wrap: break-word; }
/* Horizontal paddings are capped by viewport width so they cannot eat the whole
   viewport when the root font size is very large (200-400% text). */
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 min(1rem, 4vw); }
.skip { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: .5rem min(1rem, 4vw); z-index: 10; max-width: 100%; }
.skip:focus { left: 0; }
header.site { background: #fff; border-bottom: 1px solid var(--line); padding: 1rem 0; }
h1 { margin: 0 0 .25rem; font-size: 1.6rem; overflow-wrap: anywhere; }
h2 { font-size: 1.3rem; margin: 0 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
h4 { font-size: 1rem; margin: 1rem 0 .4rem; }
h2, h3, h4 { overflow-wrap: break-word; }
label > span, .help, .tagline, .privacy, footer.site p { overflow-wrap: break-word; }
dl.kv dt { overflow-wrap: break-word; }
.foot-disclaimer { overflow-wrap: break-word; }
.tagline { margin: 0 0 .25rem; }
.privacy { margin: 0 0 .75rem; color: var(--muted); }
.shared-warn { margin: 0 0 .75rem; padding: .5rem min(.75rem, 3vw); background: var(--warn-bg); border: 1px solid #8a6d00; border-radius: 6px; overflow-wrap: anywhere; }
.unsaved-box { margin: .75rem 0 0; padding: min(.75rem, 3vw); background: var(--err-bg); border: 2px solid var(--danger); border-radius: 6px; }
.unsaved-box p { margin: 0 0 .5rem; overflow-wrap: anywhere; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 min(.25rem, 1.5vw); max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main { padding-top: 1rem; padding-bottom: 2rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: min(1rem, 4vw); margin: 1rem 0; }
.grid { align-items: end; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .75rem min(1rem, 3vw); }
.grid .wide { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; font-size: .95rem; min-width: 0; }
label.check { flex-direction: row; align-items: center; flex-wrap: wrap; font-weight: 400; margin: .5rem 0; gap: min(.5rem, 2vw); }
/* The label text wraps onto its own line under the checkbox when the row is too
   narrow (a 1.25rem checkbox is most of a 160 px viewport at 400% text), and may
   break mid-word so it can never overflow the row. */
label.check > span { min-width: 0; overflow-wrap: anywhere; }
input[type=checkbox] { flex: 0 0 auto; }
label.file { margin: .5rem 0; }
input[type=text], input[type=date], select { font: inherit; font-size: 1rem; padding: .55rem min(.6rem, 2.5vw); border: 1px solid #6b747c; border-radius: 6px; background: #fff; color: var(--ink); width: 100%; min-height: 2.75rem; }
input[type=checkbox] { width: 1.25rem; height: 1.25rem; }
input[type=file] { font: inherit; font-size: 1rem; max-width: 100%; padding: .5rem 0; min-height: 2.75rem; }
button { font: inherit; padding: .55rem min(.9rem, 3vw); min-height: 2.75rem; max-width: 100%; overflow-wrap: break-word; border-radius: 6px; border: 1px solid #6b747c; background: #fff; color: var(--ink); cursor: pointer; }
button:hover:not(:disabled) { background: #eef1f3; }
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.primary:hover:not(:disabled) { background: #084a50; }
button.danger { color: var(--danger); border-color: var(--danger); }
button.link { border: 0; background: none; min-height: 2.25rem; min-width: 2.25rem; font-size: 1.25rem; padding: 0 .5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; align-items: center; }
.help { color: var(--muted); font-size: .9rem; margin: .4rem 0; }
.error { color: var(--danger); font-weight: 600; margin: .4rem 0; }
.amt-warn { background: var(--warn-bg); border: 1px solid #8a6d00; border-radius: 6px; padding: .4rem min(.6rem, 2.5vw); overflow-wrap: anywhere; }
.corrupt-box { margin: .75rem 0 0; padding: min(.75rem, 3vw); background: var(--warn-bg); border: 2px solid #8a6d00; border-radius: 6px; }
.corrupt-box p { margin: 0 0 .5rem; overflow-wrap: anywhere; }
.corrupt-box h2 { font-size: 1.05rem; margin: 0 0 .5rem; }
.error:empty { display: none; }
.empty { color: var(--muted); }
#notices { padding-top: .75rem; display: flex; flex-direction: column; gap: .5rem; }
.notice { display: flex; gap: min(.75rem, 2.5vw); align-items: center; justify-content: space-between; padding: .5rem min(.5rem, 2vw) .5rem min(.9rem, 3vw); border-radius: 6px; border: 1px solid var(--line); flex-wrap: wrap; }
.notice > span { flex: 1 1 12rem; overflow-wrap: anywhere; }
.notice > button.link { min-width: min(2.25rem, 100%); padding: 0 min(.5rem, 2vw); }
.notice.ok { background: var(--ok-bg); } .notice.warn { background: var(--warn-bg); } .notice.error { background: var(--err-bg); } .notice.info { background: var(--info-bg); }
.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 6px; }
table.data { border-collapse: collapse; width: 100%; font-size: .92rem; }
table.data th, table.data td { padding: .4rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
table.data th { background: #eef1f3; white-space: nowrap; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--danger); }
.row-actions { white-space: nowrap; }
.row-actions button { min-height: 2.25rem; padding: .25rem .6rem; margin-right: .25rem; }
.pageinfo { padding: 0 .5rem; }
#import-panel, #backup-panel { border: 1px dashed var(--line); border-radius: 6px; padding: min(.75rem, 3vw); margin-top: .75rem; }
.errors { margin: .25rem 0; padding-left: min(1.25rem, 5vw); font-size: .9rem; overflow-wrap: anywhere; }
.summary { font-weight: 600; }
/* statement */
table.frame { width: 100%; table-layout: fixed; border-collapse: collapse; margin-top: 1rem; }
table.frame td { padding: 0; }
table.frame tfoot { display: none; }
.pagefoot { font-size: .85rem; color: var(--muted); }
.banner { border: 3px solid #1d2327; background: #fff3c4; color: #111; padding: .6rem min(.8rem, 3vw); font-size: .95rem; overflow-wrap: anywhere; }
.stmt { padding: 1rem .25rem 0; }
.stmt-title { font-size: 1.35rem; }
dl.kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: .5rem 0; }
dl.kv dt { font-weight: 600; margin-top: .4rem; color: var(--muted); font-size: .9rem; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
@media (min-width: 40rem) {
  dl.kv { grid-template-columns: minmax(14rem, 22rem) 1fr; column-gap: 1rem; }
  dl.kv dt { margin-top: 0; padding: .25rem 0; font-size: .95rem; }
  dl.kv dd { padding: .25rem 0; }
}
.cur-block { border-top: 2px solid var(--ink); margin-top: 1.25rem; }
.foot-disclaimer { margin-top: 1.5rem; padding-top: .5rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
footer.site { padding: 1rem 0 2rem; color: var(--muted); font-size: .9rem; }
.notes { padding-left: min(1.25rem, 5vw); font-size: .9rem; }
.noscript { background: var(--warn-bg); }

.nowrap { white-space: nowrap; }
@media (max-width: 40rem) {
  #entries-wrap.table-wrap { border: 0; overflow: visible; }
  table.entries, table.entries tbody, table.entries tr, table.entries td { display: block; width: 100%; }
  table.entries thead { position: absolute; left: -9999px; }
  table.entries tr { border: 1px solid var(--line); border-radius: 6px; margin-bottom: .6rem; padding: .25rem min(.5rem, 2vw); background: #fff; }
  table.entries td { border: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .05rem .75rem; padding: .2rem 0; text-align: right !important; min-width: 0; }
  table.entries td::before { content: attr(data-label); font-weight: 600; text-align: left; color: var(--muted); flex: 0 1 auto; min-width: 0; overflow-wrap: break-word; }
  table.entries td .val { flex: 1 1 55%; min-width: 0; overflow-wrap: break-word; white-space: normal; }
  table.entries td.nowrap { white-space: normal; }
  /* Amount cell: never force one line in card layout - it overflowed the card at 300-400% text. */
  table.entries td.num { white-space: normal; }
  table.entries td.empty-cell { display: none; }
  table.entries td.row-actions { justify-content: flex-start; flex-wrap: wrap; gap: .25rem; white-space: normal; padding-top: .4rem; }
  table.entries td.row-actions::before { content: none; }
  table.entries td.row-actions button { margin-right: 0; }
}
@media print {
  /* "Page x of y" via margin boxes (Chrome/Edge). Browsers without margin-box support
     ignore this and still get the repeated footer row. The two words are part of the
     stylesheet because the CSP forbids injected styles; a registered locale should
     translate them here too. */
  @page { margin: 14mm 12mm 16mm; @bottom-center { content: "Page " counter(page) " of " counter(pages); font-size: 9pt; color: #333; } }
  html, body { background: #fff; color: #000; font-size: 11pt; }
  .no-print, header.site, footer.site, #notices, #unsaved, .shared-warn, .skip { display: none !important; }
  main.wrap, .wrap { max-width: none; padding: 0; }
  main { padding: 0; }
  .card { border: 0; padding: 0; margin: 0; border-radius: 0; }
  table.frame thead { display: table-header-group; }
  table.frame thead td { padding-bottom: 4mm; }
  table.frame tfoot { display: table-footer-group; }
  table.frame tfoot td { padding-top: 3mm; }
  .pagefoot { font-size: 9pt; color: #333; }
  .banner { background: #fff3c4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border: 2.5px solid #000; font-size: 10pt; }
  .table-wrap { overflow: visible; border: 0; }
  table.data { font-size: 10pt; }
  table.data tr, dl.kv, h3, h4 { break-inside: avoid; }
  h3, h4 { break-after: avoid; }
  .cur-block { break-inside: auto; }
  .neg { color: #000; }
  a { color: #000; text-decoration: none; }
  dl.kv { grid-template-columns: 22rem 1fr; }
  dl.kv dt { margin-top: 0; font-size: 10pt; color: #000; }
}
