/* Federal budget (federal-budget.php). Mobile first. A ruled budget ledger on the paper canvas: ink rules, serif headings,
   tabular numbers, no cards and no pills. Charts come from css/archive-charts.css; this file styles the controls, the
   ledger tables and the notes. Tokens only (css/vf-tokens.css). Loads after css/newsroom-voting-timeline.css, which
   supplies the shared .vt-pick form controls. */
.fb-main { padding-bottom: 96px; }
.fb-lead { max-width: 46rem; margin: 0 0 14px; color: var(--vf-ink); font: 600 1.35rem/1.35 var(--vf-font-head); }
.fb-sub { margin: 28px 0 10px; padding-top: 10px; border-top: 2px solid var(--vf-ink); color: var(--vf-ink); font: 700 1.2rem/1.25 var(--vf-font-head); }
.fb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The money setting: three plain links on a single ruled line. */
.fb-controls { display: grid; gap: 18px; }
.fb-unit { max-width: 52rem; }
.fb-unit-label { display: block; margin: 0 0 6px; color: var(--vf-mute); font: 800 .75rem var(--vf-font-body); letter-spacing: .12em; text-transform: uppercase; }
.fb-unit-links { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--vf-ink); border-bottom: 1px solid var(--vf-rule-strong); }
.fb-unit-links li { flex: 1 1 auto; margin: 0; }
.fb-unit-links a { display: block; min-height: 44px; padding: 12px 14px; border-left: 1px solid var(--vf-rule-strong); color: var(--vf-blue-text); font: 700 .95rem/1.2 var(--vf-font-body); text-decoration: none; }
.fb-unit-links li:first-child a { border-left: 0; }
.fb-unit-links a[aria-current="true"] { background: var(--vf-ink); color: var(--vf-surface); }
.fb-unit-links a:hover { text-decoration: underline; }
.fb-unit-note { margin: 8px 0 0; color: var(--vf-ink-2); font-size: .9rem; line-height: 1.45; }
.fb-jump { display: flex; flex-wrap: wrap; gap: 0 18px; }
.fb-jump a { display: inline-block; padding: 8px 0; color: var(--vf-blue-text); font-size: .9rem; }

/* Switch between president and Congress. */
.fb-tabs { display: flex; margin: 0 0 12px; padding: 0; list-style: none; border-bottom: 2px solid var(--vf-ink); }
.fb-tabs li { margin: 0; }
.fb-tabs a { display: block; min-height: 44px; padding: 12px 18px; color: var(--vf-blue-text); font: 700 .95rem/1.2 var(--vf-font-body); text-decoration: none; }
.fb-tabs a[aria-current="true"] { background: var(--vf-ink); color: var(--vf-surface); }

.fb-pick, .fb-pair { margin: 0 0 14px; }
.fb-pick select, .fb-pair select { min-height: 44px; max-width: 100%; }

/* Ledger tables: stacked records on phones, a ruled table from 720px. */
.fb-scroll { overflow-x: auto; margin: 0 0 14px; }
.fb-table { width: 100%; margin: 0; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fb-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fb-table tr { display: block; margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--vf-rule-strong); background: var(--vf-surface); }
.fb-table th[scope="row"] { display: block; margin: 0 0 4px; color: var(--vf-ink); font: 700 1rem var(--vf-font-head); text-align: left; }
.fb-table td { display: block; padding: 2px 0; color: var(--vf-ink); font-size: .95rem; overflow-wrap: anywhere; }
.fb-table td::before { content: attr(data-label) ": "; color: var(--vf-mute); font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.fb-table .fb-gap { color: var(--vf-ink-2); font-style: italic; }
.fb-table tr.fb-super { background: var(--vf-surface-2); }
.fb-subname { display: block; color: var(--vf-mute); font: 400 .8rem var(--vf-font-body); }
.fb-indent { display: inline-block; padding-left: 14px; font-weight: 400; }

.fb-source, .fb-csv { margin: 0 0 10px; font-size: .88rem; overflow-wrap: anywhere; }
.fb-source { max-width: 62rem; color: var(--vf-ink-2); line-height: 1.5; }
.fb-source a, .fb-csv a, .fb-main .measure a, .fb-notes a, .fb-jump a { color: var(--vf-blue-text); }
.fb-csv a { font-weight: 700; }
.fb-main code { overflow-wrap: anywhere; font-size: .8rem; }
.fb-wars { display: grid; gap: 4px 24px; margin: 0 0 10px; padding: 0; list-style: none; font-size: .95rem; }
.fb-wars strong { margin-right: 6px; }
.fb-estimate { max-width: 52rem; margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--vf-gold-text); background: var(--vf-gold-soft); color: var(--vf-ink); font-size: .95rem; }
.fb-notes { display: grid; gap: 8px; max-width: 46rem; margin: 0 0 14px; padding-left: 20px; color: var(--vf-ink); font-size: .95rem; }

@media (min-width: 600px) {
  .fb-wars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 720px) {
  .fb-table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .fb-table tr { display: table-row; margin: 0; padding: 0; border: 0; background: transparent; }
  .fb-table tr.fb-super { background: var(--vf-surface-2); }
  .fb-table th, .fb-table td { padding: 10px 12px; border-bottom: 1px solid var(--vf-rule-strong); text-align: left; vertical-align: top; }
  .fb-table thead th { border-bottom: 2px solid var(--vf-ink); color: var(--vf-mute); font-size: .6875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .fb-table thead th.fb-num { text-align: right; }
  .fb-table th[scope="row"] { display: table-cell; margin: 0; font-size: .95rem; }
  .fb-table td { display: table-cell; font-size: .95rem; }
  .fb-table td.fb-num { text-align: right; }
  .fb-table td::before { content: none; }
  .fb-table .fb-gap { text-align: left; }
  .fb-table-wide td.fb-text { min-width: 9rem; }
  .fb-lead { font-size: 1.6rem; }
  .fb-subname { margin-top: 2px; }
  .fb-unit-links li { flex: 0 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .fb-main * { transition: none !important; } }

/* Head block: lead, source line, money setting and the jump row sit together above the first chart. */
.fb-controls { gap: 12px; margin-top: 14px; }
.fb-method { color: var(--vf-ink-2); font-size: .95rem; }
.fb-unit-links a { font-size: .88rem; padding: 10px 8px; line-height: 1.2; display: flex; align-items: center; min-height: 48px; }
.fb-unit-links li { flex: 1 1 0; }
.fb-jump a { min-height: 40px; display: inline-flex; align-items: center; white-space: nowrap; }
@media (max-width: 719px) {
  .fb-jump { flex-wrap: nowrap; overflow-x: auto; gap: 0 20px; padding: 0 0 2px; border-top: 1px solid var(--vf-rule-strong); border-bottom: 1px solid var(--vf-rule-strong); -webkit-overflow-scrolling: touch; }
}
