/* ContractorFinder — consolidated production-candidate design system.
 * Serves the homepage, the full-screen map, and the SEO landing pages from one
 * cohesive visual language. Signature rule kept from the concepts: physical
 * location (red) and service area (teal) are always distinct — in color AND text.
 */
:root {
  --ink: #0F2A43;          /* brand navy */
  --ink-2: #16324F;
  --ink-3: #33506B;
  --physical: #E4483B;     /* verified physical location */
  --physical-d: #B4160B;
  --service: #2F9E8F;      /* service-area coverage */
  --service-d: #0C4A42;
  --approx: #B0791C;
  --test: #8A57C2;
  --surface: #FFFFFF;
  --panel: #F4F7F9;        /* cool light gray, not beige */
  --panel-2: #E9EEF2;
  --hairline: #DCE3E9;
  --text: #17242F;
  --muted: #5A6B78;
  --focus: #1E6FE0;
  --gold: #F2B705;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15,42,67,.06);
  --shadow: 0 2px 6px rgba(15,42,67,.07), 0 10px 28px rgba(15,42,67,.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1280px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--panel);
  font-size: 15.5px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -.015em; line-height: 1.15; margin: 0; }
a { color: var(--focus); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 5px; }
[hidden] { display: none !important; }

.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; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 8px; z-index: 200; transition: top .15s; }
.skip-link:focus { top: 0; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink-2);
  font: inherit; font-weight: 650; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--panel-2); text-decoration: none; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--ink-2); }
.btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--service); }

/* ---------- Masthead ---------- */
.masthead {
  background: var(--ink); color: #fff; display: flex; align-items: center; gap: 22px;
  padding: 0 22px; min-height: 60px; position: sticky; top: 0; z-index: 60;
}
.brand { font-weight: 800; font-size: 20px; letter-spacing: -.02em; white-space: nowrap; }
.brand .b1 { color: #fff; } .brand .b2 { color: var(--physical); }
.brand:hover { text-decoration: none; }
.masthead nav { display: flex; gap: 4px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.masthead nav a {
  color: #DCE7F0; font-weight: 600; font-size: 14.5px; padding: 8px 12px; border-radius: 7px;
  min-height: 40px; display: inline-flex; align-items: center;
}
.masthead nav a:hover { background: rgba(255,255,255,.10); color: #fff; text-decoration: none; }
.masthead nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--physical); border-radius: 7px 7px 0 0; }
.masthead nav a.cta { background: var(--physical); color: #fff; }
.masthead nav a.cta:hover { background: var(--physical-d); }

.dev-banner { background: #FFF3D6; color: #5A4400; border-bottom: 1px solid #F0D98A;
  padding: 8px 22px; font-size: 13.5px; font-weight: 600; }
.env-badge { position: fixed; right: 10px; bottom: 10px; z-index: 120; background: var(--gold); color: #3a2c00;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 5px 11px;
  border-radius: 999px; box-shadow: var(--shadow-sm); pointer-events: none; }

/* ---------- Cards (shared by list, map rail, landing pages) ---------- */
.card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 15px 16px; margin-bottom: 12px; cursor: pointer;
  transition: border-color .12s, box-shadow .12s, transform .04s;
}
.card:hover { border-color: var(--ink-3); box-shadow: var(--shadow); }
.card.active { border-color: var(--physical); box-shadow: 0 0 0 1.5px var(--physical), var(--shadow); }
.card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.biz-name { font-size: 16.5px; margin-bottom: 4px; }
.trade { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  color: var(--ink-2); background: var(--panel-2); padding: 2px 9px; border-radius: 999px; }
.dist { font-size: 13px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.loc { color: var(--muted); font-size: 14px; margin-top: 8px; }
.loc strong { color: var(--text); font-weight: 650; }

.tagrow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.pill.physical { color: #7A160D; background: #FBE3E0; } .pill.physical::before { background: var(--physical); }
.pill.service { color: var(--service-d); background: #DDF1EE; } .pill.service::before { background: var(--service); }
.pill.approx { color: #6A4A0A; background: #F6E9CE; } .pill.approx::before { background: var(--approx); }
.pill.test { color: #43206E; background: #ECE0F7; } .pill.test::before { background: var(--test); }
.pill.license { color: #0C4A42; background: #DDF1EE; } .pill.license::before { background: var(--service); }

.svc-line { font-size: 13px; color: var(--muted); margin-top: 9px; }
.svc-city { color: var(--service-d); font-weight: 600; }
.svc-city.hit { background: #DDF1EE; padding: 0 5px; border-radius: 5px; }
.meta-line { font-size: 12.5px; color: var(--muted); margin-top: 9px; }
.meta-phone { font-weight: 650; }
.card-actions { margin-top: 12px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.card-actions .listing { font-weight: 650; }
.listing.soon { color: var(--muted); font-style: italic; }
.website { font-size: 13.5px; }

/* ---------- Group headings (located vs serves) ---------- */
.group-head { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 13px;
  text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 16px 2px 8px; }
.group-head:first-child { margin-top: 4px; }
.group-head .gdot { width: 10px; height: 10px; border-radius: 50%; }
.group-head.located .gdot { background: var(--physical); }
.group-head.serves .gdot { background: var(--service); }
.group-note { font-size: 12.5px; color: var(--muted); margin: -4px 2px 10px; }

/* ---------- States ---------- */
.state { padding: 40px 22px; text-align: center; color: var(--muted); }
.state h3 { margin-bottom: 8px; }
.suggestions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.chip { min-height: 40px; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: 13.5px; font-weight: 650; padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:hover:not([aria-pressed="true"]) { background: var(--panel-2); }
.skel { padding: 6px; }
.skel-card { height: 118px; border-radius: var(--radius); margin-bottom: 12px;
  background: linear-gradient(90deg, var(--panel-2) 25%, #eef2f5 37%, var(--panel-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- Footer ---------- */
.site-foot { background: var(--ink); color: #C7D5E0; margin-top: 40px; padding: 34px 22px; }
.site-foot .foot-inner { max-width: var(--maxw); margin: 0 auto; display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.site-foot h3 { color: #fff; font-size: 14px; margin-bottom: 10px; }
.site-foot a { color: #C7D5E0; }
.site-foot a:hover { color: #fff; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 6px 0; font-size: 14px; }
.site-foot .foot-note { font-size: 13px; color: #93A6B4; margin-top: 6px; }

/* ---------- MapLibre popup skin ---------- */
.maplibregl-popup-content { padding: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.pop { width: 244px; font-family: var(--font); }
.pop .pop-body { padding: 12px 14px; }
.pop h3 { font-size: 15.5px; margin-bottom: 3px; }
.pop .pop-loc { font-size: 12.5px; color: var(--muted); }
.pop .tagrow { margin-top: 8px; }
.pop a { display: inline-block; margin-top: 10px; font-weight: 650; font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   HOMEPAGE (search-first hybrid)
   ===================================================================== */
.hero { background: linear-gradient(180deg, #12314C 0%, #0F2A43 100%); color: #fff; padding: 40px 22px 46px; }
.hero-inner { max-width: var(--maxw); margin: 0 auto; }
.hero h1 { color: #fff; font-size: clamp(26px, 3.4vw, 40px); max-width: 16ch; }
.hero-sub { color: #C7D8E6; font-size: 16px; margin: 12px 0 22px; max-width: 62ch; }
.hero-search { display: grid; grid-template-columns: 1.1fr 1fr auto auto; gap: 10px; align-items: end;
  background: var(--surface); padding: 14px; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-search .field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hero-search label { font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.hero-search input { min-height: 44px; padding: 10px 12px; border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); font: inherit; background: var(--panel); color: var(--text); }
.hero-search input:focus { background: #fff; }
.popular { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: #AFC4D6; font-size: 13.5px; }
.pop-link { min-height: 36px; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 999px;
  padding: 6px 14px; font: inherit; font-weight: 650; font-size: 13.5px; cursor: pointer; }
.pop-link:hover { background: rgba(255,255,255,.22); }

.content { max-width: var(--maxw); margin: 0 auto; padding: 22px; display: grid;
  grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 22px; align-items: start; }
.results-col { min-width: 0; }
.filter-bar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13.5px; }
.crumbs a, .crumbs button { color: var(--ink-2); font: inherit; font-weight: 600; background: none; border: 0;
  cursor: pointer; padding: 4px 6px; border-radius: 6px; min-height: 34px; }
.crumbs a:hover, .crumbs button:hover { background: var(--panel-2); text-decoration: none; }
.crumbs [aria-current="true"], .crumbs [aria-current="page"] { color: var(--physical); }
.crumbs .sep { color: #A9B7C2; padding: 0 2px; }
.crumbs .jump { color: var(--service-d); }
.filter-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
select { min-height: 40px; border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  padding: 6px 10px; font: inherit; background: var(--surface); color: var(--ink-2); }
.result-meta { display: flex; align-items: baseline; gap: 10px; }
.result-meta h2 { font-size: 17px; }
.result-meta .count { color: var(--muted); font-size: 13.5px; }
.dev-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.dev-note a { font-weight: 650; }

/* companion map column */
.map-col { position: sticky; top: 76px; }
.map-panel { position: relative; height: calc(100vh - 100px); min-height: 460px;
  border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; background: var(--panel-2); }
.map-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center; text-align: center; padding: 24px; background:
  radial-gradient(circle at 30% 30%, #eaf0f4, #dde6ec); }
.ph-art { position: relative; width: 120px; height: 70px; margin-bottom: 6px; }
.ph-pin { position: absolute; width: 16px; height: 16px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); background: var(--physical); box-shadow: var(--shadow-sm); }
.ph-pin.p1 { left: 20px; top: 10px; } .ph-pin.p2 { left: 60px; top: 30px; background: var(--service); }
.ph-pin.p3 { left: 92px; top: 12px; }
.map-placeholder h3 { font-size: 17px; }
.map-placeholder p { color: var(--muted); font-size: 13.5px; max-width: 32ch; margin: 0; }
.map-spinner { width: 34px; height: 34px; border-radius: 50%; margin-bottom: 12px;
  border: 3px solid var(--panel-2); border-top-color: var(--physical); animation: cf-spin .8s linear infinite; }
@keyframes cf-spin { to { transform: rotate(360deg); } }
.map-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5;
  background: rgba(255,255,255,.97); border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 13px; color: var(--ink-2); max-width: 280px; text-align: center;
  box-shadow: var(--shadow-sm); }
.map-expand { position: absolute; right: 12px; top: 12px; z-index: 6; }
.map-live { position: absolute; inset: 0; }
/* The map container MUST outrank the vendored `.maplibregl-map { position: relative }`
   rule, which MapLibre injects into <head> AFTER this stylesheet and which would
   otherwise make #map static and collapse it to height:0 (the blank-panel bug).
   Two-class specificity (0,2,0) beats the vendor's (0,1,0) regardless of load
   order; the explicit height is a belt-and-braces guard against any collapse. */
.map-panel .map-canvas,
.map-stage .map-canvas { position: absolute; inset: 0; height: 100%; width: 100%; }
.map-notice { position: absolute; left: 12px; top: 12px; right: 62px; z-index: 5; text-align: left;
  background: rgba(255,255,255,.96); border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow-sm); cursor: pointer; }
.map-legend { position: absolute; left: 12px; bottom: 12px; z-index: 5; background: rgba(255,255,255,.96);
  border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12px; box-shadow: var(--shadow-sm); }
.map-legend h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.legend-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.legend-swatch { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.sw-physical { background: var(--physical); }
.sw-service { background: #fff; border: 2px solid var(--service); }
.sw-approx { background: #fff; border: 2px dashed var(--approx); }
.sw-test { background: #fff; border: 2px dashed var(--test); }
.map-msg { position: absolute; inset: 0; z-index: 6; display: none; align-items: center; justify-content: center;
  background: rgba(244,247,249,.95); text-align: center; padding: 24px; }
.map-msg.show { display: flex; }
.map-msg .inner { max-width: 320px; }
.map-close { display: none; }

.fab-map { display: none; }

/* browse sections */
.browse { max-width: var(--maxw); margin: 0 auto; padding: 20px 22px; }
.browse h2 { font-size: 20px; margin-bottom: 4px; }
.browse-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.tile-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 3px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); padding: 14px 15px; min-height: 44px; color: var(--ink); font-weight: 700; }
.tile:hover { border-color: var(--ink-3); box-shadow: var(--shadow-sm); text-decoration: none; }
.tile .tcount { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tile.empty { color: var(--muted); background: var(--panel); cursor: default; pointer-events: none; }
.cta-band { background: var(--panel-2); }
.cta-band .band-inner { max-width: var(--maxw); margin: 0 auto; padding: 26px 22px; display: flex;
  align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.cta-band h2 { font-size: 20px; }
.cta-band p { color: var(--muted); margin: 4px 0 0; }

/* =====================================================================
   FULL-SCREEN MAP (Search by Map)
   ===================================================================== */
.app-map { display: flex; flex-direction: column; height: 100vh; }
.map-toolbar { background: var(--surface); border-bottom: 1px solid var(--hairline); padding: 10px 18px;
  display: flex; flex-direction: column; gap: 10px; }
.map-toolbar .row1 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.map-search { position: relative; flex: 1 1 300px; min-width: 220px; }
.map-search input { width: 100%; min-height: 44px; padding: 10px 12px 10px 36px; border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); font: inherit; background: var(--panel); }
.map-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.map-main { flex: 1; display: grid; grid-template-columns: 400px minmax(0,1fr); grid-template-rows: minmax(0,1fr); min-height: 0; }
.map-rail { background: var(--surface); border-right: 1px solid var(--hairline); display: flex; flex-direction: column; min-height: 0; }
.map-rail-head { padding: 12px 16px; border-bottom: 1px solid var(--hairline); display: flex;
  align-items: baseline; justify-content: space-between; gap: 8px; }
.map-rail-head h2 { font-size: 15.5px; }
.map-rail-head .count { color: var(--muted); font-size: 13px; }
.map-results { overflow-y: auto; padding: 10px; flex: 1; }
.map-stage { position: relative; min-height: 0; }
.area-chip { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 6;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 8px 6px 14px; display: flex; gap: 8px;
  align-items: center; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
.area-chip button { background: rgba(255,255,255,.2); border: 0; color: #fff; width: 26px; height: 26px;
  border-radius: 50%; cursor: pointer; font-size: 15px; }
.btn-search-area { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(20px);
  z-index: 6; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; box-shadow: var(--shadow); }
.btn-search-area.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.browse-panel { position: fixed; inset: 0; z-index: 90; background: rgba(15,42,67,.4); display: flex; }
.browse-panel .browse-sheet { background: var(--surface); width: min(460px, 92vw); margin-left: 0; padding: 20px 22px;
  overflow-y: auto; }
.browse-panel h2 { font-size: 18px; margin-bottom: 12px; }
.browse-panel ul { list-style: none; margin: 0 0 20px; padding: 0; }
.browse-panel li button { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--hairline);
  padding: 11px 4px; font: inherit; cursor: pointer; color: var(--ink); min-height: 44px; }
.browse-panel li button:hover { background: var(--panel); }
.bcount { color: var(--muted); font-weight: 500; font-size: 13px; }
.view-toggle { display: none; }

/* =====================================================================
   SEO LANDING PAGES
   ===================================================================== */
.landing { max-width: 900px; margin: 0 auto; padding: 22px; }
.landing .crumbs { margin-bottom: 14px; }
.landing h1 { font-size: clamp(24px, 3vw, 32px); }
.landing .intro { color: var(--ink-3); font-size: 16px; margin: 12px 0 20px; max-width: 68ch; }
.landing h2 { font-size: 20px; margin: 26px 0 4px; }
.sect-note { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }
.map-cta { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 16px 18px; margin: 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.map-cta p { color: var(--muted); font-size: 13px; margin: 0; }
/* Google review snapshot: deliberately understated + set apart from CF content.
   No Google brand colours, logos, or star graphics — plain text + one outbound link. */
.google-snapshot { margin: 26px 0; padding: 16px 18px; border: 1px solid var(--hairline);
  border-left: 3px solid var(--muted); border-radius: var(--radius); background: var(--panel); }
.google-snapshot h2 { margin: 0 0 8px; font-size: 17px; }
.google-snapshot p { margin: 0 0 8px; font-size: 14.5px; }
.google-snapshot p:last-child { margin-bottom: 0; }
.google-snapshot .sect-note { font-size: 13px; }

.related { margin-top: 30px; border-top: 1px solid var(--hairline); padding-top: 18px; }
.related ul { columns: 2; gap: 24px; list-style: none; margin: 0; padding: 0; }
.related li { margin: 6px 0; break-inside: avoid; }
.link-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.link-cloud a { background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px;
  padding: 7px 14px; font-size: 13.5px; font-weight: 600; min-height: 38px; display: inline-flex; align-items: center; }
.link-cloud a:hover { border-color: var(--ink-3); text-decoration: none; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 980px) {
  .hero-search { grid-template-columns: 1fr 1fr; }
  .hero-search .btn { grid-column: span 1; }
  .content { grid-template-columns: 1fr; }
  .map-col { position: static; }
  .map-panel { display: none; }               /* desktop companion hidden on mobile */
  body[data-mapopen="1"] { overflow: hidden; }
  body[data-mapopen="1"] .map-panel { display: block; position: fixed; inset: 0; z-index: 100;
    height: 100vh; border-radius: 0; }
  body[data-mapopen="1"] .map-close { display: inline-flex; position: absolute; top: 12px; right: 12px; z-index: 8; }
  .fab-map { display: inline-flex; position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
    z-index: 70; box-shadow: var(--shadow); padding: 12px 26px; }
  /* full-screen map tool: rail/map toggle */
  .map-main { grid-template-columns: 1fr; position: relative; }
  .map-stage { position: absolute; inset: 0; }
  .app-map[data-view="list"] .map-stage { display: none; }
  .app-map[data-view="map"] .map-rail { display: none; }
  .view-toggle { display: inline-flex; position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
    z-index: 20; background: var(--ink); border-radius: 999px; box-shadow: var(--shadow); padding: 4px; }
  .view-toggle button { border: 0; background: none; color: #cfe0ee; font: inherit; font-weight: 700;
    min-height: 40px; padding: 8px 20px; border-radius: 999px; cursor: pointer; }
  .view-toggle button[aria-pressed="true"] { background: #fff; color: var(--ink); }
  .site-foot .foot-inner { grid-template-columns: 1fr 1fr; }
  .masthead { gap: 8px; padding: 8px 12px; flex-wrap: nowrap; }
  .masthead nav { gap: 2px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; }
  .masthead nav::-webkit-scrollbar { display: none; }
  .masthead nav a { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .masthead nav a.cta { padding: 8px 12px; }
}
@media (max-width: 560px) {
  .masthead { flex-direction: column; align-items: stretch; padding: 8px 12px; gap: 6px; }
  .masthead .brand { padding: 2px 0; }
  .masthead nav { margin-left: 0; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .hero-search { grid-template-columns: 1fr; }
  .related ul { columns: 1; }
  .site-foot .foot-inner { grid-template-columns: 1fr; }
  .masthead .tagline { display: none; }
}
