/* The site copy: mackforge.dev's header (site-nav.css) as one slim bar across the top that is always there, the way
   openstreetmap.org and zola.planning.nyc.gov carry their site's header over a full-screen map: 55px tall, the wordmark at left. Wider than 767px (the
   width where openstreetmap.org's Bootstrap navbar folds) the site's links sit in the bar at right; narrower, they fold
   behind a "Menu" button at the right end of the bar (as on ZoLa), which opens them in a list under the bar and closes
   them again. The open list is part of the bar, so it pushes the map and everything drawn over it down. The map starts
   under the bar: site-nav.js keeps --site-top at the bar's height (the open list included); lookup.js keeps --bar-bottom
   at the search line's bottom, measured from the top of the screen. The Menu button is put in by the script in
   index.html. */
body { background: #0d1117; }
#map, #error { top: var(--site-top, 0px); }
#panel { top: calc(var(--site-top, 0px) + 8px); max-height: calc(100vh - var(--site-top, 0px) - 16px); }

/* the bar: the wordmark, then (computer) the links or (phone) the Menu button, in one 55px row */
body .mf-band { position: fixed; top: 0; left: 0; right: 0; z-index: 20; padding: 0; }
body .mf-nav { position: static; display: grid; grid-template-columns: auto 1fr; grid-template-rows: 55px;
  align-items: center; gap: 0 10px; width: auto; margin: 0; padding: 0 10px; }
body .mf-nav .brand { grid-column: 1; grid-row: 1; flex: none; min-height: 0; height: 35px; padding: 0 14px;
  border-radius: 18px; font-size: 20px; line-height: 35px; justify-content: flex-start; }
body .mf-nav nav { grid-column: 2; grid-row: 1; justify-self: end; flex: none; min-width: 0; height: 35px; gap: 20px;
  padding: 0 12px 0 20px; border-radius: 18px; font-size: 14px; }
body .mf-nav nav > a { font-size: 14px; }
body .mf-nav nav > a.gh, body .mf-nav nav > a.sc, body .mf-nav .share #share-btn { min-height: 35px; }
body .mf-nav nav > a.gh { position: static; width: auto; height: auto; min-width: 40px; color: inherit; }
body .mf-nav nav > a.gh:hover { color: #f6a85a; }
body .mf-nav nav > a.gh svg { width: 20px; height: 20px; }
body .mf-nav .share #share-btn svg { transform: none; }

/* the Menu button: a word, not an icon (ZoLa, HRSA, Census), 44px tall, in the site navigation's own colors */
#site-nav-toggler { display: none; grid-column: 3; grid-row: 1; justify-self: end; box-sizing: border-box; height: 44px;
  padding: 0 16px; border: 1px solid #2b3947; border-radius: 22px; background: #1f2a38; color: #f3efe8;
  font: 600 15px/1 "Inter", system-ui, -apple-system, sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#site-nav-toggler:hover { background: #2b3947; }
#site-nav-toggler[aria-expanded="true"] { background: #f3efe8; border-color: #f3efe8; color: #0d1117; }
#site-nav-toggler:focus-visible { outline: 3px solid #e8862e; outline-offset: 2px; }

@media (max-width: 767px) {
  /* the zoom buttons sit inside the map, so their offset is counted from the map's top, not the screen's */
  .maplibregl-ctrl-top-right { top: calc(var(--bar-bottom, 110px) - var(--site-top, 0px)); }
  html.has-navbar body .mf-nav { grid-template-columns: auto 1fr auto; grid-template-rows: 55px auto; }
  html.has-navbar #site-nav-toggler { display: block; }
  /* the folded links: a second row of the bar, the width of the screen, links centred in rows (openstreetmap.org) */
  html.has-navbar body .mf-nav nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; height: auto;
    flex-wrap: wrap; justify-content: center; gap: 0 4px; padding: 0 0 6px; border: 0; border-radius: 0;
    background: transparent; white-space: nowrap; }
  html.has-navbar body .mf-nav nav:not(.show):not(.collapsing) { display: none; }
  html.has-navbar body .mf-nav nav.collapsing { overflow: hidden; padding-bottom: 0; transition: height .35s ease; }
  html.has-navbar body .mf-nav nav > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }
  html.has-navbar body .mf-nav nav > a.gh, html.has-navbar body .mf-nav nav > a.sc,
  html.has-navbar body .mf-nav .share #share-btn { min-width: 44px; min-height: 44px; justify-content: center; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  html.has-navbar body .mf-nav nav.collapsing { transition: none; }
}
@media (min-width: 768px) {
  #panel { top: calc(var(--site-top, 0px) + 10px); max-height: calc(100vh - var(--site-top, 0px) - 20px); }
  #map-actions { top: calc(var(--site-top, 0px) + 10px); }
}
