/* The homepage map uses bundled geometry and the same cached counts as the index. */
body.home-route .home-hero {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  grid-template-rows: auto auto;
  gap: 0 clamp(24px, 4vw, 64px);
  align-items: start;
  padding: 34px 0 40px;
  border-bottom: 1px solid var(--ink);
}
.home-hero-copy { grid-column: 1; grid-row: 1; align-self: end; padding: 0; }
.home-hero-search { grid-column: 1; grid-row: 2; }
.home-kicker { display: flex; align-items: center; gap: 10px; font-size: .69rem; letter-spacing: .12em; }
.home-kicker-line { display: inline-block; flex: 0 0 25px; height: 2px; background: var(--red); }
body.home-route .home-hero h1 { margin: 22px 0; font-size: clamp(3.5rem, 5.4vw, 5.6rem); line-height: .99; letter-spacing: -.06em; }
body.home-route .home-hero h1 em { color: var(--red-dark); }
body.home-route .home-hero p { max-width: 410px; font-size: 1.02rem; line-height: 1.6; }
.home-national { display: flex; gap: 16px; align-items: center; margin-top: 25px; }
.home-national strong { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.8rem, 4vw, 4rem); line-height: 1; letter-spacing: -.06em; font-variant-numeric: tabular-nums; color: var(--blue); }
.home-national > span { font-size: .79rem; line-height: 1.6; color: var(--muted); }
.home-national b { font-weight: 500; }
.hero-search { max-width: 565px; margin-top: 32px; }
.hero-search label { display: block; margin-bottom: 10px; color: var(--ink); font-size: .88rem; font-weight: 700; }
.hero-search-row { display: flex; padding: 5px; background: var(--white); border: 1px solid var(--ink); box-shadow: 5px 5px 0 rgba(23,63,54,.10); }
.hero-search-row:focus-within { outline: 3px solid var(--red); outline-offset: 2px; }
.hero-search-row input { min-width: 0; width: 100%; flex: 1; padding: 12px; border: 0; outline: 0; background: transparent; font-size: .95rem; }
.hero-search-row input::placeholder { color: #70736f; }
.hero-search-row button { flex: 0 0 auto; border: 0; padding: 11px 14px; background: var(--red); color: #fff; font-size: .88rem; font-weight: 750; cursor: pointer; }
.hero-search-row button:hover { background: var(--red-dark); }
.hero-search-row button:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
body.home-route .home-hero .hero-actions { gap: 22px; margin-top: 22px; font-size: .79rem; flex-wrap: wrap; }
body.home-route .home-hero .hero-actions a { color: var(--ink); border-color: var(--ink); }
body.home-route .home-hero .hero-actions a:hover { color: var(--red-dark); border-color: var(--red-dark); }

.hero-map { grid-column: 2; grid-row: 1 / 3; min-width: 0; padding: 0 0 0 25px; border-left: 1px solid var(--rule); }
.map-topline { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: .67rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
#heroDataState { display: flex; align-items: center; gap: 6px; color: #346350; white-space: nowrap; font-size: .63rem; letter-spacing: .04em; }
#heroDataState::before { content: ''; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: #346350; }
#heroDataState.is-saved { color: #826332; }
#heroDataState.is-saved::before { background: #826332; }
.canada-map-wrap { position: relative; margin: 6px -8px 0; background: radial-gradient(ellipse at 45% 48%, rgba(215,230,218,.42), transparent 68%); }
.canada-map-wrap::before { content: ''; position: absolute; inset: 8% 0; pointer-events: none; background-image: linear-gradient(rgba(23,63,54,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(23,63,54,.035) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(ellipse, #000, transparent 73%); }
.canada-map { position: relative; display: block; width: 100%; height: auto; overflow: visible; }
.map-land { fill: var(--region-fill, #dae8dd); stroke: #faf8f2; stroke-width: 1.2; stroke-linejoin: round; transition: fill .3s ease, stroke .2s ease; }
.map-region { cursor: pointer; outline: none; }
.map-region:hover .map-land { fill: #93b7a0; stroke: #537b66; }
.map-region[aria-pressed='true'] .map-land { fill: #c76854; stroke: #994938; }
.map-region:focus-visible .map-land { stroke: #182f29; stroke-width: 3; }
.map-label { cursor: pointer; }
.map-label rect { fill: #faf8f2; fill-opacity: .93; stroke: rgba(23,63,54,.15); }
.map-label text { fill: #173f36; font: 700 18px system-ui, sans-serif; letter-spacing: .03em; }
.map-label:hover rect { fill: #fff; stroke: #173f36; }
.map-label.is-selected rect { fill: #fff2e8; stroke: #994938; }
.map-label.is-selected text { fill: #8c3629; }
.map-leader { fill: none; stroke: #456453; stroke-width: 1.3; pointer-events: none; }
.map-anchor { fill: #173f36; pointer-events: none; }
.map-ocean { position: absolute; pointer-events: none; color: #7c8d84; font-family: Georgia, 'Times New Roman', serif; font-size: .84rem; font-style: italic; letter-spacing: .05em; }
.map-ocean-west { left: 0; top: 69%; transform: rotate(-24deg); }
.map-ocean-east { right: 0; top: 49%; transform: rotate(21deg); }
.map-instruction { position: absolute; right: 5%; top: 12%; width: 150px; color: #66756c; font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: .95rem; line-height: 1.5; }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 8px 13px; margin: -8px 0 20px; font-size: .68rem; color: #57655c; }
.map-scale { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.map-scale i { display: inline-block; width: 78px; height: 7px; background: linear-gradient(90deg, #dae8dd, #1f5e4b); }
.map-selected-key { display: inline-flex; align-items: center; gap: 5px; }
.map-selected-key i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #c76854; }
.map-selection { padding: 15px 18px; background: #173f36; color: #fff; border-radius: 3px; }
.map-region-picker { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.map-region-picker label { flex-shrink: 0; color: #c3d6cb; font-size: .7rem; }
.map-region-picker select { min-width: 0; max-width: 72%; padding: 7px 24px 7px 8px; border: 1px solid #69857a; border-radius: 3px; background-color: #214e41; color: #fff; font-size: .8rem; font-weight: 650; text-overflow: ellipsis; cursor: pointer; }
.map-region-picker select:focus-visible, .map-region-detail a:focus-visible { outline: 2px solid #efb49b; outline-offset: 3px; }
.map-region-detail { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-top: 9px; }
.map-region-detail > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.map-region-detail strong { font-family: Georgia, 'Times New Roman', serif; font-size: 2.6rem; letter-spacing: -.05em; line-height: 1.15; font-variant-numeric: tabular-nums; }
#heroRegionUnit { font-size: .72rem; color: #d1e0d7; }
.map-region-detail a { flex-shrink: 0; color: #fff; font-size: .78rem; font-weight: 700; text-underline-offset: 5px; padding-bottom: 5px; }
body.home-route .home-hero .map-footnote { max-width: none; margin-top: 12px; font-size: .66rem; line-height: 1.5; color: #677168; }
.map-provenance { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3px 8px; margin-top: 6px; font-size: .6rem; color: #677168; }
.map-provenance a { color: inherit; text-underline-offset: 2px; }
.home-route .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body.home-route .stats { margin-top: 0; }
body.home-route #find-work { display: block; }

@media (max-width: 1100px) {
  body.home-route .masthead { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
  body.home-route .masthead .brand { order: 1; }
  body.home-route .masthead .live-chip { order: 2; margin-left: auto; }
  body.home-route .masthead .main-nav { order: 3; width: 100%; min-width: 0; overflow-x: auto; padding-top: 3px; }
  body.home-route .main-nav a { flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 1100px) and (min-width: 851px) {
  body.home-route .home-hero { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 0 24px; }
  body.home-route .home-hero h1 { font-size: 3.6rem; }
  .hero-search-row { flex-direction: column; }
  .home-national { align-items: start; flex-direction: column; gap: 6px; }
  .hero-map { padding-left: 18px; }
  .map-instruction { right: 0; width: 115px; font-size: .82rem; }
}
@media (max-width: 850px) {
  body.home-route .home-hero { grid-template-columns: minmax(0, 1fr); gap: 27px; padding-top: 30px; }
  .home-hero-copy { grid-column: 1; grid-row: 1; }
  .home-hero-search { grid-column: 1; grid-row: 3; }
  .hero-map { grid-column: 1; grid-row: 2; padding: 0; border-left: 0; max-width: 700px; width: 100%; }
  body.home-route .home-hero h1 { max-width: 610px; font-size: clamp(3.2rem, 9vw, 5rem); margin: 18px 0; }
  body.home-route .home-hero p { max-width: 550px; }
  .home-national { margin-top: 16px; }
  .hero-search { margin-top: 0; }
  .map-topline { padding-top: 16px; border-top: 1px solid var(--rule); }
  .map-region-picker select { min-height: 44px; }
}
@media (max-width: 700px) {
  body.home-route .main-nav a { flex: 0 0 auto; white-space: nowrap; }
  body.home-route .panel-head, body.home-route .snapshot-head { flex-wrap: wrap; }
  body.home-route .panel-head > div, body.home-route .snapshot-head > div { min-width: 0; }
  body.home-route .home-hero p { font-size: .95rem; }
  .home-kicker { font-size: .62rem; }
  .home-national strong { font-size: 2.7rem; }
  .home-national > span { font-size: .7rem; }
  .map-instruction { width: 113px; right: 0; top: 7%; font-size: .8rem; }
  .map-ocean { font-size: .7rem; }
  .map-ocean-west { left: 1%; }
  .map-legend { justify-content: start; gap: 7px 10px; font-size: .65rem; margin: 1px 0 14px; }
  .map-topline { font-size: .6rem; letter-spacing: .06em; }
  #heroDataState { font-size: .57rem; }
  .map-selection { padding: 12px 14px; }
  .map-region-picker { align-items: start; flex-direction: column; gap: 5px; }
  .map-region-picker select { max-width: 100%; width: 100%; font-size: .9rem; }
  .map-region-detail { margin-top: 12px; }
  .map-region-detail > div { display: grid; gap: 0; }
  .map-region-detail strong { font-size: 2.4rem; }
  .map-region-detail a { font-size: .78rem; min-height: 44px; display: flex; align-items: center; }
}
@media (max-width: 460px) {
  body.home-route .home-hero h1 { font-size: clamp(2.3rem, 10.8vw, 3rem); line-height: 1.03; margin: 16px 0; }
  body.home-route .home-hero { gap: 22px; }
  .hero-search-row { display: grid; }
  .hero-search-row button { min-height: 44px; }
  body.home-route .home-hero .hero-actions { gap: 14px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .map-land { transition: none; }
}
