/* Pickleball Bay Area — design system, v3 ("court colors, daylight")
   Direction: light, plain, and legible — a reference you'd actually trust,
   not a moody SaaS landing page. Dropped the dark glass/glow treatment
   entirely (no blur, no neon shadows, no ambient gradients, no pulsing).
   The accent palette is still drawn from the court itself, just in its
   daylight register: the blue of the outer court, the green of the
   kitchen, the terracotta of a court's perimeter apron, the ball's optic
   yellow saved for exactly one thing (the top pick). Variable NAMES kept
   stable across every version so far, so no HTML had to change — only
   values, plus removal of blur/backdrop-filter/glow/animation rules.

   --font-headline is a later, narrower addition: a condensed all-caps
   face for hero and section headlines only (not venue names or UI
   labels), for a bolder, more poster-like headline pass than
   --font-display gives on its own. */

@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap");

:root {
  --fog: #f5f7f6;
  --fog-dim: #eaeeec;
  --paper: #ffffff;
  --ink: #17232b;
  --ink-soft: #5b6b70;
  --line: #dfe5e2;

  --bay: #1d6b85;
  --bay-deep: #123240;
  --kitchen: #2f7a57;
  --kitchen-deep: #1f5a40;
  --optic: #d7e94b;
  --optic-deep: #9aa81e;
  --poppy: #b54b2c;
  --poppy-deep: #8f3a20;

  --bay-tint: #e8f1f4;
  --kitchen-tint: #e7f3ec;
  --poppy-tint: #f7eae4;

  /* RGB triplets of the above, for rgba()/alpha use (box-shadow, overlays) —
     CSS custom properties can't derive R/G/B components from a hex value,
     so these exist purely so alpha colors can reference one source of
     truth instead of hardcoding each accent's RGB triplet at every call
     site. */
  --ink-rgb: 23, 35, 43;
  --bay-rgb: 29, 107, 133;
  --bay-deep-rgb: 18, 50, 64;
  --kitchen-rgb: 47, 122, 87;
  --optic-rgb: 215, 233, 75;
  --poppy-rgb: 181, 75, 44;
  --fog-rgb: 245, 247, 246;

  /* Map-only pin colors: bay/kitchen sit only ~40° apart in hue and read as
     near-identical at 9-16px, so indoor/outdoor pins get their own wider-
     spread blue/green pair (~80° apart) instead of reusing the brand tokens. */
  --pin-outdoor: #2166a8;
  --pin-indoor: #3a8a4a;

  --radius-s: 10px;
  --radius-m: 16px;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --space-5: 5rem;

  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-headline: "Bebas Neue", var(--font-display), "Arial Narrow", sans-serif;

  --max: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* --header-h is kept live by assets/nav.js (ResizeObserver on
     .site-header); the fallback covers the brief window before that JS
     runs and the mobile-wrapped header height if it somehow doesn't. */
  scroll-padding-top: calc(var(--header-h, 130px) + 12px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--optic);
  color: var(--bay-deep);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Hero and section headlines get a bolder, condensed all-caps pass —
   venue/city names (h3) and utility headings (h4) keep --font-display. */
h1, h2 {
  font-family: var(--font-headline);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.97;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--bay);
  text-decoration-color: var(--optic-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--kitchen-deep);
}

:focus-visible {
  outline: 3px solid var(--bay);
  outline-offset: 2px;
}

/* Tighter ring for compact form controls (select, search input) — the
   sitewide 2px offset reads as clipped against these smaller boxes. */
select:focus-visible,
input[type="search"]:focus-visible {
  outline-offset: 1px;
}

img, svg {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* ---------- Eyebrow / mono labels ---------- */

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--kitchen-deep);
  font-weight: 500;
}

.stat-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3em 0.85em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.stat-chip b {
  color: var(--ink);
  font-weight: 700;
}

.stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: var(--space-2) 0;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.brand:hover {
  color: var(--ink);
}

.brand img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex: none;
}

.main-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.92rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--optic-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ---------- Nav dropdown ("More") ---------- */

.nav-dropdown {
  position: relative;
}

.nav-dropdown summary {
  color: var(--ink-soft);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.3em;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary::after {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s ease;
}

.nav-dropdown[open] summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.nav-dropdown summary:hover,
.nav-dropdown[open] summary,
.nav-dropdown summary[aria-current="page"] {
  color: var(--ink);
}

.nav-dropdown summary[aria-current="page"]::after {
  border-color: var(--optic-deep);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.9rem);
  left: 0;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  padding: 0.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  box-shadow: 0 16px 32px -12px rgba(var(--ink-rgb), 0.18);
  z-index: 20;
}

/* Invisible hover bridge: the gap above (from the "+ 0.9rem" offset) isn't
   part of .nav-dropdown's own hit area, so moving the pointer from "More"
   down into this menu briefly exits the element and triggers nav.js's
   mouseleave-closes-it handler before the pointer arrives. This closes that
   gap for hover/hit-testing purposes without changing where the menu itself
   visually sits. */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -0.9rem;
  left: 0;
  right: 0;
  height: 0.9rem;
}

.nav-dropdown-menu a {
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a[aria-current="page"] {
  background: var(--fog);
  text-decoration: none;
  color: var(--ink);
}

/* ---------- Sitewide global search (assets/global-search.js) ---------- */

.global-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-left: auto;
}

.global-search-icon {
  position: relative;
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  border: 1.5px solid var(--ink-soft);
  border-radius: 50%;
  flex: none;
}

.global-search-icon::after {
  content: "";
  position: absolute;
  width: 0.55em;
  height: 1.5px;
  background: var(--ink-soft);
  top: 95%;
  left: 95%;
  transform: rotate(45deg);
  transform-origin: 0 0;
}

.global-search-input {
  width: 128px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--fog);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.4em 0.6em;
  transition: width 0.15s ease;
}

.global-search-input:focus,
.global-search-input:not(:placeholder-shown) {
  width: 190px;
}

.global-search-results[hidden] {
  display: none;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: 260px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  box-shadow: 0 8px 24px rgba(var(--ink-rgb), 0.12);
  z-index: 20;
}

.global-search-result {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
}

.global-search-result:hover,
.global-search-result.is-active {
  background: var(--fog);
}

.global-search-result .gsr-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.global-search-result .gsr-sublabel {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.global-search-empty {
  padding: 0.55rem 0.65rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  .global-search {
    margin-left: 0;
  }

  .global-search-input,
  .global-search-input:focus,
  .global-search-input:not(:placeholder-shown) {
    width: 100px;
  }

  .global-search-results {
    right: auto;
    left: 0;
    width: min(260px, 80vw);
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: var(--space-5) 0 var(--space-4);
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  animation: rise 0.6s var(--ease) both;
}

.hero .lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 46ch;
  animation: rise 0.6s var(--ease) 0.08s both;
}

.hero .stat-strip {
  animation: rise 0.6s var(--ease) 0.16s both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-hero {
  padding: var(--space-4) 0 var(--space-3);
  border-bottom: 1px solid var(--line);
}

.page-hero .eyebrow {
  margin-bottom: 0.5rem;
}

.page-hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.3rem);
}

.page-hero .lede {
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75em 1.4em;
  border-radius: var(--radius-s);
  background: var(--bay);
  color: #fff;
  text-decoration: none;
  border: none;
  box-shadow: 0 6px 16px -6px rgba(var(--bay-rgb), 0.4);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.btn:hover {
  color: #fff;
  background: var(--bay-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -6px rgba(var(--bay-deep-rgb), 0.35);
}

/* ---------- Sections / regions ---------- */

.section {
  padding: var(--space-4) 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.region-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.region-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.3rem);
  margin-bottom: 0.2em;
}

/* Bare section h2s (e.g. city pages' "Where to play") aren't wrapped in
   .region-head, but should read at the same headline scale. */
.section > .container > h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.3rem);
  margin-bottom: 0.9rem;
}

.region-head p {
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
}

.region-head .overview-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  white-space: nowrap;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.city-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 1.3rem 1.4rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.city-card:hover {
  transform: translateY(-2px);
  border-color: var(--bay);
  box-shadow: 0 16px 32px -16px rgba(var(--ink-rgb), 0.22);
  color: var(--ink);
}

.city-card .name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.city-card h3 {
  font-size: 1.2rem;
  margin: 0;
}

.city-card .arrow {
  font-family: var(--font-mono);
  color: var(--kitchen-deep);
  transition: transform 0.2s var(--ease);
}

.city-card:hover .arrow {
  transform: translateX(3px);
}

.city-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  flex: 1;
}

/* ---------- Venue cards (city detail pages) ---------- */

.venue-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.venue-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--bay);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.venue-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.15em;
}

.venue-card .addr {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
  display: block;
}

.venue-card .facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.venue-card p:last-child {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.venue-card.top-pick {
  border-left-color: var(--optic-deep);
  background: rgba(var(--optic-rgb), 0.09);
}

.venue-card .name-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.venue-card .name-row h3 {
  margin-bottom: 0;
}

.rank-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--bay-tint);
  color: var(--bay-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2em 0.7em;
  white-space: nowrap;
}

.rank-badge.top {
  background: var(--optic);
  color: var(--bay-deep);
  border-color: var(--optic-deep);
}

/* ---------- Address row / directions link ---------- */

.addr-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  margin-bottom: 0.5rem;
}

.addr-row .addr {
  margin-bottom: 0;
}

.directions-link,
.mini-venue-row .mv-directions {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--bay);
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

.directions-link:hover,
.mini-venue-row .mv-directions:hover {
  text-decoration: underline;
}

/* ---------- Beginner / competitive quick badge ---------- */

.level-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 0.2em 0.75em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.level-badge.beginner {
  background: var(--kitchen-tint);
  color: var(--kitchen-deep);
  border-color: rgba(var(--kitchen-rgb), 0.3);
}

.level-badge.competitive {
  background: var(--poppy-tint);
  color: var(--poppy-deep);
  border-color: rgba(var(--poppy-rgb), 0.3);
}

.level-badge.mixed {
  background: var(--bay-tint);
  color: var(--bay-deep);
  border-color: rgba(var(--bay-rgb), 0.3);
}

/* ---------- Rating breakdown ---------- */

.rating-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.rating-pill {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--fog);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  min-width: 90px;
}

.rating-pill .rlabel {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.rating-pill .rvalue {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.rating-pill .rvalue.good {
  color: var(--kitchen-deep);
}

.rating-pill .rvalue.caution {
  color: var(--poppy-deep);
}

.rating-pill .rvalue.neutral {
  color: var(--ink-soft);
  font-weight: 500;
}

/* ---------- Booking button / outline pill button (shared with
   directory.css's "Clear filters" and paddle-quiz.js's "Retake the quiz"
   buttons via .clear-btn — same outline-fills-on-hover pill, just an <a>
   in one case and a <button> in the other) ---------- */

.book-btn,
.clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bay);
  background: transparent;
  border: 1.5px solid var(--bay);
  border-radius: 999px;
  padding: 0.4em 0.95em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.book-btn {
  margin-top: 0.7rem;
}

.book-btn:hover,
.clear-btn:hover {
  background: var(--bay);
  color: #fff;
}

/* ---------- Compact / minor venue list ---------- */

.mini-venue-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  overflow: hidden;
  margin: 1rem 0;
}

.mini-venue-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 1rem;
  padding: 0.55rem 0.9rem;
  background: var(--paper);
}

.mini-venue-row + .mini-venue-row {
  border-top: 1px solid var(--line);
}

.mini-venue-row .mv-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1 1 170px;
  color: var(--ink);
}

.mini-venue-row .mv-addr {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  flex: 1 1 200px;
}

.mini-venue-row .mv-facts {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  flex: 0 0 auto;
}

.mini-venue-row .mv-note {
  flex-basis: 100%;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

/* ---------- Callout ---------- */

.callout {
  background: var(--poppy-tint);
  border-left: 4px solid var(--poppy);
  border-radius: var(--radius-s);
  padding: 1.1rem 1.3rem;
  margin: var(--space-3) 0;
}

.callout .eyebrow {
  color: var(--poppy-deep);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ---------- Good to know list ---------- */

.know-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.know-list li {
  padding-left: 1.4em;
  position: relative;
}

.know-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5em;
  height: 0.5em;
  background: var(--kitchen);
  border-radius: 1px;
}

/* ---------- Region overview cards (home page) ---------- */

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.region-card {
  background: var(--bay-deep);
  color: var(--fog);
  border-radius: var(--radius-m);
  padding: 1.4rem 1.5rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.region-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -14px rgba(var(--bay-deep-rgb), 0.45);
  color: var(--fog);
}

.region-card .eyebrow {
  color: var(--optic);
}

.region-card h3 {
  color: var(--fog);
  margin-bottom: 0.1em;
}

.region-card p {
  color: rgba(var(--fog-rgb), 0.75);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- How this works (three-up) ---------- */

.trio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.trio h3 {
  font-size: 1.05rem;
  color: var(--kitchen-deep);
}

.trio p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.rank-note {
  margin-top: 1.5rem;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--fog-dim);
  padding: var(--space-4) 0 var(--space-3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.footer-grid h4 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-bottom: 0.8em;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-grid a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-grid a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-note {
  color: var(--ink-soft);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.sources {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px dashed var(--line);
}

.sources a {
  color: var(--ink-soft);
}

/* ---------- Status line (loading / error state for the three JS-driven
   data pages — directory, map, rankings — each has its own id/class for
   its status element, but the look is shared) ---------- */

.directory-status,
.map-status,
.rankings-status {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.directory-status.is-error,
.map-status.is-error,
.rankings-status.is-error {
  color: var(--poppy-deep);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .main-nav {
    gap: 0.8rem;
    font-size: 0.85rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-note {
    flex-direction: column;
  }
}

/* ---------- Voting & ratings ---------- */

.star-rating {
  display: inline-flex;
  gap: 1px;
  vertical-align: middle;
}

.star-rating .star {
  position: relative;
  width: 1em;
  height: 1em;
  font-size: 1rem;
  line-height: 1;
}

.star-rating .star::before,
.star-rating .star::after {
  content: "\2605";
  position: absolute;
  inset: 0;
  font-size: 1em;
  line-height: 1;
}

.star-rating .star::before {
  color: var(--line);
}

.star-rating .star::after {
  width: var(--fill, 0%);
  overflow: hidden;
  white-space: nowrap;
  color: var(--optic-deep);
}

.rating-value-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-left: 0.4em;
}

.star-picker {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 1px;
}

.star-picker button {
  background: none;
  border: none;
  padding: 0.05em;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--line);
}

.star-picker button::before {
  content: "\2605";
}

.star-picker button:hover,
.star-picker button:hover ~ button,
.star-picker button.is-selected,
.star-picker button.is-selected ~ button {
  color: var(--optic-deep);
}

.favorite-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--poppy-deep);
  background: var(--paper);
  border: 1.5px solid var(--poppy);
  border-radius: 999px;
  padding: 0.4em 0.95em;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.favorite-btn::before {
  content: "\2661";
  font-size: 1.05em;
}

.favorite-btn:hover {
  background: var(--poppy-tint);
}

.favorite-btn.is-favorited {
  background: var(--poppy);
  color: #fff;
}

.favorite-btn.is-favorited::before {
  content: "\2665";
}

.badge-top-rated,
.badge-most-loved {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 0.2em 0.75em;
  white-space: nowrap;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.badge-top-rated {
  background: var(--optic);
  color: var(--bay-deep);
  border-color: var(--optic-deep);
}

.badge-most-loved {
  background: var(--poppy-tint);
  color: var(--poppy-deep);
  border-color: rgba(var(--poppy-rgb), 0.3);
}

.rating-form {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line);
}

.rating-form-toggle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bay);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--optic-deep);
  text-underline-offset: 3px;
}

.rating-form-body:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.rating-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rating-form-row .rf-label {
  font-size: 0.85rem;
  color: var(--ink);
  flex: 1 1 160px;
}

.rating-form-row .rf-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.rating-form-row .rf-control {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.rating-form-row .rf-your-rating {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.vote-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 0.7rem;
}

@media (max-width: 560px) {
  .rating-form-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Google rating badge (shown alongside, never blended with,
   the community rating above) ---------- */

.google-rating-slot {
  display: inline-block;
  margin-left: 0.6em;
}

.google-rating-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--fog);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15em 0.7em;
  text-decoration: none;
  white-space: nowrap;
}

a.google-rating-badge:hover {
  color: var(--bay-deep);
  border-color: var(--bay);
  text-decoration: none;
}

.google-rating-asof {
  margin-left: 0.45em;
  font-weight: 400;
  opacity: 0.65;
}

/* ---------- City quick-jump tags (shared with rankings.css's own
   city-jump nav via .city-jump-tag/.city-jump-group — same pill/group,
   independently rolled and now merged; .city-jump-region keeps its own
   rule below since it genuinely differs in weight from .city-tag-region) ---------- */

.city-quick-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.3rem;
  margin-top: var(--space-2);
}

.city-tag-group,
.city-jump-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
}

.city-tag-region {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.city-tag,
.city-jump-tag {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3em 0.85em;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.city-tag:hover,
.city-tag:focus-visible,
.city-jump-tag:hover,
.city-jump-tag:focus-visible {
  border-color: var(--bay);
  color: var(--bay-deep);
  background: var(--bay-tint);
}
