@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Serif:ital,wght@0,500;0,600;1,400;1,500&display=swap");
/* Long Haul Ledger shared surfaces (Dec 3, 2026).
   One set of tokens for every page: no flat fills. Each surface keeps its own base colour and gets
   a soft top light, a sheen that falls off toward the bottom, a lit top edge and depth below.
   Loaded last on the dashboard, both maps and Top Builders, and through site-header-v5.css on every subpage.
   CSS only, no images. Motion is slow, optional and off under prefers-reduced-motion. */
:root{
  --lhl-navy-0:#080b10;--lhl-navy-1:#0c1117;--lhl-navy-2:#111820;--lhl-navy-3:#17202a;
  --lhl-gold:#deba80;--lhl-gold-rgb:222 186 128;--lhl-amber:#d08a45;--lhl-ink:#f1ebe0;
  --lhl-serif:"Newsreader","IBM Plex Serif",Georgia,serif;
  --lhl-sans:"IBM Plex Sans","Segoe UI",system-ui,sans-serif;
  --lhl-r-ctl:10px;--lhl-r-card:12px;--lhl-h-ctl:36px;
  --lhl-ctl-bd:rgba(255,255,255,.22);--lhl-ctl-bg:rgba(14,18,22,.82);
  /* Light falloff: a warm key light from above that fades into navy. */
  --lhl-page-light:
    radial-gradient(1200px 560px at 50% -180px,rgb(var(--lhl-gold-rgb) / .09),transparent 70%),
    radial-gradient(900px 700px at -10% 10%,rgba(70,110,160,.09),transparent 65%),
    radial-gradient(900px 700px at 110% 40%,rgba(70,110,160,.06),transparent 65%);
  --lhl-page-base:linear-gradient(180deg,#121921 0%,#0e1319 38%,#0a0e13 100%);
  /* Sheen: works over any base colour, so each panel keeps its own tone. */
  --lhl-sheen:linear-gradient(180deg,rgba(255,255,255,.05) 0%,rgba(255,255,255,.015) 34%,rgba(0,0,0,0) 62%,rgba(0,0,0,.14) 100%);
  --lhl-card-light:radial-gradient(130% 90% at 18% -20%,rgb(var(--lhl-gold-rgb) / .065),transparent 58%);
  --lhl-card-img:var(--lhl-card-light),var(--lhl-sheen);
  --lhl-ctl-img:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.01) 55%,rgba(0,0,0,.12));
  --lhl-edge:inset 0 1px 0 rgba(255,255,255,.07);
  --lhl-depth:0 1px 0 rgba(0,0,0,.35),0 16px 36px -22px rgba(0,0,0,.85);
  --lhl-depth-hi:0 1px 0 rgba(0,0,0,.35),0 22px 46px -22px rgba(0,0,0,.9),0 0 0 1px rgb(var(--lhl-gold-rgb) / .14);
}

/* Shared control skin: every map pill, Share, Copy and Draft a report button gets the same lit face. */
:is(#lhl-surface,html) .labmap-root .lgb,:is(#lhl-surface,html) .labmap-root .pill,
:is(#lhl-surface,html) body .map-stage .fs-ui button:not(.mc-car):not(.mc-ib),:is(#lhl-surface,html) body .map-stage .fs-ui .fs-btn,
:is(#lhl-surface,html) body .bps-actions button,:is(#lhl-surface,html) body .bps-actions a,:is(#lhl-surface,html) body .bp-share-row button,:is(#lhl-surface,html) body .bp-share-row a,
:is(#lhl-surface,html) body .bd-pill,:is(#lhl-surface,html) body .bd-btn{
  background-image:var(--lhl-ctl-img)!important;
  box-shadow:var(--lhl-edge),0 6px 14px -10px rgba(0,0,0,.8)!important}

/* "On" toggles read the same on the dashboard map as on the full maps. */
:is(#lhl-surface,html) body .map-stage.mc-on .fs-ui #bp-heat-t[aria-pressed="true"],
:is(#lhl-surface,html) body .map-stage.mc-on .fs-ui #fs-bp.on,
:is(#lhl-surface,html) body .map-stage.mc-on .fs-ui #fs-bp[aria-pressed="true"]{
  color:var(--hs-acc,#deba80)!important;border-color:rgb(var(--lhl-gold-rgb) / .7)!important}

/* Map panels: legend, filters, brief card, search results, summary card, popups. */
:is(#lhl-surface,html) .labmap-root .legend,:is(#lhl-surface,html) body .map-stage .bp-lg.is-open,:is(#lhl-surface,html) .labmap-root #fl.open,:is(#lhl-surface,html) .labmap-root #panel,
:is(#lhl-surface,html) .labmap-root .hd.mc-card,:is(#lhl-surface,html) body .map-stage.mc-on .mc-hd,:is(#lhl-surface,html) .labmap-root .map-locator,
:is(#lhl-surface,html) .labmap-root .leaflet-popup-content-wrapper,:is(#lhl-surface,html) body .map-search-results,:is(#lhl-surface,html) body .sr-panel,
:is(#lhl-surface,html) body .map-stage #fl.open{
  background-image:var(--lhl-card-img)!important;
  box-shadow:var(--lhl-edge),0 18px 40px -18px rgba(0,0,0,.75)!important}
:is(#lhl-surface,html) .labmap-root .legend.open,:is(#lhl-surface,html) .labmap-root .legend.lg-more,:is(#lhl-surface,html) .labmap-root #lg.legend{background-color:rgba(12,16,22,.94)}
:is(#lhl-surface,html) .labmap-root .legend,:is(#lhl-surface,html) .labmap-root #fl.open,:is(#lhl-surface,html) body .map-stage #fl.open{border-radius:var(--lhl-r-card)}
:is(#lhl-surface,html) .labmap-root #fl.open .fl-hd,:is(#lhl-surface,html) body .map-stage #fl.open .fl-hd{background-image:var(--lhl-sheen)}
@media (max-width:700px){:is(#lhl-surface,html) .labmap-root .legend:not(.open){background-image:none!important;box-shadow:none}}

/* The full maps use the same type as the dashboard map. */
:is(#lhl-surface,html) .labmap-root,:is(#lhl-surface,html) .labmap-root button,:is(#lhl-surface,html) .labmap-root select,:is(#lhl-surface,html) .labmap-root input{font-family:var(--lhl-sans)}
:is(#lhl-surface,html) .labmap-root .ib,:is(#lhl-surface,html) .labmap-root #ib{font-family:Georgia,serif}

/* Dashboard: panels, folds, indicator and news cards, the rail and the Big Projects block. */
:is(#lhl-surface,html) body .panel-dollar{background-image:radial-gradient(1000px 380px at 30% -120px,rgb(var(--lhl-gold-rgb) / .07),transparent 70%),linear-gradient(180deg,rgba(255,255,255,.015),rgba(0,0,0,.12))}
:is(#lhl-surface,html) body .leadership-acc,:is(#lhl-surface,html) body .sec-fold,:is(#lhl-surface,html) body .ind-card:not(.is-inherited),:is(#lhl-surface,html) body .lead-role,:is(#lhl-surface,html) body .feed-item,:is(#lhl-surface,html) body .signup-compact{
  background-image:var(--lhl-card-img);box-shadow:var(--lhl-edge),var(--lhl-depth)}
:is(#lhl-surface,html) body .rail{background-image:radial-gradient(520px 300px at 50% -80px,rgb(var(--lhl-gold-rgb) / .06),transparent 70%),linear-gradient(180deg,rgba(255,255,255,.02),rgba(0,0,0,.18));box-shadow:inset 1px 0 0 rgba(255,255,255,.04)}
:is(#lhl-surface,html) body .rail-head{background-image:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,0))}
:is(#lhl-surface,html) body .feed-item,:is(#lhl-surface,html) body .ind-card,:is(#lhl-surface,html) body .lead-role{transition:box-shadow .25s ease,border-color .25s ease,background-color .25s ease}
:is(#lhl-surface,html) body .feed-item:hover,:is(#lhl-surface,html) body .ind-card:hover,:is(#lhl-surface,html) body .lead-role:hover{box-shadow:var(--lhl-edge),var(--lhl-depth-hi)}

/* Top Builders panels. */
:is(#lhl-surface,html) body .bd-stats,:is(#lhl-surface,html) body .bd-how,:is(#lhl-surface,html) body .bd-card,:is(#lhl-surface,html) body .bd-row{background-image:var(--lhl-card-img);box-shadow:var(--lhl-edge),var(--lhl-depth)}

@media (prefers-reduced-motion:reduce){
  :is(#lhl-surface,html) body .feed-item,:is(#lhl-surface,html) body .ind-card,:is(#lhl-surface,html) body .lead-role{transition:none}
}

/* Dec 3, 2026 (items 7 and 10): the rest of the map chrome. The full Big Projects Map puts
   .labmap-root on <body>, so these use "html .labmap-root" (a "body .labmap-root" selector never
   matched there). Controls that sit inside a bordered card (▾, i, the Legend's +/-) stay flat:
   one border per control. */
:is(#lhl-surface,html) body .map-stage .mc-hd .mc-car,:is(#lhl-surface,html) body .map-stage .mc-hd .mc-ib,
:is(#lhl-surface,html) .labmap-root .top .hd .car,:is(#lhl-surface,html) .labmap-root .top .hd .ib,:is(#lhl-surface,html) .labmap-root .top .hd #ib,
:is(#lhl-surface,html) .labmap-root .legend .lg-min{background-image:none!important;box-shadow:none!important}
/* Every floating pill on both maps wears the same lit face (top highlight, falloff, soft drop). */
:is(#lhl-surface,html) .labmap-root:not(.embed) .top .back,:is(#lhl-surface,html) .labmap-root .top .lens-select,
:is(#lhl-surface,html) .labmap-root .legend .lgb,:is(#lhl-surface,html) .labmap-root .legend.is-min,
:is(#lhl-surface,html) body .map-stage .bp-lg:not(.is-open),:is(#lhl-surface,html) .map-breadcrumb,
:is(#lhl-surface,html) .map-search-toggle,:is(#lhl-surface,html) body .pm-on .pm-bar button,:is(#lhl-surface,html) body .pm-on .pm-bar a,
:is(#lhl-surface,html) body .map-stage .zoom-controls,:is(#lhl-surface,html) .labmap-page .leaflet-control-zoom,
:is(#lhl-surface,html) body .bp-nl-btn{
  background-image:var(--lhl-ctl-img)!important;box-shadow:var(--lhl-edge),0 6px 14px -10px rgba(0,0,0,.8)!important}
/* Lens select keeps its chevron: the lit face goes under it. */
:is(#lhl-surface,html) .labmap-root .top .lens-select,:is(#lhl-surface,html) body .map-stage .fs-ui .lens-select{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23f1ebe0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),var(--lhl-ctl-img)!important;
  background-repeat:no-repeat,no-repeat!important;background-position:right 11px center,0 0!important;background-size:10px 6px,100% 100%!important}
/* Panels: header cards on phones, the open dashboard Legend, News and History, search results,
   the share menu, the report and brief overlay, phone sheets and popups. Same top light and depth as cards. */
:is(#lhl-surface,html) body .map-stage.pm-on .mc-ptop .mc-hd,:is(#lhl-surface,html) .labmap-root:not(.embed) .top .title>.hd,
:is(#lhl-surface,html) body .map-stage .bp-lg.is-open,:is(#lhl-surface,html) body .bp-nl-panel,
:is(#lhl-surface,html) .map-search-list,:is(#lhl-surface,html) .map-search-rpt,:is(#lhl-surface,html) .labmap-root #pl,
:is(#lhl-surface,html) body .bps-menu,:is(#lhl-surface,html) body .bpr-box,:is(#lhl-surface,html) body .pm-on .pm-sheet,
:is(#lhl-surface,html) .leaflet-popup-content-wrapper,:is(#lhl-surface,html) .labmap-root .plc{
  background-image:var(--lhl-card-img)!important;box-shadow:var(--lhl-edge),0 18px 40px -18px rgba(0,0,0,.75)!important}
:is(#lhl-surface,html) body .bpr-box{border-radius:var(--lhl-r-card)}
/* The report and brief overlay dims the page with a vignette instead of one flat veil. */
:is(#lhl-surface,html) body .bpr-ov{background:radial-gradient(120% 90% at 50% 40%,rgba(6,9,13,.62),rgba(3,5,8,.9))}
/* Dashboard: the Big Projects block under the map gets a key light instead of a flat band. */
:is(#lhl-surface,html) body .bigp{background-image:radial-gradient(900px 260px at 20% -60px,rgb(var(--lhl-gold-rgb) / .06),transparent 70%);border-radius:var(--lhl-r-card)}

/* Dec 3, 2026 (item 8): one page container on every page, copied from the Explainers index.
   Index pages (Explainers, Project Tracker, Top Builders) use the wide 1160px column with the
   kicker, title, intro, stats and filters centered; reading pages (explainers, citations,
   project pages, Reindustrialization) use the 760px reading column, centered. Same 20px gutters. */
:root{--lhl-page-wide:1160px;--lhl-page-read:760px;--lhl-page-pad:20px}
:is(#lhl-surface,html) body main.grid,:is(#lhl-surface,html) body main.wide,:is(#lhl-surface,html) body main.bd-main-w,:is(#lhl-surface,html) body .bd-top{
  box-sizing:border-box;max-width:var(--lhl-page-wide);margin-left:auto;margin-right:auto;padding-left:var(--lhl-page-pad);padding-right:var(--lhl-page-pad)}
:is(#lhl-surface,html) body:has(.site-header) > main:not(.grid):not(.wide):not(.bd-main-w):not(:has(> .hero-band)),
:is(#lhl-surface,html) body:has(.site-header):has(> main:not(.grid):not(.wide):not(:has(> .hero-band))) > footer{
  box-sizing:border-box;max-width:var(--lhl-page-read);margin-left:auto;margin-right:auto;padding-left:var(--lhl-page-pad);padding-right:var(--lhl-page-pad)}
/* Centered heads, as on Explainers. */
:is(#lhl-surface,html) body main.wide>.kicker,:is(#lhl-surface,html) body main.wide>h1,:is(#lhl-surface,html) body main.wide>.intro,
:is(#lhl-surface,html) body .bd-hero,:is(#lhl-surface,html) body .bd-now{text-align:center}
:is(#lhl-surface,html) body main.wide>.intro,:is(#lhl-surface,html) body .bd-lede{max-width:760px;margin-left:auto;margin-right:auto}
:is(#lhl-surface,html) body .bd-stats{text-align:center}
:is(#lhl-surface,html) body .bd-row-c{justify-content:center;flex-wrap:wrap}
:is(#lhl-surface,html) body .bd-top{justify-content:center}
:is(#lhl-surface,html) body main.wide>.chips,:is(#lhl-surface,html) body main.wide .chips{justify-content:center}
@media (min-width:761px){:is(#lhl-surface,html) body .bd-ctl{justify-items:center}:is(#lhl-surface,html) body .bd-find{margin-left:0;flex:0 1 260px}:is(#lhl-surface,html) body .bd-row-c:has(.bd-find){flex-wrap:nowrap}:is(#lhl-surface,html) body .bd-row-c .bd-seg{flex:none}:is(#lhl-surface,html) body .bd-seg button{white-space:nowrap}}
:is(#lhl-surface,html) body #stgrid{background-color:#0b0f14;background-image:radial-gradient(120% 280px at 50% 0,rgb(var(--lhl-gold-rgb) / .06),transparent 70%),linear-gradient(180deg,#0f151c 0,#0b0f14 320px)}
:is(#lhl-surface,html) body #stgrid .sg-card{background-image:linear-gradient(180deg,rgba(255,255,255,.028),rgba(255,255,255,0) 70%)}

/* Dec 3, 2026: the About this map popover uses the same lit card face, not a flat fill. */
:is(#lhl-surface,html) .labmap-root #ibpop{
  background-image:var(--lhl-card-img)!important;
  box-shadow:var(--lhl-edge),var(--lhl-depth-hi)!important}
:is(#lhl-surface,html) .map-stage .ibpop{
  background-image:var(--lhl-card-img)!important;
  box-shadow:var(--lhl-edge),var(--lhl-depth-hi)!important}

/* Map merge step E (Dec 3, 2026): on the Dashboard US and state view (.map-stage.labmap-on) the embedded map is the labs Big Projects Map:
   the shared markup (labsmarkup.js, generated from labs/big-projects-us/index.html) and the labs chrome CSS (its #labmap-root no longer carries
   the old "embed" class, so the labs rules ".labmap-root:not(.embed) ..." apply). The Dashboard's own copies of the chrome hide there:
   the .fs-ui stack with its .mc-card, the .bp-lg Legend, the .zoom-controls stack and the phone .mc-ptop. World, other-country and city views
   do not set labmap-on and keep the Dashboard chrome. */
.map-stage.map-stage.labmap-on > .fs-ui,
.map-stage.map-stage.labmap-on > .bp-lg,
.map-stage.map-stage.labmap-on > .zoom-controls,
.map-stage.map-stage.labmap-on > .mc-ptop { display: none !important; }
/* The Dashboard-only styles.css gives the "Color the map by" picker (.cov-toggle) an absolute spot in the stage corner. Inside the labs chrome on the Dashboard
   it sits in the control row, as on the labs page (which does not load styles.css). */
.map-stage.labmap-on #labmap-root .top .lens-select.cov-toggle { position: static !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; }
/* Sources: on the labs page the credit is fixed to the viewport center, which is the map center there. On the Dashboard the map is not the viewport,
   so the credit is centered on the map itself (the Leaflet corner box spans the map width). */
@media (min-width: 701px) {
  .map-stage.labmap-on #labmap-root .leaflet-control-attribution { position: absolute !important; left: 50% !important; right: auto !important; bottom: 2px !important; transform: translateX(-50%); }
}
/* Expand on the Dashboard US and state view: a third button under + and minus in the labs Leaflet zoom stack. */
#labmap-root .leaflet-control-zoom a.leaflet-control-zoom-expand { display: flex; align-items: center; justify-content: center; }
#labmap-root .leaflet-control-zoom a.leaflet-control-zoom-expand svg { width: 15px; height: 15px; }
/* Map merge step E: the Dashboard loads styles.css first and the shared stylesheets in a different order than the labs page, so on a
   phone a few labs rules lose the cascade here (for example the labs phone rule that hides the Legend and the Leaflet zoom, which live in
   the Layers sheet on a phone). Restate them for the Dashboard US and state view only. */
@media (max-width: 700px) {
  .map-stage.map-stage.labmap-on.pm-on #labmap-root .legend,
  .map-stage.map-stage.labmap-on.pm-on #labmap-root .leaflet-control-zoom { display: none !important; }
  .map-stage.map-stage.labmap-on.pm-on #fs-btn-tl,
  .map-stage.map-stage.labmap-on.pm-on #fs-btn-br { display: none !important; }
}
