@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/instrument-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Ledger Icons";
  src: url("/assets/ledger-icons.woff2") format("woff2");
  font-display: block;
}

:root {
  color-scheme: light;
  --canvas: #f2f5f1;
  --surface: #fff;
  --ink: #172922;
  --muted: #53655b;
  --subtle: #66796f;
  --rule: #dce5dc;
  --rail: #14251f;
  --rail-rule: #31453b;
  --green: #256450;
  --green-deep: #1d5645;
  --green-soft: #e8f2eb;
  --lime: #d8f77b;
  --lime-light: #eff8db;
  --amber: #825326;
  --amber-bg: #f9eedc;
  --blue: #375e78;
  --blue-bg: #e8f1f6;
  --radius: 17px;
  --rail-width: 228px;
  --gutter: clamp(1.1rem, 2.7vw, 2.85rem);
  --shadow: 0 1px 2px rgb(20 37 31 / 4%);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 100%;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; font-size: 1rem; line-height: 1.5; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
a { color: var(--green-deep); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
button, a { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .5; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
h1, h2, h3, .amount { line-height: 1.14; letter-spacing: -.04em; font-weight: 650; }
h1 { font-size: clamp(2.35rem, 4vw, 4rem); }
h2 { font-size: clamp(1.35rem, 2.1vw, 1.85rem); }
h3 { font-size: 1.13rem; }
strong { font-weight: 670; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #5eaa66; outline-offset: 4px; }
::selection { background: var(--lime); color: var(--ink); }
.num, .amount, time, .number-input { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.secondary { font-size: .875rem; color: var(--muted); }
.eyebrow {
  display: block;
  color: var(--green-deep);
  font-size: .875rem;
  line-height: 1.2;
  font-weight: 680;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  font: normal 1.25rem/1 "Ledger Icons";
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}
.skip-link {
  position: fixed;
  z-index: 20;
  top: .7rem;
  left: .7rem;
  padding: .65rem 1rem;
  transform: translateY(-180%);
  border-radius: .5rem;
  background: var(--lime);
  color: var(--ink);
}
.skip-link:focus { transform: none; }

.app { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 5;
  inset: 0 auto 0 0;
  width: var(--rail-width);
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1rem 1.45rem;
  color: #eaf2eb;
  background: var(--rail);
}
.brand {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: .72rem;
  margin: .12rem .55rem 2.6rem;
  color: #f4faf3;
  text-decoration: none;
}
.brand:hover { color: #fff; }
.brand strong { display: block; white-space: nowrap; font-size: 1.22rem; letter-spacing: -.045em; line-height: 1.1; }
.brand small { display: block; color: #b9cabe; margin-top: .22rem; font-size: .875rem; }
.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 3px;
  padding-bottom: 10px;
  background: var(--lime);
}
.brand-mark i { display: block; width: 4px; border-radius: 2px; background: var(--rail); }
.brand-mark i:nth-child(1) { height: 7px; }
.brand-mark i:nth-child(2) { height: 12px; }
.brand-mark i:nth-child(3) { height: 18px; }
.navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .34rem;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #597464 transparent;
}
.navigation a {
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: .69rem;
  color: #cbd8cf;
  padding: .61rem .72rem;
  border-radius: 9px;
  text-decoration: none;
  font-size: .925rem;
  font-weight: 530;
  line-height: 1.25;
}
.navigation a:hover { background: #213a2e; color: #fff; }
.navigation a:focus-visible { outline-offset: -3px; }
.navigation a[aria-current="page"] { background: var(--lime); color: var(--rail); font-weight: 670; }
.navigation a .icon { flex: none; font-size: 1.22rem; }
.nav-count {
  margin-left: auto;
  border-radius: 9px;
  background: #365245;
  color: #f4faf3;
  font-size: .78rem;
  padding: 0 .36rem;
}
.navigation a[aria-current="page"] .nav-count { background: var(--rail); color: white; }
.sidebar-foot { margin-top: auto; padding: 1rem .55rem 0; border-top: 1px solid var(--rail-rule); color: #a8bbae; font-size: .813rem; }
.source-indicator { display: flex; align-items: center; gap: .46rem; margin-bottom: .23rem; color: #d7e4d9; font-weight: 590; }
.indicator { width: .45rem; height: .45rem; border-radius: 50%; background: var(--lime); }
.workspace { margin-left: var(--rail-width); min-width: 0; }
.topbar {
  min-height: 69px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem var(--gutter);
  background: rgb(250 252 249 / 96%);
  border-bottom: 1px solid var(--rule);
}
.topbar-context, .topbar-actions { display: flex; align-items: center; gap: .75rem; }
.topbar-page { font-weight: 650; letter-spacing: -.02em; }
.search-launch {
  display: flex;
  align-items: center;
  width: min(28vw, 290px);
  min-height: 41px;
  gap: .52rem;
  padding: .37rem .5rem .37rem .75rem;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--surface);
  text-align: left;
  color: var(--muted);
  font-size: .875rem;
}
.search-launch:hover, .icon-button:hover { background: var(--green-soft); border-color: #b3c9bb; color: var(--ink); }
.search-launch kbd {
  margin-left: auto;
  padding: .02rem .35rem;
  border-radius: 5px;
  border: 1px solid var(--rule);
  background: var(--canvas);
  font-size: .83rem;
}
.icon-button {
  width: 41px;
  height: 41px;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.menu-button { display: none; }
.alerts-launch { position: relative; }
.alert-indicator { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: #4c8f55; box-shadow: 0 0 0 2px #fff; }
.mobile-shade { display: none; }

.main { padding: 1.8rem var(--gutter) 2.4rem; margin: 0 auto; width: 100%; max-width: 1520px; min-height: calc(100vh - 133px); }
.main:focus { outline: none; }
.stack { display: grid; gap: 1.3rem; }

.button {
  display: inline-flex;
  width: fit-content;
  min-height: 42px;
  gap: .48rem;
  align-items: center;
  justify-content: center;
  padding: .57rem .92rem;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--surface);
  background: var(--green-deep);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.3;
}
.button:hover { background: #164535; color: white; }
.button:active { transform: translateY(1px); }
.button.lime { color: var(--rail); background: var(--lime); }
.button.lime:hover { background: #e8ff9d; color: var(--rail); }
.button.secondary-button { color: var(--ink); background: var(--surface); border-color: var(--rule); }
.button.secondary-button:hover { background: var(--green-soft); border-color: #b7cbbd; }
.button.compact { min-height: 36px; padding: .4rem .65rem; }
.button .icon { font-size: 1.1rem; }

.panel, .stat-card {
  min-width: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel-pad { padding: clamp(1rem, 2.1vw, 1.6rem); }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.stat-card { display: grid; gap: .4rem; padding: 1.15rem; }
.stat-label { display: flex; align-items: center; gap: .58rem; font-size: .96rem; font-weight: 600; color: var(--muted); }
.icon-tile {
  width: 35px;
  height: 35px;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  color: var(--green-deep);
  background: var(--green-soft);
}
.icon-tile.soft-lime { background: var(--lime-light); color: #41672b; }
.icon-tile.soft-blue { background: var(--blue-bg); color: var(--blue); }
.icon-tile.soft-amber { background: var(--amber-bg); color: var(--amber); }
.stat-card .amount { font-size: clamp(1.9rem, 3.15vw, 2.85rem); letter-spacing: -.06em; }
.stat-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .7rem; font-size: .825rem; color: var(--muted); }
.stat-meta a { white-space: nowrap; }
.stat-label a { color: inherit; text-decoration-color: var(--rule); }
.stat-label a:hover, .stat-label a:focus-visible { color: var(--green-deep); text-decoration-color: currentColor; }

.dashboard-grid, .receipt-grid, .watch-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr);
}
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem 1rem; }
.section-head + p, .section-head p { margin-top: .4rem; }
.section-head .badge, .section-head .button { flex-shrink: 0; }
.panel .section-head + .chart { margin-top: 1.2rem; }
.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: .27rem;
  padding: .29rem .55rem;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: .813rem;
  line-height: 1.25;
  white-space: nowrap;
  font-weight: 650;
}
.badge.amber { color: var(--amber); background: var(--amber-bg); }
.badge.blue { color: var(--blue); background: var(--blue-bg); }
.badge.neutral { color: #4d5d54; background: #edf0eb; }
.badge.lime-badge { color: #3d5c29; background: var(--lime-light); }
.chart { display: grid; gap: .78rem; }
.bar-top { display: flex; align-items: baseline; justify-content: space-between; gap: .55rem; font-size: .9rem; }
.bar-top strong { white-space: nowrap; }
.bar-track { height: 8px; overflow: hidden; border-radius: 20px; background: #eaf0e9; margin-top: .3rem; }
.bar-fill { display: block; height: 100%; border-radius: inherit; width: var(--w); background: var(--bar, #53966e); }
.chart-note { margin-top: .98rem; color: var(--muted); font-size: .875rem; }
.feature-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .65rem; font-size: .875rem; color: var(--muted); }
.spending-breakdown {
  display: grid;
  gap: .1rem;
  font-size: .92rem;
}
.spending-breakdown > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: .6rem;
  padding: .48rem .62rem;
  border-top: 1px solid var(--rule);
}
.spending-breakdown dd { font-weight: 650; white-space: nowrap; text-align: right; }
.spending-breakdown > .fee-row {
  background: var(--lime-light);
  color: var(--green-deep);
  border-color: transparent;
  border-radius: 8px;
}
.spending-breakdown .fee-row dt { font-weight: 650; }

.page-intro { padding: .65rem 0 .25rem; }
.page-intro .eyebrow { margin-bottom: .62rem; }
.page-intro h1 { letter-spacing: -.065em; }
.page-intro p { margin-top: .65rem; max-width: 45rem; color: var(--muted); }
.page-intro .section-head { align-items: flex-end; }
.page-intro .section-head .button { margin-bottom: .15rem; }

.records-panel { overflow: hidden; }
.records-panel .section-head { padding: 1.23rem 1.4rem 1.05rem; }
.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th, td { border-top: 1px solid var(--rule); vertical-align: middle; padding: .83rem 1rem; }
th:first-child, td:first-child { padding-left: 1.4rem; }
th:last-child, td:last-child { padding-right: 1.4rem; }
th { background: #f7f9f6; font-weight: 630; color: var(--muted); font-size: .875rem; white-space: nowrap; }
tr:hover td { background: #f8fbf7; }
td.amount-cell, th.amount-cell { text-align: right; white-space: nowrap; }
td.date-cell, th.date-cell { white-space: nowrap; }
td.amount-cell strong { font-size: .95rem; }
.record-title {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: var(--ink);
  font-weight: 670;
}
.record-title:hover { text-decoration: underline; text-underline-offset: .18em; }
.record-subtitle { display: block; margin-top: .22rem; color: var(--muted); font-size: .813rem; }
.record-mobile { display: none; }
.table-footer { padding: .86rem 1.4rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .875rem; }
.spending-filters { padding: 1.2rem 1.35rem 1.05rem; display: grid; gap: .92rem; border-bottom: 1px solid var(--rule); }
.filter-grid { display: grid; grid-template-columns: minmax(180px, 1.6fr) repeat(3, minmax(125px, 1fr)); gap: .75rem; align-items: end; }
.field { display: grid; min-width: 0; gap: .32rem; font-size: .875rem; font-weight: 650; }
.field select, .field > input, .search-input, .input-money {
  display: flex;
  min-height: 43px;
  width: 100%;
  min-width: 0;
  padding: .57rem .73rem;
  border: 1px solid #cbd8ce;
  border-radius: 9px;
  background: var(--surface);
}
select {
  appearance: none;
  padding-right: 1.65rem !important;
  background-image: linear-gradient(45deg, transparent 50%, #4c6557 50%), linear-gradient(135deg, #4c6557 50%, transparent 50%) !important;
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52% !important;
  background-size: 5px 5px !important;
  background-repeat: no-repeat !important;
}
.search-input { align-items: center; gap: .52rem; color: var(--muted); }
.search-input input, .input-money input { width: 100%; min-width: 0; padding: 0; outline: none; border: 0; background: none; color: var(--ink); }
.search-input:focus-within, .input-money:focus-within { outline: 2px solid #77a984; outline-offset: 2px; }
.flex-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem; }
.chips { display: flex; flex-wrap: wrap; gap: .43rem; }
.chip {
  min-height: 36px;
  padding: .33rem .74rem;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--surface);
  font-size: .875rem;
  font-weight: 600;
}
.chip:hover { background: var(--green-soft); }
.chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--green-soft); color: var(--green-deep); border-color: #a8c4b2; }
a.chip { display: inline-flex; align-items: center; text-decoration: none; }
.empty { padding: 2rem 1.4rem; text-align: center; }
.empty > * + * { margin-top: .55rem; }
.empty .button { margin: .8rem auto 0; }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.project-card { display: grid; align-content: start; gap: .75rem; }
.project-card h2 { margin: .08rem 0 0; }
.project-card .flex-actions { margin-top: .16rem; }
.project-card .badge { white-space: normal; }
.mini-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.mini-metrics > div { padding: .66rem .58rem; border-radius: 9px; background: #f1f6f1; }
.mini-metrics dt { color: var(--muted); font-size: .813rem; line-height: 1.28; }
.mini-metrics dd { margin-top: .29rem; font-size: clamp(1rem, 1.85vw, 1.5rem); letter-spacing: -.04em; line-height: 1.2; font-weight: 670; }
.mini-metrics dd.missing { color: var(--muted); font-size: .9rem; letter-spacing: -.01em; font-weight: 560; }
.timeline { list-style: none; padding: 0; }
.timeline li { display: grid; position: relative; padding: 0 0 1rem 1.18rem; margin-left: .25rem; border-left: 1px solid #cbdacc; }
.timeline li:last-child { padding-bottom: 0; border-color: transparent; }
.timeline li::before { position: absolute; top: .44rem; left: -.28rem; width: .5rem; height: .5rem; content: ""; background: #559069; border-radius: 100%; }
.timeline p { margin-top: .1rem; }
.timeline a { font-size: .875rem; }
.money-brief { display: grid; gap: .95rem; padding-block: .18rem .25rem; }
.money-brief .section-head { align-items: center; flex-wrap: wrap; }
.money-brief-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.money-brief-card, .vote-card { display: flex; flex-direction: column; align-items: stretch; gap: .8rem; }
.money-brief-card { padding: clamp(1rem, 1.75vw, 1.45rem); }
.money-brief-card h3 { font-size: clamp(1.2rem, 1.7vw, 1.5rem); }
.money-brief-card .decision-meta time, .money-brief-card .badge { font-size: .81rem; }
.decision-meta { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: .4rem .6rem; }
.decision-meta time { color: var(--muted); font-size: .875rem; font-weight: 620; }
.decision-figure { padding: .7rem .8rem; border-radius: 9px; background: var(--canvas); }
.decision-figure .amount { color: var(--green-deep); font-size: clamp(1.85rem, 2.75vw, 2.6rem); }
.money-brief-card .decision-figure {
  padding: .55rem 0 .15rem;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
}
.money-brief-card .decision-figure .amount { font-size: clamp(1.7rem, 2.22vw, 2.2rem); }
.decision-figure .secondary { margin-top: .1rem; }
.explanation-fields { display: grid; gap: .63rem; }
.explanation-fields dt { font-weight: 670; color: var(--ink); }
.explanation-fields dd { color: var(--muted); font-size: .94rem; line-height: 1.49; }
.brief-actions { display: flex; flex-wrap: wrap; gap: .15rem 1rem; }
.brief-actions a { display: inline-flex; align-items: center; min-height: 2rem; font-size: .9rem; font-weight: 650; }
.vote-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.vote-results { display: grid; gap: .55rem; margin-top: auto; padding: .75rem .85rem; border: 1px solid var(--rule); border-radius: 9px; }
.vote-results h3 { font-size: .98rem; letter-spacing: 0; }
.vote-bars { display: grid; gap: .6rem; }
.vote-row { font-size: .875rem; }
.vote-row-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .1rem .7rem; }
.vote-progress { height: 7px; overflow: hidden; border-radius: 20px; margin-top: .3rem; background: #c18c60; }
.vote-progress span { display: block; width: var(--w); height: 100%; background: #4d9568; border-radius: 20px; }

.receipt-grid { grid-template-columns: minmax(0, 1.03fr) minmax(0, 1.22fr); }
.receipt-controls { display: grid; align-content: start; gap: 1rem; }
.input-money { gap: .65rem; min-height: 51px; align-items: center; font-size: 1.1rem; }
.input-money span { color: var(--green); }
.inline-options { display: flex; flex-wrap: wrap; gap: .43rem; }
.receipt {
  padding: 1.35rem;
  background: #17392e;
  border-radius: var(--radius);
  color: #f7fbf6;
  border: 1px solid #17392e;
}
.receipt .eyebrow { color: var(--lime); }
.receipt .amount { font-size: clamp(2.15rem, 4.1vw, 3.95rem); font-weight: 670; margin: .33rem 0 .7rem; }
.receipt-line { display: grid; grid-template-columns: 1fr auto auto; gap: .65rem; padding: .55rem 0; align-items: baseline; border-top: 1px dashed #46705e; font-size: .92rem; }
.receipt-line .share { color: #b6d2c2; font-size: .875rem; font-variant-numeric: tabular-nums; min-width: 3.2rem; text-align: right; }
.receipt-line strong { text-align: right; font-variant-numeric: tabular-nums; min-width: 4.9rem; }
.receipt .hint { margin-top: .65rem; color: #cee0d4; font-size: .875rem; }
.key-value-list { display: grid; }
.key-value-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .56rem 0; border-bottom: 1px solid var(--rule); }
.key-value-list > div:last-child { border-bottom: 0; }
.key-value-list dd { text-align: right; white-space: nowrap; font-weight: 650; font-variant-numeric: tabular-nums; }
.receipt-footer { margin-top: 1rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.stat-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: .9rem 0; }
.stat-strip div { background: #f1f6f1; border-radius: 9px; padding: .75rem; }
.stat-strip dt { font-size: .875rem; color: var(--muted); }
.stat-strip dd { margin-top: .25rem; font-size: clamp(1.25rem, 2vw, 1.8rem); font-weight: 670; letter-spacing: -.045em; }

.watch-grid { align-items: start; }
.settings, .source-list { display: grid; gap: .85rem; }
.check-label { display: flex; align-items: center; gap: .58rem; font-size: .94rem; }
.check-label input { width: 1.1rem; height: 1.1rem; accent-color: var(--green); }
.watch-list, .source-cards { list-style: none; padding: 0; }
.watch-item { display: grid; gap: .36rem; padding: .92rem 0; border-bottom: 1px solid var(--rule); }
.watch-item:last-child { border: 0; padding-bottom: 0; }
.watch-item .watch-title { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-weight: 650; }
.notice { border: 1px solid #d3dfd0; background: #eff5eb; padding: .83rem .98rem; border-radius: 11px; color: var(--ink); }
.notice > * + * { margin-top: .3rem; }
.source-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.source-cards li { display: grid; gap: .42rem; }
.source-cards a { width: fit-content; font-weight: 650; }
.methodology { display: grid; gap: .9rem; }
.methodology dl { display: grid; gap: .69rem; }
.methodology dt { font-weight: 680; }
.methodology dd { color: var(--muted); }

.footer { max-width: 1520px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; padding: 1rem var(--gutter) 1.3rem; gap: .48rem 1rem; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--rule); }
.footer a { color: var(--green-deep); }

.dialog {
  padding: 0;
  width: min(680px, calc(100% - 2rem));
  max-height: min(88vh, 840px);
  max-height: min(88dvh, 840px);
  overflow: auto;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 80px rgb(16 34 26 / 30%);
}
.dialog::backdrop { background: rgb(13 28 22 / 59%); backdrop-filter: blur(3px); }
.search-dialog { margin-top: min(18vh, 160px); }
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1.05rem 1.3rem;
  border-bottom: 1px solid var(--rule);
}
.dialog-top h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
.dialog-body { padding: 1.1rem 1.3rem 1.3rem; }
.detail-dialog .dialog-body { display: grid; gap: 1rem; }
.search-results { margin-top: .78rem; }
.search-results .empty { padding: 1rem 0; text-align: left; }
.result-list { padding: 0; list-style: none; display: grid; }
.result-list li + li { border-top: 1px solid var(--rule); }
.result-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .55rem;
  padding: .65rem .42rem;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: .95rem;
}
.result-button:hover { background: #f1f6f1; }
.result-button > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.result-button .result-value { text-align: right; white-space: nowrap; }
.detail-hero { display: grid; gap: .57rem; }
.detail-hero > .amount { font-size: clamp(2.2rem, 5.5vw, 3.8rem); }
.detail-hero .amount-caption { color: var(--muted); }
.detail-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .52rem; }
.detail-fields div { padding: .7rem .8rem; background: var(--canvas); border-radius: 9px; }
.detail-fields dt { font-size: .85rem; color: var(--muted); }
.detail-fields dd { font-weight: 620; margin-top: .14rem; }
.source-ref { overflow-wrap: anywhere; }
.toast {
  position: fixed;
  z-index: 15;
  bottom: 1rem;
  right: 1rem;
  max-width: min(92vw, 320px);
  border-radius: 10px;
  background: var(--rail);
  color: #f2f8f3;
  box-shadow: 0 8px 24px rgb(0 0 0 / 16%);
  padding: .72rem .95rem;
  font-size: .875rem;
}
.noscript { margin: 1rem; padding: 1rem; background: var(--amber-bg); }

@media (min-width: 1320px) {
  .money-brief-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .money-brief-card h3 { min-height: 2.28em; }
}

@media (min-width: 681px) {
  @supports (grid-template-rows: subgrid) {
    .money-brief-card { display: grid; grid-template-rows: subgrid; grid-row: span 5; }
    .money-brief-card h3 { min-height: 0; }
    .money-brief-card .brief-details { margin-top: 0; }
  }
}

@media (min-width: 1400px) {
  .main { padding-top: 2rem; }
}

@media (max-width: 1100px) {
  :root { --rail-width: 205px; }
  .sidebar { padding-inline: .8rem; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  th, td { padding-inline: .76rem; }
}

@media (min-width: 881px) and (max-width: 1100px) {
  .navigation a { gap: .48rem; padding-inline: .55rem; }
}

@media (max-width: 880px) {
  .workspace { margin-left: 0; }
  .menu-button { display: inline-grid; }
  .sidebar { width: min(84vw, 264px); transform: translateX(-105%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
  .sidebar.menu-open { transform: none; visibility: visible; }
  .mobile-shade { display: block; position: fixed; z-index: 4; inset: 0; background: rgb(13 28 22 / 54%); }
  .topbar { min-height: 63px; }
  .search-launch { width: min(38vw, 282px); }
  .main { padding-top: 1.18rem; }
}

@media (max-width: 680px) {
  .dashboard-grid, .receipt-grid, .watch-grid { grid-template-columns: minmax(0, 1fr); }
  .stack { gap: 1rem; }
  .stat-grid { gap: .5rem; }
  .stat-card { padding: .68rem; gap: .35rem; }
  .stat-label { font-size: .81rem; flex-direction: column; align-items: start; gap: .3rem; line-height: 1.32; }
  .stat-card .amount { font-size: clamp(1.2rem, 4.8vw, 2rem); }
  .stat-meta { font-size: .75rem; }
  .icon-tile { width: 31px; height: 31px; }
  .project-grid, .vote-grid, .source-cards, .money-brief-grid { grid-template-columns: minmax(0, 1fr); }
  .page-intro .section-head { align-items: flex-start; flex-direction: column; }
  .filter-grid { grid-template-columns: 1fr 1fr; gap: .56rem; }
  .spending-filters { padding: .9rem; }
  th, td { padding-inline: .55rem; }
  th:first-child, td:first-child { padding-left: .8rem; }
  th:last-child, td:last-child { padding-right: .8rem; }
  .records-panel .section-head, .table-footer { padding-inline: .85rem; }
  table .date-cell, table .type-cell { display: none; }
  .record-mobile { display: block; }
  .mini-metrics dd { font-size: 1.2rem; }
}

@media (max-width: 405px) {
  :root { --gutter: .78rem; }
  .topbar-actions, .topbar-context { gap: .45rem; }
  .search-launch { width: auto; min-width: 41px; padding: 0; justify-content: center; }
  .search-launch .search-caption, .search-launch kbd { display: none; }
  .stat-card { padding: .55rem; }
  .detail-fields { grid-template-columns: minmax(0, 1fr); }
  .filter-grid > label:first-child { grid-column: 1 / -1; }
  .receipt { padding: 1rem; }
  .receipt-line { gap: .32rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.fallback-input { width: 100%; border: 1px solid var(--rule); border-radius: 8px; padding: .68rem .8rem; }
.vote-card, #photo-credit { scroll-margin-top: .7rem; }
.project-comparison { padding: .8rem .85rem; border: 1px solid var(--rule); border-radius: 10px; }

.home {
  --home-rule: #ced9ce;
  display: grid;
  gap: clamp(1.4rem, 2.6vw, 2.1rem);
  max-width: 1200px;
  margin-inline: auto;
}
.home-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.35rem, 4.5vw, 4.5rem);
  padding-block: .3rem clamp(1.4rem, 2.65vw, 2.25rem);
  border-bottom: 1px solid var(--home-rule);
}
.home-heading h1 {
  max-width: 15ch;
  color: var(--rail);
  font-size: clamp(2.65rem, 4.7vw, 4.75rem);
  line-height: 1;
  letter-spacing: -.06em;
  text-wrap: balance;
}
.home-heading p {
  max-width: 34ch;
  margin-top: .86rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.17rem);
  text-wrap: pretty;
}
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1.1rem; margin-top: 1.05rem; font-size: .91rem; font-weight: 650; }
.home-actions > a:last-child { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; }
.home-harbour {
  position: relative;
  width: 100%;
  aspect-ratio: 2.45;
  min-height: 168px;
  overflow: hidden;
  margin: 0;
  border-radius: 12px;
  background: var(--green-soft);
}
.home-harbour img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 53%; }
.home-harbour figcaption { position: absolute; right: .55rem; bottom: .55rem; }
.home-harbour a {
  display: block;
  padding: .22rem .46rem;
  border-radius: 4px;
  background: var(--rail);
  color: var(--surface);
  font-size: .75rem;
}
.home-harbour a:hover { color: var(--lime); }
.home-harbour a:focus-visible { outline-offset: 2px; }
.home-reading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.35rem, 3.3vw, 2.7rem);
}
.home-updates .section-head { align-items: center; flex-wrap: wrap; gap: .35rem .85rem; margin-bottom: .8rem; }
.home-updates .section-head a { font-size: .9rem; font-weight: 650; }
.home-update-list { list-style: none; padding: 0; }
.home-update {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto .75rem;
  align-items: center;
  gap: .35rem clamp(.5rem, 1.5vw, .95rem);
  min-height: 72px;
  padding: .8rem .68rem .8rem .12rem;
  border-bottom: 1px solid var(--home-rule);
  color: var(--ink);
  text-decoration: none;
}
.home-update:hover { background: #eaf1e8; }
.home-update:focus-visible { outline-offset: -2px; }
.home-update-title { font-size: 1rem; font-weight: 670; line-height: 1.2; letter-spacing: -.018em; }
.home-update:hover .home-update-title { text-decoration: underline; }
.home-update-meta { margin-top: .3rem; color: var(--muted); font-size: .875rem; }
.home-update-meta time { white-space: nowrap; }
.home-update-amount { color: var(--green-deep); white-space: nowrap; }
.home-update-arrow { color: var(--muted); font-size: 1.3rem; line-height: 1; }
.home-update-lead {
  min-height: 108px;
  padding: 1rem .68rem 1rem clamp(.7rem, 1.8vw, 1.15rem);
  border-left: 3px solid #5e886a;
  border-bottom: 0;
  border-radius: 0 9px 9px 0;
  background: #e4ede2;
}
.home-update-lead:hover { background: #dbe8da; }
.home-update-lead .home-update-title { font-size: clamp(1.12rem, 1.8vw, 1.6rem); letter-spacing: -.035em; }
.home-update-lead .home-update-amount { font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.12; letter-spacing: -.042em; }
.home-budget-rail { min-width: 0; }
.home-budget {
  display: grid;
  gap: 1.05rem;
  padding: clamp(1.16rem, 2vw, 1.7rem);
  border-radius: 12px;
  background: var(--rail);
  color: #f5faf4;
}
.home-budget h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.014em; }
.home-budget-amount { font-size: clamp(2.5rem, 3.7vw, 3.65rem); line-height: 1.03; letter-spacing: -.06em; }
.home-budget-label { margin-top: .25rem; color: #c9d9cd; font-size: .91rem; }
.home-facts {
  display: flex;
  min-height: 49px;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .4rem .12rem;
  border-bottom: 1px solid var(--home-rule);
  font-size: .93rem;
  font-weight: 650;
  text-decoration: none;
}
.home-facts:hover { text-decoration: underline; }
.catalogue-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; padding: 0 1.4rem .9rem; }
.archive-quick { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }
.catalogue-loading { padding: 1rem 1.4rem; color: var(--muted); border-top: 1px solid var(--rule); }
.catalogue-list { list-style: none; padding: 0; }
.catalogue-list > li { display: grid; grid-template-columns: minmax(100px, 118px) minmax(0, 1fr) auto; align-items: start; gap: .3rem 1rem; padding: .83rem 1.4rem; border-top: 1px solid var(--rule); }
.catalogue-list > li:hover { background: #f8fbf7; }
.catalogue-list .catalogue-date { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.catalogue-list .catalogue-title { color: var(--ink); font-weight: 670; text-decoration: none; overflow-wrap: anywhere; }
.catalogue-list .catalogue-title:hover { text-decoration: underline; }
.catalogue-meta { margin-top: .15rem; }
.catalogue-note { margin-top: .25rem; }
.catalogue-list .badge { justify-self: end; }
.archive-panel #archive-count { color: var(--green-deep); font-weight: 640; border-top: 0; }
.archive-page { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.archive-method { display: grid; gap: .9rem; }
.archive-coverage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; padding: 0; list-style: none; }
.archive-coverage > li { display: flex; justify-content: space-between; gap: .4rem .7rem; flex-wrap: wrap; align-items: center; padding: .65rem .72rem; border-radius: 9px; background: var(--canvas); }
.archive-coverage a { font-weight: 620; }
.search-archive-link { margin-top: .65rem; padding-top: .7rem; border-top: 1px solid var(--rule); font-size: .93rem; font-weight: 620; }
.search-results-heading { margin-bottom: .35rem; font-size: .94rem; font-weight: 690; }
.search-results:empty { display: none; }
#search-results:not(:empty) + #archive-search-results:has(.search-results-heading) { padding-top: .75rem; border-top: 1px solid var(--rule); }
.record-breakdown { display: grid; gap: .45rem; }
@media (max-width: 680px) {
  .home-masthead, .home-reading-grid { grid-template-columns: minmax(0, 1fr); }
  .home-masthead { gap: 1rem; padding-bottom: 0; border-bottom: 0; }
  .home-heading h1 { font-size: clamp(2.35rem, 7.8vw, 3.65rem); }
  .home-heading p { margin-top: .55rem; }
  .home-harbour { min-height: 0; height: clamp(112px, 28vw, 164px); aspect-ratio: auto; }
  .catalogue-controls { padding-inline: .85rem; }
  .catalogue-list > li { grid-template-columns: minmax(0, 1fr) auto; padding: .75rem .85rem; align-items: baseline; }
  .catalogue-entry { grid-row: 2; grid-column: 1 / -1; }
  .catalogue-list .badge { grid-row: 1; grid-column: 2; }
  .archive-coverage { grid-template-columns: minmax(0, 1fr); }
  .archive-method .section-head { flex-wrap: wrap; }
}
@media (max-width: 510px) {
  .home-update-lead { grid-template-columns: minmax(0, 1fr) .75rem; padding: .9rem .68rem .9rem .82rem; }
  .home-update-lead .home-update-amount { grid-column: 1; grid-row: 2; margin-top: .18rem; }
  .home-update-lead .home-update-arrow { grid-column: 2; grid-row: 1 / 3; }
}
.badge.scrutiny { background: #fbe6de; color: #872f23; }
.document { max-width: 1140px; margin-inline: auto; }
.breadcrumbs { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .55rem; color: var(--muted); font-size: .91rem; }
.breadcrumbs a { font-weight: 630; }
.document-header {
  display: grid;
  justify-items: start;
  gap: .75rem;
  padding: clamp(1.2rem, 3vw, 2.45rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #e7f1e8;
}
.document-header h1 { max-width: 17ch; color: var(--rail); font-size: clamp(2.3rem, 5.15vw, 4.95rem); line-height: 1.02; letter-spacing: -.06em; }
.document-header .document-lede { max-width: 66ch; color: #29473a; font-size: clamp(1.03rem, 1.5vw, 1.26rem); line-height: 1.48; }
.document-header .document-byline { color: var(--muted); font-size: .93rem; }
.document-header .document-stats { width: 100%; margin-top: .55rem; }
.case-header { border-color: #e8d4c8; background: #fff7f0; }
.case-header .document-lede { color: #4b3d35; }
.document-jumps { display: flex; flex-wrap: wrap; gap: .48rem; }
.document-jumps a { padding: .45rem .72rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); font-size: .91rem; font-weight: 650; }
.document-jumps a:hover { background: var(--green-soft); }
.document-columns { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: 1rem; }
.document-section { display: grid; align-content: start; gap: .86rem; scroll-margin-top: 1rem; }
.document-section p { max-width: 76ch; }
.document-section h2, .document-section h3, .document-section h4 { color: var(--rail); }
.document-section .document-amount { color: var(--green-deep); font-size: clamp(2rem, 3.6vw, 3.3rem); overflow-wrap: anywhere; }
.document-section .section-head { flex-wrap: wrap; }
.document-section .spending-breakdown { margin-block: .22rem; }
.scrutiny-panel { border-left: 4px solid #ac4734; background: #fff8f4; }
.scrutiny-panel h2 { color: #732e23; }
.scrutiny-line { padding-top: .75rem; border-top: 1px solid #ebd4c9; }
.question-list { display: grid; gap: .54rem; padding-left: 1.35rem; }
.document-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem 1.1rem; color: var(--green-deep); }
.document-actions a { display: inline-flex; align-items: center; min-height: 38px; font-size: .93rem; font-weight: 650; }
.document-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .68rem; }
.document-stats > div { display: flex; min-width: 0; flex-direction: column-reverse; justify-content: flex-end; gap: .28rem; padding: .8rem; border: 1px solid var(--rule); border-radius: 11px; background: var(--surface); }
.document-stats dt { color: var(--muted); font-size: .93rem; }
.document-stats .amount { color: var(--green-deep); font-size: clamp(1.4rem, 2.55vw, 2.4rem); overflow-wrap: anywhere; }
.money-rows { display: grid; border-top: 1px solid var(--rule); }
.money-rows > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: baseline; padding: .57rem .62rem; border-bottom: 1px solid var(--rule); }
.money-rows dd { text-align: right; font-weight: 670; white-space: nowrap; }
.money-rows .money-total { background: var(--green-soft); color: var(--green-deep); font-weight: 670; }
.budget-receipt { border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.money-rows.budget-receipt > div { padding: .62rem clamp(.65rem, 2vw, 1.15rem); }
.budget-receipt > .budget-receipt-line dt { padding-inline-start: .65rem; color: var(--muted); }
.budget-receipt > .budget-receipt-opening,
.budget-receipt > .budget-receipt-spending,
.budget-receipt > .budget-receipt-closing { color: var(--green-deep); font-weight: 720; background: var(--green-soft); }
.budget-receipt > .budget-receipt-spending { color: var(--ink); background: var(--canvas); }
.budget-receipt > .budget-receipt-closing { border-top: 2px solid #8cae9b; border-bottom: 0; }
.budget-receipt-opening dd, .budget-receipt-closing dd { font-size: clamp(1.05rem, 2vw, 1.42rem); }
.budget-receipt .budget-receipt-note {
  grid-column: 1 / -1;
  margin-top: -.24rem;
  padding-inline-start: .65rem;
  color: var(--muted);
  text-align: left;
  white-space: normal;
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.45;
}
.budget-receipt-note a { display: inline-block; max-width: 100%; font-weight: 600; }
.budget-pension-terms { display: grid; gap: .55rem; }
.budget-pension-terms dt { font-weight: 680; }
#where-it-goes .breakdown-row[id] { scroll-margin-top: 1rem; }
#planned-costs { scroll-margin-top: 1rem; }
.breakdown-list { display: grid; }
.breakdown-row { border-bottom: 1px solid var(--rule); }
.breakdown-row:first-child { border-top: 1px solid var(--rule); }
.breakdown-row > summary, .scheme-group > summary {
  display: grid;
  align-items: center;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  gap: .55rem;
  min-height: 48px;
  padding: .65rem .55rem;
  color: var(--green-deep);
  font-weight: 680;
  cursor: pointer;
  list-style: none;
}
.breakdown-row > summary::-webkit-details-marker, .scheme-group > summary::-webkit-details-marker { display: none; }
.breakdown-row > summary::before, .scheme-group > summary::before { content: "+"; color: var(--green-deep); font-size: 1.2rem; font-weight: 590; }
.breakdown-row[open] > summary::before, .scheme-group[open] > summary::before { content: "−"; }
.breakdown-row > summary:hover, .scheme-group > summary:hover { background: var(--green-soft); }
.breakdown-row > summary small { display: block; color: var(--muted); font-size: .875rem; font-weight: 520; }
.breakdown-detail { display: grid; gap: .67rem; max-width: 60rem; padding: .12rem .55rem .8rem 2.1rem; }
.breakdown-detail .money-rows { background: #f7faf7; }
.brief-details { margin-top: auto; border-top: 1px solid var(--rule); border-bottom: 0; }
.brief-details > summary { min-height: 44px; padding-inline: 0; font-size: .925rem; }
.brief-details > .breakdown-detail { padding-inline: 0; padding-bottom: .3rem; }
.updates-options { border-bottom: 0; }
.home-more { border-block: 1px solid var(--home-rule); }
.home-more > .home-dashboard { border: 0; }
.home-more > .home-dashboard + .home-dashboard { border-top: 1px solid var(--home-rule); }
.home-more > .home-dashboard > summary { padding-inline: .12rem; }
.home-more > .home-dashboard[open] { padding-bottom: 1.15rem; }
.home-dashboard[open] > summary { margin-bottom: 1.3rem; }
.updates-options > summary, .spending-preview > summary { padding-inline: 1.4rem; }
.spending-options > .breakdown-detail { max-width: none; }
.spending-options .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.breakdown-group h4 { margin: .25rem 0 .55rem; font-size: 1rem; }
.document-inset { display: grid; gap: .76rem; padding: 1rem; border-radius: 12px; background: var(--canvas); }
.history-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.history-card { align-content: stretch; grid-template-rows: auto auto 1fr auto; }
.history-card .amount { color: var(--green-deep); font-size: clamp(1.85rem, 3vw, 2.75rem); }
.history-card .document-actions { justify-content: space-between; }
.scheme-group { border: 1px solid var(--rule); border-radius: 10px; }
.scheme-group > summary { padding-inline: .8rem; }
.scheme-group .breakdown-list { padding-inline: .55rem; }
.scheme-help { margin: .1rem .85rem .7rem; }
.programme-search { max-width: 32rem; }
.result-button[href] { color: var(--ink); text-decoration: none; }

.expense-alerts { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.expense-alert {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "date amount" "title amount" "reason amount";
  align-items: center;
  gap: .28rem .85rem;
  padding: .85rem .7rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
}
.expense-alert:hover { background: var(--green-soft); }
.expense-alert:hover h3 { text-decoration: underline; }
.expense-alert-date { grid-area: date; }
.expense-alert-date time { white-space: nowrap; }
.expense-alert h3 { grid-area: title; }
.expense-alert-value { grid-area: amount; display: grid; justify-items: end; gap: .1rem; text-align: right; }
.expense-alert strong { color: var(--green-deep); white-space: nowrap; font-size: 1.2rem; }
.expense-alert-reason { grid-area: reason; }
.expense-filter { display: grid; grid-template-columns: minmax(0, 22rem) minmax(6.25rem, 9rem) minmax(10rem, 12rem); gap: .75rem; }
.expense-filter-extra { grid-column: 1 / -1; width: fit-content; min-height: 36px; cursor: pointer; }
.expense-results { display: grid; gap: .55rem; }
.expense-results > button { justify-self: start; }
.expense-total { display: grid; gap: .3rem; padding: .85rem 1rem; background: var(--green-soft); border-radius: 9px; }
.expense-total strong { color: var(--green-deep); font-size: clamp(1.55rem, 3vw, 2.2rem); }
.expense-record[id] { scroll-margin-top: 1rem; }
.expense-record .expense-figure { text-align: right; }
.expense-record > summary .badge { margin-top: .24rem; white-space: normal; }
.expense-review-reason { padding: .55rem .75rem; border-left: 3px solid #b47957; background: #faf1eb; }

@media (max-width: 750px) {
  .document-columns, .history-cards { grid-template-columns: minmax(0, 1fr); }
  .document-stats { gap: .4rem; }
  .document-stats > div { padding: .65rem .52rem; }
}
@media (max-width: 510px) {
  .expense-alert { grid-template-areas: "date amount" "title title" "reason reason"; }
  .expense-filter { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
  .expense-query-field { grid-column: 1 / -1; }
  .expense-record .expense-figure { max-width: 7.4rem; font-size: .88rem; }
  .document-header .document-stats, .document-stats { grid-template-columns: minmax(0, 1fr); }
  .document-stats > div { padding: .53rem .68rem; }
  .breakdown-row > summary { grid-template-columns: .8rem minmax(0, 1fr) auto; gap: .38rem; padding-inline: .32rem; }
  .updates-options > summary, .spending-preview > summary { padding-inline: .85rem; }
  .spending-options .filter-grid { grid-template-columns: minmax(0, 1fr); }
  .breakdown-detail { padding-left: .48rem; }
  .money-rows > div { gap: .48rem; padding-inline: .38rem; }
  .budget-receipt dt { font-size: .9rem; line-height: 1.35; }
  .budget-receipt > .budget-receipt-line dt, .budget-receipt .budget-receipt-note { padding-inline-start: .25rem; }
  .document-section .spending-breakdown > div { gap: .48rem; }
}
