:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #66716d;
  --line: #d9dfdc;
  --paper: #f4f5f1;
  --panel: #ffffff;
  --actual: #17684a;
  --review: #9a5b0a;
  --forecast: #5746a5;
  --trace: #1e6486;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button, select, input { min-height: 44px; }
button { border: 0; border-radius: 10px; padding: 0 18px; background: var(--ink); color: white; cursor: pointer; }
button:hover { opacity: .88; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #6ba7c4; outline-offset: 2px; }
.secondary { background: white; color: var(--ink); border: 1px solid var(--line); margin-bottom: 14px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 20; background: #fff; color: #000; padding: 12px; }
.skip-link:focus { top: 12px; }
.topbar { display: flex; justify-content: space-between; gap: 28px; align-items: end; padding: 46px max(24px, calc((100vw - 1240px) / 2)); background: #17201d; color: #fff; }
.topbar h1 { margin: 3px 0 8px; font-size: clamp(2rem, 4vw, 4rem); line-height: .98; max-width: 800px; letter-spacing: -.045em; }
.topbar button { background: #fff; color: var(--ink); flex: 0 0 auto; }
.eyebrow, .step { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 750; }
.eyebrow { color: #b9c8c1; margin: 0; }
.lede { margin: 0; color: #cdd7d2; }
main { max-width: 1240px; margin: 0 auto; padding: 32px 24px 80px; }
section { padding: 32px 0; border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2.2rem); letter-spacing: -.025em; }
.step { margin: 0 0 5px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 11px; border: 1px solid currentColor; border-radius: 999px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; }
.actual { color: var(--actual); } .review { color: var(--review); } .forecast { color: var(--forecast); } .trace { color: var(--trace); } .neutral { color: var(--muted); }
.notice { background: #eef0ec; border-left: 4px solid var(--muted); border-radius: 4px 10px 10px 4px; padding: 13px 15px; color: #4a5551; }
.source-grid, .cards, .method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.source-card, .item, .method-card { min-width: 0; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 0 rgba(17,31,25,.03); }
.source-card h3, .item h3, .method-card h3 { margin: 0 0 10px; font-size: 1rem; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr); gap: 7px 12px; margin: 0; font-size: .88rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.item p { margin: 7px 0; color: #46504c; }
.item .money { font-size: 1.35rem; color: var(--ink); font-weight: 760; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { border-radius: 999px; background: #eef0ec; padding: 5px 9px; font-size: .76rem; overflow-wrap: anywhere; }
details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .78rem; background: #f5f6f3; padding: 12px; border-radius: 8px; }
.trace-form { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.trace-form > label { display: block; margin-bottom: 8px; font-weight: 750; }
.trace-controls { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.5fr) auto; gap: 8px; }
input, select { width: 100%; border: 1px solid #abb6b1; border-radius: 9px; background: #fff; color: var(--ink); padding: 9px 11px; }
.hint { margin: 10px 0 0; font-size: .82rem; color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }
.error { background: #fff0ed; color: #8e2b22; border-left-color: #b63f32; }
.method-card ul { margin: 0; padding-left: 19px; } .method-card li + li { margin-top: 7px; }
@media (max-width: 760px) {
  .topbar { align-items: stretch; flex-direction: column; padding: 30px 18px; }
  .topbar button { width: 100%; }
  main { padding: 16px 14px 60px; }
  section { padding: 26px 0; }
  .source-grid, .cards, .method-grid { grid-template-columns: 1fr; }
  .trace-controls { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .section-head { align-items: flex-start; }
}
