/* =======================================================================
   DETOUR RUN CLUB (DRC) — MASTER BRAND SYSTEM CSS
   Centralized Tokens, Navigation, Section Headers, and Component Atoms
   Ensures 100% Visual Parity Across All Digital Endpoints
   ======================================================================= */

/* Self-Hosted Production Fonts */
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/BebasNeue-Regular.woff2') format('woff2'),
       url('fonts/BebasNeue-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/JetBrainsMono-Regular.woff2') format('woff2'),
       url('fonts/JetBrainsMono-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/JetBrainsMono-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Inter-Bold.woff2') format('woff2');
}

:root {
  /* Core 70 / 20 / 10 Master Palette Tokens */
  --asphalt-950: #121214;          /* Canonical Web Canvas Background */
  --bg: #121214;                   /* Web Canvas Alias */
  --bg-asphalt: #121214;           /* Web Canvas Alias */
  --bg-deep: #121214;              /* Web Canvas Alias */
  --bg-dark: #121214;              /* Web Canvas Alias */
  --bg-primary: #121214;           /* Web Canvas Alias */
  --surface-deep: #141416;         /* Recessed Input / Code Surface */
  --night-asphalt: #1A1A1C;        /* Card & Surface Plate (Pantone Black 7 C) */
  --asphalt-900: #1A1A1C;          /* Card & Surface Plate Alias */
  --surface: #1A1A1C;              /* Card Surface */
  --surface-bg: #1A1A1C;           /* Card Surface Alias */
  --surface-card: #242428;         /* Surface Elevated Panels */
  --surface-elevated: #242428;     /* Surface Elevated Panels Alias */
  --asphalt-800: #242428;          /* Surface Elevated Panels Alias */
  --asphalt-700: #38383D;          /* Hairline Border Subtle */
  --border-color: #38383D;         /* Subtle Hairline Dividers */
  --border-subtle: #38383D;        /* Alias */
  --border: #38383D;               /* Alias */
  --surface-border: #38383D;       /* Alias */
  
  --lane-cream: #F2EFE6;           /* Primary Typographic Voice (Pantone 7527 C) */
  --fg: #F2EFE6;                   /* Alias */
  --cream: #F2EFE6;                /* Alias */
  --text-cream: #F2EFE6;           /* Alias */
  --text-primary: #F2EFE6;         /* Alias */
  
  --detour-orange: #F4581C;        /* High-Signal Active Vector Accent (Pantone 1655 C) */
  --accent: #F4581C;               /* Alias */
  --orange: #F4581C;               /* Alias */
  --accent-orange: #F4581C;        /* Alias */
  --detour-orange-glow: rgba(244, 88, 28, 0.22); /* Glow halo */
  
  --surveyor-gray: #B8BDC3;        /* Technical Data & Waypoints (Pantone Cool Gray 7 C / WCAG AA 7.2:1) */
  --steel-400: #B8BDC3;            /* High-Contrast Label Standard */
  --muted: #B8BDC3;                /* High-Contrast Accessible Muted */
  --fg-muted: #B8BDC3;             /* High-Contrast Accessible Muted */
  --text-muted: #B8BDC3;           /* High-Contrast Accessible Muted */
  --steel-500: #8E949D;            /* Secondary muted (Passes AA large/decorative) */
  --text-faint: #757B85;           /* Deep muted telemetry */
  
  --east-river-navy: #244464;      /* Secondary Maritime & Chapter Accent (Pantone 534 C) */
  --accent-secondary: #244464;     /* Secondary Accent Alias */
  --navy-accent: #244464;          /* Secondary Accent Alias */
  --tonal-binding: #2D2D31;        /* 100% Tonal Garment Seam Binding (Pantone 447 C) */
  --success-green: #10B981;        /* Status/Success Emerald */
  --alert-red: #EF4444;            /* Status/Alert Crimson */

  /* World Marathon Majors Civic Accents (Special Event Context Only) */
  --chicago-sky: #41B6E6;
  --chicago-sky-glow: rgba(65, 182, 230, 0.22);          /* Chicago Flag Sky Blue */
  --chicago-red: #E03A3E;          /* Chicago Flag Star Red */
  --finish-gold: #F59E0B;          /* Central Park / Finish Gold */
  --major-chicago-sky: #41B6E6;    /* Chicago Flag Sky Blue */
  --major-chicago-red: #E03A3E;    /* Chicago Flag Star Red */
  --major-nyc-navy: #002855;       /* NYRR Municipal Navy */
  --major-nyc-gold: #F59E0B;       /* Central Park Finish Gold */
  --major-berlin-cyan: #00A8B5;    /* Berlin Speed Cyan */
  --berlin-cyan: #00A8B5;          /* Alias */
  --major-london-navy: #0C2340;    /* Royal Thames Navy */
  --major-london-magenta: #E40046; /* TCS London Magenta */
  --london-magenta: #E40046;       /* Alias */
  --major-boston-blue: #002D72;    /* B.A.A. Royal Blue */
  --boston-blue: #002D72;          /* Alias */
  --major-boston-gold: #FFC72C;    /* B.A.A. Athletic Gold */
  --boston-gold: #FFC72C;          /* Alias */
  --major-tokyo-indigo: #1B1C4B;   /* Edo Traditional Indigo */
  --tokyo-azure: #00A0E9;          /* Tokyo Marathon Azure */
  --major-tokyo-pink: #E95295;     /* Sakura Blossom Pink */
  --major-sydney-blue: #004B87;    /* Sydney Harbour Ultramarine */
  --sydney-blue: #004B87;          /* Alias */
  --major-sydney-gold: #FFB81C;    /* Bondi Gold */
  --sydney-gold: #FFB81C;          /* Alias */

  /* Surface & Card Aliases */
  --bg-card: #1A1A1C;
  --bg-card-hover: #242428;
  --bg-elevated: #242428;

  /* Typography Font Stacks */
  --font-display: 'Bebas Neue', Impact, Teko, Oswald, -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Standard Component Radii & Heights */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius: 8px;
  --control-height: 36px;
}

/* Master Sovereign Light Theme Tokens */
[data-theme="light"] {
  --asphalt-950: #F4F1EA;
  --bg: #F4F1EA;
  --bg-deep: #EBE7DD;
  --bg-dark: #F4F1EA;
  --bg-primary: #F4F1EA;
  
  --night-asphalt: #FFFFFF;
  --asphalt-900: #FFFFFF;
  --surface: #FFFFFF;
  --surface-bg: #FFFFFF;
  --surface-card: #F8F6F0;
  --surface-elevated: #F8F6F0;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8F6F0;
  --bg-elevated: #F8F6F0;
  --asphalt-800: #F8F6F0;
  
  --asphalt-700: #D6D0C2;
  --border-color: #D6D0C2;
  --border-subtle: #E5E0D5;
  --border: #D6D0C2;
  --surface-border: #D6D0C2;
  
  --lane-cream: #1A1A1C;
  --fg: #1A1A1C;
  --text-primary: #1A1A1C;
  
  --detour-orange: #EA580C;
  --accent: #EA580C;
  --detour-orange-glow: rgba(234, 88, 12, 0.18);
  
  --surveyor-gray: #575D65;
  --steel-400: #575D65;
  --muted: #575D65;
  --fg-muted: #575D65;
  --text-muted: #575D65;
  --steel-500: #717780;
  --text-faint: #858B93;
  
  --east-river-navy: #1B365D;
  --accent-secondary: #1B365D;
  --navy-accent: #1B365D;
  --tonal-binding: #E5E0D5;
  --success-green: #059669;
  --alert-red: #DC2626;

  /* World Marathon Majors Civic Accents (Calibrated for Light Canvas) */
  --chicago-sky: #0284C7;
  --chicago-sky-glow: rgba(2, 132, 199, 0.16);
  --chicago-red: #DC2626;
  --finish-gold: #D97706;
  --major-chicago-sky: #0284C7;
  --major-chicago-red: #DC2626;
  --major-nyc-navy: #001A38;
  --major-nyc-gold: #D97706;
  --major-berlin-cyan: #08838E;
  --berlin-cyan: #08838E;
  --major-london-navy: #09182B;
  --major-london-magenta: #C2003B;
  --london-magenta: #C2003B;
  --major-boston-blue: #002259;
  --boston-blue: #002259;
  --major-boston-gold: #D49B00;
  --boston-gold: #D49B00;
  --major-tokyo-indigo: #131438;
  --tokyo-azure: #0077B6;
  --major-tokyo-pink: #D13377;
  --major-sydney-blue: #003866;
  --sydney-blue: #003866;
  --major-sydney-gold: #D99600;
}

[data-theme="light"] .top-nav {
  background: rgba(244, 241, 234, 0.94);
}

/* Master Screen Layout Atoms */
/* ---- Base document (single owner for every page that links this file) ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; -webkit-text-size-adjust: 100%; background: var(--bg-primary); }
[id] { scroll-margin-top: 130px; }
body {
  margin: 0;
  padding-bottom: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main {
  flex: 1 0 auto;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.container, main.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 56px;
  box-sizing: border-box;
}

/* =======================================================================
   1. UNIFIED STICKY TOP NAVIGATION (.top-nav)
   ======================================================================= */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 18, 20, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 60px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height); /* 36px */
  height: var(--control-height);
  min-width: var(--control-height);
  padding: 0;
  background: var(--night-asphalt);
  border: 1px solid var(--border-color);
  color: var(--lane-cream);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}

.nav-back-btn:hover {
  background: var(--surface-card);
  border-color: var(--detour-orange);
  color: var(--detour-orange);
}

.nav-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.nav-brand-lockup:hover {
  opacity: 0.85;
}

.nav-brand-lockup .brand-glyph,
.brand-glyph {
  width: 56px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}

.nav-brand-text {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.10em;
  color: var(--lane-cream);
  line-height: 1;
}

.nav-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(244, 88, 28, 0.15);
  border: 1px solid rgba(244, 88, 28, 0.4);
  color: var(--detour-orange);
  border-radius: var(--radius-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav .btn-zip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height); /* 36px */
  height: var(--control-height);
  min-width: var(--control-height);
  padding: 0;
  background: var(--night-asphalt);
  border: 1px solid var(--border-color);
  color: var(--lane-cream);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}

.top-nav .btn-zip:hover {
  background: var(--surface-card);
  border-color: var(--detour-orange);
  color: var(--detour-orange);
}

.top-nav .btn-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height); /* 36px */
  height: var(--control-height);
  min-width: var(--control-height);
  padding: 0;
  background: var(--detour-orange);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}

.top-nav .btn-print:hover {
  opacity: 0.9;
}

.top-nav .btn-zip svg,
.top-nav .btn-print svg,
.top-nav .nav-lock-btn svg,
.nav-back-btn svg {
  display: block;
  flex-shrink: 0;
}

.nav-lock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height); /* 36px */
  height: var(--control-height);
  min-width: var(--control-height);
  padding: 0;
  background: var(--night-asphalt);
  border: 1px solid var(--border-color);
  color: var(--surveyor-gray);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}

.nav-lock-btn:hover {
  background: var(--surface-card);
  border-color: var(--detour-orange);
  color: var(--detour-orange);
}

/* =======================================================================
   2. STICKY QUICK-JUMP ANCHOR PILLS (.nav-pills-bar)
   ======================================================================= */
.nav-pills-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 24px;
  background: #141416;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 60px;
  z-index: 90;
  scrollbar-width: none;
  box-sizing: border-box;
  width: 100%;
}

.nav-pills-bar::-webkit-scrollbar {
  display: none;
}

.nav-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  background: var(--night-asphalt);
  border: 1px solid var(--border-color);
  color: var(--surveyor-gray);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  cursor: pointer;
}

.nav-pill:hover,
.nav-pill.active {
  background: var(--surface-card);
  border-color: var(--detour-orange);
  color: var(--lane-cream);
}

.nav-pill.active {
  color: var(--detour-orange);
  font-weight: 700;
}

/* =======================================================================
   3. UNIFIED 2-TIER SECTION HEADER (.section-header)
   ======================================================================= */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  box-sizing: border-box;
  width: 100%;
}

.section-header-top,
.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 88, 28, 0.15);
  border: 1px solid rgba(244, 88, 28, 0.4);
  color: var(--detour-orange);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.08em;
}

.section-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  line-height: 1.15;
}

.section-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--surveyor-gray);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono) !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--surveyor-gray);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  line-height: 1.2;
}

.btn-vendor-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--detour-orange);
  color: #121214 !important;
  border: 1px solid var(--detour-orange);
  padding: 0 18px;
  height: 42px;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-vendor-primary:hover {
  background: #ff682e;
  border-color: #ff682e;
  color: #121214 !important;
  box-shadow: 0 0 14px rgba(244, 88, 28, 0.45);
  transform: translateY(-1px);
}

/* Split-Rail Section Header with Optional Actions Toolbar */
.section-header--with-actions {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.section-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Card Header Pattern (Editorial Gateway & Narrative Pages) */
.card-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--detour-orange);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.card-title {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 0.08em;
  color: var(--lane-cream);
  margin-bottom: 14px;
  line-height: 1;
}

.card-body-text {
  color: var(--surveyor-gray);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* =======================================================================
   4. CARDS & INTERACTIVE HOVER ELEVATION (Unified Standard)
   ======================================================================= */
.card,
.asset-card,
.color-card {
  background: var(--night-asphalt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-sizing: border-box;
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover,
.asset-card:hover,
.color-card:hover {
  border-color: var(--detour-orange) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

/* Stage hover zoom cue */
.asset-preview-stage {
  position: relative;
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  background: #121214;
}

.asset-preview-stage:hover::after {
  content: '🔍 CLICK TO ZOOM';
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--lane-cream);
  background: rgba(18, 18, 20, 0.90);
  border: 1px solid var(--detour-orange);
  box-shadow: 0 4px 14px rgba(244, 88, 28, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  pointer-events: none;
}

/* Stage Contrast Switcher */
.contrast-switcher {
  display: flex;
  gap: 4px;
  background: #141416;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px;
  align-items: center;
}

.contrast-btn {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.15s ease;
  padding: 0;
  box-sizing: border-box;
}

.contrast-btn:hover,
.contrast-btn.active {
  border-color: var(--detour-orange);
  transform: scale(1.1);
}

.contrast-btn.bg-asphalt { background: #1A1A1C; }
.contrast-btn.bg-obsidian { background: #121214; }
.contrast-btn.bg-cream { background: #F2EFE6; }
.contrast-btn.bg-grid { background: repeating-linear-gradient(0deg, #1A1A1C, #1A1A1C 3px, #242428 3px, #242428 4px); }
.contrast-btn.bg-photo { background: #242428; color: #FFF; }

/* Stage Themes */
.asset-preview-stage.theme-asphalt { background: #1A1A1C !important; }
.asset-preview-stage.theme-obsidian { background: #121214 !important; }
.asset-preview-stage.theme-cream { background: #F2EFE6 !important; }
.asset-preview-stage.theme-grid, .token-stage.theme-grid, .svg-stage.theme-grid {
  background-color: #161618 !important;
  background-image: linear-gradient(rgba(242, 239, 230, 0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(242, 239, 230, 0.05) 1px, transparent 1px) !important;
  background-size: 16px 16px !important;
}
.asset-preview-stage.theme-photo { background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)), url('imagery/crew-redhook-trolley.png') center 40% / cover no-repeat !important; }

/* Cheer Poster Stage (Full un-cropped view) */
.asset-preview-stage.poster-stage {
  padding: 16px;
  box-sizing: border-box;
  min-height: 240px;
  background: #0D0D0F !important;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.poster-img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  aspect-ratio: 11 / 7;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

/* Lightbox Modal Actions */
.brand-lightbox-actions .btn-card-action,
.lightbox-actions .btn-action {
  padding: 0 20px;
  height: 42px;
  font-size: 12px;
  white-space: nowrap;
  min-width: 140px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  box-sizing: border-box;
}

/* =======================================================================
   5. UNIFIED STANDALONE FOOTER (.standalone-footer)
   ======================================================================= */
footer[data-od-id="standalone-footer"],
.standalone-footer {
  border-top: 1px solid var(--border-color, #38383D);
  background: #141416;
  padding: 24px 0;
  margin-top: auto;
  width: 100%;
}

footer[data-od-id="standalone-footer"] .footer-inner,
.standalone-footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  box-sizing: border-box;
}

footer[data-od-id="standalone-footer"] .footer-left,
.standalone-footer .footer-left {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--surveyor-gray, #9DA2A8);
  letter-spacing: 0.06em;
}

footer[data-od-id="standalone-footer"] .footer-links,
.standalone-footer .footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

footer[data-od-id="standalone-footer"] .footer-links a,
footer[data-od-id="standalone-footer"] .footer-link,
.standalone-footer .footer-links a,
.standalone-footer .footer-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--surveyor-gray, #9DA2A8);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.15s ease;
}

footer[data-od-id="standalone-footer"] .footer-links a:hover,
footer[data-od-id="standalone-footer"] .footer-link:hover,
.standalone-footer .footer-links a:hover,
.standalone-footer .footer-link:hover {
  color: var(--detour-orange, #F4581C);
}

/* -----------------------------------------------------------------------
   13. MEMBER HUB 4-DOORWAY FOOTER (.member-footer)
   Applied to drop1.html, survey.html, lookbook.html
   ----------------------------------------------------------------------- */
footer[data-od-id="member-footer"],
.member-footer {
  border-top: 1px solid var(--border-subtle, #38383D);
  background: #141416;
  padding: 24px 0;
  margin-top: auto;
  width: 100%;
}

footer[data-od-id="member-footer"] .footer-inner,
.member-footer .footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  box-sizing: border-box;
}

.member-footer .footer-links,
footer[data-od-id="member-footer"] .footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.member-footer .footer-link,
footer[data-od-id="member-footer"] .footer-link {
  color: var(--surveyor-gray, #9DA2A8);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.15s ease;
}

.member-footer .footer-link:hover,
footer[data-od-id="member-footer"] .footer-link:hover {
  color: var(--lane-cream, #F2EFE6);
}

.member-footer .footer-link.active,
footer[data-od-id="member-footer"] .footer-link[style*="accent"] {
  color: var(--detour-orange, #F4581C);
}

/* -----------------------------------------------------------------------
   14. PUBLIC SITE MINIMAL FOOTER (.site-footer)
   Applied to index.html
   ----------------------------------------------------------------------- */
footer[data-od-id="site-footer"],
.site-footer {
  border-top: 1px solid var(--border-subtle, #2D2D31);
  background: #121214;
  padding: 32px 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--lane-cream, #F2EFE6);
  width: 100%;
  box-sizing: border-box;
}


/* Responsive adjustments */
@media (max-width: 960px) {
  .nav-badge {
    display: none;
  }
}
@media (max-width: 860px) {
  .top-nav {
    flex-direction: row;
    height: 60px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    box-sizing: border-box;
  }
  .nav-right {
    width: auto;
    justify-content: flex-end;
    gap: 8px;
  }
  .section-header-top {
    flex-wrap: wrap;
  }
  .section-title {
    font-size: 24px;
  }
  .section-meta {
    font-size: 11.5px;
  }
}
@media (max-width: 600px) {
  .nav-brand-text {
    display: none;
  }
  .nav-left {
    gap: 10px;
  }
  .nav-right {
    gap: 6px;
  }
  .top-nav {
    padding: 10px 12px;
  }
}

/* =======================================================================
   6. MASTER DESIGN ATOMS & INTERACTIVE PRIMITIVES
   ======================================================================= */

/* 6.1 Callouts & Monospace Inscriptions */
.callout-block {
  background: var(--surface-card, #242428);
  border: 1px solid var(--border-color, #38383D);
  border-radius: var(--radius-lg, 8px);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.callout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--detour-orange, #F4581C);
  text-transform: uppercase;
}

.callout-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--detour-orange, #F4581C);
  box-shadow: 0 0 6px rgba(244, 88, 28, 0.6);
}

.callout-text {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 13px;
  line-height: 1.5;
  color: var(--lane-cream, #F2EFE6);
  margin: 0;
}

/* 6.2 Type Specimen Header & Role Architecture */
.type-specimen-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color, #38383D);
  padding-bottom: 10px;
}

.type-role-title {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--detour-orange, #F4581C);
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.2;
}

.type-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.type-name-title {
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: 24px;
  letter-spacing: 0.08em;
  color: var(--lane-cream, #F2EFE6);
  line-height: 1;
  margin-top: 0;
  margin-bottom: 0;
}

/* 6.3 Buttons & Action Economy */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--detour-orange, #F4581C);
  color: #FFFFFF;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: var(--radius-md, 6px);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
  box-sizing: border-box;
}

.btn-primary:hover {
  background-color: #ff682e;
}

.btn-primary:focus-visible {
  outline: 2px solid var(--detour-orange, #F4581C);
  outline-offset: 2px;
}

.btn-ghost,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: transparent;
  color: var(--lane-cream, #F2EFE6);
  border: 1px solid var(--border-color, #38383D);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-md, 6px);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.btn-ghost:hover,
.btn-secondary:hover {
  border-color: var(--detour-orange, #F4581C);
  color: var(--detour-orange, #F4581C);
  background-color: rgba(244, 88, 28, 0.06);
}

.btn-utility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--night-asphalt, #1A1A1C);
  color: var(--lane-cream, #F2EFE6);
  border: 1px solid var(--border-color, #38383D);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.06em;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.btn-utility:hover {
  border-color: var(--detour-orange, #F4581C);
  color: var(--detour-orange, #F4581C);
}

button:disabled,
.btn-disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* 6.3 Tabs & Segmented Switchers */
.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--night-asphalt, #1A1A1C);
  border: 1px solid var(--border-color, #38383D);
  border-radius: var(--radius-lg, 8px);
  padding: 4px;
  box-sizing: border-box;
}

.tab-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  background: transparent;
  color: var(--surveyor-gray, #9DA2A8);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
  border-radius: var(--radius-md, 6px);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  text-transform: uppercase;
}

.tab-pill:hover {
  color: var(--lane-cream, #F2EFE6);
}

.tab-pill.active {
  background: var(--surface-card, #242428);
  color: var(--lane-cream, #F2EFE6);
  border-color: rgba(244, 88, 28, 0.4);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* 6.4 Links & Anchors */
.inline-link {
  color: var(--lane-cream, #F2EFE6);
  text-decoration: underline;
  text-decoration-color: var(--surveyor-gray, #9DA2A8);
  text-underline-offset: 3px;
  transition: all 0.15s ease;
}

.inline-link:hover {
  color: var(--detour-orange, #F4581C);
  text-decoration-color: var(--detour-orange, #F4581C);
}

:focus-visible {
  outline: 2px solid var(--detour-orange, #F4581C) !important;
  outline-offset: 2px !important;
}

/* 6.5 Dates, Timestamps & Countdown Badges */
.date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface-card, #242428);
  border: 1px solid var(--border-color, #38383D);
  border-radius: var(--radius-md, 6px);
  width: 54px;
  height: 54px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.date-badge-month {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--detour-orange, #F4581C);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 2px;
}

.date-badge-day {
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: 24px;
  color: var(--lane-cream, #F2EFE6);
  line-height: 1;
}

.timestamp-mono {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--surveyor-gray, #9DA2A8);
  text-transform: uppercase;
}

/* 6.6 Waypoints, Locations & GPS Chips */
.waypoint-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--night-asphalt, #1A1A1C);
  border: 1px solid var(--border-color, #38383D);
  border-radius: var(--radius-sm, 4px);
  padding: 4px 10px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--lane-cream, #F2EFE6);
  text-transform: uppercase;
  box-sizing: border-box;
}

.waypoint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--detour-orange, #F4581C);
}

.mile-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(244, 88, 28, 0.12);
  border: 1px solid rgba(244, 88, 28, 0.35);
  color: var(--detour-orange, #F4581C);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: var(--radius-sm, 4px);
}

/* 6.7 Form Controls & Dropdowns */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.input-label {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--lane-cream, #F2EFE6);
  text-transform: uppercase;
}

.input-helper {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 12px;
  color: var(--surveyor-gray, #9DA2A8);
}

.input-error {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  color: #EF4444;
  letter-spacing: 0.06em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 48px;
  background-color: var(--night-asphalt, #1A1A1C);
  border: 1px solid var(--border-color, #38383D);
  border-radius: var(--radius-md, 6px);
  padding: 0 16px;
  color: var(--lane-cream, #F2EFE6);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 15px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  color-scheme: dark;
}

.form-input.compact,
.form-select.compact {
  height: 36px;
  font-size: 13px;
  padding: 0 12px;
}

.form-textarea {
  height: auto;
  min-height: 96px;
  padding: 12px 16px;
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--detour-orange, #F4581C);
  outline: none;
  box-shadow: 0 0 0 2px rgba(244, 88, 28, 0.18);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%239DA2A8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* 6.8 Stat & Metric KPI Tiles */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  width: 100%;
}

.stat-tile {
  background: var(--surface-card, #242428);
  border: 1px solid var(--border-color, #38383D);
  border-radius: var(--radius-lg, 8px);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
}

.stat-label {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--surveyor-gray, #9DA2A8);
  text-transform: uppercase;
}

.stat-value {
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: 38px;
  color: var(--lane-cream, #F2EFE6);
  line-height: 1;
}

.stat-subtext {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11.5px;
  color: var(--detour-orange, #F4581C);
  letter-spacing: 0.06em;
}

/* 6.9 Status Badges & Pills */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: var(--radius-sm, 4px);
  text-transform: uppercase;
}

.badge-status.active {
  background: rgba(244, 88, 28, 0.15);
  border: 1px solid var(--detour-orange, #F4581C);
  color: var(--detour-orange, #F4581C);
}

.badge-status.demand {
  background: rgba(157, 162, 168, 0.10);
  border: 1px solid var(--border-color, #38383D);
  color: var(--surveyor-gray, #9DA2A8);
}

.badge-status.founder {
  background: var(--night-asphalt, #1A1A1C);
  border: 1px solid var(--detour-orange, #F4581C);
  color: var(--lane-cream, #F2EFE6);
}

/* 6.10 Data Spec Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color, #38383D);
  border-radius: var(--radius-md, 6px);
  background: var(--night-asphalt, #1A1A1C);
  box-sizing: border-box;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.spec-table th {
  background: var(--surface-card, #242428);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--surveyor-gray, #9DA2A8);
  text-transform: uppercase;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color, #38383D);
  white-space: nowrap;
}

.spec-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(56, 56, 61, 0.6);
  color: var(--lane-cream, #F2EFE6);
  font-family: var(--font-body, 'Inter', sans-serif);
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table td.mono {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  letter-spacing: 0.04em;
}

/* 6.11 Toast Notifications */
.toast-notification {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(26, 26, 28, 0.96);
  border: 1px solid var(--detour-orange, #F4581C);
  backdrop-filter: blur(8px);
  padding: 10px 18px;
  border-radius: var(--radius-md, 6px);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  color: var(--lane-cream, #F2EFE6);
  letter-spacing: 0.06em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* 6.12 Accordions / Disclosure */
.accordion-item {
  border: 1px solid var(--border-color, #38383D);
  border-radius: var(--radius-md, 6px);
  background: var(--surface-card, #242428);
  margin-bottom: 8px;
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: transparent;
  border: none;
  color: var(--lane-cream, #F2EFE6);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-align: left;
}

.accordion-panel {
  padding: 0 18px 16px 18px;
  color: var(--surveyor-gray, #9DA2A8);
  font-size: 14px;
  line-height: 1.55;
}

/* =======================================================================
   7. TOUCH TARGET ACCESSIBILITY EXPANSION (WCAG 2.2 / Apple HIG 44px+)
   Preserves compact 36x36px visual geometry on desktop while expanding
   the physical tap hit-box to 44x44px min on coarse pointer (touch) devices.
   ======================================================================= */
@media (pointer: coarse) {
  .nav-back-btn,
  .top-nav .btn-zip,
  .top-nav .btn-print,
  .nav-lock-btn,
  .btn-lock,
  .btn-print,
  .theme-toggle-btn,
  .unit-toggle-btn,
  .nav-pill,
  .modal-close,
  .kit-lightbox-close,
  .brand-lightbox-close,
  .lightbox-close {
    position: relative;
  }

  .nav-back-btn::after,
  .top-nav .btn-zip::after,
  .top-nav .btn-print::after,
  .nav-lock-btn::after,
  .btn-lock::after,
  .btn-print::after,
  .theme-toggle-btn::after,
  .unit-toggle-btn::after,
  .modal-close::after,
  .kit-lightbox-close::after,
  .brand-lightbox-close::after,
  .lightbox-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 44px;
    min-height: 44px;
    width: max(100%, 44px);
    height: max(100%, 44px);
    pointer-events: auto;
  }
}

/* =======================================================================
   8. SYSTEM PRINT STYLESHEET (@media print)
   Standardized print formatting across Detour Run Club system pages.
   ======================================================================= */
@media print {
  @page {
    size: letter portrait;
    margin: 0.45in 0.45in 0.50in 0.45in;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background-color: #121214 !important;
    color: #F2EFE6 !important;
  }

  .top-nav,
  .nav-pills-bar,
  .standalone-footer,
  .gate-overlay,
  .brand-lightbox-modal,
  .kit-lightbox-modal,
  .btn-action,
  .btn-zip,
  .btn-print,
  .nav-lock-btn {
    display: none !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .card,
  .stage,
  .section-header {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
}

/* =======================================================================
   9. CANONICAL UNIT PREFERENCE SWITCHERS (.unit-toggle-group & .unit-segment-control)
   Standardized athletic telemetry toggles with decoupled Distance (MI / KM)
   and Temperature (°F / °C) controls and 44px touch target ergonomics.
   ======================================================================= */
.unit-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.unit-segment-control {
  display: inline-flex;
  align-items: center;
  background: var(--night-asphalt);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
  box-sizing: border-box;
  height: 32px;
}

.unit-segment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--surveyor-gray);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
  height: 100%;
  box-sizing: border-box;
}

.unit-segment-btn:hover {
  color: var(--lane-cream);
  background: rgba(255, 255, 255, 0.06);
}

.unit-segment-btn.active {
  background: var(--detour-orange);
  color: #fff;
  border-color: var(--detour-orange);
  box-shadow: 0 1px 4px rgba(244, 88, 28, 0.3);
}

.unit-segment-btn:focus-visible {
  outline: 2px solid var(--detour-orange);
  outline-offset: 1px;
}

@media (pointer: coarse) {
  .unit-segment-btn {
    position: relative;
    min-width: 28px;
  }
  .unit-segment-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 44px;
    min-height: 44px;
    width: max(100%, 44px);
    height: max(100%, 44px);
  }
}

/* Legacy single-button unit toggle support */
.unit-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--night-asphalt);
  border: 1px solid var(--border-color);
  color: var(--lane-cream);
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
  box-sizing: border-box;
}

.unit-toggle-btn:hover {
  background: var(--surface-card);
  border-color: var(--detour-orange);
  color: var(--detour-orange);
}

.unit-toggle-btn:focus-visible {
  outline: 2px solid var(--detour-orange);
  outline-offset: 2px;
}

/* =======================================================================
   10. HORIZONTAL SCROLL AFFORDANCE & TOPOGRAPHY VIEWPORT CONTAINER
   Eliminates flexbox width blowouts and provides explicit edge fade indicators
   ======================================================================= */
.hero-elevation-scroll-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.hero-elevation-track-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
  padding-bottom: 4px;
}

.elevation-scroll-indicator {
  position: absolute;
  top: 0;
  bottom: 8px;
  width: 68px;
  display: none;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  transition: opacity 0.25s ease;
  z-index: 5;
  pointer-events: none;
  box-sizing: border-box;
}

.elevation-scroll-indicator.right {
  right: 0;
  background: linear-gradient(to right, transparent, rgba(18, 18, 20, 0.94) 80%);
}

.elevation-scroll-indicator.left {
  left: 0;
  justify-content: flex-start;
  padding-left: 6px;
  background: linear-gradient(to left, transparent, rgba(18, 18, 20, 0.94) 80%);
}

.elevation-scroll-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(26, 26, 28, 0.92);
  border: 1px solid var(--detour-orange);
  border-radius: 6px;
  padding: 4px 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 12px rgba(244, 88, 28, 0.25);
  pointer-events: auto;
  cursor: pointer;
  animation: elevationHintBounce 1.8s infinite ease-in-out;
}

.elevation-scroll-badge .scroll-arrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--detour-orange);
  line-height: 1;
}

.elevation-scroll-badge .scroll-text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--lane-cream);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes elevationHintBounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

@media (max-width: 820px) {
  .elevation-scroll-indicator {
    display: flex;
  }
}

/* =======================================================================
   12. PASSCODE GATE OVERLAY & DIALOG SUBSYSTEM (.gate-overlay)
   ======================================================================= */
.gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 20, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gate-overlay.unlocked {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-card {
  background: var(--surface-bg, #1A1A1C);
  border: 1px solid var(--border-color, #38383D);
  border-radius: var(--radius-lg, 12px);
  padding: 44px 36px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.gate-logo {
  display: block;
  margin: 0 auto 16px;
  overflow: visible;
}

.gate-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--detour-orange, #F4581C);
  background: rgba(244, 88, 28, 0.12);
  border: 1px solid rgba(244, 88, 28, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.gate-title {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.08em;
  color: var(--lane-cream, #F2EFE6);
  margin-bottom: 8px;
}

.gate-desc {
  font-size: 14.5px;
  color: var(--text-muted, #9DA2A8);
  margin-bottom: 24px;
  line-height: 1.5;
}

.gate-desc code {
  font-family: var(--font-mono);
  color: var(--detour-orange, #F4581C);
  background: var(--surface-card, #242428);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gate-input {
  background: var(--asphalt-950, #121214);
  border: 1px solid var(--border-color, #38383D);
  border-radius: var(--radius-sm, 6px);
  padding: 14px 16px;
  color: var(--lane-cream, #F2EFE6);
  font-family: var(--font-mono);
  font-size: 16px;
  text-align: center;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.2s;
}

.gate-input:focus {
  border-color: var(--detour-orange, #F4581C);
}

.gate-btn {
  background: var(--detour-orange, #F4581C);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm, 6px);
  padding: 14px;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.10em;
  cursor: pointer;
  transition: background 0.15s ease;
}

.gate-btn:hover {
  background: #D94610;
}

.gate-guest-btn {
  background: transparent;
  color: var(--text-muted, #9DA2A8);
  border: 1px solid var(--border-color, #38383D);
  border-radius: var(--radius-sm, 6px);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
  transition: all 0.15s ease;
}

.gate-guest-btn:hover {
  border-color: var(--detour-orange, #F4581C);
  color: var(--lane-cream, #F2EFE6);
  background: rgba(244, 88, 28, 0.06);
}

.gate-error {
  color: #EF4444;
  font-size: 12.5px;
  font-family: var(--font-mono);
  margin-top: 8px;
  display: none;
}

.gate-field-group {
  text-align: left;
}

.gate-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted, #9DA2A8);
  margin-bottom: 6px;
}

.gate-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted, #9DA2A8);
  letter-spacing: 0.06em;
  margin-top: 16px;
}

.gate-input.shake {
  animation: gateShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  border-color: var(--detour-orange, #F4581C);
}

@keyframes gateShake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.roster-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  justify-content: center;
}

.roster-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  background: var(--bg-canvas, #121214);
  border: 1px solid var(--border-color, #38383D);
  color: var(--text-muted, #9DA2A8);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.roster-chip:hover, .roster-chip.active {
  border-color: var(--detour-orange, #F4581C);
  color: var(--lane-cream, #F2EFE6);
  background: rgba(244, 88, 28, 0.15);
}

body.locked-scroll {
  overflow: hidden;
}

/* =======================================================================
   13. AMBIENT TELEMETRY BAR (.telemetry-bar)
   ======================================================================= */
.telemetry-bar {
  background-color: var(--surface-card, #242428);
  border-bottom: 1px solid var(--border-color, #38383D);
  padding: 9px 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--surveyor-gray, #9DA2A8);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.telemetry-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lane-cream, #F2EFE6);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.telemetry-status:hover,
.telemetry-status:focus-visible {
  color: var(--detour-orange, #F4581C);
  outline: none;
}

.telemetry-provenance {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--surveyor-gray, #9DA2A8);
  letter-spacing: 0.08em;
}

.telemetry-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--detour-orange, #F4581C);
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
  display: inline-block;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulseGreen 2s infinite ease-in-out;
}

@keyframes pulseGreen {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.65; }
}

@media (max-width: 640px) {
  .telemetry-bar {
    padding: 6px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .telemetry-status {
    font-size: 11px;
  }
  .telemetry-provenance {
    font-size: 11px;
  }
}

/* ==========================================================================
   SHARED SEGMENTED TAB BAND (Cate = reference spec; used by chicago + cate)
   Sticky full-width band under the header. Tabs scroll horizontally on small
   screens; --fill modifier makes a 3-tab bar share the width equally.
   Set --seg-sticky-top on the page to match its sticky header height.
   ========================================================================== */
.is-hidden { display: none !important; }
.segmented-nav-wrap {
  background: var(--surface, #1A1A1C);
  border-top: 1px solid var(--border-subtle, #38383D);
  border-bottom: 2px solid var(--border-color, #38383D);
  position: sticky;
  top: var(--seg-sticky-top, 59px);
  z-index: 95;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px 0;
}
.segmented-bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.segmented-bar::-webkit-scrollbar { display: none; width: 0; height: 0; }
@media (min-width: 860px) { .segmented-bar { overflow-x: visible; } }
.seg-tab {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 9px 15px;
  min-height: 36px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.seg-tab:hover { color: var(--text-primary); border-color: var(--text-muted); background: var(--bg-elevated); }
.seg-tab.active {
  background: var(--detour-orange);
  border-color: var(--detour-orange);
  color: #FFFFFF;
  box-shadow: 0 0 14px rgba(244, 88, 28, 0.45);
}
.seg-tab:focus-visible { outline: 2px solid var(--chicago-sky, #41B6E6); outline-offset: 2px; }
.segmented-bar--fill .seg-tab { flex: 1 1 0; justify-content: center; }
@media (max-width: 560px) {
  .seg-tab { font-size: 11px; padding: 7px 11px; }
  .segmented-bar--fill { gap: 6px; padding: 0 12px; }
  .segmented-bar--fill .seg-tab { padding: 7px 6px; letter-spacing: 0.02em; }
  .segmented-bar--fill .seg-num { display: none; }
}


/* ==========================================================================
   14. SHARED RAILS (lifted from chicago-hub.css — one top bar, hero, telemetry strip and
   theme toggle for every race-week page. Page CSS must not redefine these.
   ========================================================================== */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 12px;
  }

  .brand-home-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 0.08em;
    flex-shrink: 0;
  }

  .theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
    box-sizing: border-box;
  }

  .theme-toggle-btn:hover {
    border-color: var(--detour-orange);
    color: var(--detour-orange);
  }

  @media (pointer: coarse) {
    .theme-toggle-btn {
      position: relative;
    }
    .theme-toggle-btn::after {
      content: "";
      position: absolute;
      inset: -6px -6px;
    }}

  .hero-telemetry-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
  }

  .hero-telemetry-pills {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  @media (max-width: 960px) {
    .top-bar {
      padding: 10px 16px;
      gap: 10px;
    }
    .hero-telemetry-row {
      flex-direction: column;
      align-items: flex-start;
      text-align: left;
      gap: 8px;
    }
    .hero-telemetry-pills {
      flex-direction: column;
      align-items: flex-start;
      width: 100%;
      gap: 8px;
    }}

  @media (max-width: 640px) {
    .top-bar {
      padding: 8px 12px;
      gap: 8px;
    }
    .brand-home-link span {
      display: none;
    }
    .brand-home-link svg {
      width: 30px;
      height: 14px;
    }
    .theme-toggle-btn {
      height: 30px;
      padding: 0 10px;
      font-size: 11px;
      gap: 4px;
      flex-shrink: 0;
      white-space: nowrap;
    }
    .hero-weather-pill,
    .hero-countdown-pill {
      font-size: 11px;
      padding: 5px 11px;
      gap: 6px;
      max-width: 100%;
    }}

  @media (max-width: 380px) {
    .top-bar {
      padding: 6px 8px;
      gap: 6px;
    }
    .theme-toggle-btn {
      padding: 0 8px;
      font-size: 11px;
      letter-spacing: 0.02em;
    }}

  .brand-hero {
    background: radial-gradient(ellipse 520px 260px at calc(100% - 140px) 150px, var(--chicago-sky-glow), transparent 70%), var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 36px 16px 28px;
    position: relative;
    overflow: hidden;
  }

  .brand-hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--chicago-sky) 0%, var(--chicago-sky) 30%, var(--detour-orange) 50%, var(--chicago-red) 70%, var(--chicago-sky) 100%);
  }

  /* HERO COUNTDOWN & WEATHER PILLS */
  .hero-countdown-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(244, 88, 28, 0.12);
    border: 1px solid rgba(244, 88, 28, 0.35);
    border-radius: 20px;
    padding: 5px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--detour-orange);
    letter-spacing: 0.08em;
  }

  .hero-weather-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(65, 182, 230, 0.12);
    border: 1px solid rgba(65, 182, 230, 0.35);
    border-radius: 20px;
    padding: 5px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--chicago-sky);
    letter-spacing: 0.06em;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
  }
  .hero-weather-pill:hover {
    background: rgba(65, 182, 230, 0.22);
    border-color: var(--chicago-sky);
    box-shadow: 0 0 14px rgba(65, 182, 230, 0.30);
    transform: translateY(-1px);
  }

  .weather-pulse-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    min-height: 8px;
    max-width: 8px;
    max-height: 8px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    display: inline-block;
    border-radius: 50%;
    background: var(--chicago-sky);
    box-shadow: 0 0 8px var(--chicago-sky);
    animation: weatherPulse 2.2s infinite ease-in-out;
  }

  @keyframes weatherPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
  }

  .countdown-pulse-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    min-height: 8px;
    max-width: 8px;
    max-height: 8px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    display: inline-block;
    border-radius: 50%;
    background: var(--detour-orange);
    box-shadow: 0 0 8px var(--detour-orange);
    animation: countdownPulse 1.8s infinite ease-in-out;
  }

  @keyframes countdownPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
  }

  /* DUAL-ANCHOR HERO MASTHEAD */
  .hero-masthead-dual-lockup {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: nowrap;
  }

  .hero-masthead-lockup {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
  }
  .hero-masthead-svg-box {
    flex-shrink: 0;
    width: 124px;
  }
  .hero-masthead-svg-box svg {
    width: 100%;
    height: auto;
    display: block;
  }
  .hero-masthead-headings {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
  }

  .hero-masthead-svg-box {
    filter: drop-shadow(0 6px 20px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 140px;
    height: 60px;
  }

  .hero-masthead-svg-box svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  .hero-masthead-svg-box:hover {
    transform: scale(1.03);
  }

  .hero-masthead-headings {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
  }

  .hero-masthead-sub {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .hero-masthead-crest-anchor {
    filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.7));
    transition: transform 0.3s ease, filter 0.3s ease;
    flex-shrink: 0;
  }

  .hero-masthead-crest-anchor:hover {
    transform: scale(1.05);
  }

  .hero-masthead-crest-anchor img {
    width: 124px;
    height: 124px;
    display: block;
  }

  @media (max-width: 960px) {
    .hero-masthead-dual-lockup {
      gap: 14px;
      flex-wrap: nowrap;
    }
    .hero-masthead-lockup {
      gap: 14px;
      min-width: 0;
      flex: 1;
      flex-wrap: nowrap;
    }
    .hero-masthead-svg-box {
      width: 96px;
      height: 42px;
      flex-shrink: 0;
    }
    .hero-title {
      font-size: 32px;
      line-height: 1.05;
    }
    .hero-masthead-sub {
      font-size: 11px;
      line-height: 1.3;
    }
    .hero-masthead-crest-anchor {
      flex-shrink: 0;
    }
    .hero-masthead-crest-anchor img {
      width: 96px;
      height: 96px;
    }}

  @media (max-width: 680px) {
    .hero-telemetry-row {
      align-items: center;
      text-align: center;
      gap: 8px;
    }
    .hero-telemetry-pills {
      align-items: center;
    }
    .hero-masthead-dual-lockup {
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 16px;
    }
    .hero-masthead-lockup {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }
    .hero-masthead-headings {
      align-items: center;
    }
    .hero-masthead-crest-anchor {
      align-self: center;
    }
    .hero-desc {
      text-align: center;
      margin-left: auto;
      margin-right: auto;
    }}

  .badge-hybrid {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
  }

  .badge-hybrid .stars {
    color: var(--chicago-red);
    font-size: 13px;
    letter-spacing: 2px;
  }

  .badge-hybrid .label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--chicago-sky);
    text-transform: uppercase;
  }

  .hero-title {
    font-family: var(--font-display);
    font-size: 44px;
    letter-spacing: 0.04em;
    line-height: 1.0;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 10px;
  }

  @media (max-width: 640px) {
    .hero-title { font-size: 34px; }}

  .hero-desc {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 680px;
    margin-bottom: 20px;
  }


  /* Telemetry Live Vitals 4-Tile Strip (Matching Cate.html Architecture) */
  .telemetry-strip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  }
  .telemetry-tile {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .telemetry-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
  }
  .telemetry-val {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.35;
    word-break: break-word;
  }
  .telemetry-val.highlight { color: var(--chicago-sky); }
  .telemetry-val.orange { color: var(--detour-orange); }
  .telemetry-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.35;
    word-break: break-word;
  }
  @media (max-width: 860px) {
    .telemetry-strip {
      grid-template-columns: repeat(2, 1fr);
    }}
  @media (max-width: 520px) {
    .telemetry-strip {
      grid-template-columns: 1fr;
      gap: 10px;
    }}


/* ==========================================================================
   15. HERO, HEADINGS & ACTION CONTRACT (Detour chassis × Chicago civic accents)
   Precedent: Detour owns canvas, type, orange; Chicago contributes sky/red/gold
   as STATUS colours only (DESIGN_SYSTEM_RULES §2.2, §8.1, §9.6).
   ========================================================================== */

/* -- Page switcher in the top bar (Athlete | Spectator) -- */
.top-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.page-switch { display: inline-flex; border: 1px solid var(--border-color); border-radius: 999px; padding: 2px; background: var(--bg-primary); }
.page-switch-link {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--text-muted); text-decoration: none; padding: 0 12px; height: 28px;
  display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid transparent;
  transition: color .15s ease, background .15s ease;
}
.page-switch-link:hover { color: var(--text-primary); background: var(--bg-elevated); }
.page-switch-link.is-active { color: var(--text-primary); background: var(--bg-elevated); border-color: var(--detour-orange); }
.page-switch-link:focus-visible, .theme-toggle-btn:focus-visible { outline: 2px solid var(--chicago-sky); outline-offset: 2px; }
.brand-home-glyph { flex-shrink: 0; }

/* -- Theme toggle: SVG moon/sun, label from #themeModeText -- */
.theme-toggle-btn .theme-ico { flex-shrink: 0; }
.theme-toggle-btn .theme-ico--sun { display: none; }
[data-theme="light"] .theme-toggle-btn .theme-ico--sun { display: block; }
[data-theme="light"] .theme-toggle-btn .theme-ico--moon { display: none; }
@media (max-width: 640px) {
  .page-switch-link { padding: 0 9px; font-size: 11px; letter-spacing: 0.04em; }
  .top-bar--shared .brand-home-link span { display: none; }
  .top-bar--shared .unit-toggle-group { display: none; }
}

/* -- Heading scale: Bebas on H1/H2 only, one colour (§4, §8.1) -- */
h1, h2 { font-family: var(--font-display); font-weight: 400; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.15; }
h1 { font-size: clamp(32px, 4.4vw, 44px); }
h2 { font-size: 28px; }
h3, h4 { font-family: var(--font-body); font-weight: 600; font-size: 16px; line-height: 1.3; letter-spacing: 0; text-transform: none; color: var(--text-primary); }
h4 { font-size: 14px; }
@media (max-width: 640px) { h2 { font-size: 24px; } }

/* -- Action contract (§8.3): ONE solid orange primary per view, obsidian text.
      Toggles, chips, tabs and filters show "active" with an orange outline + cream text. -- */
.btn-primary, .nav-btn.primary, .btn-itinerary-action.primary, .btn-rsvp-action.primary,
.btn-pacing-action.primary, .btn-squad-action.primary, .badge-btn.primary, .btn-gcal-import {
  background: var(--detour-orange); border-color: var(--detour-orange); color: #121214;
}
.btn-primary:hover, .btn-itinerary-action.primary:hover, .btn-rsvp-action.primary:hover,
.btn-pacing-action.primary:hover, .btn-squad-action.primary:hover, .badge-btn.primary:hover, .btn-gcal-import:hover {
  background: #ff7a3d; border-color: #ff7a3d; color: #121214;
}
.unit-segment-btn.active, .view-toggle-btn.active, .pill.active, .pill.pill-team.active, .pill.pill-itinerary.active,
.pill.pill-essential.active, .btn-attend.active, .variant-toggle-btn.active, .strategy-sub-btn.active,
.dmr-btn-pill.active, .dmr-btn-pill.active.orange, .btn-squad-toggle.active.going, .wf-view-btn.active, .station-pill.active {
  background: rgba(244, 88, 28, 0.14) !important; color: var(--text-primary) !important;
  border-color: var(--detour-orange) !important; box-shadow: inset 0 -2px 0 var(--detour-orange) !important;
}
.seg-tab.active {
  background: var(--bg-elevated); color: var(--text-primary); border-color: var(--detour-orange);
  box-shadow: inset 0 -3px 0 var(--detour-orange);
}
[data-theme="light"] .seg-tab {
  background: #FFFFFF;
  border-color: #D6D0C2;
  color: #575D65;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
[data-theme="light"] .seg-tab:hover {
  color: #1A1A1C;
  border-color: #9DA2A8;
  background: #F8F6F0;
}
[data-theme="light"] .seg-tab.active {
  background: #FFFFFF;
  color: var(--detour-orange);
  border-color: var(--detour-orange);
  box-shadow: inset 0 -3px 0 var(--detour-orange), 0 2px 8px rgba(234, 88, 12, 0.15);
}
[data-theme="light"] .btn-action,
[data-theme="light"] .btn-splits-jump {
  background: #FFFFFF;
  border-color: #D6D0C2;
  color: #1A1A1C;
}
[data-theme="light"] .btn-action:hover,
[data-theme="light"] .btn-splits-jump:hover {
  border-color: var(--detour-orange);
  background: rgba(234, 88, 12, 0.08);
  color: var(--detour-orange);
}
[data-theme="light"] .btn-primary, [data-theme="light"] .btn-itinerary-action.primary { color: #121214; }

.gcal-modal-title { font-family: var(--font-display); font-size: 24px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 400; }

/* ==========================================================================
   16. TYPE FLOOR (Detour: readable content >= 14px; mono labels >= 11px; nothing smaller)
   Reference: DESIGN_SYSTEM_RULES §4 body text 15–16px, §8.2 mono labels 10.5–12.5px.
   Race-weekend phone use (sun, sweat, one thumb) is the reason for the floor.
   ========================================================================== */
.perks, .perks div, .event-info .meta, .event-info .meta span, .event-info .meta a,
.meta-col, .meta-col span, .loc-name, .loc-pin, .rsvp-loc-link, .contact-hotel, .hwp-detail-line,
.step-content p, .tactic-card p, .tactile-info strong, .tactile-info span, .stn-transit-pill,
.col-checkpoint, .col-location, .t-strong, .t-muted-xs, .t-muted-xs2, .expo-rule-item strong, .expo-rule-item {
  font-size: 14px; line-height: 1.5;
}
.perks-pill, .cat-pill { font-size: 11px; }
.event-info .v, .event-info .v a { font-size: 14px; }
.perks a, .perks-a-1 { color: var(--detour-orange); text-decoration: underline; text-underline-offset: 3px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em; }
.perks a:hover, .perks-a-1:hover { color: var(--detour-orange-bright, #ff7a3d); }

/* -- Inline SVG icons (replace emoji in UI; DESIGN_SYSTEM_RULES §8.3) -- */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1em; height: 1em; vertical-align: -0.14em; flex-shrink: 0; }
.ico--lg { width: 28px; height: 28px; color: var(--text-muted); }

:root { --seg-sticky-top: 59px; }
@media (max-width: 960px) { :root { --seg-sticky-top: 55px; } }
@media (max-width: 680px) { :root { --seg-sticky-top: 51px; } }

/* ==========================================================================
   17. PHONE HERO (<=640px): the first tab must land inside the first screen.
   Keep: weather + countdown, title, crest (small), 4 vitals. Defer: long intro
   paragraph, chapter label, route-glyph tagline (still on desktop).
   ========================================================================== */
@media (max-width: 640px) {
  .brand-hero { padding: 16px 14px 14px; }
  .brand-hero .hero-telemetry-row { margin-bottom: 10px; gap: 6px; }
  .brand-hero .badge-hybrid { display: none; }
  .brand-hero .hero-telemetry-pills { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
  .brand-hero .hero-weather-pill, .brand-hero .hero-countdown-pill { padding: 4px 10px; font-size: 11px; gap: 6px; flex: 1 1 auto; justify-content: center; }
  .brand-hero .pill-hl, .brand-hero .pill-date, .brand-hero .pill-kit { display: none; }
  .brand-hero .hero-masthead-dual-lockup { flex-direction: row; align-items: center; text-align: left; gap: 12px; margin-bottom: 12px; padding-bottom: 12px; }
  .brand-hero .hero-masthead-lockup { flex-direction: row; gap: 10px; align-items: center; }
  .brand-hero .hero-masthead-svg-box { width: 56px; height: auto; }
  .brand-hero .hero-masthead-headings { align-items: flex-start; }
  .brand-hero .hero-title { font-size: 28px; line-height: 1; text-align: left; }
  .brand-hero .hero-masthead-sub { display: none; }
  .brand-hero .hero-masthead-crest-anchor { width: 64px; height: 64px; flex-shrink: 0; }
  .brand-hero .hero-masthead-crest-anchor img { width: 64px; height: 64px; }
  .brand-hero .hero-desc, .brand-hero .hero-subhead { display: none; }
  .brand-hero .telemetry-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px 12px; margin-top: 0; }
  .brand-hero .telemetry-sub { display: none; }
  .brand-hero .glyph-lore-drawer { margin-top: 10px; }
}


/* ==========================================================================
   18. SHARED HERO (one spec for chicago.html + cate.html)
   Same markup on both pages: badge | pills row, then glyph + title/sub | crest,
   then one intro paragraph, then the 4-tile vitals strip. Units live in the top bar.
   Precedent: Detour chassis (canvas, type, orange) + Chicago civic glow behind crest.
   ========================================================================== */
.brand-hero .hero-inner { padding-top: 0; padding-bottom: 0; }
.hero-telemetry-row { align-items: flex-start; margin-bottom: 18px; }
.badge-hybrid { margin-bottom: 0; }
.hero-telemetry-pills { align-items: flex-end; }
.hero-weather-pill, .hero-countdown-pill { min-height: 29px; box-sizing: border-box; white-space: nowrap; max-width: 100%; }
.pill-label { color: var(--text-muted); font-size: 11px; }
.pill-val { color: var(--text-primary); font-weight: 800; letter-spacing: 0.04em; }
.pill-hl { color: var(--chicago-sky); font-size: 11px; font-weight: 700; }
.pill-date { color: var(--text-faint); font-size: 11px; font-weight: 600; }
.pill-kit { color: var(--text-primary); font-size: 11px; font-weight: 700; }
.hero-masthead-dual-lockup { margin-top: 0; align-items: center; }
.hero-masthead-lockup { align-items: center; gap: 20px; }
.hero-masthead-headings { gap: 6px; justify-content: center; }
.hero-title { margin: 0; }
.hero-masthead-sub { margin: 0; line-height: 1.35; }
.hero-desc { margin: 0 0 18px; max-width: 760px; line-height: 1.5; }
.brand-hero .telemetry-strip { margin-top: 0; }
@media (max-width: 960px) {
  .hero-telemetry-pills { align-items: flex-start; }
}
@media (max-width: 480px) {
  .brand-hero .badge-hybrid { display: none; }
}

/* crest: circular, sky ring (Chicago civic accent, §9.6) */
.hero-masthead-crest-anchor { cursor: zoom-in; border-radius: 50%; }
.hero-masthead-crest-anchor img {
  border-radius: 50%; border: 2px solid var(--chicago-sky); display: block;
  box-shadow: 0 0 24px rgba(65, 182, 230, 0.25); object-fit: cover; background: transparent;
}
.hero-masthead-crest-anchor:hover img { box-shadow: 0 0 32px rgba(65, 182, 230, 0.45); }

/* Units: top bar on desktop; a hero row on phones (top bar has no room) */
.unit-toggle-group--hero { display: none; }
@media (max-width: 640px) {
  .unit-toggle-group--hero { display: inline-flex; width: 100%; justify-content: flex-start; margin-top: 2px; }
  .unit-toggle-group--hero .unit-segment-control { flex: 1 1 0; }
  .unit-toggle-group--hero .unit-segment-btn { flex: 1 1 0; min-height: 28px; }
  .brand-hero .telemetry-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-hero .telemetry-val { white-space: normal; overflow: visible; text-overflow: clip; font-size: 13px; line-height: 1.3; }
  .brand-hero .telemetry-tile { min-width: 0; }
}

/* hero polish: pills share one left edge, drawer spacing, tab rail = content rail */
@media (min-width: 961px) {
  .hero-telemetry-pills { align-items: stretch; }
  .hero-weather-pill, .hero-countdown-pill { justify-content: flex-start; }
}
.brand-hero .glyph-lore-drawer { margin: 0 0 14px; }
.segmented-bar { padding-left: 24px; padding-right: 24px; }
@media (max-width: 640px) {
  .segmented-bar { padding-left: 12px; padding-right: 12px; }
  .brand-hero .telemetry-label { white-space: normal; }
}
@media (min-width: 961px) { .hero-telemetry-pills { width: auto; min-width: 380px; max-width: 100%; flex-shrink: 0; } }

/* Start-line block: single source of truth for waves, corrals and gate closures */
.startline-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; padding: 18px 20px; margin-bottom: 24px; }
.startline-head { margin-bottom: 12px; }
.startline-head .eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--text-muted); }
.startline-head h2 { margin: 4px 0 0; }
.startline-table-wrap { overflow-x: auto; }
.startline-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.startline-table th { text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; font-weight: 700; color: var(--text-muted); text-transform: uppercase; padding: 6px 12px 8px 0; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.startline-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border-color); color: var(--text-primary); }
.startline-table tbody tr:last-child td { border-bottom: 0; }
.startline-table .t-gate { color: var(--chicago-red); font-family: var(--font-mono); font-weight: 700; }
.startline-note { margin: 10px 0 0; font-size: 14px; color: var(--text-muted); }

@media (max-width: 640px) {
  .startline-table thead { display: none; }
  .startline-table, .startline-table tbody, .startline-table tr, .startline-table td { display: block; }
  .startline-table tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
  .startline-table tbody tr:last-child { border-bottom: 0; }
  .startline-table td { padding: 0; border: 0; font-size: 14px; }
  .startline-table td[data-label="Wave"] { grid-row: 1 / span 2; }
  .startline-table td[data-label="Gun"]::before { content: "Gun "; color: var(--text-muted); }
  .startline-table td[data-label="Corrals close"] { grid-column: 3; grid-row: 1; text-align: right; }
  .startline-table td[data-label="Corrals close"]::before { content: "Closes "; color: var(--text-muted); font-family: var(--font-body); font-weight: 400; }
  .startline-table td[data-label="Corral"] { grid-column: 3; grid-row: 2; text-align: right; }
  .startline-table td[data-label="Corral"]::before { content: "Corral "; color: var(--text-muted); }
  .startline-table td[data-label="Squad"] { grid-column: 2; grid-row: 2; font-weight: 600; }
  .startline-table td[data-label="Gun"] { grid-column: 2; grid-row: 1; }
}

/* Canonical DRC Footer & Prospective Runner Onboarding */
.main-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 28px 0;
  margin-top: auto;
  margin-bottom: 0;
  width: 100%;
  flex-shrink: 0;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.footer-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.footer-brand-lockup svg {
  flex-shrink: 0;
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex-shrink: 0;
}
.footer-mantra {
  color: var(--text-faint);
  font-weight: 500;
}
.footer-sep {
  color: var(--border-color);
}
.footer-crew-link {
  color: var(--detour-orange);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: color 0.15s ease;
}
.footer-crew-link:hover {
  color: var(--detour-orange-bright, #ff6b2b);
  text-decoration: underline;
}
@media (max-width: 900px) {
  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .footer-brand-lockup {
    white-space: normal;
    justify-content: center;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}


/* ==========================================================================
   17. CANONICAL SQUAD SOFT-GATE VAULT & SUNDAY OPS HUD
   ========================================================================== */
.vault-banner {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.vault-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vault-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.vault-title-span-1 {
  color: var(--detour-orange);
  font-weight: 800;
}
.vault-desc {
  font-size: 13.5px;
  color: var(--text-muted);
}
.vault-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.vault-input {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 4px;
  width: 140px;
  text-transform: uppercase;
}
.vault-input:focus { border-color: var(--detour-orange); outline: none; }
.vault-submit-btn {
  background: var(--detour-orange);
  color: #121214;
  border: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.vault-submit-btn:hover { opacity: 0.9; }
.vault-status-unlocked {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--success-green, #4ade80);
  font-weight: 700;
}
.vault-lock-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.vault-lock-btn:hover { border-color: var(--text-muted); color: var(--text-primary); }

/* --- SUNDAY OPS EMERGENCY COCKPIT (RACE MORNING HUD) --- */
.sunday-ops-strip {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--detour-orange);
  border-radius: 8px;
  padding: 12px 18px;
  margin: 16px auto 24px auto;
  max-width: 1140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.ops-strip-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--detour-orange);
  background: rgba(244, 88, 28, 0.12);
  border: 1px solid rgba(244, 88, 28, 0.35);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.ops-strip-vitals {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-primary);
}
.ops-vital-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ops-vital-divider {
  color: var(--border-color);
}
.ops-wx-warn {
  color: var(--finish-gold, #F59E0B);
  font-weight: 700;
}
.ops-strip-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-ops-jump {
  background: var(--surface-elevated, #242428);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-ops-jump:hover {
  border-color: var(--detour-orange);
  color: var(--detour-orange);
}
@media (max-width: 768px) {
  .sunday-ops-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 14px;
    gap: 10px;
  }
  .ops-strip-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
