/* The federal money atlas inside Unvault: Unvault's neutrals, mint and Inter Tight; atlas layout unchanged. */
#atlas { --bg: #eeeeec; --ink: #1c1c1c; --mute: #5d5d5a; --faint: #8a8a86; --line: #d3d3cf; --white: #f7f7f5; --green: #5dbb94; --green-ink: #1f6b4c;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "JetBrains Mono", ui-monospace, Menlo, monospace; background: transparent; font-family: var(--sans); }
:root[data-theme="dark"] #atlas { --bg: #18181b; --ink: #f7f7f5; --mute: #a1a1a6; --faint: #6b6b70; --line: #303036; --white: #222226; --green: #5dbb94; --green-ink: #6cc39f; }
#atlas #atlas-main { padding: 0 0 24px; }
#atlas #atlas-main:focus { outline: none; }
#atlas .cell { border-radius: 0; }
#atlas .grid { border-radius: 6px; overflow: hidden; }
.fm-tip { position: fixed; z-index: 60; display: none; pointer-events: none; background: #1c1c1c; color: #f7f7f5; font: 500 13px/1.45 "Inter Tight", sans-serif; padding: 8px 10px; border-radius: 6px; max-width: 240px; }

/* Section header and tab bar */
.atlas-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 4px 0 18px; }
.atlas-title { font-weight: 500; font-size: clamp(32px, 4vw, 52px); letter-spacing: -0.035em; line-height: 1; margin: 0; }
.atlas-head .small { max-width: 440px; text-align: right; }
@media (max-width: 760px) { .atlas-head { flex-direction: column; align-items: flex-start; gap: 8px; } .atlas-head .small { text-align: left; } }
#atlas .atlas-tabs { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 8px; background: var(--bg); padding: 12px 0; margin-bottom: 14px; }
#atlas .atlas-tabs::-webkit-scrollbar { display: none; }
#atlas .atlas-tabs a { flex: none; text-decoration: none; font: 600 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #24453a; background: var(--white); border: 1.5px solid #c9d6cf; border-radius: 99px; padding: 10px 15px; } @media (max-width: 760px) { #atlas .atlas-tabs a { font-size: 11px; padding: 9px 12px; } }
@media (hover: hover) and (pointer: fine) { #atlas .atlas-tabs a:hover { color: var(--ink); background: #e4f3ec; border-color: #5dbb94; } }
#atlas .atlas-tabs a[aria-current="page"] { color: #0f1a16; background: #5dbb94; border-color: #5dbb94; box-shadow: none; }
:root[data-theme="dark"] #atlas .atlas-tabs a { color: #c9c9c6; border-color: #3a4a44; } :root[data-theme="dark"] #atlas .atlas-tabs a[aria-current="page"] { color: #0f1a16; border-color: #5dbb94; }

/* Decorative tiles: a mint panel with one Unvault drawing */
#atlas .uv-pat { position: absolute; inset: 0; display: grid; place-items: center; background: #e4f3ec; }
:root[data-theme="dark"] #atlas .uv-pat { background: #1b2722; }
#atlas .uv-pat .illo { color: #1c1c1c; }
:root[data-theme="dark"] #atlas .uv-pat .illo { color: #f7f7f5; }
@media (max-width: 760px) { #atlas .uv-pat .illo { --illo-size: 72px !important; } }
/* Unvault line drawings inside this section (Unvault's own drawing styles stay outside #atlas) */
#atlas .uv-pat svg.illo, #atlas svg.illo { position: static; inset: auto; width: var(--illo-size, 52px); height: var(--illo-size, 52px); overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
#atlas svg.illo .acc { stroke: #2d8a64; }
#atlas svg.illo .dot { fill: #da9b22; stroke: none; }
:root[data-theme="dark"] #atlas svg.illo .acc { stroke: #6cc39f; }
#atlas svg.illo [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: illo-draw 900ms cubic-bezier(0.23, 1, 0.32, 1) forwards; animation-delay: calc(var(--d, 0) * 110ms); }
#atlas svg.illo .dot { opacity: 0; transform-box: fill-box; transform-origin: center; animation: illo-pop 320ms cubic-bezier(0.23, 1, 0.32, 1) 520ms forwards; }
@media (prefers-reduced-motion: reduce) { #atlas svg.illo [pathLength] { stroke-dashoffset: 0; animation: none; } #atlas svg.illo .dot { opacity: 1; animation: none; } }
#atlas .ico-tile { width: var(--t); height: var(--t); display: inline-grid; place-items: center; border: 1.25px solid currentColor; border-radius: calc(var(--t) * 0.24); color: var(--ink); }
#atlas .ico-tile svg.illo { width: 54% !important; height: 54% !important; stroke-width: 1.5; }
#atlas .ico-tile svg.illo .acc { stroke: currentColor; }

/* ---- Phase A oversight fixes (2026-11) ---- */
/* OV-6: "Coming soon" boxes look like the ones on other hubs; the list uses the full width */
#atlas .soon { border: 1px dashed var(--line-strong, #b9b9b4); border-radius: 6px; padding: 22px 24px; }
#atlas .soon .checks li { display: block; position: relative; padding: 9px 0 9px 26px; font-size: 15px; }
#atlas .soon .checks li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 11px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
#atlas .soon-line { margin: 18px 0 0; }
/* OV-10: footnote under the county strip */
#atlas .strip-note { margin: 10px 0 0; max-width: 90ch; }
/* OV-17: bar numbers stay readable where a marker line crosses them */
#atlas svg text.halo { paint-order: stroke; stroke: var(--bg, #eeeeec); stroke-width: 4px; stroke-linejoin: round; }
/* OV-20: example comparisons in the empty state */
#atlas .chip-ex { font: inherit; font-size: 14px; margin: 6px 6px 0 0; padding: 7px 12px; border: 1.5px solid #c9d6cf; border-radius: 99px; background: var(--white, #fff); color: var(--ink, #0a0a0a); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { #atlas .chip-ex:hover { background: #e4f3ec; border-color: #5dbb94; } }
:root[data-theme="dark"] #atlas .chip-ex { background: transparent; color: #e8e8e4; border-color: #3a4a44; }
/* OV-16: on phones the three hero numbers sit in one row, with the years line under them */
@media (max-width: 760px) {
  body[data-page="atlas"] .pband-stats[style*="--n:3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  body[data-page="atlas"] .pband-stats[style*="--n:3"] .bs-item b { font-size: 21px; }
  body[data-page="atlas"] .pband-stats[style*="--n:3"] .bs-item span { font-size: 12px; white-space: normal; overflow: visible; text-overflow: clip; }
  body[data-page="atlas"] .pband-stats[style*="--n:3"] .bs-asof { grid-column: 1 / -1; }
}
/* OV-5 (Phase B): By agency and Contracts and grants views (atlas/spend.js) */
#atlas .sp-tools { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; justify-content: space-between; margin-bottom: 6px; }
#atlas .sp-field { display: flex; flex-direction: column; gap: 6px; min-width: 240px; flex: 1 1 280px; max-width: 460px; }
#atlas .sp-field span { font: 600 12px var(--mono, monospace); text-transform: uppercase; letter-spacing: .06em; color: var(--mute, #666); }
#atlas .sp-field input, #atlas .sp-field select { font: inherit; font-size: 15px; padding: 10px 12px; border: 1.5px solid var(--line-strong, #c9c9c4); border-radius: 6px; background: var(--white, #fff); color: var(--ink, #0a0a0a); }
#atlas .sp-seg { display: inline-flex; border: 1.5px solid var(--ink, #0a0a0a); border-radius: 99px; overflow: hidden; }
#atlas .sp-seg a { padding: 8px 18px; font: 600 14px var(--sans, inherit); text-decoration: none; color: var(--ink, #0a0a0a); }
#atlas .sp-seg a[aria-current="true"] { background: var(--ink, #0a0a0a); color: var(--bg, #fff); }
#atlas .sp-list { counter-reset: none; }
#atlas .sp-list > li.sp-ag { display: block; padding: 0; }
#atlas .sp-list > li.sp-ag::before { content: none; }
#atlas .sp-ag summary { display: grid; grid-template-columns: 28px minmax(0, 1.4fr) minmax(80px, 1fr) 84px 44px; gap: 12px; align-items: center; padding: 10px 0; cursor: pointer; list-style: none; }
#atlas .sp-ag summary::-webkit-details-marker { display: none; }
#atlas .sp-ag summary:hover .wn { text-decoration: underline; text-underline-offset: 3px; }
#atlas .sp-ag .sp-n { font: 700 12px var(--mono, monospace); color: var(--mute, #666); }
#atlas .sp-ag .sp-pc { font: 500 12px var(--mono, monospace); color: var(--mute, #666); text-align: right; }
#atlas .sp-ag[open] summary, #atlas .sp-ag details[open] > summary { border-bottom: 1px dashed var(--line, #ddd); }
#atlas .sp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px 28px; padding: 14px 0 18px 40px; }
#atlas .sp-body > .btnrow { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
#atlas .sp-body .whol { margin-top: 8px; }
#atlas .sp-yrs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; align-items: end; margin: 10px 0 8px; }
#atlas .sp-yrs > div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
#atlas .sp-yrs .sp-bar { display: flex; align-items: flex-end; width: 100%; height: 70px; background: #EDEDED; }
#atlas .sp-yrs .sp-bar i { display: block; width: 100%; background: var(--green, #5dbb94); }
#atlas .sp-yrs b { font: 600 11.5px var(--mono, monospace); }
#atlas .sp-yrs span:last-child { color: var(--mute, #666); font: 500 11px var(--mono, monospace); }
#atlas .sp-src { margin-top: 16px; }
:root[data-theme="dark"] #atlas .sp-field input, :root[data-theme="dark"] #atlas .sp-field select { background: transparent; color: #e8e8e4; border-color: #3a4a44; }
:root[data-theme="dark"] #atlas .sp-seg { border-color: #e8e8e4; } :root[data-theme="dark"] #atlas .sp-seg a { color: #e8e8e4; } :root[data-theme="dark"] #atlas .sp-seg a[aria-current="true"] { background: #e8e8e4; color: #111; }
:root[data-theme="dark"] #atlas .sp-yrs .sp-bar { background: #2a2f2d; }
@media (max-width: 760px) {
  #atlas .sp-ag summary { grid-template-columns: 22px minmax(0, 1fr) 72px; gap: 8px; }
  #atlas .sp-ag summary .wb, #atlas .sp-ag summary .sp-pc { display: none; }
  #atlas .sp-body { grid-template-columns: 1fr; padding-left: 0; }
}
/* OV-28 (Phase B): community project list */
#atlas .sp-proj li { grid-template-columns: 28px minmax(0, 1fr) 96px; }
#atlas .sp-proj .wn small { display: block; margin-top: 3px; font: 400 13px/1.4 var(--sans, inherit); color: var(--mute, #666); }
/* v2.38 · text links inside a sentence stay inline (the standalone .textlink is a block-ish button with a top margin) */
#atlas p.small .textlink, #atlas .sp-src .textlink { display: inline; margin-top: 0; font-size: inherit; font-weight: 600; border-bottom-width: 1px; }

/* ======================================================================================================
   v2.39 · Federal money restyle: the atlas now uses unvault's own components (DESIGN.md).
   Bordered surface cells in rounded groups, mint primary buttons, .field inputs, pill chips and toggles,
   mono labels, the site's chart greens, and a map scale taken from the small-claims limit scale.
   Everything stays scoped under #atlas (atlas class names like .grid, .cell, .btn collide with the site's).
   ====================================================================================================== */
#atlas { --mute: #6b6b68; --faint: #b9b9b5; --green: #4a9576; --green-ink: #1d7a56;
  --fm-in: #4a9576; --fm-tax: #2b2b2a; --fm-muted: #b9c2bd; --fm-dot: #5dbb94; --fm-hl: #b7dcc9;
  --fm-ss: #0e3b31; --fm-gr: #4a9576; --fm-con: #9fd6bd;
  --fm-r0: #d6efe3; --fm-r1: #a3d9c1; --fm-r2: #5dbb94; --fm-r3: #237a5a; --fm-r4: #0e3b31;
  --fm-gap: #f7f7f5; --fm-excl: #eeeeec; --fm-hatch-bg: #ecece9; --fm-hatch-ln: #a8a8a4;
  --fm-radius: 4px; --fm-tile: 10px; }
:root[data-theme="dark"] #atlas { --mute: #a1a1a6; --faint: #45454c; --green: #6fcaa3; --green-ink: #6cc39f;
  --fm-in: #6fcaa3; --fm-tax: #e4e4e0; --fm-muted: #4a5651; --fm-hl: #2c4a3d;
  --fm-ss: #a3d9c1; --fm-gr: #5dbb94; --fm-con: #237a5a;
  /* on a dark page the scale flips, so more money still means more contrast with the page */
  --fm-r0: #0e3b31; --fm-r1: #237a5a; --fm-r2: #5dbb94; --fm-r3: #a3d9c1; --fm-r4: #d6efe3;
  --fm-gap: #222226; --fm-excl: #18181b; --fm-hatch-bg: #2a2a30; --fm-hatch-ln: #6b6b70; }

/* ---- cells: surface tiles in rounded groups, separated like the site's card rows */
#atlas .grid { border: 1px solid var(--line); border-radius: var(--fm-tile); overflow: hidden; background: var(--line); }
#atlas .grid + .grid { border-top: 1px solid var(--line); margin-top: 16px; }
#atlas .grid:has(.fm-options:not([hidden])) { overflow: visible; }
#atlas .cell, #atlas .cell.white, #atlas .cell.gray, #atlas .site-foot .cell { background: var(--white); }
#atlas .cell.green, #atlas .pair > div:first-child { background: var(--accent-soft); color: var(--text); }
#atlas .cell.green .label, #atlas .pair > div:first-child .label { color: var(--accent-text) !important; }
#atlas [data-view] > .col { margin-top: 20px !important; }
#atlas [data-view] > .foot, #atlas [data-view] > .soon-line, #atlas [data-view] > .sp-src { margin-top: 16px; padding: 0; }

/* ---- type: the site's scale */
#atlas .label, #atlas h2.label, #atlas h3.label, #atlas .crumb, #atlas .fm-sheet-k, #atlas .adder label, #atlas .drawer legend { font: 500 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
#atlas .fm-h { font: 500 clamp(26px, 3.2vw, 38px)/1.05 var(--sans); letter-spacing: -0.03em; margin: 10px 0 0; text-wrap: balance; color: var(--text); }
#atlas .fm-h.hero { font-size: clamp(36px, 4.6vw, 60px); line-height: 1; letter-spacing: -0.04em; }
#atlas h2.t { font: 650 21px/1.2 var(--sans); letter-spacing: -0.015em; text-wrap: balance; }
#atlas .principles h3 { font: 600 17px/1.25 var(--sans); letter-spacing: -0.01em; }
#atlas .lead { font: 400 19px/1.5 var(--sans); color: var(--text-2); max-width: 64ch; text-wrap: pretty; }
#atlas .lead b { color: var(--text); font-weight: 600; }
#atlas .small { font-size: 13px; color: var(--text-3); }
#atlas .giant { font-weight: 600; letter-spacing: -0.05em; }
#atlas .big { font-weight: 650; letter-spacing: -0.03em; }
#atlas .statement { font-weight: 550; letter-spacing: -0.035em; }
#atlas .statement .hl { background: linear-gradient(transparent 60%, var(--fm-hl) 60%); }
#atlas .ctat { font-weight: 650 !important; letter-spacing: -0.025em; }
#atlas .crumb { font: 400 13.5px var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-3); }
#atlas .crumb a { color: var(--text-2); }
#atlas .bars .t2 b, #atlas .checks b, #atlas .worked b, #atlas .formula b { font-weight: 650; }
#atlas .rows .r .v, #atlas .cmp .vals b, #atlas .whol b, #atlas .ext .v, #atlas .nb span, #atlas .hb b, #atlas .srow b, #atlas .rb b, #atlas .keys b, #atlas .fm-sheet-l a span:last-child, #atlas .fm-options .fm-opt-v { font-family: var(--sans); font-weight: 600; font-variant-numeric: tabular-nums; }
#atlas .est, #atlas .tag, #atlas .act .tag { display: inline-flex; align-items: center; font: 600 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); border: 1px solid var(--line-strong); border-radius: 99px; padding: 3px 7px; margin-left: 6px; vertical-align: 1px; }
#atlas [tabindex="-1"]:focus { outline: none !important; }
#atlas :focus-visible { outline: 2px solid var(--line-accent) !important; outline-offset: 2px !important; }

/* ---- links */
#atlas .textlink, #atlas .linkbtn, #atlas .keybar a, #atlas .drawer .reset, #atlas .fm-sheet-go-text { font: 600 15px var(--sans); color: var(--accent-text); border-bottom: 0; text-decoration: underline; text-decoration-color: var(--mint-line); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
#atlas p.small .textlink, #atlas .sp-src .textlink { font-size: inherit; text-decoration-thickness: 1px; }
#atlas .keybar a, #atlas .drawer .reset { font-size: 13.5px; }
@media (hover: hover) and (pointer: fine) { #atlas .textlink:hover, #atlas .linkbtn:hover, #atlas .keybar a:hover, #atlas .drawer .reset:hover { text-decoration-color: currentColor; } }
#atlas .whol .wn a, #atlas .rows .r .n, #atlas .ext .n { text-decoration: none; border-bottom: 0; }
#atlas .whol .wn a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { #atlas .whol .wn a:hover { color: var(--accent-text); text-decoration-color: currentColor; } }

/* ---- buttons: .btn outline, .btn.primary mint (base.css) */
#atlas .btn { height: 50px; padding: 0 20px; gap: 10px; border: 1.5px solid var(--text); border-radius: var(--fm-radius); background: transparent; color: var(--text); font: 600 15px var(--sans); transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease, transform 120ms ease-out; }
@media (hover: hover) and (pointer: fine) { #atlas .btn:hover { background: var(--text); color: var(--bg); } }
#atlas .btn:active { transform: scale(.97); }
#atlas .btn.primary { background: var(--field); border-color: var(--field); color: var(--on-field); }
@media (hover: hover) and (pointer: fine) { #atlas .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-field); } }
#atlas .btn.primary:disabled { opacity: .45; cursor: not-allowed; }
#atlas .btn.primary .dot { display: none; }
#atlas .btn.sm { height: 40px; padding: 0 14px; font-size: 14px; }
#atlas .btnrow { margin-top: 18px; }

/* ---- inputs: the site's .field */
#atlas input:not([type=radio]):not([type=range]):not([type=checkbox]), #atlas select { border: 1.5px solid var(--line-strong) !important; border-radius: var(--fm-radius); background-color: var(--white); color: var(--text); font: 500 15px var(--sans); min-height: 44px; transition: border-color 140ms ease, box-shadow 140ms ease; }
#atlas select:not([multiple]) { -webkit-appearance: none; appearance: none; padding-right: 34px !important; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
#atlas select:disabled { opacity: .6; }
#atlas input:not([type=radio]):not([type=range]):focus, #atlas select:focus { outline: none !important; border-color: var(--line-accent) !important; box-shadow: 0 0 0 3px rgba(93,187,148,.25); }
#atlas input::placeholder { color: var(--text-3); opacity: 1; }
#atlas .search #q-home { height: 58px; font: 500 17px var(--sans); padding: 0 18px; border-color: var(--text) !important; }
#atlas .search #c-q { height: 50px; }
#atlas .filters input, #atlas .filters select, #atlas .adder select, #atlas .sp-field input, #atlas .sp-field select { height: 44px; padding: 0 12px; font: 500 15px var(--sans); }
#atlas .adder label, #atlas .sp-field span { font: 600 14px var(--sans); letter-spacing: 0; text-transform: none; color: var(--text); gap: 6px; }
#atlas .adder { align-items: end; }
#atlas #c-add { height: 44px !important; }
#atlas .or { color: var(--text-3); font-size: 13px; }
:root[data-theme="dark"] #atlas .sp-field input, :root[data-theme="dark"] #atlas .sp-field select { background-color: var(--white); color: var(--text); }

/* search suggestions: the site's results dropdown */
#atlas .fm-options { top: calc(100% + 6px); padding: 0; background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--fm-radius); box-shadow: 0 18px 40px -24px rgba(0,0,0,.35); }
#atlas .fm-options li { border-radius: 0; padding: 11px 14px; border-top: 1px solid var(--line); font-weight: 500; }
#atlas .fm-options li:first-child { border-top: 0; }
#atlas .fm-options li[aria-selected="true"] { background: var(--mint-soft); }
#atlas .fm-options .fm-opt-v { font-size: 14px; color: var(--accent-text); }
/* map tooltip (it lives on <body>, outside #atlas) */
.fm-tip { background: var(--surface, #f7f7f5); color: var(--text, #1c1c1c); border: 1px solid var(--line-strong, #b9b9b5); border-radius: 6px; box-shadow: 0 18px 40px -24px rgba(0,0,0,.35); font: 500 13px/1.45 "Inter Tight", system-ui, sans-serif; padding: 9px 12px; }
.fm-tip b { font-weight: 650; }

/* ---- pills: toggles, chips and chosen counties (the site's .seg buttons and tabs) */
#atlas .whotabs, #atlas .sp-seg, #atlas .seg { display: flex; flex-wrap: wrap; gap: 6px; border: 0; border-radius: 0; overflow: visible; background: none; }
#atlas .whotabs button, #atlas .sp-seg a, #atlas .seg label, #atlas .toc button, #atlas .chip-ex { display: inline-flex; align-items: center; justify-content: center; height: auto; min-height: 36px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--white); color: var(--text); font: 500 13.5px var(--sans); letter-spacing: 0; text-transform: none; text-decoration: none; cursor: pointer; transition: border-color 140ms ease, background-color 140ms ease, transform 120ms ease-out; }
#atlas .seg label + label { border-left: 1px solid var(--line-strong); }
#atlas .seg label { flex: 1 1 0; }
@media (hover: hover) and (pointer: fine) { #atlas .whotabs button:hover, #atlas .sp-seg a:hover, #atlas .seg label:hover, #atlas .toc button:hover, #atlas .chip-ex:hover { background: var(--mint-soft); border-color: var(--field); } }
#atlas .whotabs button:active, #atlas .sp-seg a:active, #atlas .seg label:active, #atlas .toc button:active, #atlas .chip-ex:active { transform: scale(.97); }
#atlas .whotabs button[aria-selected="true"], #atlas .sp-seg a[aria-current="true"], #atlas .seg label:has(input:checked), :root[data-theme="dark"] #atlas .sp-seg a[aria-current="true"] { background: var(--field); border-color: var(--field); color: var(--on-field); font-weight: 600; }
#atlas .seg label:has(input:focus-visible) { outline: 2px solid var(--line-accent); outline-offset: 2px; }
:root[data-theme="dark"] #atlas .sp-seg { border: 0; } :root[data-theme="dark"] #atlas .sp-seg a:not([aria-current="true"]), :root[data-theme="dark"] #atlas .chip-ex { color: var(--text); border-color: var(--line-strong); background: var(--white); }
#atlas .toc { gap: 6px; margin-top: 22px; }
#atlas .pin { gap: 8px; border: 1px solid var(--mint-line); border-radius: 99px; background: var(--chip); padding: 6px 8px 6px 14px; font: 600 14.5px var(--sans); color: var(--text); }
#atlas .pin::before { width: 8px; height: 8px; border-radius: 50%; background: var(--field); }
#atlas .pin button { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--text-2); font-size: 18px; }
@media (hover: hover) and (pointer: fine) { #atlas .pin button:hover { background: var(--white); color: var(--text); } }
#atlas .picker .chosen .pin { padding-right: 14px; }

/* "Show the data" and phone folds: quiet bordered buttons */
#atlas .dt > summary, #atlas details.more > summary { height: 36px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: var(--fm-radius); background: var(--white); color: var(--text); font: 600 11.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
#atlas .dt > summary::after, #atlas details.more > summary::after { font: 500 15px var(--mono); color: var(--accent-text); }
@media (hover: hover) and (pointer: fine) { #atlas .dt > summary:hover, #atlas details.more > summary:hover { background: var(--mint-soft); border-color: var(--field); } }
#atlas .dt[open] > summary, #atlas details.more[open] > summary { background: var(--accent-soft); border-color: var(--mint-line); color: var(--text); }
#atlas details.more[open] { border: 1px solid var(--line); border-radius: var(--fm-radius); background: var(--white); }
@media (min-width: 761px) { #atlas details.more[open] { border: 0; background: none; } }
@media (max-width: 760px) { #atlas details.more > summary { height: 44px; } #atlas details.more[open] > summary { border: 0; border-bottom: 1px solid var(--line); border-radius: var(--fm-radius) var(--fm-radius) 0 0; } }
#atlas details.an-sec > summary { font: 650 17px var(--sans); letter-spacing: -0.01em; background: var(--white); border-top: 1px solid var(--line); }
#atlas details.an-sec > summary::after { color: var(--accent-text); }
#atlas details.an-sec[open] > summary { background: var(--mint-soft); }
#atlas details.an-sec { border-radius: var(--fm-radius); }

/* ---- tables (the site's .tbl) */
#atlas .dt table { font-size: 14px; border: 1px solid var(--line); border-radius: var(--fm-radius); border-collapse: separate; border-spacing: 0; overflow: hidden; margin-top: 10px; }
#atlas .dt th, #atlas .dt td { padding: 9px 12px; border-bottom: 0; border-top: 1px solid var(--line); text-align: left; font-variant-numeric: tabular-nums; }
#atlas .dt td { font-family: var(--sans); }
#atlas .dt thead th { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); background: var(--bg); border-top: 0; white-space: nowrap; }
#atlas .dt tbody th { font-weight: 600; }

/* ---- ranked lists and rows */
#atlas .whol, #atlas .ext, #atlas .srcs, #atlas .cmp, #atlas .rows { border-top: 1px solid var(--line); }
#atlas .whol .wb, #atlas .hbar, #atlas .srow .sb, #atlas .sp-yrs .sp-bar, #atlas .bars .track, #atlas .ex .bar { background: var(--line) !important; border-radius: 2px; overflow: hidden; }
#atlas .whol .wb { height: 12px; }
#atlas .whol .wb i, #atlas .srow .sb i, #atlas .nb i, #atlas .cmp .vals i, #atlas .rb i, #atlas .hbar i, #atlas .keys i, #atlas .fm-legend i, #atlas .mini > div { border-radius: 2px; }
#atlas .sp-yrs .sp-bar i { border-radius: 2px 2px 0 0; }
#atlas .bars .track { height: 22px; border-radius: var(--fm-radius); } #atlas .bars .fill { border-radius: var(--fm-radius); }
#atlas .cell .mini { background: var(--line); border-radius: 2px; overflow: hidden; }
#atlas .nb i { background: var(--fm-muted); height: 8px; } #atlas .nb li.me i { background: var(--fm-in); }
#atlas .cmp .vals i { height: 12px; background: var(--fm-muted); }
#atlas .keys i { width: 10px; height: 10px; }
#atlas .stackbar { border: 0; border-radius: var(--fm-radius); overflow: hidden; gap: 2px; background: var(--white); }
#atlas .rows { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--white); }
#atlas .rows li:last-child { border-bottom: 0; }
#atlas .rows .r { padding: 14px 18px; align-items: center; }
#atlas .rows .r .n { font: 600 16px/1.35 var(--sans); letter-spacing: -0.005em; }
#atlas .rows .r .n small { font: 500 11.5px var(--mono); letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); margin-top: 4px; }
#atlas .rows .r .v { font-size: 16px; }
@media (hover: hover) and (pointer: fine) { #atlas .rows a.r:hover { background: var(--bg); } #atlas .rows a.r:hover .n { text-decoration: underline; text-underline-offset: 3px; } }
#atlas .act :last-child { border-bottom: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { #atlas .act a:hover, #atlas .act button:hover { color: var(--accent-text); } }
#atlas .regions .reg { border-top: 1px solid var(--line); }
#atlas .srcs .n a { color: var(--accent-text); text-decoration: underline; text-decoration-color: var(--mint-line); text-underline-offset: 3px; }
#atlas .srcs .y, #atlas .stripends { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }

/* ---- facts, formula, steps, notes */
#atlas .pair { border-radius: var(--fm-tile); overflow: hidden; }
#atlas .pair > div { background: var(--white); }
#atlas .pair b { font-weight: 650; font-size: 30px; }
#atlas .bigfact .giant { background: var(--accent-soft); color: var(--text); border-radius: var(--fm-radius); padding: 6px 14px; }
#atlas .formula .op, #atlas .worked .op { color: var(--accent-text); font-weight: 500; }
#atlas .formula .res b { background: var(--accent-soft); border-radius: var(--fm-radius); }
#atlas .step { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--fm-radius); background: var(--field); color: var(--on-field); font: 600 12px/1 var(--mono); letter-spacing: 0; margin-bottom: 14px; }
#atlas .fm-caution { background: var(--bg); border: 0; border-left: 3px solid #7a5200; border-radius: 0 var(--fm-radius) var(--fm-radius) 0; padding: 12px 16px; color: var(--text-2); font-size: 15px; }
:root[data-theme="dark"] #atlas .fm-caution { border-left-color: #f1c770; }
#atlas .fm-caution b { font: 600 10.5px/1.9 var(--mono); letter-spacing: .08em; color: var(--text); }
#atlas .pending-box { border: 1px dashed var(--line-strong); border-radius: var(--fm-radius); }
#atlas .citet { font: 400 14.5px/1.55 var(--sans); background: var(--bg); border: 1px solid var(--line); border-radius: var(--fm-radius); color: var(--text-2); }
#atlas .cta { justify-content: space-between; }
@media (hover: hover) and (pointer: fine) { #atlas .cta:not(.green):hover, #atlas .cta.green:hover { background: var(--mint-soft); transform: none; } #atlas .cta:hover .ctat { color: var(--accent-text); } }

/* ---- map page */
#atlas .keybar { background: var(--white); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--fm-tile) var(--fm-tile) 0 0; padding: 14px 20px; }
#atlas .keybar .fm-h { font: 600 clamp(20px, 2vw, 24px)/1.15 var(--sans); letter-spacing: -0.02em; margin: 0; }
#atlas .keybar .fm-legend { color: var(--text-2); }
#atlas .keybar .fm-legend i, #atlas .fm-legend i { width: 14px; height: 14px; }
#atlas .stage { background: var(--white); border: 1px solid var(--line); border-radius: 0 0 var(--fm-tile) var(--fm-tile); }
#atlas .drawer { background: var(--white); border-right: 1px solid var(--line); }
#atlas .drawer fieldset { border-top: 1px solid var(--line); }
#atlas .drawer legend { color: var(--text-2); }
#atlas .drawer legend .n { width: 22px; height: 22px; border-radius: var(--fm-radius); background: var(--field); color: var(--on-field); font: 600 11px var(--mono); }
#atlas .radio { border-bottom: 1px solid var(--line); }
#atlas .radio input { accent-color: var(--line-accent); }
#atlas .radio:has(input:checked) { font-weight: 600; }
#atlas .radio .v, #atlas .range .hd output { font: 600 13px var(--sans); font-variant-numeric: tabular-nums; color: var(--text-2); }
#atlas .dual .track { background: var(--line); border-radius: 2px; }
#atlas .dual .fill { background: var(--fm-in); }
#atlas .dual input::-webkit-slider-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--white); border: 2px solid var(--line-accent); }
#atlas .dual input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--white); border: 2px solid var(--line-accent); }
#atlas .dual input:focus-visible::-webkit-slider-thumb { background: var(--field); box-shadow: 0 0 0 3px rgba(93,187,148,.25); }
#atlas .drawer-tab { background: var(--white); color: var(--text); border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--fm-radius) var(--fm-radius) 0; }
#atlas .stage.closed .drawer-tab { border-left: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { #atlas .drawer-tab:hover { background: var(--mint-soft); } }
/* the county card on the map */
#atlas .fm-sheet, #atlas .stage .fm-sheet { background: var(--white); border: 1px solid var(--line); border-radius: var(--fm-tile); box-shadow: 0 10px 26px -18px rgba(15,26,22,.45); }
#atlas .fm-sheet-n { font: 650 19px/1.25 var(--sans); letter-spacing: -0.015em; }
#atlas .stage .fm-sheet-v, #atlas .fm-sheet-v { font: 600 44px/1 var(--sans); letter-spacing: -0.04em; }
#atlas .fm-sheet-go { background: var(--field) !important; color: var(--on-field) !important; border: 1.5px solid var(--field) !important; border-radius: var(--fm-radius); font: 600 15px var(--sans) !important; transition: background-color 140ms ease; }
@media (hover: hover) and (pointer: fine) { #atlas .fm-sheet-go:hover { background: var(--accent-hover) !important; border-color: var(--accent-hover) !important; color: var(--on-field) !important; } }
#atlas .fm-close { border-radius: var(--fm-radius); }
#atlas .fm-sheet-l a { border-top: 1px solid var(--line); }
/* map colors: county gaps match the stage, selection ring in text color */
#atlas .fm-map .fm-hit { stroke: var(--fm-gap); }
#atlas .fm-map .fm-hit:hover { stroke: var(--text); stroke-width: 1; }
#atlas .fm-map .fm-borders { stroke: var(--fm-gap); }
#atlas .fm-map .fm-nation { fill: var(--line); }
#atlas .fm-map .fm-sel { stroke: var(--text); } #atlas .fm-map .fm-sel-ring { stroke: var(--fm-gap); }
#atlas .fm-map .fm-city-dot { fill: var(--text); } #atlas .fm-map .fm-city { fill: var(--text); stroke: var(--fm-gap); }
#atlas .fm-hatch-bg { fill: var(--fm-hatch-bg); } #atlas .fm-hatch-ln { stroke: var(--fm-hatch-ln); }
#atlas .fm-hatch { background: repeating-linear-gradient(45deg, var(--fm-hatch-bg) 0 3px, var(--fm-hatch-ln) 3px 4.5px); }
#atlas #nbmap .fm-nb { stroke: var(--white); } #atlas #nbmap .fm-nb-me { stroke: var(--text); }
/* the compare map picker */
#atlas .picker { background: var(--white); border-left: 1px solid var(--line); }
#atlas .picker.open { box-shadow: 0 24px 48px -28px rgba(0,0,0,.35); }
#atlas .picker header { border-bottom: 1px solid var(--line); }
#atlas .picker header h2 { font: 500 clamp(22px, 2.4vw, 28px)/1.1 var(--sans); letter-spacing: -0.03em; }
#atlas .closebtn { border-radius: var(--fm-radius); color: var(--text-2); }
@media (hover: hover) and (pointer: fine) { #atlas .closebtn:hover { background: var(--mint-soft); color: var(--text); } }
#atlas .scrim { background: rgba(15,26,22,.28); }

/* ---- By agency, Contracts, Community projects */
#atlas .sp-ag[open] summary, #atlas .sp-ag details[open] > summary { border-bottom: 1px dashed var(--line); }
#atlas .sp-ag summary { border-radius: var(--fm-radius); }
@media (hover: hover) and (pointer: fine) { #atlas .sp-ag summary:hover .wn { color: var(--accent-text); } }
#atlas .sp-body { background: var(--bg); border-radius: var(--fm-radius); padding: 16px 18px 18px 40px; margin: 10px 0 12px; }
@media (max-width: 760px) { #atlas .sp-body { padding: 14px; } }
#atlas .em-pick-empty { background: var(--accent-soft) !important; }
#atlas .em-pick-empty .sp-field select { border-color: var(--line-accent) !important; }
#atlas .em-pick-empty .sp-tools { align-items: flex-end; }
#atlas .em-pick-empty .sp-tools > .small { flex: 1 1 280px; max-width: 460px; color: var(--text-2); }
#atlas .em-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--fm-tile); overflow: hidden; }
#atlas .em-stats > div { background: var(--white); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
#atlas .em-stats b { font: 650 26px/1.05 var(--sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
#atlas .em-stats span { font-size: 13px; color: var(--text-2); line-height: 1.35; }
#atlas .em-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 28px; counter-reset: em; }
#atlas .em-steps li { position: relative; padding-left: 46px; font-size: 14.5px; line-height: 1.45; color: var(--text-2); counter-increment: em; }
#atlas .em-steps li::before { content: "0" counter(em); position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--fm-radius); background: var(--field); color: var(--on-field); font: 600 12px var(--mono); }
#atlas .em-steps b { display: block; color: var(--text); font-weight: 600; font-size: 16px; margin-bottom: 2px; }
#atlas .em-states { margin-top: 14px; }
#atlas .em-states .srow { grid-template-columns: minmax(0, 150px) 1fr 66px; }
#atlas .em-states .srow span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#atlas .em-dist li { grid-template-columns: 28px minmax(0, 1.2fr) minmax(60px, 1fr) 76px; }
#atlas .em-dist .wn small { display: block; font: 400 12.5px var(--sans); color: var(--text-3); margin-top: 1px; }
@media (max-width: 760px) {
  #atlas .em-steps { grid-template-columns: 1fr; }
  #atlas .em-dist li { grid-template-columns: 22px minmax(0, 1fr) 72px; }
  #atlas .grid + .grid { margin-top: 12px; }
  #atlas .grid { border-radius: var(--fm-tile); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
#atlas .lead + .small, #atlas .lead + p.small { margin-top: 12px; }
#atlas details.an-sec { margin-top: 16px; }
#atlas .chart .cl, #atlas .chart .cv { font-family: var(--mono); font-size: 11px; font-weight: 500; }
#atlas .chart .cl { fill: var(--text-3); } #atlas .chart .cv { fill: var(--text); font-weight: 600; }
#atlas .chart .cm { font: 600 12px var(--sans); fill: var(--text); }
@media (max-width: 760px) { #atlas .chart .cl, #atlas .chart .cv { font-size: 12px; } #atlas details.an-sec { margin-top: 0; } }

/* ===== v2.41 phone · hubs (Federal money on phones). Desktop unchanged. ===== */
#atlas .fm-chips, #atlas .fm-about { display: none; }
@media (max-width: 760px) {
  /* MB-02 / MN-06: the wrapped, pinned 172px tab block gives way to the pinned "View n of N" picker under the band (atlas/v3.js) */
  #atlas .atlas-tabs { display: none; }
  /* #p6 chart 1, option C: the count first, the chart, labelled ends, a 3-part key; notes in "About this chart" */
  #atlas .fm-c1 .label { margin: 0; }
  #atlas .fm-c1-n { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 12px; }
  #atlas .fm-c1-n b { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1; color: var(--accent-text); }
  #atlas .fm-c1-n span { font-size: 15px; color: var(--text-2); }
  #atlas .fm-c1-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font: 500 12px/1.3 var(--mono); color: var(--text-3); }
  #atlas .fm-c1-key { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 10px 0 0; padding: 0; font: 500 12px/1.3 var(--mono); color: var(--text-3); }
  #atlas .fm-c1-key li { display: inline-flex; align-items: center; gap: 6px; }
  #atlas .fm-c1-key i { display: inline-block; width: 11px; height: 11px; }
  #atlas .fm-c1-key .k-tax { background: var(--fm-tax); } #atlas .fm-c1-key .k-in { background: var(--fm-in); }
  #atlas .fm-c1-key .k-line { width: 16px; height: 0; border-top: 2px solid var(--text-3); }
  /* #p6 chart 2, option B: "U.S. overall" and "Typical county" as two number chips; one $1 line in the chart */
  #atlas .fm-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; }
  #atlas .fm-chips p { margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
  #atlas .fm-chips span { display: block; font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
  #atlas .fm-chips b { display: block; font-size: 20px; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; }
  #atlas .chart .fm-in-t { fill: var(--accent-text); }
  #atlas details.fm-about { display: block; margin-top: 10px; border-top: 1px solid var(--line); }
  #atlas details.fm-about > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
  #atlas details.fm-about > summary::-webkit-details-marker { display: none; }
  #atlas details.fm-about > summary::after { content: "+"; font: 500 18px/1 var(--mono); color: var(--accent-text); }
  #atlas details.fm-about[open] > summary::after { content: "−"; }
  #atlas details.fm-about p { margin: 0 0 10px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
  #atlas .dt > summary { min-height: 40px; }
  /* MB-19 / MB-20: type floors and 40px hit areas */
  #atlas .stripends { font-size: 12px; }
  #atlas a.textlink { display: inline-block; padding-block: 11px; margin-block: -11px; }
  #atlas .soon-line a.textlink { display: inline; padding-block: 12px; margin-block: 0; }
  #atlas .keybar a, #atlas .drawer .reset { display: inline-block; padding-block: 12px; margin-block: -12px; }
  #atlas .closebtn { min-width: 40px; min-height: 40px; box-sizing: border-box; text-align: center; }
}
/* end v2.41 phone · hubs */

/* ===== v2.44 phone · Federal money (same rules as base.css v2.44, inside #atlas) ===== */
@media (max-width: 760px) {
  #atlas input, #atlas select, #atlas .adder select, #atlas .sp-field input, #atlas .sp-field select, #atlas .filters input, #atlas .filters select { font-size: 16px !important; }
  #atlas .label, #atlas h2.label, #atlas legend, #atlas .stat span, #atlas .lab, #atlas .chip-ex, #atlas .stat b + span { font-size: 12px; }
  #atlas select { text-overflow: ellipsis; }
  #atlas .chart figcaption { font-size: 14px; }
  #atlas .small, #atlas figcaption, #atlas .foot, #atlas .soon-line, #atlas .sp-src, #atlas .sp-src a, #atlas a.textlink, #atlas li, #atlas .prose b { font-size: 14px; line-height: 1.5; }
  #atlas a.srow { min-height: 42px; align-items: center; }
  #atlas .linkbtn, #atlas .chip-ex, #atlas a.textlink { min-height: 40px; display: inline-flex; align-items: center; }
  #atlas .sp-row a, #atlas td a, #atlas .sp-list a { display: inline-block; padding-block: 11px; margin-block: -11px; }
  #atlas label:has(> input[type="radio"]) { min-height: 42px; align-items: center; }
  /* County list filters: two even columns instead of four different widths */
  #atlas .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #atlas .filters > * { width: 100%; min-width: 0; }
  #atlas .filters > input { grid-column: 1 / -1; }
}
/* end v2.44 phone · Federal money */
