/* jasonfurman.org/research/spending-decomposition — cream, teal, Source Serif Pro + Inter (the look it carried over from the apps hub). */
:root {
  --accent: #0E7C7B; --accent-soft: #6AB7B6; --charcoal: #1F2A30; --body: #435058;
  --bg: #FBF8F1; --surface: #F3EDE0; --rule: #DDD9CF; --muted: #8A938F; --err: #A43B2E;
  /* chart series — validated with the dataviz palette checker (light surface) */
  --c-leg: #4472C4; --c-adm: #159E8C; --c-dem: #ED7D31; --c-xhc: #8E3B5E; --c-eco: #C98500; --c-cap: #7E5BA6;
  --c-policy: #4472C4; --c-nonpolicy: #ED7D31; --c-actual: #262626; --grid: #E4E0D6;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--body); }
body { font-family: 'Inter', system-ui, sans-serif; font-size: 15px; line-height: 1.45; }
a { color: var(--accent); }
.wrap { max-width: 1260px; margin: 0 auto; padding: 18px 16px 64px; }

header.top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
header.top h1 { font-family: 'Source Serif Pro', Georgia, serif; font-weight: 700; color: var(--charcoal); font-size: 27px; margin: 0; letter-spacing: -0.01em; }
.brand-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.standfirst { margin: 6px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--charcoal); max-width: 1000px; }
.standfirst .w-stance { font-weight: 600; color: #2F5AA8; } .standfirst .w-cond { font-weight: 600; color: #9A4A14; }
.backlink { display: inline-block; font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 6px; }
.backlink:hover { color: var(--charcoal); }
nav.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 18px; }
nav.tabs a { text-decoration: none; font-size: 13.5px; font-weight: 500; padding: 7px 0; width: 132px; text-align: center; border: 1px solid var(--rule); border-radius: 999px; color: var(--charcoal); background: #fff; }
nav.tabs a.on { background: var(--accent); border-color: var(--accent); color: #fff; }

h2 { font-family: 'Source Serif Pro', Georgia, serif; font-size: 19px; font-weight: 600; color: var(--charcoal); margin: 22px 0 8px; }
h3 { font-size: 14px; font-weight: 600; color: var(--charcoal); margin: 16px 0 6px; }
p.note, .caption { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
p.lede { font-size: 15px; color: var(--body); max-width: 820px; margin: 0 0 12px; }

.card { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; }

/* headline tiles — one row of three, content centered both ways */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.tile { background: #fff; border: 1px solid var(--rule); border-radius: 12px; min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px; }
.tile .lab { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.tile .val { font-size: 30px; font-weight: 600; color: var(--charcoal); line-height: 1.1; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tile .eg { font-size: 11.5px; color: var(--err); margin-top: 6px; }
.tile.policy .val { color: var(--c-policy); } .tile.nonpolicy .val { color: #B85C1C; }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; } .tile { min-height: 70px; } }
table.t.dense { font-size: 12.5px; } table.t.dense th, table.t.dense td { padding: 5px 4px; }

/* segmented controls: every button the same fixed size */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg button { font: inherit; font-size: 12.5px; font-weight: 500; color: var(--charcoal); background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 6px 0; width: 138px; min-height: 34px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 0 auto; }
.seg button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg button:disabled { color: var(--muted); background: var(--surface); cursor: not-allowed; border-style: dashed; }
.seg.wide button { width: 156px; }
.seg.narrow button { width: 126px; font-size: 12px; }
.ctrl-row { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 4px 0 12px; }
.ctrl-row .lab { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-right: 6px; }

/* assumptions bar — horizontal, directly under the headline tiles */
.assumptions { margin-top: 12px; }
.assumptions .arow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.assumptions .arow .lab { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.presets button { font: inherit; font-size: 12.5px; font-weight: 500; padding: 7px 0; width: 132px; min-height: 34px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; color: var(--charcoal); cursor: pointer; flex: 0 0 auto; white-space: nowrap; }
.presets button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.presets button:disabled { color: var(--muted); background: var(--surface); cursor: not-allowed; }
.dialgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(198px, 1fr)); gap: 10px 14px; align-items: start; }
/* one row of seven on a normal desktop window; below that the auto-fit rule above wraps them */
@media (min-width: 980px) { .dialgrid { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; gap: 10px 8px; } .dialgrid .dial .seg button { font-size: 11px; min-height: 44px; padding: 4px 3px; } }   /* one row however many dials there are (eight since the administrative-changes dial, 2026-09-03) */   /* one fixed height for every dial button, so a label that wraps to two lines does not make its button taller than its neighbors (the .dial qualifier outranks the later .dial .seg button rule) */
.dial { border-top: 1px solid var(--rule); padding-top: 8px; }
.dial .dlab { font-size: 12px; font-weight: 600; color: var(--charcoal); margin-bottom: 6px; min-height: 30px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px; }
.dial .dlab .why { font-size: 11px; font-weight: 400; color: var(--err); }
.dial.off .dlab { color: var(--muted); }
.dial .seg { display: grid; grid-template-columns: 1fr; gap: 4px; }
.dial .seg button { width: 100%; font-size: 12px; white-space: normal; line-height: 1.2; padding: 6px 4px; min-height: 34px; }
.assumptions .hint { margin: 10px 0 0; min-height: 32px; }

/* charts */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; display: block; font-family: 'Inter', system-ui, sans-serif; }
.chart text { fill: var(--charcoal); font-size: 12px; }
.chart .axis text { fill: var(--body); font-size: 11.5px; }
.chart .grid line { stroke: var(--grid); stroke-width: 1; }
.chart .zero line, .chart line.zero { stroke: #7A8388; stroke-width: 1; }
.chart .lbl { font-size: 11.5px; font-weight: 600; }
.chart .muted { fill: var(--muted); font-size: 11px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--body); margin: 6px 0 2px; align-items: center; justify-content: center; }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend .ln { display: inline-block; width: 18px; height: 0; border-top: 2px solid; margin-right: 5px; vertical-align: 3px; }
.tip { position: fixed; pointer-events: none; background: var(--charcoal); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 6px; z-index: 20; display: none; max-width: 300px; line-height: 1.4; }
.tip b { color: #fff; }

/* tables: every column centered, headers included */
table.t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.t th, table.t td { text-align: center; padding: 6px 6px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.t th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; background: var(--surface); }
table.t tr.group td { font-weight: 600; color: var(--charcoal); background: #FAF7F0; cursor: pointer; }
table.t tr.group td:first-child::before { content: '▸ '; color: var(--muted); }
table.t tr.group.open td:first-child::before { content: '▾ '; }
table.t tr.line td:first-child { padding-left: 22px; color: var(--body); }
table.t tr.total td { font-weight: 700; color: var(--charcoal); border-top: 2px solid var(--charcoal); }
table.t td.neg { color: #8A2B1E; }
table.t td.pos { color: var(--charcoal); }
.scrollx { overflow-x: auto; }

/* the results tree table: left-justified names, equal-width number columns, policy / non-policy bands, bold sums */
table.t.tree { table-layout: fixed; min-width: 660px; }
table.t.tree.dense { min-width: 880px; font-size: 11.5px; }
table.t.tree.dense th, table.t.tree.dense td { padding: 5px 2px; }
table.t.tree.dense th { font-size: 10.5px; letter-spacing: 0.03em; }
table.t.tree th.name, table.t.tree td.name { text-align: left; width: 30%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.t.tree.dense th.name, table.t.tree.dense td.name { width: 25%; }
table.t.tree thead tr.band th { font-size: 11px; letter-spacing: 0.08em; border-bottom: 0; padding-bottom: 2px; background: transparent; }
table.t.tree th.pol, table.t.tree tr.band th.pol { color: #2F5AA8; background: rgba(68,114,196,0.10); }
table.t.tree th.non, table.t.tree tr.band th.non { color: #9A4A14; background: rgba(237,125,49,0.12); }
table.t.tree td.pol { background: rgba(68,114,196,0.05); }
table.t.tree td.non { background: rgba(237,125,49,0.06); }
table.t.tree td.sum, table.t.tree th.sum { font-weight: 700; color: var(--charcoal); }
table.t.tree td.pol.sum { background: rgba(68,114,196,0.13); border-left: 2px solid rgba(68,114,196,0.35); }
table.t.tree td.non.sum { background: rgba(237,125,49,0.16); border-left: 2px solid rgba(237,125,49,0.4); }
table.t.tree tr.d0 td { font-weight: 700; color: var(--charcoal); background: #FAF7F0; }
table.t.tree tr.d0 td.pol { background: rgba(68,114,196,0.09); } table.t.tree tr.d0 td.non { background: rgba(237,125,49,0.10); }
table.t.tree tr.d1 td { font-weight: 600; color: var(--charcoal); }
table.t.tree tr.d1 td.name { padding-left: 18px; }
table.t.tree tr.d2 td { color: var(--body); font-weight: 400; }
table.t.tree tr.d2 td.name { padding-left: 34px; }
table.t.tree tr.exp { cursor: pointer; }
table.t.tree .tri { display: inline-block; width: 14px; color: var(--muted); font-size: 11px; }
table.t.tree tr.total td { border-top: 2px solid var(--charcoal); background: #fff; }
table.t.tree tr.total.memo td { border-top: 1px solid var(--rule); font-weight: 600; }   /* the "Total ex defense" memo row reads a step lighter than the Total above it */
table.t.tree td.chg { font-weight: 600; }

/* methodology */
.prog { border-top: 1px solid var(--rule); padding: 14px 0 6px; }
.prog h3 { margin-top: 0; font-size: 16px; font-family: 'Source Serif Pro', Georgia, serif; font-weight: 600; }
.prog .nums { font-size: 13px; color: var(--muted); margin: -2px 0 8px; }
.prog .nums b { color: var(--charcoal); font-weight: 600; }
.prog p { margin: 0 0 8px; max-width: 900px; }
ul.plain { margin: 4px 0 8px 18px; padding: 0; }
ul.plain li { margin: 2px 0; }
.small { font-size: 13px; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.toc a { font-size: 12.5px; text-decoration: none; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 10px; background: #fff; color: var(--charcoal); }
.pill { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted); vertical-align: 1px; margin-left: 4px; }
.pill.leg { color: var(--c-leg); border-color: var(--c-leg); } .pill.adm { color: var(--c-adm); border-color: var(--c-adm); } .pill.pri { color: #2A5D9F; border-color: #2A5D9F; }
.hint { font-size: 12.5px; color: var(--muted); }
.err { color: var(--err); font-weight: 600; }
.draftnote { color: var(--err); font-weight: 600; font-size: 13px; margin: 2px 0 6px; }

/* excluded-items table on the methodology page */
table.t.excl { table-layout: fixed; min-width: 720px; }
table.t.excl th.name, table.t.excl td.name { text-align: left; width: 24%; }
table.t.excl th.why, table.t.excl td.why { text-align: left; width: 44%; font-size: 12px; color: var(--body); line-height: 1.45; }
table.t.excl td { vertical-align: top; padding-top: 8px; }
table.t.excl tr.sub td { font-weight: 700; color: var(--charcoal); background: #FAF7F0; }
table.t.excl tr.apart td { border-top: 2px solid var(--rule); color: var(--muted); }
table.t.excl tr.apart td.name { color: var(--charcoal); }
section.excluded { border-top: 1px solid var(--rule); padding-top: 14px; }

/* the ranked-programs table */
table.t.ranked { table-layout: fixed; min-width: 700px; }
table.t.ranked th.name, table.t.ranked td.name { text-align: left; width: 20%; font-weight: 600; color: var(--charcoal); }
table.t.ranked th, table.t.ranked td { vertical-align: top; padding-top: 9px; }
table.t.ranked th.chg, table.t.ranked td.chg { width: 8%; font-weight: 700; color: var(--charcoal); }
table.t.ranked th.why, table.t.ranked td.why { width: 72%; }
table.t.ranked th.why, table.t.ranked td.why { text-align: left; font-size: 13px; color: var(--body); line-height: 1.5; font-weight: 400; }

.ctrl-row .ctrl-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* methodology: one summary paragraph, the rest behind a disclosure, so Program by program sits high on the page */
details.method > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent); list-style: none; padding: 8px 0 2px; }
details.method > summary::-webkit-details-marker { display: none; }
details.method > summary::before { content: '▸ '; }
details.method[open] > summary::before { content: '▾ '; }

/* deep-dive pages: long-form prose in a card; tables center-aligned per the house rule */
.deep { max-width: 980px; }
.deep h2 { font-size: 18px; margin: 26px 0 8px; border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
.deep h3 { font-size: 14.5px; margin: 18px 0 6px; }
.deep p, .deep li { font-size: 14px; line-height: 1.55; color: var(--body); }
.deep table { border-collapse: collapse; width: 100%; margin: 8px 0 14px; font-size: 12.5px; }
.deep th, .deep td { border: 1px solid var(--rule); padding: 5px 8px; text-align: center; vertical-align: top; }
.deep th { background: var(--surface); color: var(--charcoal); font-weight: 600; }
.deep .box { background: #FFF7E1; border-left: 4px solid #D4B106; padding: 10px 14px; margin: 12px 0 16px; border-radius: 0 8px 8px 0; font-size: 14px; line-height: 1.55; }
.deep .kicker { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 4px; }
.deep .stand { font-size: 13px; color: var(--muted); font-style: italic; margin: 0 0 12px; }
.deep blockquote { border-left: 3px solid var(--rule); margin: 8px 0; padding: 2px 14px; color: var(--body); }
.deep code { font-family: Menlo, monospace; font-size: 12px; }
.deep .back { font-size: 13px; margin: 18px 0 0; }
.dives { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-top: 8px; }
.dives a.dive { display: block; text-decoration: none; border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; background: #fff; color: var(--charcoal); }
.dives a.dive:hover { border-color: var(--accent); }
.dives a.dive b { display: block; font-size: 14px; margin-bottom: 4px; color: var(--accent); }
.dives a.dive span { font-size: 12.5px; color: var(--body); line-height: 1.45; }
/* deep-dive banner when a non-FY2000 window is selected (audit finding 3, 2026-09-05) */
.winbanner { margin: 0 0 14px; padding: 8px 12px; border: 1px solid #d9b24a; border-radius: 8px; background: #fdf6e3; color: #6b5314; font-size: 13px; line-height: 1.5; }
