/* Bulk Billing Tracker: GP bulk billing by local area.
   Layout: a health-statistics bulletin set in San Francisco (Inter off Apple devices), heavier
   and tighter for headlines, regular for reading. White paper, navy ink.
   Blue means bulk billed; the muted red is reserved for money paid out of pocket.
   The hex map is the one loud thing. Light by default; dark only when chosen. */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --paper-2: #f4f6f8;
  --ink: #0f1d2e;
  --ink-2: #3c4a5b;
  --ink-3: #5d6978;
  --rule: #e1e5ea;
  --rule-2: #c5ccd4;
  --ui-line: #848f9c; /* borders of controls: 3:1 against paper (WCAG 1.4.11) */
  --empty: #e9edf0;
  --pay: #a3402f;
  --sel: #0f1d2e;
  --s1: #daeafc; --s2: #b2d1f5; --s3: #87b5e9; --s4: #5b96d6; --s5: #3377be; --s6: #0e599d; --s7: #003d77;
  --g1: #fbe1dc; --g2: #f2c0b6; --g3: #e29d8f; --g4: #c87b6b; --g5: #a95b4c; --g6: #874033; --g7: #62291f;
  --d1: #874033; --d2: #c87b6b; --d3: #f2c0b6; --d4: #dfe3e6; --d5: #a7dbc8; --d6: #48a689; --d7: #00694f;
  --line-area: #0e599d;
  --line-state: #75808d;
  --line-aus: #0f1d2e;
  --c1: #2a78d6; --c2: #e05d2a; --c3: #139c6a;
  /* San Francisco on Apple devices. Apple licenses SF only for its own platforms, so Windows and
     Android get Inter, the closest open design, instead of Segoe UI or Roboto. */
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --serif: var(--sans);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #101b27; --paper-2: #16232f; --ink: #e6ecf1; --ink-2: #b2bfcc; --ink-3: #93a2b2;
  --rule: #263646; --rule-2: #354a5e; --ui-line: #677b8f; --empty: #1c2a37; --pay: #ee9a88; --sel: #ffffff;
  --s1: #1a3450; --s2: #224974; --s3: #2b639c; --s4: #3c7dc2; --s5: #5e9ce0; --s6: #88bcf6; --s7: #b7dbff;
  --g1: #492922; --g2: #68392f; --g3: #8c4c3f; --g4: #ad6354; --g5: #ce8171; --g6: #e9a495; --g7: #fdcabf;
  --d1: #e9a495; --d2: #ad6354; --d3: #68392f; --d4: #2b3846; --d5: #145442; --d6: #2b8d71; --d7: #7ec9af;
  --line-area: #88bcf6; --line-state: #8394a6; --line-aus: #e6ecf1;
  --c1: #3987e5; --c2: #d95926; --c3: #199e70;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--s5); outline-offset: 3px; }
tbody tr:focus-visible { outline: 2px solid var(--s5); outline-offset: -2px; }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* ---------- masthead ---------- */
.mast { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0 18px; border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 19px; letter-spacing: -.02em; text-decoration: none; }
.brand svg { width: 22px; height: 24px; flex: none; }
.theme {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: 0;
  padding: 6px 0; font-size: 15px; cursor: pointer; color: var(--ink-3);
}
.theme:hover { color: var(--ink); }
.theme svg { width: 18px; height: 18px; }

/* ---------- hero ---------- */
.news { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.news b { color: var(--ink); font-weight: 650; }
@media (max-width: 640px) { .news { font-size: 14px; } .news-more { display: none; } }
.news .tag { display: inline-block; margin-right: 10px; padding: 2px 8px; border-radius: 4px; background: color-mix(in srgb, var(--s5) 14%, transparent); color: var(--s6); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; vertical-align: 1px; }
.faq dt { font-size: 17px; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.faq dd { margin: 0 0 22px; color: var(--ink-2); font-size: 16px; line-height: 1.55; max-width: 64ch; }
.faq a { color: inherit; text-underline-offset: 2px; }
.dl { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); text-underline-offset: 3px; }
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; padding: 56px 0 64px; align-items: start; }
h1 {
  margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(40px, 5.2vw, 64px); line-height: 1.04;
  letter-spacing: -.032em; max-width: 12ch; text-wrap: balance;
}
.lede { margin: 20px 0 30px; font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 34ch; letter-spacing: -.01em; }

.find { position: relative; max-width: 440px; }
.find label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 7px; }
.field { display: flex; align-items: center; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 4px; }
.field svg { width: 20px; height: 20px; margin-left: 14px; flex: none; color: var(--ink-3); }
.field input { flex: 1; min-width: 0; border: 0; background: none; padding: 14px 14px 14px 10px; font-size: 18px; outline: none; }
.field:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--s5) 30%, transparent); }
.field input::placeholder { color: var(--ink-3); }
.opts {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: var(--paper); border: 1px solid var(--rule-2); border-radius: 4px; max-height: 340px; overflow-y: auto;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--ink) 12%, transparent);
}
.opts li { padding: 9px 10px; border-radius: 2px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.opts li[aria-selected="true"] { background: color-mix(in srgb, var(--s5) 16%, transparent); }
.opts .o1 { font-weight: 600; }
.opts .o2 { color: var(--ink-3); font-size: 15px; text-align: right; }
.opts .none { cursor: default; color: var(--ink-3); }
.locate { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.locate button {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.locate button:hover { text-decoration-thickness: 2px; }
.locate button[disabled] { opacity: .6; cursor: progress; }
.locate svg { width: 16px; height: 16px; flex: none; }
.locate-msg { font-size: 14px; color: var(--ink-3); }

/* ---------- the answer ---------- */
.answer { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--ink); }
.a-place { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.022em; }
.a-sub { margin: 4px 0 0; font-size: 15px; color: var(--ink-3); }
.a-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 22px; align-items: center; margin: 20px 0 0; }
.waffle { display: block; width: 112px; height: 112px; }
.a-lead { margin: 0; font-size: 22px; line-height: 1.32; letter-spacing: -.015em; text-wrap: pretty; }
.a-lead b { font-weight: 650; }
.wkey { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0 0; font-size: 14px; color: var(--ink-3); }
.wkey span { display: inline-flex; align-items: center; gap: 6px; }
.wkey i { width: 10px; height: 10px; display: inline-block; }
.a-more { margin: 16px 0 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.a-more b { color: var(--ink); font-weight: 600; }
.a-more .pay { color: var(--pay); font-weight: 600; }
.a-more .alink { display: inline-block; margin-top: 8px; color: var(--ink); font-weight: 600; font-size: 16px; }
.a-note { margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-3); max-width: 50ch; }
.a-note a { color: inherit; text-underline-offset: 2px; }
.mini { margin-top: 26px; }
.chart-title { font-size: 15px; font-weight: 600; margin: 0 0 6px; line-height: 1.35; }
.chart-title .fn { font-weight: 700; margin-right: .4em; }

/* ---------- map ---------- */
.mapcol { position: sticky; top: 16px; }
.mapbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin-bottom: 10px; }
.views { display: inline-flex; flex-wrap: wrap; gap: 4px 20px; }
.views button { border: 0; border-bottom: 2px solid transparent; background: none; padding: 6px 0 5px; font-size: 15px; font-weight: 600; cursor: pointer; color: var(--ink-3); }
.views button:hover { color: var(--ink); }
.views button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.when { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); }
.when b { color: var(--ink); font-weight: 700; min-width: 7.5em; display: inline-block; }
.play { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--ui-line); background: var(--paper); display: grid; place-items: center; cursor: pointer; padding: 0; }
.play svg { width: 14px; height: 14px; }
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 2px 0 4px; background: transparent; cursor: pointer; }
.slider::-webkit-slider-runnable-track { height: 2px; background: var(--ui-line); border-radius: 2px; }
.slider::-moz-range-track { height: 2px; background: var(--ui-line); border-radius: 2px; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px; border-radius: 50%; background: var(--ink); border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--ink); }
.slider::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--ink); }
.map { display: block; width: 100%; height: auto; touch-action: manipulation; }
.map .hx { stroke: var(--paper); stroke-width: 1.4; cursor: pointer; transition: fill .35s; }
.map .hx.hot { stroke: var(--ink); stroke-width: 2.2; }
.map .border { stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; opacity: .55; pointer-events: none; }
.map .selring { fill: none; stroke: var(--sel); stroke-width: 3.6; pointer-events: none; }
.map .st { font-family: var(--sans); font-size: 13px; font-weight: 700; fill: var(--ink); stroke: var(--paper); stroke-width: 4px; paint-order: stroke; stroke-linejoin: round; pointer-events: none; letter-spacing: .02em; }
.legend { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.legend .lt { font-size: 14px; color: var(--ink-3); max-width: 15ch; line-height: 1.3; }
.scale { display: flex; gap: 2px; }
.scale span { display: grid; gap: 4px; font-size: 13px; color: var(--ink-3); }
.scale i { display: block; width: 46px; height: 10px; }
.mapnote { font-size: 14px; color: var(--ink-3); margin: 10px 0 0; max-width: 60ch; }

/* ---------- tooltip ---------- */
.tip {
  position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--paper);
  border-radius: 3px; padding: 8px 11px; font-size: 14px; line-height: 1.35; max-width: 260px;
  box-shadow: 0 8px 24px color-mix(in srgb, #000 22%, transparent);
}
.tip b { font-size: 17px; }
.tip .k { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.tip .tr { display: flex; justify-content: space-between; gap: 14px; }
.tip .muted { opacity: .75; }

/* ---------- story sections ---------- */
.sect { padding: 72px 0; border-top: 1px solid var(--rule); }
.sect-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; align-items: start; }
h2 { margin: 0 0 16px; font-size: clamp(27px, 2.9vw, 36px); font-weight: 700; line-height: 1.12; letter-spacing: -.026em; text-wrap: balance; max-width: 18ch; }
.prose p { margin: 0 0 14px; max-width: 44ch; color: var(--ink-2); font-size: 17px; line-height: 1.58; }
.prose p strong { color: var(--ink); font-weight: 700; }
.events { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; max-width: 42ch; }
.events li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 15.5px; color: var(--ink-2); line-height: 1.5; }
.events .mk { width: 22px; height: 22px; border-radius: 50%; border: 1.25px solid var(--ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink); margin-top: 1px; }
.events b { color: var(--ink); }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .axis { stroke: var(--rule-2); stroke-width: 1; }
.chart text { font-family: var(--sans); }
.chart .tick { fill: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.chart .ln { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart .lab { font-size: 14px; font-weight: 700; }
.chart .lab-sub { font-size: 13px; font-weight: 400; fill: var(--ink-3); }
.chart .ev { stroke: var(--ink); stroke-width: 1; opacity: .5; }
.chart .evc { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.chart .evt { font-size: 12px; font-weight: 700; fill: var(--ink); text-anchor: middle; }
.chart .target { stroke: var(--ink); stroke-width: 1; opacity: .7; }
.chart .targett { font-size: 13px; fill: var(--ink-2); }
.chart .cross { stroke: var(--ink); stroke-width: 1; opacity: .35; }
.chart .dot { stroke: var(--paper); stroke-width: 2; }
.chart .pt { fill: var(--s5); opacity: .5; }
.chart .pt-sel { fill: var(--line-area); stroke: var(--paper); stroke-width: 2.5; }
.chart .med { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.chart .medt { font-size: 13px; font-weight: 700; fill: var(--ink); font-variant-numeric: tabular-nums; }
.chart .band { fill: var(--ink); opacity: .035; }
.chart .sel-lab { font-size: 13px; font-weight: 700; fill: var(--ink); }
.chart .medt, .chart .sel-lab { paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.keyrow .kdot { width: 9px; height: 9px; border-radius: 50%; background: var(--s5); opacity: .6; }
.keyrow .kbar { width: 18px; height: 3px; background: var(--ink); border-radius: 2px; }
.chart-src { font-size: 13.5px; color: var(--ink-3); margin: 10px 0 0; line-height: 1.45; max-width: 70ch; }

/* states dumbbell */
.db .row text { font-size: 15px; }
.db .nm { fill: var(--ink); font-weight: 600; }
.db .v { fill: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 14px; }
.db .bar { stroke: var(--rule-2); stroke-width: 3; stroke-linecap: round; }
.db .then { fill: var(--paper); stroke: var(--ink-3); stroke-width: 2; }
.db .now { fill: var(--s6); }
.db .aus .nm { font-weight: 700; }
.keyrow { display: flex; gap: 6px 18px; font-size: 14px; color: var(--ink-3); margin: 0 0 10px; flex-wrap: wrap; }
.keyrow span { display: inline-flex; align-items: center; gap: 7px; }
.keyrow i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* ---------- table ---------- */
.tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tools input { background: var(--paper); border: 1px solid var(--ui-line); border-radius: 3px; padding: 10px 12px; font-size: 16px; width: min(320px, 100%); }
.tools span { color: var(--ink-3); font-size: 15px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th { text-align: left; font-weight: 600; font-size: 14px; color: var(--ink-2); border-bottom: 2px solid var(--ink); padding: 0; }
th button { background: none; border: 0; padding: 10px 8px 10px 0; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: inherit; }
th[aria-sort="ascending"] button::after { content: "▲"; font-size: 10px; }
th[aria-sort="descending"] button::after { content: "▼"; font-size: 10px; }
th.r, td.r { text-align: right; }
td.r, th.r button { padding-right: 0; }
th.r { padding-left: 12px; }
th.r button { margin-left: auto; padding-right: 0; }
td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: color-mix(in srgb, var(--s5) 8%, transparent); }
td .sw { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: 0; }
td .up { color: var(--ink-2); }
td .st-s { display: none; color: var(--ink-3); font-size: 13px; margin-left: 6px; }
.more { margin-top: 14px; background: none; border: 0; padding: 6px 0; cursor: pointer; font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.more:hover { text-decoration-thickness: 2px; }

/* ---------- about ---------- */
.about h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.about p, .about li { color: var(--ink-2); font-size: 16px; max-width: 64ch; }
.about ul { padding-left: 20px; margin: 0 0 18px; }
.about li { margin-bottom: 6px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 56px; }
.foot { padding: 28px 0 48px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 15px; color: var(--ink-3); }
.foot a { color: var(--ink); font-weight: 600; }

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 40px; }
  .mapcol { position: static; }
  .sect-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand { white-space: nowrap; }
  .theme { padding: 9px; }
  .theme span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .lede { font-size: 17px; }
  .a-row { grid-template-columns: 88px minmax(0, 1fr); gap: 16px; }
  .waffle { width: 88px; height: 88px; }
  .a-lead { font-size: 20px; }
  .scale i { width: 34px; }
  .sect { padding: 52px 0; }
  .views { gap: 14px; }
  .views button { font-size: 14px; }
  td, th { font-size: 14px; }
  .hide-s { display: none; }
  td .st-s { display: inline; }
}
@media (prefers-reduced-motion: reduce) { .map .hx { transition: none; } }
