:root {
  color-scheme: light;
  --paper: #f7f6f1;
  --ink: #192c29;
  --muted: #52625e;
  --rule: #ccd3cb;
  --pine: #164a40;
  --pine-dark: #10372f;
  --lime: #e2edaa;
  --display: 'PT Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
button, input, select { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
a { color: var(--pine); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #986024;
  outline-offset: 4px;
}
.wrap { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
main { padding-bottom: 56px; }
.skip { position: absolute; left: 1rem; top: -8rem; z-index: 2; background: white; padding: 12px; }
.skip:focus { top: 1rem; }
.masthead { border-bottom: 1px solid var(--rule); }
.mast-row { min-height: 68px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-weight: 720; font-size: 18px; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 35px; background: var(--pine); border-radius: 6px 6px 10px 6px; }
.brand-mark i { width: 15px; height: 19px; border: 1.5px solid var(--lime); border-radius: 1px 1px 4px 1px; position: relative; }
.brand-mark i::before, .brand-mark i::after { content: ''; position: absolute; width: 7px; height: 1px; background: var(--lime); left: 3px; top: 5px; }
.brand-mark i::after { top: 10px; width: 5px; }
.quiet { min-height: 42px; border: 0; background: transparent; color: var(--muted); font-size: 14px; padding-inline: 12px; }
.quiet:hover, .back:hover, .entry-link:hover { color: var(--pine-dark); text-decoration: underline; }
.period, .section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.period { margin: 40px 0 24px; }
.overline { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .105em; text-transform: uppercase; margin-bottom: 6px; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.045em; }
h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); line-height: 1.06; }
h1 span { color: var(--muted); }
h2 { font-size: clamp(1.85rem, 3.5vw, 2.6rem); line-height: 1.12; }
.months { display: flex; align-items: center; border: 1px solid var(--rule); border-radius: 8px; }
.months a { display: grid; place-items: center; min-height: 44px; text-decoration: none; color: var(--ink); }
.months a:hover { background: #e6eae1; }
.arrow { width: 44px; font: 26px/1 var(--sans); border-radius: 7px; }
.month-now { padding: 0 8px; font-size: 14px; font-weight: 600; }
.summary { overflow: hidden; background: #f2f2ea; border: 1px solid var(--rule); border-radius: 12px; }
.summary-main { display: grid; grid-template-columns: 1fr 1fr; background: var(--pine-dark); color: #f5f6ee; padding: 26px 32px; }
.overview { min-width: 0; }
.overview > span { display: block; margin-bottom: 6px; color: #d1ded6; font-size: .875rem; font-weight: 550; }
.overview strong { display: block; font: 500 clamp(2.1rem, 4.2vw, 3.75rem)/1.12 var(--sans); letter-spacing: -.055em; overflow-wrap: anywhere; }
.overview small { font-size: .56em; font-weight: 400; }
.open-total { border-left: 1px solid #52726b; padding-left: 32px; }
.open-total strong { color: var(--lime); }
.summary-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 18px 32px; gap: 18px; }
dt { color: var(--muted); font-size: .79rem; line-height: 1.35; }
dd { overflow-wrap: anywhere; }
.summary-details dd { margin-top: 4px; font-size: 1.1rem; font-weight: 650; }
.section-head { align-items: center; margin: 36px 0 17px; }
.ledger-tools { display: flex; align-items: center; gap: 16px; }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; border: 1px solid transparent; border-radius: 7px; font-size: 14px; line-height: 1.35; font-weight: 650; padding: 10px 17px; text-align: center; }
.primary { color: #fff; background: var(--pine); }
.primary:hover { background: var(--pine-dark); }
.entries, .catalog ul { list-style: none; padding: 0; }
.entries { border-block: 1px solid var(--rule); }
.entry { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) minmax(115px, .62fr); align-items: center; gap: 20px; padding: 20px 0; }
.entry + .entry, .catalog li + li { border-top: 1px solid var(--rule); }
.entry-main, .catalog li div { overflow-wrap: anywhere; }
.due { color: var(--muted); font-size: .76rem; font-weight: 600; line-height: 1.5; }
.due span { padding: 0 2px; }
h3 { font-size: 1.13rem; line-height: 1.35; font-weight: 680; margin-top: 3px; }
.channel, .empty p, .catalog p, .form-intro { font-size: .92rem; color: var(--muted); line-height: 1.55; }
.channel { margin-top: 4px; }
.amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.amounts dt { margin-bottom: 4px; }
.amounts dd { font-size: .95rem; font-weight: 600; }
.entry-action { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 1px; }
.status { display: inline-block; font-size: .75rem; line-height: 1.4; font-weight: 650; padding: 3px 8px; border-radius: 5px; color: #47544b; background: #e7eae1; text-align: center; }
.paid, .funded { color: #134b3c; background: #deebdf; }
.late { color: #813711; background: #f5e1d2; }
.skipped { background: #e9e6e0; }
.entry-link, .back { display: inline-flex; min-height: 44px; align-items: center; gap: 5px; font-size: .86rem; font-weight: 650; text-decoration: none; }
.empty { padding: 26px; border: 1px dashed var(--rule); border-radius: 8px; }
.empty p { margin-top: 5px; }
.catalog { margin-top: 28px; border: 1px solid var(--rule); border-radius: 9px; padding: 0 20px; }
.catalog summary { padding: 15px 0; font-weight: 660; }
.catalog summary span { color: var(--muted); font-size: .8rem; margin-left: 6px; }
.catalog p { margin-bottom: 12px; }
.catalog li { padding: 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.catalog small { display: block; margin-top: 4px; color: var(--muted); }
.form-shell { max-width: 590px; margin: 25px auto 0; }
.form-shell h1 { margin: 10px 0 21px; font-size: clamp(2.1rem, 5vw, 3.5rem); overflow-wrap: anywhere; }
.auth { max-width: 430px; margin-top: clamp(48px, 12vh, 128px); }
.form-intro { margin: -5px 0 20px; }
.form-card { border: 1px solid var(--rule); background: #fdfcf8; border-radius: 11px; padding: 24px; }
.field + .field, noscript + .field { margin-top: 17px; }
#schedule-rule:empty { display: none; }
.field label { display: block; font-size: .9rem; font-weight: 650; margin-bottom: 6px; }
.field input, .field select { display: block; width: 100%; min-width: 0; min-height: 46px; color: var(--ink); border: 1px solid #909f96; border-radius: 6px; background: white; padding: 8px 10px; font-size: 16px; }
.field input[aria-invalid="true"] { border-color: #983e27; }
.help, .errors { font-size: .83rem; line-height: 1.4; margin-top: 5px; }
.help { color: var(--muted); }
.errors { color: #8a301a; }
.errors ul { list-style: none; padding: 0; }
.form-card > .errors { margin-bottom: 16px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; border-top: 1px solid var(--rule); margin-top: 21px; padding-top: 17px; }
.copy-previous { border: 0; border-radius: 4px; color: var(--pine); background: #e8efe4; margin: 6px 0 12px; padding: 7px 10px; min-height: 40px; font-size: .82rem; }
.messages { background: #e4eddd; border-left: 3px solid var(--pine); padding: 12px 16px; margin-top: 20px; }
@media (max-width: 940px) {
  .entry { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(115px, .65fr); }
  .amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 32px); }
  .mast-row { min-height: 56px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 28px; height: 30px; }
  .period { margin: 25px 0 16px; align-items: flex-start; flex-direction: column; gap: 13px; }
  .months { align-self: stretch; }
  .month-now { flex: 1; }
  .summary-main { padding: 19px 16px; gap: 12px; }
  .open-total { padding-left: 12px; }
  .overview > span { font-size: .78rem; }
  .overview strong { font-size: clamp(1.5rem, 5.8vw, 2.5rem); }
  .summary-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 18px; padding: 16px; }
  .summary-details dd { font-size: .98rem; }
  .section-head { flex-wrap: wrap; gap: 10px; margin: 26px 0 13px; }
  .entry { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'main action' 'amounts amounts'; gap: 10px; padding: 15px 0; }
  .entry-main { grid-area: main; }
  .entry-action { grid-area: action; max-width: 132px; }
  .amounts { grid-area: amounts; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 12px; border-radius: 6px; background: #eeefe8; }
  .amounts dt { font-size: .72rem; }
  .amounts dd { font-size: .86rem; }
  .catalog { padding: 0 14px; }
  .form-shell { margin-top: 14px; }
  .auth { margin-top: 42px; }
  .form-card { padding: 18px; }
}
@media (max-width: 390px) {
  .amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-action { max-width: 108px; }
}
