/* ============================================================
   COURT HUNTER PH — NIGHT SESSION
   One world: a pickleball board under floodlights. Availability
   is literal light — open courts glow acid, full courts sit dark.
   Drenched near-black green ground; pale mist ink; one acid accent
   reserved for lit courts, open counts, and primary actions.
   ============================================================ */

/* ---------- Tokens ---------- */

:root {
  color-scheme: dark;

  /* Ground — the night board */
  --night: #0b1512;
  --night-2: #101d18;
  --night-3: #152620;

  /* Ink — pale mist on dark ground */
  --mist: #e8f3e2;
  --mist-dim: #a9bca6;
  --mist-faint: #87998a;

  /* The accent — light itself. Lit courts, open counts, primary actions. */
  --acid: #c8f04f;
  --acid-press: #b7df3d;
  --acid-ink: #1a2408;   /* text/icons sitting on acid */
  --pool: rgba(200, 240, 79, 0.14);

  /* Secondary states — half-light (limited) and trouble */
  --ember: #f0b25e;
  --alert: #f08066;

  /* Lines */
  --line: rgba(232, 243, 226, 0.13);
  --line-strong: rgba(232, 243, 226, 0.26);

  /* Type */
  --font-display: 'Big Shoulders', 'Hanken Grotesk', 'Arial Narrow', sans-serif;
  --font-body: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Spline Sans Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Geometry */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-plate: 0 22px 48px -28px rgba(0, 0, 0, 0.85);
  --maxw: 1180px;
}

/* ---------- Reset & base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--mist);
  background:
    radial-gradient(1100px 520px at 12% -6%, rgba(200, 240, 79, 0.05), transparent 60%),
    radial-gradient(900px 480px at 88% 12%, rgba(200, 240, 79, 0.04), transparent 60%),
    var(--night);
  background-color: var(--night);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3 { margin: 0; line-height: 1.08; font-weight: 700; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--acid); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Text-entry controls carry their own focus cues (caret, native date-segment
   highlight) and no ring — the tap-time acid outlines read as noise there
   (owner direction, 2026-09-08). Buttons, chips, and steppers keep the ring. */
.field-control :is(input, select, textarea):focus-visible,
.venue-search-control input:focus-visible {
  outline: none;
}

::selection { background: var(--acid); color: var(--acid-ink); }
input, select, textarea { caret-color: var(--acid); }

/* Scrollbars — themed, not browser-default */
html { scrollbar-color: #24382f transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #24382f; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 21, 18, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--mist);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-mark { display: grid; place-items: center; }
.brand-mark svg { width: 32px; height: 32px; display: block; }

.brand-word {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.brand-word b { color: var(--mist); font-weight: 800; }

.nav-links { display: flex; align-items: center; gap: 26px; }

.nav-links a {
  color: var(--mist-dim);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--mist); text-decoration: none; }

.nav-cta {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 9px 18px;
  color: var(--acid) !important;
  border-color: rgba(200, 240, 79, 0.4);
}
.nav-cta:hover {
  background: rgba(200, 240, 79, 0.1);
  border-color: var(--acid);
}

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

.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) 24px 0;
  overflow: hidden; /* the decorative court art bleeds right; clip it so it never widens the page */
}

.hero-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: rgba(232, 243, 226, 0.1);
}

.hero-court {
  position: absolute;
  right: -60px;
  top: 24px;
  width: min(58vw, 620px);
  transform: translate(var(--px, 0), var(--py, 0));
}

.hero-pool {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--pool), rgba(200, 240, 79, 0.05) 42%, transparent 68%);
  animation: breathe 6s ease-in-out infinite;
}
.hero-pool-a { width: 300px; height: 300px; right: 6%; top: -40px; }
.hero-pool-b { width: 230px; height: 230px; right: 27%; top: 170px; animation-delay: -2s; }
.hero-pool-c { width: 200px; height: 200px; right: -30px; top: 280px; animation-delay: -4s; --pool: rgba(200, 240, 79, 0.07); }

.hero h1 {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(4rem, 10.5vw, 7.6rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: 0.92;
}

.hero h1 em {
  font-style: normal;
  color: var(--mist);
}

/* The sport word in the hero question is lit — the one sanctioned acid use
   in a heading: availability-as-light applied to the sport itself
   (owner decision, 2026-09-08; DESIGN.md One Light Rule exception). */
.hero h1 .hero-sport { color: var(--acid); }

/* The live brief — the desk's game plan, mirrored under the headline */
.hero-live {
  margin-top: 18px;
  font: 500 12.5px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mist-dim);
}

.hero-copy {
  position: relative;
  margin-top: 22px;
  max-width: 52ch;
  font-size: 1.12rem;
  color: var(--mist-dim);
}

/* The desk — the dominant object. Availability is set here. */

.search-desk {
  position: relative;
  margin-top: clamp(28px, 4vw, 44px);
  background: var(--night-2);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: clamp(18px, 2.6vw, 28px);
  box-shadow: var(--shadow-plate);
}

.desk-grid {
  display: grid;
  /* Stepper tracks floor at the squeezed control (32+74+32+2px) and the
     button at its one-line width — together they exactly spend the 1074px
     the 1180px container can honestly give. Intrinsic sizing has burned
     us here before (see .stepper button/output) — never trust `auto`
     alone with these widths. */
  grid-template-columns: minmax(212px, 1.35fr) minmax(160px, 1.05fr) minmax(130px, 1fr) minmax(140px, auto) minmax(140px, auto) minmax(232px, auto);
  gap: 12px;
  align-items: end;
}

.field { min-width: 0; }

.field-label,
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mist-faint);
  margin-bottom: 8px;
}

.field-control {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 14px;
  background: var(--night);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  transition: border-color 0.15s ease;
}

.field-control > svg { width: 18px; height: 18px; flex: none; color: var(--mist-faint); }

.field-control input,
.field-control select {
  width: 100%;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--mist);
  font: 500 1rem var(--font-body);
}
.field-control input { height: 100%; }

.field-control select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23a9bca6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 16px;
}

.date-control input { width: 100%; }
.date-control input::-webkit-calendar-picker-indicator { display: none; } /* the control draws its own icon; dateControl opens the picker on click */

.location-control {
  border-style: dashed;
  background: var(--night);
}
.location-control .fixed-location {
  font: 500 0.95rem var(--font-body);
  color: var(--mist-dim);
  white-space: nowrap;
}

.stepper {
  display: flex;
  align-items: center;
  height: 52px;
  background: var(--night);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
}
.stepper-button {
  /* Buttons may compress under desk pressure (44→32px) but never vanish:
     an explicit min-width keeps Chrome's intrinsic sizing honest, so the
     desk's auto tracks always reserve the squeezed width and the icons
     survive every width. */
  min-width: 32px;
  width: 44px;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--mist-dim);
  transition: background-color 0.15s ease;
}
.stepper-button svg { width: 14px; height: 14px; }
.stepper-button:hover:not(:disabled) { background: var(--night-3); color: var(--mist); }
.stepper-button:disabled { opacity: 0.35; cursor: default; }

.stepper output {
  /* `flex: 1 1 auto` (not 0%): a zero basis poisons Chrome's intrinsic
     sizing — tracks then size the stepper under its real width and it
     overlaps its neighbor. The 74px floor plus nowrap keeps readouts on
     one line: mono readouts up to "10 hours" (~84px) center across the
     62px content box into the 6px padding without touching the buttons. */
  flex: 1 1 auto;
  min-width: 74px;
  padding: 0 6px;
  text-align: center;
  font: 600 1rem var(--font-mono);
  color: var(--mist);
  white-space: nowrap;
}

/* Output tick pulse */
output.tick { animation: tick 0.3s ease-out; }

/* Quick set — ritual windows */
.desk-row-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.presets-label,
.tools-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mist-faint);
}

.preset-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.preset-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--mist-dim);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.preset-chip span {
  font: 500 11px var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--mist-faint);
  text-transform: uppercase;
}
.preset-chip:hover { border-color: var(--mist-faint); color: var(--mist); }
.preset-chip.is-active {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--acid-ink);
}
.preset-chip.is-active span { color: #46531c; }

.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 52px;
  padding: 0 28px;
  background: var(--acid);
  color: var(--acid-ink);
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.search-button:hover { background: var(--acid-press); }
.search-button:disabled { opacity: 0.55; cursor: wait; }

.search-button .button-arrow {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
}
.search-button .button-arrow svg { width: 18px; height: 18px; }
.search-button.is-loading .button-arrow svg { animation: spin 0.9s linear infinite; }

.form-error {
  margin-top: 12px;
  color: var(--alert);
  font-size: 0.95rem;
}

.hero-note {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--mist-faint);
}
.hero-note svg { width: 15px; height: 15px; flex: none; }

/* ---------- Court report ticker ---------- */

.court-report {
  margin-top: clamp(30px, 4vw, 48px);
  border-block: 1px solid var(--line);
  background: rgba(16, 29, 24, 0.5);
  overflow: hidden;
}

.court-report-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.court-report:hover .court-report-track { animation-play-state: paused; }

.report-set { display: flex; align-items: center; }

.report-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mist-dim);
  white-space: nowrap;
}
.report-item b { color: var(--acid); font-weight: 600; }
.report-sep { display: inline-flex; padding: 0 22px; color: var(--mist-faint); opacity: 0.7; }
.report-sep svg { width: 9px; height: 9px; }

/* ---------- Results ---------- */

.results-section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) 24px;
  scroll-margin-top: 76px;
}

.results-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.results-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.results-heading h2 em { font-style: normal; color: var(--mist); white-space: nowrap; }

.reset-button {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mist-dim);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 16px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.reset-button:hover { color: var(--acid); border-color: rgba(200, 240, 79, 0.4); }

.results-count {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--mist-dim);
}

.count-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-right: 18px;
}
.count-stat strong {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--acid);
  line-height: 1;
}
.count-stat em {
  font: 500 12px var(--font-mono);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mist-faint);
}
.checked-note { font-size: 12px; color: var(--mist-faint); }

.search-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.summary-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 13px;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.summary-pill .pill-label {
  font: 500 11px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mist-faint);
}
.summary-pill strong { font: 600 0.95rem var(--font-mono); color: var(--mist); }

.results-note {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--mist-faint);
}
.note-spark { display: inline-flex; margin-right: 7px; color: var(--mist-faint); }
.note-spark svg { width: 9px; height: 9px; }

.results-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 26px;
  margin-top: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.results-tools > div { display: flex; align-items: center; gap: 12px; }

.tools-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mist-faint);
}

.court-type-chips,
.sort-chips { display: flex; gap: 7px; flex-wrap: wrap; }

.type-chip {
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--mist-dim);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.1s ease;
}
.type-chip:hover { border-color: var(--mist-faint); color: var(--mist); }
.type-chip.is-active {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--acid-ink);
}

.venue-search-control {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  width: min(250px, 100%);
  padding: 0 13px;
  background: var(--night);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: border-color 0.15s ease;
}
.venue-search-control > svg { width: 16px; height: 16px; color: var(--mist-faint); flex: none; }

.venue-search-control input {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--mist);
  font: 500 0.92rem var(--font-body);
}
.venue-search-control input::placeholder { color: var(--mist-faint); }

.venue-search-clear {
  color: var(--mist-faint);
  font-size: 17px;
  line-height: 1;
  padding: 2px 4px;
}
.venue-search-clear:hover { color: var(--mist); }

.sort-note {
  width: 100%;
  font: 500 12.5px var(--font-mono);
  color: var(--ember);
}

/* Venue plates — the lit board */

.results-grid {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.venue-card {
  background: #0f1b16;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "band strip"
    "foot foot"
    "map map";
  gap: 10px 24px;
  transition: border-color 0.2s ease;
}
.venue-card:hover { border-color: var(--line-strong); }

.venue-band { grid-area: band; min-width: 0; }

.venue-band-id h3 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.2vw, 1.8rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

/* The Facebook mark rides the name line — an icon-only hairline circle in
   the interactive-stroke language, never a brand-blue device (one accent
   rule: no second hue on the plate). Hover lights it like the map toggle. */
.venue-name-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.venue-name-row h3 { min-width: 0; }

.venue-fb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 27px;
  height: 27px;
  /* Optical centering on the caps: Big Shoulders' measured cap band centers
     at 0.516 of the name's font-size, so the offset tracks the clamp instead
     of a fixed nudge (verified: Δ≤0.03px at 28.2px and 23.2px name sizes). */
  margin-top: calc(0.516 * clamp(1.45rem, 2.2vw, 1.8rem) - 13.5px);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--mist-dim);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.venue-fb svg { width: 9px; height: 13px; }
.venue-fb:hover { color: var(--acid); border-color: rgba(200, 240, 79, 0.4); }
.venue-fb:active { color: var(--acid); }

.venue-location {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--mist-faint);
}
.venue-location svg { width: 13px; height: 13px; flex: none; }

.venue-distance { margin-top: 4px; font: 500 12.5px var(--font-mono); color: var(--mist-dim); }

.venue-band-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 13px; }

/* Status — the light states */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font: 600 12px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-available { background: rgba(200, 240, 79, 0.12); color: var(--acid); }
.status-limited { background: rgba(240, 178, 94, 0.12); color: var(--ember); }
.status-none { background: rgba(232, 243, 226, 0.07); color: var(--mist-faint); }

.venue-type {
  font: 500 11.5px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mist-faint);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 11px;
}

.venue-rate {
  font: 600 13px var(--font-mono);
  color: var(--mist);
  background: var(--night-3);
  border-radius: 8px;
  padding: 7px 11px;
}

/* Score strip — numeral, plan, window. Unboxed: the cells sit directly on
   the plate like a scoreboard row. */
.venue-strip {
  grid-area: strip;
  align-self: center;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.venue-scorebox { text-align: center; min-width: 58px; }
.venue-scorebox strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.7rem;
  font-weight: 800;
  line-height: 0.9;
  color: var(--acid);
}
.venue-scorebox span {
  display: block;
  margin-top: 3px;
  font: 500 11px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mist-faint);
}
.venue-scorebox.is-empty strong { color: var(--mist-faint); }

.venue-plan {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-content: flex-start;
  max-width: 176px;
}
.plan-court { display: block; width: 20px; height: 28px; color: var(--mist-faint); }
.plan-court svg { display: block; width: 100%; height: 100%; }
.plan-court.is-lit {
  color: var(--acid);
  animation: glow-pulse 6s ease-in-out infinite;
}

.venue-window { min-width: 96px; }
.venue-time { display: block; font: 600 1.02rem var(--font-mono); color: var(--mist); }
.venue-date { display: block; margin-top: 2px; font: 500 11.5px var(--font-mono); color: var(--mist-faint); }

/* Foot — map + booking */

.venue-foot {
  grid-area: foot;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.map-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: 500 12px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mist-dim);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.map-toggle svg { width: 14px; height: 14px; }
.map-toggle:hover { color: var(--acid); border-color: rgba(200, 240, 79, 0.4); }

/* The swapped-in map plate takes its own full-width row in the foot. Width
   does that job, not a percentage flex-basis: the foot turns into a column
   at ≤560px, where `flex-basis: 100%` resolves against the container's
   HEIGHT — the plate would consume the whole main axis and wrap the booking
   CTA into a second flex column off the card's right edge. */
.venue-foot .venue-map { width: 100%; }

/* The map plate — iframes render non-interactive under ~200px tall,
   so the plate stays at 220px. Maps load on demand (tap "Show map")
   on every viewport: eager iframes made the results a data-burning
   scroll, and on-demand keeps every plate light. */
.venue-map { grid-area: map; }
.venue-map iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.venue-book,
.venue-book-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.venue-book { background: var(--acid); color: var(--acid-ink); }
.venue-book:hover { background: var(--acid-press); text-decoration: none; }
.venue-book-ghost {
  border: 1px solid var(--line-strong);
  color: var(--mist-dim);
}
.venue-book-ghost:hover { color: var(--mist); border-color: var(--mist-faint); text-decoration: none; }

.book-arrow svg { width: 15px; height: 15px; }

.venue-card.unavailable { background: transparent; }
.venue-card.unavailable .venue-band-id h3 { color: var(--mist-dim); }
.venue-card.unavailable .plan-court.is-lit { display: none; }
.venue-card.unavailable .venue-scorebox strong { color: var(--mist-faint); }

/* Empty states & loading */

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 54px 26px;
  text-align: center;
}
.empty-state-icon svg { width: 34px; height: 34px; color: var(--mist-faint); }
.empty-state h3 {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.empty-state p {
  margin: 10px auto 0;
  max-width: 46ch;
  font-size: 0.95rem;
  color: var(--mist-dim);
}
.empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.empty-action {
  padding: 12px 20px;
  background: var(--acid);
  color: var(--acid-ink);
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.92rem;
}
.empty-action:hover { background: var(--acid-press); }
.empty-action-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--mist-dim);
}
.empty-action-ghost:hover { background: transparent; border-color: var(--mist-faint); color: var(--mist); }

.loading-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 52px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mist-dim);
}

.hunt-board { position: relative; width: 150px; height: 80px; color: var(--mist-faint); }
.hb-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(200, 240, 79, 0.14) 48%, rgba(232, 243, 226, 0.18) 50%, rgba(200, 240, 79, 0.14) 52%, transparent 70%);
  background-size: 220% 100%;
  animation: sweep 1.4s ease-in-out infinite;
}
.hb-dot {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(200, 240, 79, 0.5);
  animation: hb-blink 1.96s ease-in-out infinite;
}
@keyframes hb-blink {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

/* ---------- How it works ---------- */

.how-it-works {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 24px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 76px;
}

.how-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px 56px;
  align-items: end;
}
.how-heading p { color: var(--mist-dim); font-size: 1.02rem; max-width: 44ch; }

.how-heading h2,
.venues-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.how-heading h2 em,
.venues-heading h2 em { font-style: normal; color: var(--mist); }

.steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  margin-top: 52px;
  align-items: start;
}

.step h3 {
  font-family: var(--font-body);
  font-size: 1.18rem;
  font-weight: 700;
  margin-top: 10px;
}
.step p { margin-top: 8px; color: var(--mist-dim); font-size: 0.95rem; max-width: 30ch; }

.step-number {
  font: 600 12px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--mist-faint);
}

.step-connector {
  align-self: center;
  width: 72px;
  height: 1px;
  background: var(--line-strong);
  margin: 0 18px 0 0;
  position: relative;
  top: -14px;
}
.step-connector::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  border-left: 7px solid var(--line-strong);
  border-block: 3.5px solid transparent;
}

.data-note {
  margin-top: 60px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.data-fact { padding: 24px 28px; }
.data-fact + .data-fact { border-left: 1px solid var(--line); }

.data-fact h3 {
  font: 600 12.5px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--mist);
}
.data-fact p { margin-top: 10px; color: var(--mist-dim); font-size: 0.93rem; }

/* ---------- Venues directory — the night sheet ---------- */

.venues-section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 24px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 76px;
}

.venues-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px 56px;
  align-items: end;
}
.venues-intro { color: var(--mist-dim); font-size: 1.02rem; max-width: 48ch; }
.venues-intro #venue-count { color: var(--mist); font-weight: 700; }

.directory-note {
  margin-top: 18px;
  font: 500 12.5px var(--font-mono);
  color: var(--mist-faint);
}

.venue-board {
  margin-top: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--night-2);
  overflow: hidden;
}

.directory-head,
.directory-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.6fr) minmax(0, 0.75fr) auto 44px;
  gap: 14px;
  align-items: center;
}

.directory-head {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  font: 500 11.5px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mist-faint);
}

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

.directory-row {
  width: 100%;
  padding: 15px 20px;
  text-align: left;
  transition: background-color 0.15s ease;
}
.directory-row:hover { background: var(--night-3); }

.board-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.board-where { font: 400 12.5px var(--font-mono); color: var(--mist-faint); }

.board-rate { font: 600 0.95rem var(--font-mono); color: var(--mist); }

.board-chevron { display: grid; place-items: center; color: var(--mist-faint); }
.board-chevron svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.directory-row[aria-expanded="true"] .board-chevron svg { transform: rotate(180deg); }

.directory-panel {
  padding: 2px 20px 20px;
}

.panel-fact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.panel-label {
  font: 500 11.5px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mist-faint);
}
.panel-value { display: flex; flex-direction: column; gap: 5px; }

.fact-line { display: flex; gap: 10px; font: 500 13.5px var(--font-mono); color: var(--mist-dim); }
.fact-line em {
  font-style: normal;
  font: 500 11px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mist-dim);
  min-width: 74px;
  padding-top: 2px;
}
.panel-meta { font: 500 12.5px var(--font-mono); color: var(--mist-faint); }
.panel-missing { font-style: italic; color: var(--mist-faint); font-size: 0.95rem; }

.venue-distance[data-distance-slot] { display: block; margin-top: 12px; font: 500 12.5px var(--font-mono); color: var(--mist-dim); }

.directory-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }

.directory-action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--mist-dim);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.directory-action:hover { border-color: var(--mist-faint); color: var(--mist); text-decoration: none; }
.directory-action.is-primary {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--acid-ink);
}
.directory-action.is-primary:hover { background: var(--acid-press); }

/* ---------- Invite / feedback ---------- */

.invite-wrap { margin-top: clamp(48px, 7vw, 76px); }

.invite-card {
  background: var(--night-2);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: clamp(26px, 4vw, 46px);
}

.invite-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.invite-copy { margin-top: 12px; max-width: 62ch; color: var(--mist-dim); font-size: 1rem; }

.invite-card form { margin-top: 26px; display: grid; gap: 16px; max-width: 620px; }

.invite-card .field-control { background: var(--night); }
.invite-card .field-control-area { height: auto; padding: 12px 14px; }
.invite-card textarea {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--mist);
  font: 400 0.98rem var(--font-body);
  resize: vertical;
  min-height: 96px;
}
.invite-card textarea::placeholder,
.field-control input::placeholder { color: var(--mist-faint); }

.optional-tag {
  font: 500 11px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mist-faint);
}

.invite-submit {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  height: 50px;
  padding: 0 24px;
  background: var(--acid);
  color: var(--acid-ink);
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background-color 0.15s ease;
}
.invite-submit:hover { background: var(--acid-press); }
.invite-submit:disabled { opacity: 0.55; cursor: wait; }
.invite-submit .button-arrow svg { width: 17px; height: 17px; }

.invite-note { font: 500 12px var(--font-mono); color: var(--mist-faint); }
.invite-status { font: 500 13.5px var(--font-mono); color: var(--acid); }

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

.site-footer { border-top: 1px solid var(--line); margin-top: 20px; }

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand { display: flex; align-items: center; gap: 11px; }
.footer-mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  background: var(--night-3);
  border-radius: 9px;
  font: 800 13px var(--font-display);
  color: var(--acid);
  letter-spacing: 0.04em;
}
.footer-brand span:last-child {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-tagline {
  font: 500 12px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--mist-faint);
}

/* ---------- Motion — authored, gated ---------- */

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 12px rgba(200, 240, 79, 0.2); }
  50% { box-shadow: 0 0 24px rgba(200, 240, 79, 0.34); }
}

@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(200, 240, 79, 0.3)); opacity: 0.92; }
  50% { filter: drop-shadow(0 0 7px rgba(200, 240, 79, 0.55)); opacity: 1; }
}

@keyframes flicker-on {
  0% { opacity: 0; }
  45% { opacity: 1; }
  55% { opacity: 0.35; }
  70% { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes sweep {
  from { background-position: 185% 0; }
  to { background-position: -85% 0; }
}

@keyframes tick {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* The floodlight sweep — THE moment. A beam crosses the results once;
   open courts flicker on in sequence. Fires on new searches only. */
.results-grid.is-sweeping::after {
  content: "";
  position: absolute;
  inset: -8px;
  pointer-events: none;
  background: linear-gradient(100deg,
    transparent 30%,
    rgba(200, 240, 79, 0.10) 44%,
    rgba(232, 243, 226, 0.16) 50%,
    rgba(200, 240, 79, 0.10) 56%,
    transparent 70%);
  background-size: 220% 100%;
  background-position: 185% 0;
  animation: sweep 1.15s ease-out both;
}

.results-grid.is-sweeping .plan-court.is-lit { animation: flicker-on 0.55s both; }
.results-grid.is-sweeping .venue-card:nth-child(1) .is-lit { animation-delay: 0.06s; }
.results-grid.is-sweeping .venue-card:nth-child(2) .is-lit { animation-delay: 0.14s; }
.results-grid.is-sweeping .venue-card:nth-child(3) .is-lit { animation-delay: 0.22s; }
.results-grid.is-sweeping .venue-card:nth-child(4) .is-lit { animation-delay: 0.3s; }
.results-grid.is-sweeping .venue-card:nth-child(5) .is-lit { animation-delay: 0.38s; }
.results-grid.is-sweeping .venue-card:nth-child(6) .is-lit { animation-delay: 0.46s; }
.results-grid.is-sweeping .venue-card:nth-child(n+7) .is-lit { animation-delay: 0.52s; }

/* ---------- Reduced motion — everything rests lit and still ---------- */

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

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

/* The desk re-flows below 1200px — as the one-row desk folded in half:
   the same six controls in a 3×2 grid of near-equal boxes, the CHECK
   COURTS button filling its column. The previous fold (four fields over
   courts + button) left the duration stepper as the desk's narrowest box
   with a dead hole beside the button. The one-row desk's honest floor is
   1074px of tracks — exactly what the 1180px container can give — so the
   row fits only once the content box clears ~1180px (≥1197px viewport
   with a scrollbar); the fold owns the band under 1200. The old 1060
   breakpoint squeezed the stepper buttons down to nothing at these
   widths — the vanish that started this fix. */
@media (max-width: 1200px) {
  .desk-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(232px, 1fr);
    grid-template-areas:
      "location date time"
      "duration courts button";
  }
  .field-location { grid-area: location; }
  .field-date { grid-area: date; }
  .field-time { grid-area: time; }
  .field-duration { grid-area: duration; }
  .field-courts { grid-area: courts; }
  .search-button { grid-area: button; }
}

@media (max-width: 1060px) {
  .how-heading,
  .venues-heading { grid-template-columns: 1fr; }
  .data-note { grid-template-columns: 1fr; }
  .data-fact + .data-fact { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 840px) {
  .header-inner { padding: 12px 18px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.88rem; }
  .nav-cta { padding: 7px 13px; }

  .hero { padding-top: 48px; }
  .hero-court { right: -80px; width: 74vw; opacity: 0.6; }

  .desk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "location location"
      "date time"
      "duration courts"
      "button button";
  }
  .search-button { width: 100%; }

  .results-heading { align-items: flex-start; flex-direction: column; }
  .results-tools { align-items: flex-start; flex-direction: column; gap: 12px; }
  .results-tools > div { flex-wrap: wrap; }

  .venue-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "band"
      "strip"
      "foot"
      "map";
  }
  .venue-strip { justify-self: stretch; }
  .venue-foot .venue-book,
  .venue-foot .venue-book-ghost { flex: 1 1 auto; justify-content: center; }

  .steps { grid-template-columns: 1fr; gap: 0; }
  .step-connector { display: none; }
  .step + .step { margin-top: 26px; }
  .step p { max-width: none; }

  .directory-head { display: none; }

  .directory-row {
    grid-template-columns: 1fr 44px;
    grid-template-areas:
      "name chevron"
      "where where"
      "rate type";
    row-gap: 7px;
  }
  .board-name { grid-area: name; }
  .board-where { grid-area: where; }
  .board-rate { grid-area: rate; }
  .directory-row .venue-type { grid-area: type; justify-self: end; }
  .board-chevron { grid-area: chevron; }

  .directory-panel .panel-fact { grid-template-columns: 1fr; }

  .invite-card form { max-width: none; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .header-inner { padding: 10px 14px; gap: 12px; }
  .brand-word { font-size: 1.02rem; white-space: nowrap; }
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 0.8rem; white-space: nowrap; }
  .nav-cta { padding: 6px 11px; }
  .field-control { padding: 0 10px; gap: 7px; }
  .field-control > svg { width: 15px; height: 15px; }
  .field-control input, .field-control select { font-size: 0.92rem; }

  .hero h1 { font-size: clamp(2.6rem, 9.6vw, 4rem); }
  .hero-copy { font-size: 1.02rem; }

  .search-desk { padding: 16px; border-radius: 16px; }
  .desk-grid { gap: 10px; }
  .field-control, .stepper { height: 48px; }
  .stepper output { font-size: 0.92rem; }
  .search-button { height: 54px; font-size: 1.3rem; padding: 0 20px; }

  .results-section, .how-it-works, .venues-section { padding-inline: 14px; }
  .venue-card { padding: 14px; }
  .venue-strip { gap: 8px 14px; }
  .venue-plan { max-width: none; }
  .venue-scorebox strong { font-size: 2.3rem; }
  .venue-foot { flex-direction: column; align-items: stretch; }
  .map-toggle { justify-content: center; }
  .venue-book, .venue-book-ghost { justify-content: center; }

  .empty-state { padding: 40px 16px; }
  .empty-state h3 { font-size: 1.4rem; }
  .loading-card { flex-direction: column; gap: 14px; }

  .directory-row { padding: 13px 14px; }
  .board-name { font-size: 1.15rem; }
  .directory-panel { padding: 2px 14px 16px; }
  .directory-links { flex-direction: column; align-items: stretch; }
  .directory-action { justify-content: center; }

  .footer-inner { padding: 22px 14px; }
}

@media (max-width: 380px) {
  .plan-court { width: 17px; height: 24px; }
  .preset-chip { padding: 8px 12px; font-size: 0.86rem; }
  .search-button { font-size: 1.15rem; letter-spacing: 0.03em; }
  .count-stat strong { font-size: 1.8rem; }
  /* Everything stacks full-width here: side-by-side steppers honestly fit
     two 140px floors down to ~362px (cols ≥ 140), so the pairs above stay
     paired; below that a squeezed row is how the −/+ icons used to vanish. */
  .desk-grid {
    grid-template-areas:
      "location location"
      "date date"
      "time time"
      "duration duration"
      "courts courts"
      "button button";
  }
}

/* Tiny phones: the header wraps to two rows — brand above, nav below.
   Below 380px the whole desk stacks full-width (see the 380px block). */
@media (max-width: 400px) {
  .header-inner { flex-wrap: wrap; row-gap: 8px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 8px; }
}
