/* Wreckless Drivers — dark road-clip catalogue (Heartstrings-style cards) */
:root {
  --bg: #0b0e12;
  --bg-elevated: #12171e;
  --bg-card: #171d26;
  --ink: #f0f3f7;
  --ink-muted: #9aa8b8;
  --ink-faint: #6b7a8c;
  --accent: #e85d4c;
  --accent-soft: #f08a7a;
  --line: rgba(232, 93, 76, 0.18);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 10% -5%, rgba(232, 93, 76, 0.2), transparent 55%),
    radial-gradient(ellipse 50% 35% at 95% 5%, rgba(60, 100, 160, 0.12), transparent 50%);
  z-index: 0;
}

a { color: var(--accent-soft); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.wrap {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.muted { color: var(--ink-muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tiny { font-size: 0.78rem; }
.hint { margin: 0.25rem 0 0.75rem; font-size: 0.85rem; color: var(--ink-faint); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 14, 18, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand:hover { text-decoration: none; color: inherit; }

/* W logo larger than the wordmark so it reads as the leading “W” */
.brand-logo {
  display: block;
  height: 72px;
  width: auto;
  max-width: min(28vw, 96px);
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
  border-radius: 4px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-top: 0.15rem;
}
.brand-text strong,
.brand-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  line-height: 0.95;
  font-weight: 400;
}
.brand-text small {
  color: var(--ink-muted);
  font-size: 0.72rem;
  margin-top: 0.2rem;
  line-height: 1.25;
}

/* Keep old mark class harmless if cached markup references it */
.brand-mark { display: none; }

.nav { display: flex; gap: 1rem; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--ink-muted); }
.nav a:hover { color: var(--ink); }

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

.header-command {
  position: relative;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.header-command .brand-logo {
  height: 52px;
  max-width: 72px;
}

.header-command .brand-name {
  font-size: 1.25rem;
}

.command-bar {
  flex: 1 1 16rem;
  min-width: 0;
}

.command-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.command-jumps {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex-wrap: wrap;
}

.command-jumps a {
  padding: 0.32rem 0.55rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.command-jumps a:hover,
.command-jumps a:focus-visible {
  color: var(--ink);
  background: rgba(232, 93, 76, 0.12);
  border-color: var(--line);
}

.command-search {
  position: relative;
  flex: 1 1 10rem;
  min-width: 8rem;
  max-width: 22rem;
}

.command-search-input {
  width: 100%;
  padding: 0.42rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-elevated);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
}

.command-search-input:focus {
  outline: 2px solid rgba(232, 93, 76, 0.45);
  outline-offset: 1px;
}

.command-search-results {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: min(22rem, 60vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.command-search-status {
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.command-search-hit {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: inherit;
  padding: 0.6rem 0.75rem;
  font: inherit;
  cursor: pointer;
}

.command-search-hit:hover,
.command-search-hit.is-active {
  background: rgba(232, 93, 76, 0.12);
}

.command-search-hit-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.command-search-hit-snip {
  font-size: 0.74rem;
  color: var(--ink-muted);
  line-height: 1.35;
}

.command-menu-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--bg-card);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.command-menu-btn:hover {
  border-color: var(--accent-soft);
}

.command-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 70;
  width: min(36rem, calc(100vw - 2rem));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  padding: 0.95rem 1rem;
  background: rgba(18, 23, 30, 0.98);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: min(70vh, calc(100dvh - 5rem));
  overflow: auto;
}

.command-menu-group h3 {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.command-menu-group a {
  display: block;
  padding: 0.32rem 0.45rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.86rem;
}

.command-menu-group a:hover {
  color: var(--ink);
  background: rgba(232, 93, 76, 0.12);
}

.command-menu[hidden],
.command-chips[hidden],
.command-search-results[hidden] {
  display: none !important;
}

.command-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.4rem 0 0.1rem;
  scrollbar-width: none;
}

.command-chips::-webkit-scrollbar { display: none; }

.board-chip {
  display: inline-flex;
  align-items: baseline;
  flex-shrink: 0;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: inherit;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.board-chip-value {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink);
}

.board-chip.is-human { border-color: rgba(232, 93, 76, 0.4); }
.board-chip.is-av { border-color: rgba(52, 211, 153, 0.4); }
.board-chip.is-pulse {
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.35);
}

.tonight-board {
  scroll-margin-top: 6.5rem;
  margin: 0 0 1.6rem;
  padding: 1.15rem 1.2rem 1.3rem;
  background: linear-gradient(160deg, var(--bg-elevated), #101820 55%, #0e1614);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
}

.tonight-head {
  margin-bottom: 0.95rem;
}

.tonight-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #86efac;
}

.tonight-head h2 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: 0.04em;
  font-weight: 400;
  text-transform: uppercase;
}

.tonight-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.tonight-tile {
  display: flex;
  flex-direction: column;
  min-height: 8.2rem;
  padding: 0.9rem 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 14, 18, 0.55);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tonight-tile:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.tonight-tile.is-human { border-color: rgba(232, 93, 76, 0.35); }
.tonight-tile.is-av { border-color: rgba(52, 211, 153, 0.35); }
.tonight-tile.is-pulse {
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.5), 0 0 24px rgba(52, 211, 153, 0.25);
}

.tonight-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.tonight-value {
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: var(--ink);
}

.tonight-tile.is-human .tonight-value { color: var(--accent-soft); }
.tonight-tile.is-av .tonight-value { color: #86efac; }

.tonight-sub {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--ink-faint);
  line-height: 1.35;
}

.why-block,
#av-safety,
.fleet-block,
.rides-section,
.news-section,
.behaviour-strip {
  scroll-margin-top: 6.5rem;
}

.site-header.is-pinned + .main .why-block,
.site-header.is-pinned + .main #av-safety,
.site-header.is-pinned + .main .fleet-block,
.site-header.is-pinned + .main .rides-section,
.site-header.is-pinned + .main .news-section,
.site-header.is-pinned + .main .tonight-board {
  scroll-margin-top: 8.5rem;
}

.search-hit-flash {
  outline: 2px solid var(--accent-soft);
  outline-offset: 4px;
}

.news-ticker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.28rem 0 0.1rem;
}

.news-ticker-kicker {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.news-ticker-viewport {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 1.3rem;
  overflow: hidden;
}

.news-ticker-item {
  position: absolute;
  inset: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(0.4rem);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.news-ticker-item.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.compare-strip,
.av-map-section,
.deaths-map {
  scroll-margin-top: 6.5rem;
  margin: 0 0 1.6rem;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.compare-op {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.95rem 1rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}

.compare-op:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: inherit;
}

.compare-op h3 {
  margin: 0;
  font-size: 1.02rem;
}

.compare-stat {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.compare-stat strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.compare-op ul {
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.compare-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.compare-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #334155;
}

.compare-op.is-waymo { border-color: rgba(52, 211, 153, 0.35); }
.compare-op.is-waymo .compare-bar span { background: #34d399; }
.compare-op.is-tesla { border-color: rgba(232, 93, 76, 0.35); }
.compare-op.is-tesla .compare-bar span { background: var(--accent); }
.compare-op.is-zoox { border-color: rgba(34, 211, 238, 0.35); }
.compare-op.is-zoox .compare-bar span { background: #22d3ee; }
.compare-op.is-aurora { border-color: rgba(251, 146, 60, 0.35); }
.compare-op.is-aurora .compare-bar span { background: #fb923c; }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin: 0 0 0.75rem;
}

.map-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.map-swatch::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.map-swatch.is-waymo::before { background: #34d399; }
.map-swatch.is-tesla::before { background: var(--accent); }
.map-swatch.is-zoox::before { background: #22d3ee; }
.map-swatch.is-aurora::before { background: #fb923c; }
.map-swatch.is-world::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px #c4a574;
}

.map-swatch.is-deaths-xl::before,
.map-swatch.is-deaths-md::before,
.map-swatch.is-deaths-sm::before,
.map-country.is-deaths circle {
  fill: var(--accent);
  background: var(--accent);
}

.map-swatch.is-deaths-xl::before { width: 14px; height: 14px; }
.map-swatch.is-deaths-md::before { width: 10px; height: 10px; }
.map-swatch.is-deaths-sm::before { width: 7px; height: 7px; }

.map-country.is-deaths circle {
  stroke: rgba(11, 14, 18, 0.85);
  stroke-width: 1.2;
}

.map-country.is-deaths text {
  fill: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #071018;
  stroke-width: 3px;
}

.deaths-chip-list { margin-top: 0.9rem; }

.map-chip.is-deaths { border-color: rgba(232, 93, 76, 0.5); }

.map-chip-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.deaths-note { margin: 0.85rem 0 0; line-height: 1.45; }

.map-canvas-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #071018;
}

.map-canvas {
  display: block;
  width: 100%;
  height: auto;
}

.map-ocean { fill: #071018; }
.map-grid { stroke: rgba(148, 163, 184, 0.1); stroke-width: 1; }
.map-continent { fill: rgba(51, 65, 85, 0.55); }
.map-us-frame {
  fill: rgba(125, 211, 252, 0.1);
  stroke: #7dd3fc;
  stroke-width: 1.2;
}

.map-world circle {
  fill: #0f172a;
  stroke: #c4a574;
  stroke-width: 1.5;
}
.map-world text,
.map-city-label,
.map-inset-label {
  fill: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #071018;
  stroke-width: 3px;
}
.map-inset-label {
  text-anchor: start;
  fill: #7dd3fc;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.map-inset rect {
  fill: none;
  stroke: #7dd3fc;
  stroke-width: 1.6;
}
.map-route {
  stroke: #fb923c;
  stroke-width: 1.6;
  stroke-dasharray: 4 3;
  opacity: 0.85;
}
.map-city circle {
  stroke: rgba(15, 23, 42, 0.8);
  stroke-width: 1;
}
.map-city.is-waymo circle { fill: #34d399; }
.map-city.is-tesla circle { fill: var(--accent); }
.map-city.is-zoox circle { fill: #22d3ee; }

.map-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.map-chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.map-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  font-size: 0.78rem;
}

.map-chip-meta {
  color: var(--ink-faint);
  font-size: 0.7rem;
}

.ride-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.ride-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ride-filter {
  appearance: none;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.ride-filter.is-on {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
}

.ride-card.is-off { display: none !important; }
.ride-empty {
  display: none;
  padding: 1.2rem;
  color: var(--ink-muted);
}
.ride-grid.is-empty + .ride-empty,
.ride-empty.is-on { display: block; }

.site-header.is-pinned + .main .compare-strip,
.site-header.is-pinned + .main .av-map-section,
.site-header.is-pinned + .main .deaths-map {
  scroll-margin-top: 8.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .tonight-tile.is-pulse,
  .board-chip.is-pulse { box-shadow: none; }
}

.main { padding: 1.5rem 0 3rem; }

.hero {
  background: linear-gradient(145deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
}
.hero-compact { padding: 1.15rem 1.25rem; margin-bottom: 1.25rem; }
.hero-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.hero h1,
.hero-headline {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.5vw, 2.45rem);
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--ink);
  font-weight: 400;
  max-width: 48rem;
  text-transform: uppercase;
}
.hero p { margin: 0; color: var(--ink-muted); max-width: 42rem; }
.hero-mission {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink-muted) !important;
  max-width: 44rem !important;
}
.hero-meta { margin-top: 0.9rem !important; font-size: 0.9rem; }

.admin-tabs { margin-top: 1rem !important; display: flex; gap: 0.5rem; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin: -0.5rem 0 1.75rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.stat-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--accent-soft);
}
.stat-label {
  margin: 0.45rem 0 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
  line-height: 1.35;
}

.behaviour-strip {
  margin: 0 0 2.25rem;
}
.section-head-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-head-center p {
  margin-left: auto;
  margin-right: auto;
}
.behaviour-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1.15rem;
  max-width: 1080px;
  margin: 0 auto;
}
.behaviour-card {
  margin: 0;
  flex: 1 1 160px;
  max-width: 230px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.behaviour-card img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 20%;
}
.behaviour-card figcaption {
  margin: 0;
  padding: 0.55rem 0.7rem 0.7rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.av-section { margin: 0 0 2.4rem; }
.av-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin: 0 0 1.25rem;
}
.av-kpi {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.15rem;
}
.chart-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}
.chart-panel h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}
.chart-group { margin-top: 0.85rem; }
.chart-label {
  margin: 0 0 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-muted);
}
.chart-bar-row {
  display: grid;
  grid-template-columns: 3.4rem 1fr 3.2rem;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.28rem;
}
.chart-who {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.chart-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.chart-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  min-width: 4px;
}
.chart-fill-human { background: linear-gradient(90deg, var(--accent), #c44738); }
.chart-fill-av { background: linear-gradient(90deg, #34d399, #059669); }
.chart-num {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-align: right;
}
.av-table-wrap { margin: 0 0 0.75rem; }
.av-table td.cell-note,
.cell-note { color: var(--ink-muted); font-size: 0.88rem; }

.fleet-block {
  margin: 0 0 1.35rem;
}
.fleet-block h3 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}
.fleet-block .tiny { margin: 0 0 0.75rem; }
.tesla-kpis { margin-bottom: 0; }

.rides-section { margin: 0 0 2.4rem; }
.ride-grid { margin-top: 0.2rem; }
.ride-play {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  position: relative;
}
.ride-play img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}
.ride-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.ride-play:hover .ride-play-icon,
.ride-play:focus-visible .ride-play-icon {
  background: var(--accent);
  border-color: transparent;
}
.ride-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  position: absolute;
  inset: 0;
}
.ride-badge-waymo {
  background: rgba(52, 211, 153, 0.18);
  color: #86efac;
}
.ride-badge-tesla {
  background: rgba(232, 93, 76, 0.18);
  color: var(--accent-soft);
}
.ride-badge-cybercab {
  background: rgba(196, 165, 116, 0.2);
  color: #e2c9a0;
}
.ride-badge-zoox {
  background: rgba(34, 211, 238, 0.16);
  color: #67e8f9;
}
.ride-badge-aurora {
  background: rgba(251, 146, 60, 0.18);
  color: #fdba74;
}
.ride-badge-both {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
}
.ride-card .news-badge { margin-bottom: 0.4rem; }
.ride-card .news-source { display: inline-block; margin-top: 0.45rem; }

.news-section { margin-bottom: 2.25rem; }
.section-head { margin-bottom: 1rem; }
.section-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: 0.04em;
  font-weight: 400;
  text-transform: uppercase;
}
.section-head p { margin: 0; max-width: 42rem; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem 1.15rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.news-badge {
  margin: 0;
  align-self: flex-start;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(232, 93, 76, 0.18);
  color: var(--accent-soft);
}
.news-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}
.news-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.news-summary {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.5;
  flex: 1;
}
.news-source {
  margin-top: 0.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}
.news-disclaimer { margin: 0.9rem 0 0; max-width: 44rem; }

.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.panel h1, .panel h2 { margin: 0 0 0.75rem; color: var(--ink); }
.panel-narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
.empty-panel { text-align: center; padding: 2.5rem 1.5rem; }

.flash {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.flash-ok { background: rgba(40, 120, 70, 0.25); color: #8fd9a8; border: 1px solid rgba(100, 180, 120, 0.35); }
.flash-error { background: rgba(160, 40, 40, 0.25); color: #f0a0a0; border: 1px solid rgba(200, 80, 80, 0.4); }

/* Video grid — card style like Heartstrings */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.video-card:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 93, 76, 0.35);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5);
}

.video-frame {
  background: #000;
  aspect-ratio: 16 / 9;
  position: relative;
}
.clip-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  vertical-align: middle;
}

.video-meta {
  padding: 0.9rem 1rem 1.05rem;
}
.video-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
.video-date {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}
.video-date time {
  font-variant-numeric: tabular-nums;
}

/* Forms */
label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
}
input[type="text"],
input[type="url"],
input[type="password"],
input[type="datetime-local"],
input[type="date"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-elevated);
  color: var(--ink);
  font: inherit;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(232, 93, 76, 0.45);
  outline-offset: 1px;
}
.check-row {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-weight: 500;
  color: var(--ink);
}
.check-row input { width: auto; }

.form-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(145deg, var(--accent), #c44738);
  color: #fff;
  border-color: transparent;
}
.btn-primary:hover { filter: brightness(1.08); color: #fff; text-decoration: none; }
.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--ink-muted);
}
.btn-ghost:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.3); text-decoration: none; }
.btn-block { width: 100%; }

.admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: 1fr; }
}

.table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.65rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}
.admin-table th {
  color: var(--ink-faint);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.admin-actions form { display: inline; margin: 0; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(232, 93, 76, 0.2);
  color: var(--accent-soft);
}
.badge-off {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-faint);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}
.site-footer p { margin: 0.25rem 0; }

.back-to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.1rem;
  height: 3.1rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--accent), #c44738);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.back-to-top:hover {
  color: #fff;
  filter: brightness(1.08);
  text-decoration: none;
}

@media (max-width: 960px) {
  .tonight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tonight-tile:last-child { grid-column: 1 / -1; }
  .compare-grid { grid-template-columns: 1fr 1fr; }
  .map-lists { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .stat-strip,
  .av-kpis,
  .chart-grid { grid-template-columns: 1fr; }
  .behaviour-card { max-width: calc(50% - 0.7rem); flex-basis: calc(50% - 0.7rem); }
  .behaviour-card img { height: 240px; }
  .command-menu {
    grid-template-columns: 1fr 1fr;
    left: 0;
    right: 0;
    width: auto;
  }
}

@media (max-width: 600px) {
  .video-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }
  .behaviour-row { gap: 0.75rem; }
  .behaviour-card img { height: 210px; }
  .brand-logo {
    height: 56px;
    max-width: 72px;
  }
  .header-command .brand-logo {
    height: 44px;
    max-width: 56px;
  }
  .brand-name {
    font-size: 1.25rem;
  }
  .brand-text small { display: none; }
  .command-bar {
    flex: 1 1 100%;
    order: 3;
  }
  .command-menu-btn {
    margin-left: auto;
  }
  .command-jumps {
    width: 100%;
    justify-content: space-between;
  }
  .command-jumps a {
    flex: 1;
    text-align: center;
    padding: 0.38rem 0.2rem;
    font-size: 0.72rem;
  }
  .command-search {
    width: 100%;
    max-width: none;
    flex-basis: 100%;
  }
  .command-menu-label { display: none; }
  .command-chips { width: 100%; }
  .news-ticker { width: 100%; }
  .compare-grid { grid-template-columns: 1fr; }
  .tonight-grid { grid-template-columns: 1fr; }
  .tonight-tile:last-child { grid-column: auto; }
  .tonight-tile { min-height: 0; }
  .command-menu { grid-template-columns: 1fr; }
}
