/* One hue per government, reused in its nodes, profile and connections. */
:root{
  --ink:#0c3045;--muted:#5e6d70;--paper:#f8f8f2;--rule:#dce1dd;
  --city:#234f70;--city-wash:#edf3f8;--city-tint:#dce8f1;
  --county:#236b60;--county-wash:#edf5f0;--county-tint:#d8ebe3;
  --state:#69519a;--state-wash:#f1eef8;--state-tint:#e6dff2;
  --resident:#933850;--resident-wash:#fff1f0;--accent:#c70043;
}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.55 "Atkinson Hyperlegible Next","Helvetica Neue",Arial,sans-serif}button,input{font:inherit}button,a,input,summary{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit;background:none;border:0;min-height:44px}a{color:inherit;text-underline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible,[role=button]:focus-visible{outline:3px solid var(--accent);outline-offset:4px}header{display:flex;align-items:center;gap:24px;padding:18px 4%;border-bottom:1px solid var(--rule)}.brand{display:flex;align-items:center;gap:14px;text-decoration:none;font-weight:600;font-size:17px}.brand small{display:block;font-size:12px;color:var(--muted);font-weight:400}.preview-note{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-left:auto}.current{font-size:13px}main{max-width:1500px;margin:auto;padding:28px 4%}.topline{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px}h1{font-size:30px;letter-spacing:-.03em;margin:0}h1+p{color:var(--muted);margin:3px 0 0;font-size:14px}.scope-switch{display:flex;flex-shrink:0;background:#e9ede8;border-radius:99px;padding:4px}.scope-switch button{padding:8px 20px;border-radius:99px;font-size:14px}.scope-switch [aria-pressed=true]{background:var(--ink);color:white}.workspace{display:grid;grid-template-columns:minmax(300px,360px) minmax(0,1fr);gap:28px;align-items:start}.sidebar{min-width:0}.search-label{font-size:12px;display:block;color:var(--muted);margin:0 0 6px}input{width:100%;border:1px solid var(--rule);border-radius:10px;padding:12px 15px;color:var(--ink);background:#fff}#search-results{background:white;border:1px solid var(--rule);border-radius:10px;margin:8px 0 0;max-height:320px;overflow:auto}#search-results button{width:100%;display:block;text-align:left;padding:10px 14px;border-bottom:1px solid var(--rule)}#search-results small{display:block;color:var(--muted);font-size:11px}#search-results p{padding:0 16px}#profile,#relationships{background:#fff;border:1px solid var(--rule);border-radius:16px;margin-top:16px;padding:24px}.eyebrow{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);margin:0 0 12px}h2{font-size:27px;line-height:1.2;letter-spacing:-.02em;margin:0 0 16px}#profile p{font-size:15px}#profile .holder{font-size:17px;font-weight:600;margin-bottom:4px}.shortcuts{display:grid;gap:4px;margin-top:20px}.shortcuts button{text-align:left;border-top:1px solid var(--rule);padding:10px 0;font-size:14px}.shortcuts button::after{content:'→';float:right}.action{display:block;text-align:center;background:var(--ink);color:white;text-decoration:none;border-radius:8px;padding:12px 10px;margin:20px 0 12px;font-size:14px}.secondary{display:block;font-size:13px;padding:8px 0}.sources{border-top:1px solid var(--rule);margin-top:18px;padding-top:12px}.sources summary{font-size:12px;cursor:pointer;min-height:32px}.sources a{display:block;font-size:12px;padding:8px 0}.reviewed{color:var(--muted);font-size:11px!important}.map-panel{min-width:0}.map-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:var(--muted)}.map-heading button{font-size:12px;text-decoration:underline;text-underline-offset:4px}#chart svg{display:block;width:100%;height:auto;overflow:visible}svg text{font-family:"Atkinson Hyperlegible Next","Helvetica Neue",Arial,sans-serif}.sector-label{font-size:17px;letter-spacing:1px;font-weight:600}.orbit{fill:none;stroke:#bbc7c5;stroke-width:1;stroke-dasharray:3 6}.gov-node{cursor:pointer;outline:none;color:var(--office-color)}.gov-node .shape{fill:var(--office-tint);stroke:currentColor;stroke-width:1.8}.gov-node .hit{fill:transparent;stroke:none}.gov-node .node-name{font-size:14px;fill:currentColor;paint-order:stroke;stroke:var(--paper);stroke-width:5px;stroke-linejoin:round;pointer-events:none}.gov-node.selected .shape{fill:currentColor;stroke-width:2.5}.selection-ring{fill:none;stroke:currentColor;stroke-width:5;opacity:.2}.gov-node.selected .node-name{font-weight:700}.gov-node.selected .initial{fill:white}.gov-node .initial{font-size:13px;fill:currentColor;font-weight:600;pointer-events:none}.gov-node:hover .shape{stroke-width:3.5}.gov-node:focus-visible .shape{stroke:var(--accent);stroke-width:4}.gov-node.dim{color:#5d6e75}.gov-node.dim .shape{fill:var(--paper);stroke:#7b8c91}.gov-node.dim:hover,.gov-node.dim:focus{color:var(--office-color)}.gov-node.dim:hover .shape,.gov-node.dim:focus .shape{fill:var(--office-tint);stroke:currentColor}.gov-node .hover-name{opacity:0}.gov-node:hover .hover-name,.gov-node:focus .hover-name{opacity:1}.edge{fill:none;stroke:var(--relationship);stroke-width:2.8}.edge.quiet-edge{opacity:.4;stroke-width:2}.center{fill:var(--resident-wash);stroke:var(--resident);stroke-width:1.5}.center-label{font-size:14px;fill:var(--resident);font-weight:600;letter-spacing:.02em}.map-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;border-bottom:1px solid var(--rule);padding:0 0 10px}.map-bottom p{font-size:13px;margin:0;color:var(--muted)}.map-bottom button{font-size:12px;text-decoration:underline;text-underline-offset:4px;flex-shrink:0}.legend{font-size:12px;padding:12px 0;color:var(--muted)}.legend summary{cursor:pointer;min-height:36px}.legend div{display:flex;gap:8px 20px;flex-wrap:wrap}.legend p{max-width:530px}.study-note{font-size:11px;color:var(--muted);border-top:1px solid var(--rule);margin:30px 0 0;padding-top:16px}h3{font-size:16px;margin:0 0 8px}.connection{border-top:1px solid var(--rule);padding:12px 0}.connection p{font-size:13px;margin:0 0 5px}.connection button{display:block;text-align:left;font-weight:600;font-size:14px;min-height:36px;padding:0}.connection a{font-size:11px;color:var(--muted)}.remaining{font-size:12px;color:var(--muted)}.state-hint{font-size:16px;fill:var(--muted)}.state-node .node-name{font-size:22px;font-weight:600}.state-node .initial{font-size:19px}.election-label{fill:var(--muted);font-size:15px}.small-note{font-size:13px;fill:var(--muted)}[hidden]{display:none!important}
.sector-city{fill:var(--city-wash)}
.sector-county{fill:var(--county-wash)}
.sector-state{fill:var(--state-wash)}
#profile[data-government]{border-top:3px solid var(--profile-color)}
#profile .action{background:var(--profile-color,var(--ink))}
#relationships .connection button{color:var(--profile-color,var(--ink))}
.scope-switch [data-scope=state][aria-pressed=true]{background:var(--state)}
@media(min-width:1450px){#chart{max-width:850px;margin:auto}}
/* Keep the overview on screen while the profile remains the readable detail view. */
#chart svg{height:clamp(600px,calc(100svh - 280px),740px)}
.gov-node .node-name{font-size:18px}
#mobile-map-toggle{display:none}
.profile-overview{font-size:12px;color:var(--muted);padding:0 0 12px;text-decoration:underline;text-underline-offset:4px}
.connection button{min-height:44px}
.sidebar{grid-column:1;grid-row:1}
.map-panel{grid-column:2;grid-row:1 / span 2}
.insight-rail{grid-column:1;grid-row:2;min-width:0}
.legend .key-content,.legend .key-group,.legend [data-key-local]{display:block}
.legend summary{font-size:16px;font-weight:600;color:var(--ink);min-height:44px}
.key-group{margin:14px 0 22px}
.key-group h3{font-size:12px;color:var(--muted);font-weight:500;margin-bottom:10px}
.legend .key-group p{display:flex;align-items:center;gap:12px;margin:8px 0;font-size:13px;color:var(--ink);line-height:1.45}
.key-swatch{display:block;flex:0 0 6px;width:6px;height:18px;border-radius:2px;margin:0 5px}
.key-shape{display:block;flex:0 0 15px;width:15px;height:15px;border:1.5px solid var(--ink)}
.key-circle{border-radius:50%}.key-square{border-radius:3px}.key-diamond{transform:rotate(45deg) scale(.76)}
.legend .key-direction p{display:block}
.key-direction p>span{display:block;font-weight:600;font-size:16px;letter-spacing:.08em;margin-bottom:8px}
.legend .key-direction .key-note{font-size:12px;color:var(--muted);margin-top:10px}
.connection-intro{color:var(--muted);font-size:12px;margin:0 0 14px}
.connection-list{list-style:none;margin:0;padding:0}
.connection{display:grid;grid-template-columns:25px minmax(0,1fr);gap:12px;padding:18px 0}
.connection-number{width:25px;height:25px;border:1.5px solid var(--profile-color);border-radius:50%;color:var(--profile-color);text-align:center;font-size:12px;font-weight:600;line-height:22px;background:white;margin-top:8px}
.flow-route{min-width:0}
.connection .flow-office{display:block;font-size:14px;line-height:1.4;text-align:left;font-weight:600;color:var(--profile-color);padding:10px 0}
.connection .flow-description{display:grid;grid-template-columns:16px minmax(0,1fr);gap:7px;font-size:13px;line-height:1.5;margin:0}
.flow-description>span{color:var(--profile-color);font-size:21px;line-height:1}
.connection .flow-source{display:inline-block;margin-top:4px;font-size:11px}
.remaining{display:block;padding-top:12px}
.edge-reference circle{fill:var(--paper);stroke:var(--relationship);stroke-width:1.5}
.edge-reference text{fill:var(--relationship);font-size:14px;font-weight:600}
.reference-leader{fill:none;stroke:var(--relationship);stroke-width:1;opacity:.65}
@media(min-width:1280px){
  main{max-width:1680px;padding:28px 3.5%}
  header{padding-left:3.5%;padding-right:3.5%}
  .workspace{grid-template-columns:300px minmax(0,1fr) 240px;gap:24px}
  .sidebar{grid-column:1;grid-row:1}
  .map-panel{grid-column:2;grid-row:1;position:sticky;top:16px}
  .insight-rail{grid-column:3;grid-row:1;border-left:1px solid var(--rule);padding-left:22px}
  .insight-rail .legend{padding:0}
  .insight-rail #relationships{border:0;border-top:1px solid var(--rule);border-radius:0;background:none;padding:24px 0 0;margin-top:22px}
}
@media(max-width:900px){main{padding:22px 20px}.workspace{grid-template-columns:280px minmax(0,1fr);gap:18px}#profile,#relationships{padding:20px}h2{font-size:24px}.topline{align-items:flex-start}h1{font-size:26px}h1+p{max-width:300px}}
@media(max-width:680px){header{padding:12px 16px;gap:12px}.current{display:none}.brand{font-size:14px}.brand img{width:40px;height:40px}.preview-note{font-size:9px}main{padding:20px 16px}.topline{display:block;margin-bottom:18px}.scope-switch{margin-top:16px;width:100%}.scope-switch button{flex:1}.workspace{display:flex;flex-direction:column;gap:8px}.map-panel{width:100%;order:0}.sidebar{width:100%;order:1}.map-heading{font-size:11px}.map-bottom{gap:10px}.map-bottom p{font-size:12px}.map-bottom button{font-size:11px}.legend{padding-bottom:0}#profile,#relationships{margin-top:12px;padding:22px}.search-label{margin-top:10px}h2{font-size:26px}.study-note{line-height:1.6}.sector-label{font-size:21px}.gov-node .node-name{font-size:20px}.gov-node .initial{font-size:17px}}
@media(max-width:680px){
  #mobile-map-toggle{display:block;width:100%;text-align:left;text-decoration:underline;text-underline-offset:4px;font-size:13px;margin-bottom:8px}
  .map-panel{display:none}
  .mobile-map-open .map-panel{display:block}
  .insight-rail{width:100%;order:2}
  .insight-rail .legend{display:none}
  .mobile-map-open .insight-rail .legend{display:block}
  .insight-rail #relationships[data-scope=state]{display:none}
  .connection{grid-template-columns:minmax(0,1fr)}
  .connection-number,.connection-intro{display:none}
  #chart svg{height:auto}
}

/* Council districts stay accessible without filling the opening overview. */
.council-roster{margin:22px 0 10px}
.council-roster h3{font-size:15px}
.district-list{border-top:1px solid var(--rule)}
.district-list button{display:grid;grid-template-columns:44px minmax(0,1fr) 12px;gap:10px;align-items:center;width:100%;min-height:52px;padding:11px 0;border-bottom:1px solid var(--rule);text-align:left;font-size:13px;line-height:1.45}
.district-list button:hover{background:var(--city-wash)}
.district-tag{font-size:11px;font-weight:600;color:var(--city)}
.search-district{font-weight:600;color:var(--city)}
#profile .council-note{font-size:13px;color:var(--muted);border-top:1px solid var(--rule);padding-top:16px;margin-top:18px}
.district-seat .initial{font-size:17px}
.council-center .initial{font-size:19px}
.council-center .small-note{fill:var(--city);font-size:16px;pointer-events:none}
@media(max-width:680px){.district-seat .initial{font-size:22px}.council-center .initial{font-size:22px}}

.council-view-controls{display:flex;gap:8px;margin:12px 0 0;font-size:12px}
.council-view-controls button{border:1px solid var(--rule);border-radius:6px;padding:6px 14px}
.council-view-controls [aria-pressed=true]{background:var(--city);color:white;border-color:var(--city)}

/* Public graph shares the site's navigation and quiet footer. */
.civic-graph-page .atlas-header .atlas-navigation{min-width:0}
.civic-graph-page .civic-site-footer{padding:20px 5%;border-top:1px solid var(--rule);color:var(--muted);font-size:12px}
.civic-graph-page .civic-utility-links{display:flex;gap:20px;flex-wrap:wrap}
.civic-graph-page .civic-utility-links a{display:inline-flex;align-items:center;min-height:44px}
.civic-graph-page noscript p{padding:24px 5%}
@media(max-width:680px){.civic-graph-page .atlas-header nav a{font-size:12px}.civic-graph-page .atlas-header .atlas-navigation{width:100%}.civic-graph-page .civic-utility-links{justify-content:center;width:100%}}
/* Unified preview: profiles retain substance; the map holds its place. */
.civic-graph-page main{max-width:1500px}
.workspace{grid-template-columns:minmax(300px,390px) minmax(440px,1fr) 200px;align-items:start}
.person-photo{margin:12px 0}.person-photo img{object-fit:cover;border-radius:12px;width:88px;height:88px}.person-photo figcaption{font-size:11px;margin-top:4px;color:var(--muted)}
.roster-photo{width:36px;height:36px;object-fit:cover;border-radius:50%}
.district-list button{grid-template-columns:48px 36px 1fr 15px!important;align-items:center}
#journey{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0}#journey button,#journey a{font-size:14px;background:none;border:0;color:var(--ink);padding:8px;cursor:pointer}#journey [aria-current]{font-weight:700;text-decoration:underline}
.preview-note{font-size:12px;color:#53636a}.map-panel{position:sticky;top:12px}
#profile li{margin:8px 0}#profile details{margin:16px 0}#profile summary{cursor:pointer;min-height:32px}
@media(max-width:1100px){.workspace{grid-template-columns:minmax(280px,360px) minmax(0,1fr)}.insight-rail{grid-column:1/-1}.connection-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
@media(max-width:680px){.workspace{display:flex;flex-direction:column}.sidebar,.insight-rail{width:100%}.map-panel{position:static;width:100%}.connection-list{display:block}.person-photo img{width:72px;height:72px}}

#close-profile{min-height:44px;margin:0 0 12px;padding:8px 14px;cursor:pointer}

/* Office names and descriptions live outside the dense diagram. */
#chart .gov-node .node-name { display:none; }
.graph-office-preview { margin:12px 0; padding:14px 18px; border:1px solid var(--rule); border-radius:8px; background:#fff; min-height:84px; box-sizing:border-box; }
.graph-office-preview strong { display:block; font-size:17px; line-height:1.4; }
.graph-office-preview span { display:block; margin-top:5px; font-size:14px; line-height:1.5; color:var(--muted); }

/* Stable diagram frame; labels sit beyond the circular drawing. */
html { scrollbar-gutter:stable; }
.map-panel { position:static; overflow-anchor:none; }
#chart { overflow-anchor:none; }
#council-view-controls[hidden] { display:flex!important; visibility:hidden; }
.map-bottom { min-height:64px; }
.office-callout { pointer-events:none; }
.office-callout path { fill:none; stroke:var(--ink); stroke-width:1.5; }
.office-callout circle { fill:var(--ink); }
.office-callout text { fill:var(--ink); font-size:22px; font-weight:600; paint-order:stroke; stroke:var(--paper); stroke-width:6px; stroke-linejoin:round; }

.civic-graph-page { overflow-anchor:none; }
