/* The site's own palette — the one austin.chat had before 2026-09-09, restored
   2026-09-10 at the owner's word: the night palette taken from the Moontower app
   (and the serif type, the vignette and the glows that came with it) was never
   asked for and is gone. Day is the default and lives here on bare :root; night
   is the option below, chosen with the header button and remembered. */
:root {
  --background: #f5f7fa;
  --text: #1c1c28;
  --accent: #0067c5;
  --accent-light: #5ba8ff;
  --surface: #ffffff;
  --muted: #6f7780;
  --border: #e1e6ee;
  --shadow: rgba(15, 25, 45, 0.12);
  color-scheme: light;
}

:root[data-theme='dark'] {
  --background: #0e1117;
  --text: #f5f7fa;
  --accent: #4cc3ff;
  --accent-light: #8ad7ff;
  --surface: #161b23;
  --muted: #c0c7d1;
  --border: #2a3040;
  --shadow: rgba(0, 0, 0, 0.45);
  /* so scrollbars and form controls go dark with the rest of the page */
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

h1,
h2 {
  margin: 0 0 0.5rem;
  font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
  line-height: 1.7;
  color: var(--muted);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-light);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.9rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.topbar-right {
  margin-left: auto;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1rem;
  color: var(--text);
}

.primary-nav {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  font-weight: 600;
  font-size: 1rem;
}

.primary-nav a {
  color: var(--text);
  padding: 0.35rem 0;
  border-radius: 8px;
  position: relative;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--accent);
}

.primary-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.5rem;
  width: 100%;
  height: 3px;
  background: var(--accent);
  border-radius: 99px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
  transform: scaleX(1);
}

.site-title {
  font-size: 2.4rem;
  letter-spacing: 0.02em;
  color: var(--text);
  font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  margin: 0.25rem 0;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* Lets the map window below actually shrink. Without it a flex child refuses
     to go below its content's size and the page grows a scrollbar instead. */
  min-height: 0;
}

/* The map window takes whatever is left of the viewport after the header, the
   chips, the cards and the footer — it is not a fixed 65vh. A fixed height was
   both bugs at once: on a laptop (800px tall) the parts added up to 816px and
   the page grew a scrollbar, and on a tall screen they fell short and left a
   dead band above the footer. Taking the remainder means the page is exactly
   one screen at every size, with the footer on the bottom edge and nothing to
   scroll. Below MIN_HERO there is genuinely no room, and the page scrolls
   rather than squashing the map to a sliver. */
.map-hero {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  min-height: 220px;
  border-bottom: none;
  overflow: hidden;
}

#map {
  flex: 1;
  height: 65vh;
  width: 100%;
}

/* ── Story map iframe ────────────────────────────────────── */
.app-window {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── Story map selector bar ──────────────────────────────── */
.chip-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chip-bar::-webkit-scrollbar { display: none; }

.reports-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  flex-shrink: 0;
  margin-right: 12px;
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.sm-nav-btn {
  padding: 6px 16px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.sm-nav-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}
.sm-nav-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Featured report cards ───────────────────────────────── */
.report-cards {
  background: var(--surface);
  /* no bottom border: the footer's own top border sits right under it, and two
     1px rules together read as one thick smudged line */
  padding: 10px 16px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* The row is the control for the window above it: whichever card is snapped
     to the left edge is what plays up there (home.js). Snapping is what makes
     "leftmost" a definite answer instead of wherever a swipe happened to stop. */
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Snap to the row's gutter, not to its border — without this the resting card
     sits flush against the window edge with its 16px of breathing room lost. */
  scroll-padding-left: 16px;
}
.report-cards::-webkit-scrollbar { display: none; }

.report-cards-inner {
  display: flex;
  gap: 10px;
  align-items: stretch;
  /* One dial for the carousel. Cards are a share of the row so a slice of the
     next one always shows — that peek is what says "this swipes". */
  --card-w: clamp(240px, 44%, 420px);
}

/* Runway. Without it the row only scrolls by its own overflow, which with three
   cards on a wide screen is a few dozen pixels — not enough for the second or
   third card to ever reach the left edge, so they could never take the window.
   This trailing space is what lets the LAST card sit at the left. */
.report-cards-inner::after {
  content: '';
  flex: 0 0 calc(100% - var(--card-w) - 10px);
}

.report-cards-inner .report-card {
  --card-accent: var(--accent);
  scroll-snap-align: start;
  flex: 0 0 var(--card-w);
  max-width: none;
  padding: 9px 13px 11px;
  background: color-mix(in srgb, var(--surface) 94%, var(--card-accent) 6%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--card-accent);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.report-cards-inner a.report-card { text-decoration: none; }

.report-cards-inner .report-card:hover,
.report-cards-inner .report-card:focus-visible {
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--shadow);
  border-color: var(--card-accent);
  outline: none;
}

.report-cards-inner .report-card.is-active {
  background: var(--accent);
  border-color: var(--accent);
  border-left-color: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px var(--shadow);
}

.report-cards-inner .report-card.is-active .report-card-eyebrow,
.report-cards-inner .report-card.is-active .report-card-title,
.report-cards-inner .report-card.is-active .report-card-blurb {
  color: #fff;
}

.report-card-eyebrow {
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--card-accent);
}

.report-card-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
  font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--text);
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.report-card-blurb {
  margin: 0;
  font-size: 0.81rem;
  line-height: 1.35;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--muted);
}

.lede {
  margin: 0 0 1.25rem;
  color: var(--muted);
  line-height: 1.6;
}

.news-feed {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

:root[data-theme='dark'] .news-feed {
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  border-color: color-mix(in srgb, var(--border) 80%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.feed-header {
  margin-bottom: 0.75rem;
}

.feed-title {
  margin: 0;
  font-size: 1.15rem;
}

.feed-subtitle {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.feed-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.feed-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 0.65rem;
  align-items: start;
}

.feed-dot {
  width: 10px;
  height: 10px;
  margin-top: 0.2rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff 0%, #fff 30%, var(--accent) 31%);
  border: 2px solid color-mix(in srgb, var(--accent) 45%, var(--accent-light));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}

.feed-headline {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.45;
}

.feed-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.info-section {
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.section-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.section-nav {
  display: inline-flex;
  align-items: center;
  font-size: 0.95rem;
}

.section-nav a {
  padding: 0 0.5rem;
}

.section-nav a + a::before {
  content: '|';
  color: var(--muted);
  margin: 0 0.5rem;
}

.page-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 18px 28px 24px;
  text-align: center;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
  transition: color 0.15s ease;
}

.social-icons a:hover {
  color: var(--accent);
}

.social-icons svg {
  width: 20px;
  height: 20px;
}


.page-footer.docs-footer {
  grid-column: 1 / -1;
  padding: 1.5rem 1rem 1.25rem;
}

.content-page {
  flex: 1;
  padding: 2.5rem 1.5rem 3rem;
  background: var(--background);
}

.content-shell {
  max-width: 860px;
  margin: 0 auto;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem 2.25rem;
  box-shadow: 0 18px 38px var(--shadow);
}

.content-kicker {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
}

.content-lede {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
}

.placeholder-grid {
  display: grid;
  gap: 1rem;
  margin: 1.4rem 0 0;
}

.placeholder-card {
  border: 1px dashed color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.placeholder-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.placeholder-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.full-map-page {
  position: relative;
  flex: 1;
  min-height: 70vh;
}

.full-map-page #map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.report-shell {
  padding: 1.25rem 1.25rem 2rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.report-card {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 14px 26px var(--shadow);
  padding: 1rem 1.1rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.15s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px var(--shadow);
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.12s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 8px 16px var(--shadow);
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 99px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bar::before {
  transform: translateY(-6px);
}

.nav-toggle-bar::after {
  transform: translateY(4px);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bar {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bar::before {
  transform: rotate(-90deg) translateX(-6px);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bar::after {
  opacity: 0;
}

@media (max-width: 600px) {
  .topbar {
    padding: 0.75rem 1.1rem;
  }

  /* Dropdown nav: overlays below the header, doesn't expand it */
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0.4rem 0 0.6rem;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 20px var(--shadow);
    font-size: 0.95rem;
    z-index: 9;
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a {
    padding: 0.7rem 1.5rem;
    width: 100%;
    border-radius: 0;
  }

  .primary-nav a::after {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-title {
    font-size: 1.75rem;
  }

  .cta-group {
    flex-wrap: wrap;
  }

  .info-section {
    padding: 2rem 1.25rem;
  }

  .chip-bar {
    padding: 8px 12px;
  }
}

/* Document layout inspired by deck.gl examples */
.docs-page {
  flex: 1;
  padding: 1.5rem 1.75rem 2rem;
  background: var(--background);
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(360px, 1fr) minmax(280px, 360px);
  gap: 1.25rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

.docs-nav {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.15rem;
  box-shadow: 0 14px 30px var(--shadow);
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.page-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.3;
}

.sidebar-lede {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.98rem;
}

.nav-section {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.nav-section:first-of-type {
  border-top: none;
  padding-top: 0.25rem;
}

.nav-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
  background: none;
  border: none;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  cursor: pointer;
}

.nav-section-toggle .chevron {
  transition: transform 0.2s ease;
}

.nav-section-toggle.is-collapsed .chevron {
  transform: rotate(-90deg);
}

.nav-links {
  list-style: none;
  padding: 0.25rem 0 0.25rem 0.25rem;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.nav-link {
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 10px 20px var(--shadow);
  transform: translateY(-1px);
}

.nav-link.is-active {
  border-color: var(--accent);
  box-shadow: 0 14px 28px var(--shadow);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.map-column {
  grid-column: 2 / 3;
}

.map-panel {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.75rem;
  box-shadow: 0 18px 36px var(--shadow);
}

.map-viewport {
  position: relative;
  border-radius: 14px;
  min-height: 420px;
  overflow: hidden;
  isolation: isolate;
  --map-accent: #0067c5;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 18%, var(--surface)) 0%, var(--surface) 45%, var(--background) 100%);
  border: 1px solid var(--border);
}

.map-viewport::before,
.map-viewport::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-viewport::before {
  background-image: linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  mix-blend-mode: multiply;
}

.map-viewport::after {
  background: radial-gradient(circle at 30% 35%, color-mix(in srgb, var(--map-accent) 25%, transparent) 0%, transparent 32%),
    radial-gradient(circle at 65% 55%, color-mix(in srgb, var(--map-accent) 35%, transparent) 0%, transparent 38%),
    radial-gradient(circle at 45% 75%, color-mix(in srgb, var(--map-accent) 22%, transparent) 0%, transparent 30%);
}

.map-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  box-shadow: 0 12px 26px var(--shadow);
  max-width: calc(100% - 2rem);
}

.overlay-label {
  margin: 0 0 0.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--muted);
}

.overlay-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.detail-panel {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 18px 36px var(--shadow);
  display: grid;
  gap: 0.4rem;
}

.detail-tag {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.8rem;
}

.detail-title {
  margin: 0;
  font-size: 1.35rem;
}

.detail-body {
  margin: 0.15rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.docs-footer {
  grid-column: 1 / -1;
  margin-top: 1rem;
  text-align: center;
  padding: 1.4rem 1rem 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: minmax(240px, 320px) 1fr;
    grid-template-areas: 'nav map' 'nav detail' 'footer footer';
  }

  .docs-nav {
    grid-area: nav;
  }

  .map-column {
    grid-area: map;
  }

  .detail-panel {
    grid-area: detail;
  }

  .docs-footer {
    grid-area: footer;
  }
}

@media (max-width: 720px) {
  .docs-layout {
    grid-template-columns: 1fr;
    grid-template-areas: 'nav' 'map' 'detail' 'footer';
  }

  .docs-nav {
    position: static;
  }

  .map-viewport {
    min-height: 320px;
  }
}

/* ── Services page: flat, card-free treatment ─────────── */
.services-page .docs-layout {
  gap: 2.25rem;
}

.services-page .docs-nav {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.services-page .page-title {
  font-size: 1.65rem;
  letter-spacing: -0.01em;
}

.services-page .nav-section,
.services-page .nav-section:first-of-type {
  border-top: none;
  padding-top: 0.35rem;
}

.services-page .nav-links {
  padding: 0.35rem 0 0;
  gap: 0;
}

.services-page .nav-link {
  border: none;
  border-left: 2px solid var(--border);
  border-radius: 0;
  padding: 0.6rem 0 0.6rem 0.9rem;
  color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.services-page .nav-link:hover,
.services-page .nav-link:focus-visible {
  border-left-color: var(--accent);
  box-shadow: none;
  transform: none;
  color: var(--text);
}

.services-page .nav-link.is-active {
  border-left-color: var(--accent);
  background: none;
  box-shadow: none;
  color: var(--text);
}

.services-page .map-panel {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.services-page .map-viewport {
  border-radius: 10px;
}

.services-page .map-overlay {
  border: none;
  border-radius: 8px;
  box-shadow: none;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(6px);
}

.services-page .detail-panel {
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  padding: 1rem 0 0;
}

/* ── Tour popup ─────────────────────────────── */
.maplibregl-popup-content {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 8px 24px var(--shadow);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  min-width: 180px;
  max-width: 240px;
}

.maplibregl-popup-content strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text);
}

.maplibregl-popup-content img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 6px;
}

.maplibregl-popup-content p {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.tour-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

.tour-link:hover {
  color: var(--accent-light);
}

.maplibregl-popup-tip {
  border-top-color: var(--surface) !important;
}

/* Shared header: Sign In placeholder left, name centred, theme right. */
.topbar-home {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  flex: none;
  pointer-events: none;
}

.topbar-home :is(a, button, nav) { pointer-events: auto; }
.topbar-home:has(~ .page-main),
body:has(#app-window.map-under-header:not([hidden])) > .topbar-home {
  margin-bottom: calc(0px - var(--site-header-height));
}
.topbar-home ~ .page-main { scroll-padding-top: var(--site-header-height); }
.topbar-home ~ .page-main::before {
  content: '';
  flex: 0 0 var(--site-header-height);
}

.topbar-home .topbar-left { flex: initial; gap: 6px; }
.topbar-home .topbar-right { margin-left: 0; justify-self: end; }

.brand-center {
  justify-self: center;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
}

.sign-in-button, .social-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--finish-chrome-line, var(--border));
  background: var(--finish-chrome-button, var(--surface));
  color: var(--finish-chrome-text, var(--text));
  font: inherit; font-size: .85rem; font-weight: 600; white-space: nowrap;
  opacity: 1; cursor: default;
}

.social-disclosure { position: relative; display: flex; }
.social-toggle { width: 36px; padding: 0; cursor: pointer; }
.social-toggle svg { width: 18px; height: 18px; }
.social-toggle:is(:hover, [aria-expanded="true"]) { border-color: var(--accent); }
.social-panel {
  position: absolute; top: 100%; left: 0; width: max-content; min-width: 156px;
  max-width: calc(100vw - 24px); max-height: min(65vh, 320px); overflow-y: auto;
  padding: 4px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); box-shadow: 0 8px 24px var(--shadow);
}
.social-panel[hidden] { display: none; }
.social-panel a {
  display: flex; gap: 10px; align-items: center; min-height: 40px; padding: 6px 10px;
  border-radius: 6px; color: inherit; text-decoration: none; font: 600 0.875rem/1.3 system-ui, sans-serif;
}
.social-panel a:is(:hover, :focus-visible) { color: var(--accent); background: var(--finish-hover, var(--background)); }
.social-panel svg { flex: none; width: 18px; height: 18px; }
.social-disclosure :focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Same hamburger icon as .nav-toggle, but always shown. */
.menu-toggle {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.12s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 8px 16px var(--shadow);
}

.menu-toggle[aria-expanded='true'] .nav-toggle-bar { transform: rotate(45deg); }
.menu-toggle[aria-expanded='true'] .nav-toggle-bar::before { transform: rotate(-90deg) translateX(-6px); }
.menu-toggle[aria-expanded='true'] .nav-toggle-bar::after { opacity: 0; }

/* The panel hangs below the header on the left and overlays the map window,
   so opening it never shrinks the window. */
.site-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: min(360px, 100vw);
  /* Never taller than most of the screen; past that the panel scrolls. */
  max-height: 80vh;
  overflow-y: auto;
  padding: 0.5rem 0 0.75rem;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 12px 0;
  box-shadow: 0 8px 20px var(--shadow);
  font-weight: 600;
  font-size: 0.95rem;
  z-index: 9;
}

.site-menu[hidden] { display: none; }

.site-menu .menu-link,
.site-menu summary {
  display: block;
  padding: 0.7rem 1.5rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;        /* no default ▸ marker on the summary */
}

.site-menu summary::-webkit-details-marker { display: none; }

/* a small chevron on every row (owner 2026-10-22: "makes it more obvious
   there are other items"); it turns when a section is open */
.site-menu .menu-link::after,
.site-menu summary::after {
  content: '›';
  float: right;
  transition: transform 0.2s ease;
}

.site-menu details[open] summary::after { transform: rotate(90deg); }

.site-menu .menu-link:hover,
.site-menu summary:hover { color: var(--accent); }

/* the second level: one row per app or map, one step in */
.menu-links {
  list-style: none;
  margin: 0;
  padding: 0 0 0.35rem;
}

.menu-links li a {
  display: block;
  padding: 0.45rem 1.5rem 0.45rem 2.5rem;
  color: var(--text);
  font-weight: 500;
}

.menu-links li a:hover { color: var(--accent); }

/* a link whose address is not set up yet: greyed, not clickable */
.menu-links li .menu-soon {
  display: block;
  padding: 0.45rem 1.5rem 0.45rem 2.5rem;
  color: var(--muted);
}

/* the categories under Apps and Maps: a heading one step in, its items one more */
.menu-groups { padding-bottom: 0.25rem; }
.menu-group summary {
  padding: 0.45rem 1.5rem 0.45rem 2.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.menu-group .menu-links li a,
.menu-group .menu-links li .menu-soon { padding-left: 3.5rem; }

/* Compact home header and footer (owner, 2026-10-22: "maximize the map
   space in the middle"). Buttons stay 36px so a thumb can still hit them. */
.topbar.topbar-home {
  padding: 0.4rem 0.75rem;
  gap: 0.5rem;
}

.topbar-home .brand-center {
  font-size: 1rem;
  padding: .28rem .55rem;
  border-radius: .6rem;
}

.topbar-home .menu-toggle {
  width: 36px;
  height: 36px;
}

.topbar-home .theme-toggle {
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}

@media (max-width: 360px) {
  .topbar.topbar-home { padding-inline: 6px; gap: 4px; }
  .topbar-home .topbar-left { gap: 4px; }
  .topbar-home .brand-center { font-size: 0.875rem; padding-inline: .25rem; }
  .topbar-home .theme-toggle { padding-inline: .35rem; }
  .topbar-home .sign-in-button { padding-inline: 6px; }
}

.page-footer.home-footer { padding: 3px 12px 4px; }

.home-footer .social-icons { gap: 8px; }

.home-footer .social-icons a {
  width: 36px;      /* thumb-sized tap target */
  height: 36px;
}

.home-footer .social-icons svg {
  width: 18px;
  height: 18px;
}

/* ── Pages inside the frame (owner, 2026-10-22) ─────────────────────────
   shell.js draws the header and footer; the page's own <main class="page-main">
   is the centre. It scrolls on its own so the frame stays put, like an app. */
.page-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--background);
}

.page-body,
.contact-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.page-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.page-body h1,
.contact-page h1 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  margin: 0 0 1.5rem;
  color: var(--text);
  line-height: 1.15;
}

.page-lede {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 1.5rem;
}

.page-list {
  padding-left: 1.2rem;
  line-height: 1.6;
}

.page-list li { margin-bottom: 0.6rem; }

/* Contact card (moved here from contact.html's own <style> on 2026-10-22). */
.contact-page h1 { margin-bottom: 2.5rem; }

.contact-card {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px var(--shadow);
}

.contact-photo {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--accent);
  box-shadow: 0 6px 20px var(--shadow);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.5rem;
}

.contact-name {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.contact-role {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.contact-divider {
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

a.contact-item:hover { color: var(--accent); }

.contact-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

@media (max-width: 600px) {
  .contact-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
  }
  .contact-divider { margin: 0 auto; }
  .contact-item { justify-content: center; }
}

/* A framed page whose address names no app (view.js). */
.view-missing {
  margin: 3rem auto;
  padding: 0 1.25rem;
  max-width: 600px;
  text-align: center;
  color: var(--muted);
}

/* The /apps/ and /maps/ index pages: one row per entry (list.js). */
.page-index { list-style: none; padding: 0; }
.page-index li { margin-bottom: 1rem; }
.page-index a { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.page-index a:hover { color: var(--accent); }
.page-index p { margin: 0.2rem 0 0; color: var(--muted); }
