/* Landing Page Version 6: county map first, full content width, grid under it */
.landing-map-page{max-width:var(--page-max);margin:0 auto;padding:24px 32px 8px;box-sizing:border-box}
.landing-map-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.landing-map-head p{margin:0;color:var(--forest,#1f5138);font-size:13px;font-weight:700}
.landing-map .popchg-map-wrap{margin-top:10px}
.landing-map-grid{max-height:560px;overflow-y:auto}
.landing-map-grid thead th{position:sticky;top:0;z-index:1;background:var(--page-bg)}
@media (max-width:700px){.landing-map-page{padding:16px 16px 8px}}
/* Clickable city dots on the landing map */
.landing-map .popchg-map-cities{pointer-events:auto}
.landing-map .popchg-map-city-hit{fill:transparent;cursor:pointer}
.landing-map .popchg-map-city-link{cursor:pointer}
.landing-map .popchg-map-city-link:hover .popchg-map-city-dot,.landing-map .popchg-map-city-link:focus .popchg-map-city-dot{fill:var(--blue,#0b69c7)}
.landing-map .popchg-map-city-link:hover .popchg-map-city-label{fill:var(--blue,#0b69c7)}
.landing-map-grid th a{color:var(--blue,#0b69c7);text-decoration:none}
.landing-map-grid th a:hover{text-decoration:underline}
.landing-map .popchg-map-svg text.popchg-map-city-label{font:400 11px var(--font-body);fill:#333;stroke-width:2px}
.landing-map .popchg-map-city-leader{stroke:#555;stroke-width:.7;vector-effect:non-scaling-stroke}
/* Hover callout: the hovered county's towns and boundaries, in the empty top-left of the map (max ~quarter page) */
.landing-map-frame{position:relative}
.county-callout{position:absolute;top:14px;left:0;z-index:4;width:min(30vw,460px);max-height:none;padding:8px 10px;display:flex;flex-direction:column;gap:2px;border:1px solid #1f5138;background:#fff;pointer-events:none;box-sizing:border-box}
.county-callout strong{color:var(--title-navy,#082946);font:700 14px var(--font-body)}
.county-callout span{color:#33475a;font-size:11px}
.county-callout em{color:#4e6658;font-size:11px}
.county-callout svg{display:block;width:100%;height:min(42vh,380px)}
.county-callout path{stroke:#555;stroke-width:.7;vector-effect:non-scaling-stroke}
.county-callout .callout-town{fill:var(--tm-town-fill,#f4f7f5);stroke:var(--tm-town-stroke,#555)}
.county-callout .callout-city{fill:var(--tm-city-fill,#d6e6f5);stroke:var(--tm-city-stroke,#0b69c7)}
.county-callout .callout-reservation{fill:var(--tm-res-fill,#efe6d4)}
.county-callout .callout-other{fill:var(--tm-other-fill,#eee)}
.county-callout .callout-label{fill:var(--tm-label-color,#1b3144);font:400 var(--tm-label-size,11px) var(--tm-label-font,var(--font-body));text-anchor:middle;paint-order:stroke;stroke:#fff;stroke-width:2px}
.county-callout .callout-label.city{fill:var(--tm-city-label-color,#0b4f96);font-weight:700;font-size:12px}
@media (hover:none){.county-callout{display:none}}
/* Map on the left, county grid on the right; stacked on narrow screens */
.landing-map-row{display:grid;grid-template-columns:auto minmax(480px,1fr);gap:20px;align-items:start}
.landing-map-row .landing-map-grid{margin-top:24px}
.landing-map-row .popchg-county-table th,.landing-map-row .popchg-county-table td{padding:7px 8px;font-size:12px}
@media (max-width:1000px){.landing-map-row{grid-template-columns:1fr}.landing-map-row .landing-map-grid{margin-top:12px}}
.landing-map-row .landing-map-grid{overflow-x:auto}
.landing-map-row .popchg-county-table{width:100%;table-layout:auto}
.landing-map-row .popchg-county-table thead th{font-size:11px;white-space:nowrap}
/* Map flush left, sized by height; grid beside it */
.landing-map .popchg-map-svg{width:auto;max-width:100%;height:640px;max-height:70vh}
.landing-map .popchg-map-wrap{margin-top:6px;padding-top:6px}
/* Smart search, selection chips, panel actions */
.landing-map-head{align-items:flex-start}
.lm-search{position:relative;flex:1;max-width:520px}
.lm-search label{display:block;margin-bottom:4px;color:var(--forest,#1f5138);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.lm-search input{width:100%;height:38px;padding:0 12px;border:1px solid #6b7f73;background:#fff;color:#1b3144;font-size:14px;box-sizing:border-box}
.lm-search-results{position:absolute;z-index:6;left:0;right:0;margin:2px 0 0;padding:0;list-style:none;border:1px solid #6b7f73;background:#fff}
.lm-search-results button{width:100%;padding:8px 12px;border:0;background:#fff;text-align:left;font-size:14px;color:#1b3144;cursor:pointer}
.lm-search-results button:hover,.lm-search-results button:focus{background:#e8f1fb}
.lm-search-results span{color:#4e6658}
.lm-search-none{margin:4px 0 0;color:#8a2c22;font-size:12px}
.landing-selected{margin-top:10px;min-height:30px;display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.landing-selected-hint{color:#4e6658;font-size:13px}
.landing-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border:2px solid;background:#fff;font-size:13px;font-weight:700;color:#1b3144}
.landing-chip i{width:10px;height:10px;display:inline-block}
.landing-chip a{color:var(--blue,#0b69c7);font-weight:700;text-decoration:none}
.landing-chip a:hover{text-decoration:underline}
.landing-chip button{border:0;background:none;color:#4e6658;font-size:16px;line-height:1;cursor:pointer}
.landing-notice{color:#8a2c22;font-size:12px;font-weight:700}
.landing-grid-panel{display:flex;flex-direction:column;min-width:0}
.landing-panel-actions{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:8px}
.landing-map .download-icon-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--forest,#1f5138);background:var(--forest,#1f5138);color:#fff;cursor:pointer}
.landing-map .source-link-icon-button{color:var(--blue,#0b69c7);font-size:11px;font-weight:700;text-decoration:underline}
.landing-map-row .landing-map-grid{margin-top:8px;max-height:600px}
.landing-map-grid tbody tr{cursor:pointer}
.landing-map-grid tbody tr.hovered{background:#eef5f0}
.landing-map-grid tbody tr.selected{background:#fff8d6}
.landing-map-grid tbody tr.flash{animation:landing-flash 2s ease-out}
@keyframes landing-flash{0%{background:#ffe066}100%{background:#fff8d6}}
.landing-map .popchg-map-city-ring{fill:none;stroke:#c1554a;stroke-width:2.5}
.landing-chart{margin-top:20px}
@media (max-width:1100px){.landing-map-row{grid-template-columns:1fr}.landing-map .popchg-map-svg{width:100%;height:auto}}
.county-callout .callout-pop{color:#1b3144;font-size:12px;font-weight:700}
.landing-grid-period{margin:0 auto 0 0;display:flex;flex-direction:column;gap:1px}
.landing-grid-period strong{color:var(--title-navy,#082946);font-size:13px}
.landing-grid-period span{color:#4e6658;font-size:11px}
.landing-map-row .popchg-county-table thead th{white-space:normal;line-height:1.25;vertical-align:bottom}
.landing-map-grid tfoot th,.landing-map-grid tfoot td{position:sticky;bottom:0;z-index:1;background:#e3ece6;border-top:2px solid var(--rule-strong,#1b3a2c);font-weight:800;color:var(--title-navy,#082946)}
.landing-map-grid tfoot th{text-align:left}
.landing-map-row .popchg-county-table th,.landing-map-row .popchg-county-table td{padding:7px 6px}
.lm-search-results button{display:flex;align-items:baseline;gap:6px}
.lm-search-results button.active{background:#e8f1fb}
.lm-search-results em{margin-left:auto;color:#6b7f73;font-size:11px;font-style:normal;text-transform:uppercase;letter-spacing:.05em}
.lm-search-filter,.lm-search-found{margin:6px 0 0;color:#1b3144;font-size:12px}
.lm-search-filter button{border:0;background:none;padding:0;color:var(--blue,#0b69c7);font-weight:700;text-decoration:underline;cursor:pointer}
.lm-search-found a{color:var(--blue,#0b69c7);font-weight:700}
/* Town tile pinned in its own column, top left, left of the map */
.landing-map-row{grid-template-columns:306px minmax(0,1fr) 500px}
.landing-callout-slot{position:sticky;top:12px;align-self:start;margin-top:8px}
.landing-callout-slot .county-callout{position:static;width:100%;box-shadow:none}
.landing-callout-slot .county-callout svg{height:270px}
.county-callout-empty{min-height:120px;justify-content:center;border-style:dashed}
.county-callout-empty span{font-size:13px;line-height:1.4}
.landing-map .popchg-map-svg{width:100%;height:auto;max-height:70vh}
@media (max-width:1300px){.landing-map-row{grid-template-columns:300px minmax(0,1fr)}.landing-grid-panel{grid-column:1/-1}}
@media (max-width:900px){.landing-map-row{grid-template-columns:1fr}.landing-callout-slot{display:none}}
.landing-th-period{display:block;font-weight:600;text-transform:none;letter-spacing:0;color:#4e6658}
/* Locked tile, clickable towns */
.landing-callout-slot .county-callout{pointer-events:auto}
.county-callout.locked{border-width:2px}
.callout-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.callout-unlock{width:24px;height:24px;padding:0;border:1px solid #1f5138;background:#fff;color:#1f5138;font-size:16px;line-height:1;cursor:pointer}
.county-callout path.clickable{cursor:pointer}
.county-callout path.clickable:hover{fill:var(--tm-hover-fill,#fff3bd)}
.county-callout path.chosen{fill:var(--tm-chosen-fill,#ffd84d);stroke:var(--tm-chosen-stroke,#7a5a00);stroke-width:1.6}
.county-callout text{pointer-events:none}
.callout-town{position:relative;margin-top:4px;padding:6px 26px 6px 8px;display:flex;flex-direction:column;gap:2px;border-left:4px solid #e0a800;background:#fffbe8}
.callout-town strong{font-size:13px}
.callout-town span{font-size:12px;color:#1b3144}
.callout-town a{font-size:12px;color:var(--blue,#0b69c7);font-weight:700}
.callout-town button{position:absolute;top:4px;right:6px;border:0;background:none;font-size:16px;color:#4e6658;cursor:pointer}
.landing-selected:empty{display:none}
.callout-lock{padding:2px 8px;border:1px solid #6b7f73;background:#fff;color:#33475a;font-size:11px;font-weight:700;white-space:nowrap;cursor:pointer}
.callout-lock.on{border-color:#1f5138;background:#1f5138;color:#fff}
/* Grid tree: counties open to show their towns and cities */
.tree-toggle{width:20px;height:20px;margin-right:4px;padding:0;border:0;background:none;color:#1f5138;font-size:13px;line-height:1;cursor:pointer;vertical-align:middle}
.tree-toggle:hover{color:var(--blue,#0b69c7)}
.tree-toggle-spacer{display:inline-block;width:24px}
.landing-map-grid tbody tr.tree-child{background:#f7faf8;cursor:default}
.landing-map-grid tbody tr.tree-child th{padding-left:34px;font-weight:400}
.landing-map-grid tbody tr.tree-child th a{color:#1b3144;font-weight:400}
.landing-map-grid tbody tr.tree-child th a:hover{color:var(--blue,#0b69c7)}
.landing-map-grid tbody tr.tree-child td{color:#33475a;font-size:11.5px}
.tree-type{color:#6b7f73;font-size:11px}
.tree-note{margin-left:4px;color:#8a2c22;font-weight:800;cursor:help}
/* Tree on the left, map in the middle, town tile on the right */
.landing-map-row{grid-template-columns:500px minmax(0,1fr) 306px}
.landing-map-row .landing-grid-panel{order:1}
.landing-map-row .landing-map-frame{order:2}
.landing-map-row .landing-callout-slot{order:3}
@media (max-width:1300px){.landing-map-row{grid-template-columns:minmax(0,1fr) 300px}.landing-map-row .landing-grid-panel{grid-column:1/-1;order:3}.landing-map-row .landing-map-frame{order:1}.landing-map-row .landing-callout-slot{order:2}}
@media (max-width:900px){.landing-map-row{grid-template-columns:1fr}}
.landing-grid-hint{margin:8px 0 0;color:#1f5138;font-size:12px;font-weight:700}
/* Pages using the county map explorer get the same width as the homepage, so the map isn't squeezed */
.popchg-page.popchg-wide{max-width:var(--page-max)}
.landing-callout-slot .landing-grid-hint{margin:0 0 6px}
.landing-map-frame .landing-grid-hint{margin:8px 0 0}
/* On-screen instructions in the site's action blue */
.landing-grid-hint{color:var(--blue,#0b69c7)}
/* Separator line above the map and above the town panel, with the instructions just below it, aligned */
.landing-map-frame,.landing-callout-slot{margin-top:8px;padding-top:8px;border-top:1px solid var(--rule,#c9d6cc)}
.landing-map-frame .landing-grid-hint,.landing-callout-slot .landing-grid-hint{margin:0 0 6px}
.landing-map .landing-map-frame .popchg-map-wrap{margin-top:0;padding-top:0;border-top:0}
/* Tree open/close buttons: + and − in a small square */
.tree-toggle{width:18px;height:18px;margin-right:6px;border:1px solid #1f5138;border-radius:2px;background:#fff;color:#1f5138;font:700 13px/16px var(--font-body);text-align:center}
.tree-toggle:hover{background:#1f5138;color:#fff}
.tree-toggle-spacer{width:24px}
/* Context layers: water and interstates (not clickable) */
.map-layers{pointer-events:none}
.popchg-map-svg path.map-lake{fill:#bcd7e8;stroke:#7fa8c4;stroke-width:.6}
.popchg-map-svg path.map-river{fill:none;stroke:#5f97c2;stroke-width:1.3}
.popchg-map-svg path.map-canal{fill:none;stroke:#2d6fa3;stroke-width:1.3;stroke-dasharray:4 2}
.popchg-map-svg path.map-interstate{fill:none;stroke:#b5473a;stroke-width:1.4;opacity:.85}
.map-shield rect{fill:#1f4f8f;stroke:#fff;stroke-width:1}
.popchg-map-svg .map-shield text{fill:#fff;font:700 11px var(--font-body);text-anchor:middle;stroke:none;paint-order:normal}
/* Same layers in the town panel's county map */
.county-callout svg{overflow:hidden}
.county-callout path.map-lake{fill:#bcd7e8;stroke:#7fa8c4;stroke-width:.6}
.county-callout path.map-river{fill:none;stroke:#5f97c2;stroke-width:1.3}
.county-callout path.map-canal{fill:none;stroke:#2d6fa3;stroke-width:1.3;stroke-dasharray:4 2}
.county-callout path.map-interstate{fill:none;stroke:#b5473a;stroke-width:1.6;opacity:.85}
/* Tree buttons: just the + / − sign, no box */
.tree-toggle{width:16px;height:18px;margin-right:4px;border:0;border-radius:0;background:none;color:#1f5138;font:800 15px/18px var(--font-body);text-align:center}
.tree-toggle:hover{background:none;color:var(--blue,#0b69c7)}
/* Blue instructions in the top (map/grid) section: one size up */
.landing-map-row .landing-grid-hint{font-size:14px}
/* Map city labels without the white outline behind the letters */
.landing-map .popchg-map-svg text.popchg-map-city-label{stroke:none}
/* Map instruction centered over the map */
.landing-map-frame .landing-grid-hint{text-align:center}
/* Tree rows: the row opens/closes (counties) or highlights in the town panel (towns); → opens the Statbook */
.landing-map-grid tbody tr.tree-row{cursor:pointer}
.landing-map-grid tbody tr.tree-row:hover{background:#e8f1fb}
.landing-map-grid tbody tr.tree-row:focus-visible{outline:2px solid var(--blue,#0b69c7);outline-offset:-2px}
.landing-map-grid .tree-name{color:var(--title-navy,#082946);font-weight:700}
.landing-map-grid tr.tree-child .tree-name{font-weight:400}
.landing-map-grid tbody tr.tree-child.found{background:#fff3bd}
.landing-map-grid .tree-go{width:22px;padding-left:2px;padding-right:4px;text-align:center}
.landing-map-grid .tree-go a{color:var(--blue,#0b69c7);font-weight:700;text-decoration:none;font-size:14px}
.landing-map-grid .tree-go a:hover{text-decoration:underline}
/* Final layout (2026-10-06): tree is always to the LEFT of the map, compressed to fit */
.landing-map-row{grid-template-columns:minmax(360px,430px) minmax(0,1fr) 280px}
.landing-map-row .landing-grid-panel{order:1;grid-column:auto;grid-row:auto}
.landing-map-row .landing-map-frame{order:2;grid-column:auto}
.landing-map-row .landing-callout-slot{order:3;grid-column:auto}
.landing-map-row .popchg-county-table th,.landing-map-row .popchg-county-table td{padding:6px 4px;font-size:11.5px}
.landing-map-row .popchg-county-table thead th{font-size:11px}
.landing-map-grid td.sc-left{white-space:normal;max-width:84px;line-height:1.2}
.landing-map-grid tbody tr.tree-child th{padding-left:26px}
@media (max-width:1300px){
  .landing-map-row{grid-template-columns:minmax(340px,410px) minmax(0,1fr)}
  .landing-map-row .landing-grid-panel{grid-column:1;grid-row:1 / span 2}
  .landing-map-row .landing-map-frame{grid-column:2;grid-row:1}
  .landing-map-row .landing-callout-slot{grid-column:2;grid-row:2;max-width:360px}
}
@media (max-width:900px){
  .landing-map-row{grid-template-columns:1fr}
  .landing-map-row .landing-grid-panel,.landing-map-row .landing-map-frame,.landing-map-row .landing-callout-slot{grid-column:1;grid-row:auto}
  .landing-map-row .landing-map-frame{order:1}.landing-map-row .landing-grid-panel{order:2}
}
.landing-map-grid td.tree-region{color:#6b7f73}
/* A selected county stays clearly highlighted in the grid, even under the pointer */
.landing-map-grid tbody tr.selected,.landing-map-grid tbody tr.selected:hover{background:#fff1a8}
/* Top map about 5% larger: a little more page width, slimmer town-panel column and gaps */
.landing-map-page,.popchg-page.popchg-wide{max-width:var(--page-max)}
.landing-map-row{grid-template-columns:minmax(360px,430px) minmax(0,1fr) 262px;column-gap:14px}
@media (max-width:1300px){.landing-map-row{grid-template-columns:minmax(340px,410px) minmax(0,1fr)}}
@media (max-width:900px){.landing-map-row{grid-template-columns:1fr}}
.landing-map-grid .sort-hint{margin-left:3px;color:#9aa8a0;font-weight:400}
/* More of the tree: wider (all columns with room to spare) and taller (more rows visible) */
.landing-map-row{grid-template-columns:minmax(440px,520px) minmax(0,1fr) 262px}
.landing-map-row .landing-map-grid{max-height:max(600px,calc(100vh - 230px))}
.landing-map-row .popchg-county-table th,.landing-map-row .popchg-county-table td{padding:6px 6px}
@media (max-width:1300px){.landing-map-row{grid-template-columns:minmax(420px,500px) minmax(0,1fr)}}
@media (max-width:900px){.landing-map-row{grid-template-columns:1fr}.landing-map-row .landing-map-grid{max-height:600px}}
.landing-dl-link{border:0;background:none;padding:0;color:var(--blue,#0b69c7);font-size:11px;font-weight:700;text-decoration:underline;cursor:pointer}
/* Color legend: narrow fixed-width bars instead of stretching across the map (Robert, 2026-10-06) */
.landing-map .popchg-map-bins{grid-template-columns:repeat(7,118px);gap:8px}
.landing-map .popchg-map-legend strong{font-size:14px}
/* Each legend tile carries its own label */
.landing-map .popchg-map-bin i{height:26px;display:flex;align-items:center;justify-content:center;font-style:normal;font-size:12.5px;font-weight:700;color:#1b2e24;white-space:nowrap}
