/* The Features page (/features/, scripts/features.py): Koray's draft of 2026-11-17, with its two state colours (FL, TX)
   made one colour per state (.s0, .s1, ...: the states in order of clinic count) so the page takes any number of states.
   Loaded only on that page, after style.css and pages.css. */
.fx{--s0:#0b7f86;--s0b:#3fb5a9;--s1:#ff6b4a;--s1b:#ff8f75;--s2:#f4a620;--s2b:#f7c25b;--s3:#5b6cd9;--s3b:#8a97ec;--s4:#2e9e5b;--s4b:#62c08a;--s5:#b0479a;--s5b:#d27cc0;--s6:#8a5a2b;--s6b:#b88555;--s7:#4b5563;--s7b:#7c8696}
.fx .s0{--c:var(--s0);--cb:var(--s0b)}.fx .s1{--c:var(--s1);--cb:var(--s1b)}.fx .s2{--c:var(--s2);--cb:var(--s2b)}
.fx .s3{--c:var(--s3);--cb:var(--s3b)}.fx .s4{--c:var(--s4);--cb:var(--s4b)}.fx .s5{--c:var(--s5);--cb:var(--s5b)}
.fx .s6{--c:var(--s6);--cb:var(--s6b)}.fx .s7{--c:var(--s7);--cb:var(--s7b)}
.fx-split span{display:block;width:0;background:var(--c);transition:width 1.2s cubic-bezier(.2,.8,.2,1)}
.fx-stats.on .fx-split span{width:var(--w)}
.fx-split-l i,.fx-legend i{background:var(--c)}
.fx-cmp i{display:block;height:8px;border-radius:8px;background:linear-gradient(90deg,var(--c),var(--cb));width:0;transition:width 1.2s cubic-bezier(.2,.8,.2,1)}
.fx-bar i,.fx-bar-t i{background:linear-gradient(90deg,var(--c),var(--cb))}
.fx-bar i{display:block;height:100%;border-radius:6px}
.fx-hb-bars i{background:var(--c)}
.fx-scatter circle{fill:var(--c)}
.fx-hero .crumbs{margin:0 0 14px;justify-content:center}.fx-hero .crumbs ol{justify-content:center}
.fx-head-row .seg{margin:0}
.fx-tiles{grid-template-columns:repeat(4,1fr)!important}
.fx-stat{position:relative;overflow:hidden;transition:transform .2s,box-shadow .2s}
.fx-stat:hover{transform:translateY(-3px);box-shadow:0 18px 40px rgba(8,15,30,.12)}
.fx-split{display:flex;height:8px;border-radius:8px;overflow:hidden;background:var(--soft-2);margin-top:12px}

.fx-split-l{display:flex;flex-wrap:wrap;column-gap:12px;row-gap:2px;justify-content:space-between;font-size:12.5px;color:var(--muted);margin-top:6px;font-weight:700}
.fx-split-l i{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px;vertical-align:1px}
.fx-ringtile .ft-q{max-width:calc(100% - 72px)}
.fx-ring{position:absolute;right:16px;bottom:16px;width:58px;height:58px;transform:rotate(-90deg)}
.fx-ring circle{fill:none;stroke-width:5}.fx-ring .bg{stroke:var(--soft-2)}
.fx-ring .fg{stroke:var(--blue);stroke-linecap:round;stroke-dasharray:0 100;transition:stroke-dasharray 1.4s cubic-bezier(.2,.8,.2,1)}
.fx-stats.on .fx-ring .fg{stroke-dasharray:var(--p) 100}
.fx-stars{position:relative;display:inline-block;font-size:20px;letter-spacing:2px;color:var(--soft-2);margin-top:10px;line-height:1}
.fx-stars span{position:absolute;left:0;top:0;overflow:hidden;white-space:nowrap;color:var(--star);width:0;transition:width 1.3s ease}
.fx-stats.on .fx-stars span{width:var(--r)}
.fx-mini{font-size:12.5px;color:var(--muted);margin-top:6px;font-weight:700}
.fx-cmp{margin-top:10px;display:grid;gap:6px}
.fx-cmp div{display:grid;grid-template-columns:24px 1fr 56px;align-items:center;gap:8px;font-size:12.5px;font-weight:800;color:var(--muted)}
.fx-stats.on .fx-cmp i{width:var(--w)}
.fx-cmp b{color:var(--ink);text-align:right}
@media (max-width:1000px){.fx-tiles{grid-template-columns:repeat(2,1fr)!important}}
@media (max-width:420px){.fx-ring{width:42px;height:42px;right:12px;bottom:12px}.fx-ringtile .ft-q{max-width:calc(100% - 46px)}}
@media (prefers-reduced-motion:reduce){.fx-split span,.fx-ring .fg,.fx-stars span,.fx-cmp i,.fx-bar-t i{transition:none}}

.fx-kicker{display:block;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:2px}
.fx-attrs{margin:0 0 14px;border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden;font-size:14px;line-height:1.45}
.fx-attrs>div{display:grid;grid-template-columns:140px 1fr}.fx-attrs>div+div{border-top:1px solid var(--line)}
.fx-attrs dt{padding:8px 12px;background:var(--soft);font-weight:800;color:var(--ink)}.fx-attrs dd{margin:0;padding:8px 12px;color:var(--muted)}
.fx-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:12px}.fx-foot .ft-src-line{margin:0}
.fx-go{display:inline-flex;align-items:center;gap:4px;font-size:14px;font-weight:800;color:var(--blue)}.fx-go .i{width:16px;height:16px}

.fx-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.fx-chips a{font-size:13px;font-weight:700;color:var(--blue);background:#fff;border:1px solid #bfe6e3;border-radius:999px;padding:4px 10px}
.hero h1.fx-h1{font-size:clamp(34px,5.2vw,62px)}
/* immersive hero */
.fx-map-svg{position:absolute;inset:0;width:100%;height:100%;z-index:0;background:radial-gradient(ellipse at 50% 40%,#f7fbfb,#e9f3f3)}.fx-map-svg .land circle{fill:#0b7f86;fill-opacity:.22}.fx-map-svg .lab text{font:800 15px Nunito,sans-serif;fill:#1e2638;fill-opacity:.55}.fx-map-svg .d{fill:#ff6b4a;fill-opacity:.85;stroke:#fff;stroke-width:1.5}.fx-map-svg .h{fill:#ff6b4a;fill-opacity:.25;animation:fxhalo 2.8s ease-out infinite}
.fx-hero .hero-fade{background:radial-gradient(ellipse 60% 55% at 50% 30%,#fff 35%,rgba(255,255,255,.7) 65%,rgba(255,255,255,.15))}
@keyframes fxhalo{0%{fill-opacity:.35}100%{fill-opacity:0}}
.fx-stage{display:flex;justify-content:center;align-items:stretch;gap:18px;flex-wrap:wrap;margin-top:40px}
.fx-stage .float-card{margin-top:0}
.fx-spot{background:#fff;border-radius:var(--r);box-shadow:0 20px 50px rgba(8,15,30,.18);padding:14px 16px 12px;width:440px;max-width:100%;text-align:left;display:flex;flex-direction:column;gap:10px}
.fx-spot-in{display:flex;gap:14px;align-items:flex-start;min-height:132px}
.fx-spot-in.swap{animation:fxin .45s ease}
@keyframes fxin{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.fx-spot-body{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.fx-spot-body b{font-size:16px;line-height:1.3}
.fx-spot-fig{display:flex;align-items:baseline;gap:8px;font-size:14px;color:var(--muted)}
.fx-spot-fig em{font-style:normal;font-size:26px;font-weight:900;color:var(--blue)}
.fx-spot .btn{align-self:flex-start}
.fx-spot-dots{display:flex;gap:6px;justify-content:center}
.fx-spot-dots button{width:8px;height:8px;border-radius:999px;border:0;padding:0;background:var(--line);cursor:pointer;transition:width .2s,background .2s}
.fx-spot-dots button[aria-current=true]{width:22px;background:var(--blue)}
/* tabs + sliders */
.fx-tabs button{white-space:nowrap}.fx-tabs button small{font-size:12px;opacity:.65;margin-left:2px}
.fx-tabs button[aria-selected=true],.fx-tabs button[aria-pressed=true]{background:var(--ink);color:#fff}
.fx-slider{position:relative}
.fx-track{display:flex;align-items:flex-start;gap:18px;transition:height .3s ease;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;padding:4px 2px 8px;scrollbar-width:none;overscroll-behavior-x:contain}
.fx-track::-webkit-scrollbar{display:none}
.fx-track:focus-visible{outline:2px solid var(--blue);outline-offset:4px;border-radius:var(--r)}
.fx-slide{scroll-snap-align:start;flex:0 0 calc((100% - 18px)/2)}
.fx-slide[hidden]{display:none}
.fx-card{display:flex;flex-direction:column;scroll-margin-top:140px}
.fx-card:target{border-color:var(--blue);box-shadow:0 0 0 4px var(--blue-soft)}
.fx-nav{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:10px}
.fx-arrow{width:42px;height:42px;border-radius:50%;border:1px solid var(--line);background:#fff;display:grid;place-items:center;cursor:pointer;color:var(--ink)}
.fx-arrow:hover{border-color:var(--blue);color:var(--blue)}.fx-arrow:disabled{opacity:.35;cursor:default}
.fx-arrow .i{width:18px;height:18px}.fx-flip{transform:scaleX(-1)}
.fx-count{font-size:14px;font-weight:700;color:var(--muted);min-width:64px;text-align:center}

.fx-head-row{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:6px}
.fx-head-row .seg{margin:0}
/* coverage */
.fx-panel[hidden]{display:none}
.fx-state{margin-bottom:16px}
.fx-state-head h3{margin:0 0 6px;font-size:24px}.fx-state-head h3 a{color:var(--ink)}
.fx-state-head p{margin:0 0 12px;color:var(--ink-2);max-width:760px}
.fx-state-kpis{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.fx-state-kpis span{background:#fff;border:1px solid var(--line);border-radius:999px;padding:6px 12px;font-size:14px;color:var(--muted)}.fx-state-kpis b{color:var(--ink)}
.fx-track-city .fx-slide{flex:0 0 calc((100% - 54px)/4)}
.fx-city{display:flex;flex-direction:column;gap:4px;background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:18px;color:var(--ink);transition:border-color .15s,transform .15s}
.fx-city:hover{border-color:var(--blue);transform:translateY(-2px)}
.fx-city-n{font-size:30px;font-weight:900;line-height:1;color:var(--blue)}.fx-city-k{font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.fx-city b{font-size:16px;margin-top:6px}
.fx-bar{height:6px;border-radius:6px;background:var(--soft-2);overflow:hidden;margin:6px 0}
.fx-city-go{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:800;color:var(--blue)}.fx-city-go .i{width:14px;height:14px}
.fx-ph{font-size:24px;margin:0 0 6px}
#inside .ft-answer{margin-bottom:18px}
@media (max-width:1000px){.fx-track-city .fx-slide{flex-basis:calc((100% - 36px)/3)}}
@media (max-width:760px){.fx-map-svg .lab{display:none}.fx-map-svg{opacity:.6}.fx-slide{flex-basis:88%}.fx-track-city .fx-slide{flex-basis:62%}.fx-attrs>div{grid-template-columns:1fr}.fx-attrs dt{background:none;padding-bottom:0}.fx-attrs dd{padding-top:2px}.fx-spot{width:100%}.fx-head-row .seg{overflow-x:auto;flex-wrap:nowrap;max-width:100%;scrollbar-width:none}}

.fx-vt{margin:0 0 14px}.fx-ctl .fx-vt{margin:0}
.fx-tbl-wrap{max-height:460px;overflow:auto;border:1px solid var(--line);border-radius:var(--r);background:#fff}
.fx-tbl{width:100%;border-collapse:collapse;font-size:14px}
.fx-tbl th{position:sticky;top:0;background:var(--soft);text-align:left;font-weight:800;padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
.fx-tbl th[data-k]{cursor:pointer}.fx-tbl th[data-k]:hover{color:var(--blue)}.fx-tbl th .ar{opacity:.5;margin-left:4px;font-size:11px}
.fx-tbl td{padding:9px 12px;border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums}
.fx-tbl td:not(:first-child),.fx-tbl th:not(:first-child){text-align:right}
.fx-tbl tr:hover td{background:#f7fbfb}.fx-tbl tr.tot td{font-weight:900;background:var(--soft)}
.fx-tbl a{color:var(--ink);font-weight:700}.fx-tbl .st{font-size:12px;font-weight:800;color:var(--muted);margin-left:6px}
.fx-tbl-q{width:100%;max-width:320px;margin:0 0 10px;padding:10px 14px;border:1px solid var(--line);border-radius:999px;font:15px Nunito,sans-serif}

.fx-track-tools .fx-slide{flex:0 0 calc((100% - 54px)/4)}
.fx-tool{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:20px;display:flex;flex-direction:column;gap:8px}
.fx-tool h3{font-size:17px;margin:0;line-height:1.3}.fx-tool p{margin:0;font-size:14.5px;color:var(--ink-2);line-height:1.5}.fx-tool .fx-go{margin-top:auto}
.fx-tool .ft-ico{width:44px;height:44px}.fx-tool .ft-ico .i{width:22px;height:22px}
.fx-tool:nth-child(4n+2) .ft-ico{background:#fff1ec;color:#d9482a}.fx-tool:nth-child(4n+3) .ft-ico{background:#fff3d8;color:#a86300}.fx-tool:nth-child(4n) .ft-ico{background:var(--green-soft);color:#11833c}
.fx-finds{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.fx-find{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:20px;display:flex;flex-direction:column;gap:6px;position:relative}
.fx-find-n{font-size:34px;font-weight:900;color:var(--blue);line-height:1;letter-spacing:-.02em}
.fx-find b{font-size:16px;line-height:1.35}.fx-find p{margin:0;font-size:14px;color:var(--muted);line-height:1.5}
.fx-find-tag{align-self:flex-start;margin-top:6px;font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);background:var(--soft);border-radius:999px;padding:3px 9px}
.fx-cap{margin:0 0 14px;color:var(--ink-2);max-width:780px}
.fx-ctl{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}.fx-ctl .seg{margin:0;scrollbar-width:none}.fx-ctl .seg button{white-space:nowrap}
.fx-bars{display:grid;gap:7px}
.fx-bar-r{display:grid;grid-template-columns:170px 1fr 74px;align-items:center;gap:10px;font-size:14px}
.fx-bar-r a{color:var(--ink);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fx-bar-r a small{color:var(--muted);font-weight:700;margin-left:4px}
.fx-bar-t{height:14px;border-radius:7px;background:var(--soft)}.fx-bar-t i{display:block;height:100%;border-radius:7px;width:0;transition:width .7s cubic-bezier(.2,.8,.2,1)}

.fx-bar-r b{text-align:right;font-variant-numeric:tabular-nums}
.fx-legend{display:flex;gap:16px;font-size:13px;font-weight:700;color:var(--muted);margin-bottom:10px}.fx-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px;vertical-align:-1px}
.fx-hbs{display:grid;gap:10px;max-width:880px}
.fx-hb{display:grid;grid-template-columns:90px 1fr;gap:12px;align-items:center}.fx-hb-l{font-size:14px;font-weight:800;text-align:right}
.fx-hb-bars{display:grid;gap:3px}.fx-hb-bars i{display:block;height:12px;border-radius:6px;width:var(--w);min-width:22px;position:relative}
.fx-hb-bars em{position:absolute;left:calc(100% + 6px);top:-3px;font-style:normal;font-size:12px;font-weight:800;color:var(--muted)}
.fx-scatter{position:relative;width:100%;max-width:960px}.fx-scatter svg{width:100%;height:auto;display:block}
.fx-scatter .ax{stroke:var(--line)}.fx-scatter .gl{stroke:var(--soft-2)}.fx-scatter text{font:700 12px Nunito,sans-serif;fill:var(--muted)}
.fx-scatter circle{fill-opacity:.6;stroke:#fff;stroke-width:1;cursor:pointer}.fx-scatter circle:hover{fill-opacity:1;stroke:#080f1e}
.fx-sc-tip{position:absolute;pointer-events:none;background:var(--ink);color:#fff;font-size:13px;line-height:1.4;padding:8px 10px;border-radius:10px;transform:translate(-50%,-110%);white-space:nowrap;opacity:0;transition:opacity .12s}
.fx-cols{display:flex;align-items:flex-end;gap:16px;height:240px;max-width:640px;padding-top:20px}
.fx-col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:6px}
.fx-col i{display:block;width:100%;height:var(--h);background:linear-gradient(180deg,#f4a620,#f7c25b);border-radius:10px 10px 4px 4px}
.fx-col-v{font-weight:900;font-size:16px}.fx-col-l{font-size:12.5px;font-weight:700;color:var(--muted);text-align:center}
.fx-src2{margin:14px 0 0;font-size:13px;color:var(--muted)}
.fx-method>div{grid-template-columns:200px 1fr}
@media (max-width:1000px){.fx-track-tools .fx-slide{flex-basis:calc((100% - 36px)/3)}.fx-finds{grid-template-columns:repeat(2,1fr)}}
@media (max-width:760px){.fx-track-tools .fx-slide{flex-basis:78%}.fx-finds,.fx-bar-r{grid-template-columns:120px 1fr 60px;font-size:13px}.fx-method>div{grid-template-columns:1fr}.fx-cols{height:200px;gap:8px}.fx-ctl .seg{overflow-x:auto;flex-wrap:nowrap;max-width:100%}}
/* The bars, rings and stars are drawn without the script; features.js empties them (.pre) only to fill them in view. */
.fx-split span,.fx-cmp i{width:var(--w)}.fx-ring .fg{stroke-dasharray:var(--p) 100}.fx-stars span{width:var(--r)}
.fx-stats.pre .fx-split span,.fx-stats.pre .fx-cmp i,.fx-stats.pre .fx-stars span{width:0}.fx-stats.pre .fx-ring .fg{stroke-dasharray:0 100}
.fx-track{overflow-y:hidden}

/* Polish (2026-11-17): room between the groups, lighter cards, one control row per chart. */
.fx .ft-h2{margin-bottom:20px}
.fx-head-row{margin-bottom:0}
.fx-panel{padding-top:32px}
.fx-panel>.fx-ph:first-child,.fx-panel>.fx-state:first-child{margin-top:0}
.fx-ph{font-size:22px;line-height:1.3;margin:0 0 8px}
.fx-cap{margin:0 0 24px;color:var(--muted);max-width:720px}
.fx-ctl{display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;margin:0 0 22px}
.fx-ctl .fx-vt{margin-left:auto}
.fx-ctl .fx-legend{margin:0}
.fx-view .fx-legend{margin:0 0 14px}
.fx-src2{margin-top:18px}
/* Feature cards: one column of evenly spaced parts, the source and link pinned to the bottom. */
.fx-card{padding:28px;gap:20px}
.fx-card>*,.fx-card>p,.fx-card .ft-card-head{margin:0}
.fx-card .ft-card-head{align-items:center}
.fx-attrs{border:0;border-radius:0;border-top:1px solid var(--line)}
.fx-attrs>div{grid-template-columns:136px 1fr;border-bottom:1px solid var(--line)}
.fx-attrs>div+div{border-top:0}
.fx-attrs dt{background:none;padding:10px 12px 10px 0;font-size:13.5px;color:var(--ink)}
.fx-attrs dd{padding:10px 0;color:var(--ink-2)}
.fx-method>div{grid-template-columns:200px 1fr}
.fx-foot{margin-top:auto;padding-top:0}
.fx-foot .ft-src-line{margin:0!important}
.fx-tool{padding:22px;gap:10px}
.fx-tool-head{display:flex;align-items:center;gap:12px}
/* The (i) notes open over the next tile, so the tiles don't clip them. */
.fx-stat{overflow:visible}.fx-stat:hover,.fx-stat:focus-within{z-index:5}
/* Spotlight: title, figure, then the button with its position beside it. */
.fx-spot-foot{display:flex;align-items:center;gap:12px;margin-top:6px}
.fx-spot-meta{font-size:13px;font-weight:700;color:var(--muted)}
/* Figures: state legends wrap left to right; four tiles a row only where they have room. */
.fx-split-l{justify-content:flex-start;gap:4px 14px}
@media (max-width:1100px){.fx-tiles{grid-template-columns:repeat(2,1fr)!important}}
/* The hero map stays behind the words: the clear centre is wider than the text and the stage. */
.fx-hero .hero-fade{background:radial-gradient(ellipse 72% 64% at 50% 44%,#fff 46%,rgba(255,255,255,.84) 68%,rgba(255,255,255,.25))}
@media (max-width:760px){
  .fx-card{padding:22px;gap:16px}
  .fx-attrs>div{grid-template-columns:1fr}
  .fx-attrs dt{padding:10px 0 0}.fx-attrs dd{padding:2px 0 10px}
  .fx-ctl .seg{flex-wrap:wrap;overflow:visible;padding:0;gap:6px;border:0;background:none}
  .fx-ctl .seg button{padding:7px 13px;border:1px solid var(--line);background:#fff}
  .fx-ctl .seg button[aria-pressed=true],.fx-ctl .seg button[aria-selected=true]{border-color:var(--ink);background:var(--ink);color:#fff}
  .fx-ctl .fx-vt{margin-left:0}
  .fx-panel{padding-top:24px}
}
