:root {
  --ink: #141414;
  --muted: #5b6268;
  --paper: #fbfbf8;
  --panel: #ffffff;
  --line: #d9ded9;
  --teal: #008a7a;
  --red: #cf3f37;
  --yellow: #f0c808;
  --green: #2d7a3e;
  --cyan: #1f9bb4;
  --shadow: 0 18px 50px rgba(20, 20, 20, 0.14);
}

/* ── Dark mode theme ──────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --ink: #e8e8e4;
  --muted: #9aa0a6;
  --paper: #1a1a1a;
  --panel: #242424;
  --line: #333836;
  --teal: #00b89e;
  --red: #e05a52;
  --yellow: #f5d020;
  --green: #4caf50;
  --cyan: #29b6cc;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] body {
  color-scheme: dark;
}

[data-theme="dark"] .site-header.is-scrolled {
  background: rgba(26, 26, 26, 0.94);
}

[data-theme="dark"] .journey {
  background: #0d0d0d;
}

[data-theme="dark"] .journey-step {
  background: #141414;
}

[data-theme="dark"] .stack-layer,
[data-theme="dark"] .deep-dive,
[data-theme="dark"] .phase-card {
  background: var(--panel);
}

[data-theme="dark"] .tech-card {
  background: var(--paper);
}

[data-theme="dark"] .cta {
  background: var(--panel);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  color: #ffffff;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.site-header.is-scrolled {
  color: var(--ink);
  background: rgba(251, 251, 248, 0.94);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(12px);
}

.brand,
.nav-links,
.header-action,
.button {
  min-height: 42px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border: 3px solid currentColor;
  border-radius: 6px;
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--yellow);
  border-radius: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a,
.header-action {
  display: inline-flex;
  align-items: center;
}

.header-action {
  justify-self: end;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: 82svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #ffffff;
  padding: 120px clamp(20px, 5vw, 70px) 72px;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.42) 52%, rgba(0, 0, 0, 0.16)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(840px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--yellow);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
}

h1 {
  max-width: 820px;
  font-size: 6.6rem;
}

h2 {
  font-size: 4.2rem;
}

h3 {
  font-size: 1.65rem;
}

.hero-copy {
  max-width: 660px;
  margin: 24px 0 0;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions,
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.hero-actions {
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 8px;
  border: 2px solid transparent;
  font-weight: 900;
}

.button.primary {
  color: #ffffff;
  background: var(--red);
}

.button.secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.75);
}

.metrics-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.metrics-band div {
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 26px clamp(20px, 4vw, 54px);
  background: var(--panel);
}

.metrics-band strong {
  font-size: 3rem;
  line-height: 1;
}

.metrics-band span {
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: clamp(72px, 9vw, 132px) clamp(20px, 5vw, 70px);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.intro > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.28rem;
}

.section-heading {
  max-width: 900px;
  margin-bottom: clamp(30px, 6vw, 58px);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.module-card,
.phase-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(20, 20, 20, 0.04);
  overflow: hidden;
}

.module-card {
  display: grid;
  grid-template-rows: 210px 1fr;
}

.module-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.module-body {
  padding: 24px;
}

.module-kicker,
.phase-number {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 14px;
  padding: 0 10px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
}

.module-card:nth-child(2) .module-kicker,
.phase-card:nth-child(2) .phase-number {
  background: var(--red);
}

.module-card:nth-child(3) .module-kicker,
.phase-card:nth-child(3) .phase-number {
  color: var(--ink);
  background: var(--yellow);
}

.module-card:nth-child(4) .module-kicker,
.phase-card:nth-child(4) .phase-number {
  background: var(--green);
}

.module-card:nth-child(5) .module-kicker {
  background: var(--cyan);
}

.module-card h3,
.phase-card h3 {
  margin-bottom: 14px;
}

.module-card p,
.phase-card p,
.phase-card li,
.journey-step p {
  color: var(--muted);
}

.module-card p,
.phase-card p,
.journey-step p {
  margin: 0;
}

.journey {
  padding: clamp(72px, 9vw, 132px) clamp(20px, 5vw, 70px);
  color: #ffffff;
  background: #171717;
}

.journey .eyebrow {
  color: var(--yellow);
}

.journey-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(170px, 1fr));
  gap: 1px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.journey-step {
  min-height: 230px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 22px;
  background: #1f1f1f;
}

.journey-step span {
  color: var(--yellow);
  font-weight: 900;
}

.journey-step strong {
  display: block;
  font-size: 1.26rem;
}

.journey-step p {
  color: rgba(255, 255, 255, 0.68);
}

.core {
  border-bottom: 1px solid var(--line);
}

.stack-layers {
  display: grid;
  gap: 18px;
}

.stack-layer {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 24px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.layer-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 30px;
  margin-bottom: 16px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.stack-layer h3 {
  margin-bottom: 14px;
}

.stack-layer > div > p {
  margin: 0;
  color: var(--muted);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stack-layer:nth-child(3) .tech-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tech-card {
  min-height: 170px;
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.tech-card:hover,
.tech-card:focus-visible {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.tech-card:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.tech-card span,
.deep-dive span {
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tech-card strong {
  display: block;
  font-size: 1.32rem;
  line-height: 1.08;
}

.tech-card p {
  margin: 0;
  color: var(--muted);
}

.tech-deep-dives {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 42px;
}

.deep-dive {
  min-height: 260px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  scroll-margin-top: 96px;
}

.deep-dive:target {
  border-color: var(--red);
  box-shadow: var(--shadow);
}

.deep-dive h3 {
  margin: 12px 0 14px;
}

.deep-dive p {
  margin: 0;
  color: var(--muted);
}

.roadmap {
  border-bottom: 1px solid var(--line);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.phase-card {
  padding: 26px;
}

.phase-card ul {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding-left: 20px;
}

.cta {
  justify-content: space-between;
  padding: clamp(56px, 8vw, 92px) clamp(20px, 5vw, 70px);
  background: #ffffff;
}

.cta > div {
  max-width: 780px;
}

.cta .button {
  min-width: 164px;
}

@media (max-width: 1020px) {
  h1 {
    font-size: 4.8rem;
  }

  h2 {
    font-size: 3.2rem;
  }

  .module-grid,
  .tech-deep-dives,
  .roadmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stack-layer {
    grid-template-columns: 1fr;
  }

  .stack-layer:nth-child(3) .tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 64px;
  }

  .nav-links {
    display: none;
  }

  .header-action {
    padding: 0 12px;
  }

  .hero {
    min-height: 78svh;
    padding: 100px 20px 52px;
  }

  h1 {
    font-size: 3.05rem;
  }

  h2 {
    font-size: 2.45rem;
  }

  h3 {
    font-size: 1.42rem;
  }

  .hero-copy,
  .intro > p {
    font-size: 1.05rem;
  }

  .metrics-band strong {
    font-size: 2.24rem;
  }

  .metrics-band,
  .module-grid,
  .tech-grid,
  .tech-deep-dives,
  .roadmap-grid {
    grid-template-columns: 1fr;
  }

  .stack-layer:nth-child(3) .tech-grid {
    grid-template-columns: 1fr;
  }

  .metrics-band div {
    min-height: 108px;
  }

  .module-card {
    grid-template-rows: 190px 1fr;
  }

  .journey-track {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .journey-step {
    min-height: 170px;
  }

  .cta {
    align-items: flex-start;
  }

  .live-dashboard {
    grid-template-columns: 1fr;
  }
}

/* ── Accessibility: visually-hidden screen-reader text ─────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Skip-navigation link ──────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 900;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 120ms ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* ── Live Demo section ─────────────────────────────────────────────────────── */
.demo {
  border-bottom: 1px solid var(--line);
}

.demo-intro {
  margin: -20px 0 40px;
  color: var(--muted);
  font-size: 0.96rem;
}

.live-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 20px;
  margin-bottom: 40px;
}

.dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
  min-height: 360px;
  overflow: hidden;
}

.dashboard-label {
  margin: 0 0 16px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Zone cards inside the zone-grid */
.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.zone-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease;
}

.zone-card:focus-within {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.zone-card.risk-elevated { border-color: var(--yellow); }
.zone-card.risk-high     { border-color: var(--red); }
.zone-card.risk-critical { border-color: #8b0000; background: #fff5f5; }

.zone-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 10px;
}

.zone-card__name {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
}

.zone-card__badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--line);
  color: var(--muted);
}

.zone-card__badge--elevated { background: #fff4cc; color: #7a5e00; }
.zone-card__badge--high     { background: #fde8e8; color: #8b1a1a; }
.zone-card__badge--critical { background: #8b0000; color: #ffffff; }

.zone-card__bar-wrap {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  margin-bottom: 10px;
  overflow: hidden;
}

.zone-card__bar {
  height: 100%;
  background: var(--teal);
  border-radius: 3px;
  transition: width 600ms ease;
}

.risk-high .zone-card__bar,
.risk-critical .zone-card__bar {
  background: var(--red);
}

.zone-card__stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  margin: 0;
  font-size: 0.76rem;
}

.zone-card__stats dt {
  color: var(--muted);
  font-weight: 600;
}

.zone-card__stats dd {
  margin: 0;
  font-weight: 700;
}

/* Alert feed */
.alert-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.alert-feed-empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.alert-item {
  display: grid;
  grid-template-areas:
    "title ack"
    "body  ack"
    "time  ack";
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  border-left-width: 4px;
}

.alert-item--info     { border-left-color: var(--teal); }
.alert-item--warning  { border-left-color: var(--yellow); }
.alert-item--critical { border-left-color: var(--red); background: #fff5f5; }

.alert-item__title {
  grid-area: title;
  font-size: 0.86rem;
  font-weight: 700;
}

.alert-item__body {
  grid-area: body;
  font-size: 0.78rem;
  color: var(--muted);
}

.alert-item__time {
  grid-area: time;
  font-size: 0.72rem;
  color: var(--muted);
}

.alert-item__ack {
  grid-area: ack;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--teal);
  transition: background 140ms ease;
}

.alert-item__ack:hover,
.alert-item__ack:focus-visible {
  background: var(--teal);
  color: #ffffff;
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* Venue map placeholder */
.venue-map-section {
  margin-top: 8px;
}

.venue-map {
  height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #e8ede8;
}

.venue-map-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
}

.venue-map-placeholder p {
  max-width: 440px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.venue-map-placeholder code {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  background: var(--line);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── OS-level accessibility preferences ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Class applied by applyContrastPreferences() for programmatic control.
   Uses :where() to keep specificity at (0,0,0), matching the * selector
   inside the media query and avoiding cascade conflicts. */
:where(html.reduce-motion) * {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

@media (prefers-contrast: more) {
  :root {
    --ink: #000000;
    --muted: #3a3a3a;
    --paper: #ffffff;
    --line: #767676;
  }

  .zone-card,
  .alert-item,
  .tech-card {
    border-width: 2px;
  }
}

:where(html.high-contrast) {
  --ink: #000000;
  --muted: #3a3a3a;
  --paper: #ffffff;
  --line: #767676;
}

/* ── Header controls (dark toggle + action button group) ────────────────────── */
.header-controls {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: inherit;
  transition:
    background 140ms ease,
    border-color 140ms ease;
  padding: 0 10px;
  height: 42px;
  min-height: 42px;
  min-width: 122px;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.15);
}

.theme-toggle__text {
  line-height: 1;
}

.theme-toggle__track {
  position: relative;
  width: 38px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: background 140ms ease;
}

.theme-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 140ms ease;
}

.theme-toggle[aria-checked="true"] .theme-toggle__thumb {
  transform: translateX(18px);
}

[data-theme="dark"] .theme-toggle__track {
  background: rgba(255, 255, 255, 0.25);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

[data-theme="dark"] .theme-toggle:hover,
[data-theme="dark"] .theme-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

/* ── SimulatedVenueMap: Google Maps iframe + density schematic ──────────────── */
.simmap-wrapper {
  display: grid;
  grid-template-rows: 260px 1fr;
  height: 100%;
  overflow: hidden;
}

.simmap-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: var(--line);
}

.simmap-density-panel {
  border-top: 1px solid var(--line);
  padding: 8px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.simmap-density-label {
  margin: 0 0 4px;
  padding: 0 10px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Make the venue-map container taller to fit both panels */
.venue-map {
  height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #e8ede8;
}

/* ── Fan Companion page ─────────────────────────────────────────────────────── */
.fan-hero {
  padding: clamp(100px, 12vw, 160px) clamp(20px, 5vw, 70px) clamp(56px, 8vw, 80px);
  background: linear-gradient(135deg, #008a7a 0%, #005f54 100%);
  color: #ffffff;
}

.fan-hero__content {
  max-width: 780px;
}

.fan-hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  margin-bottom: 16px;
}

.fan-hero__sub {
  margin: 0;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 620px;
}

.fan-hero .eyebrow {
  color: var(--yellow);
}

.fan-section {
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 70px);
  border-bottom: 1px solid var(--line);
}

.fan-section--alt {
  background: var(--paper);
}

[data-theme="dark"] .fan-section--alt {
  background: var(--panel);
}

/* Wayfinding form */
.wayfinding-form {
  margin-bottom: 28px;
}

.wayfinding-form__label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

.wayfinding-form__row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wayfinding-form__input {
  flex: 1;
  min-width: 240px;
  padding: 0 16px;
  height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--ink);
  background: var(--panel);
  transition: border-color 140ms ease;
}

.wayfinding-form__input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 138, 122, 0.2);
}

.wayfinding-form__btn {
  height: 46px;
  white-space: nowrap;
}

.wayfinding-form__status {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 1.4em;
}

/* Map iframe */
.fan-map-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.fan-map-iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: none;
  background: var(--line);
}

.fan-map-hint {
  margin: 0;
  padding: 10px 16px;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.fan-map-link {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Fan zone grid */
.fan-zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.fan-zone-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  transition: border-color 200ms ease;
}

.fan-zone-card--elevated { border-left: 4px solid var(--yellow); }
.fan-zone-card--high     { border-left: 4px solid var(--red); }
.fan-zone-card--critical { border-left: 4px solid #8b0000; background: #fff5f5; }

[data-theme="dark"] .fan-zone-card--critical { background: #2a0a0a; }

.fan-zone-card__indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.fan-zone-card__body {
  flex: 1;
  min-width: 0;
}

.fan-zone-card__name {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.fan-zone-card__status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 8px;
}

.fan-zone-card__stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  margin: 0;
  font-size: 0.76rem;
}

.fan-zone-card__stats dt {
  color: var(--muted);
  font-weight: 600;
}

.fan-zone-card__stats dd {
  margin: 0;
  font-weight: 700;
}

@media (max-width: 760px) {
  .header-controls {
    gap: 6px;
  }

  .theme-toggle {
    min-width: auto;
    padding: 0 8px;
  }

  .theme-toggle__text {
    display: none;
  }

  .fan-map-iframe {
    height: 260px;
  }

  .fan-zone-grid {
    grid-template-columns: 1fr;
  }
}
