/* ============================================================
   THE TESLA POD — editorial edition
   Ink on ivory. Hairlines, not glows. Red is a trace, not a theme.
   ============================================================ */

:root {
  --accent: #c8102e;              /* used sparingly: rec dot, micro-markers */
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 64px;
  --radius: 6px;
}

[data-theme="light"] {
  --bg: #fbfaf8;
  --bg-2: #f4f3f0;
  --surface: #ffffff;
  --surface-2: #f4f3f0;
  --line: rgba(20, 20, 20, 0.12);
  --line-soft: rgba(20, 20, 20, 0.07);
  --ink: #141414;
  --text: #1a1a1a;
  --text-dim: #57544e;
  --text-faint: #98948b;
  --glass: rgba(251, 250, 248, 0.85);
  --card-shadow: 0 1px 2px rgba(20, 20, 20, 0.04);
  --card-shadow-hover: 0 10px 30px rgba(20, 20, 20, 0.08);
  --btn-bg: #141414;
  --btn-fg: #fbfaf8;
}

[data-theme="dark"] {
  --bg: #101012;
  --bg-2: #141416;
  --surface: #18181b;
  --surface-2: #1e1e22;
  --line: rgba(250, 250, 245, 0.14);
  --line-soft: rgba(250, 250, 245, 0.08);
  --ink: #f4f2ed;
  --text: #ecebe6;
  --text-dim: #a3a099;
  --text-faint: #6b6963;
  --glass: rgba(16, 16, 18, 0.85);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 14px 40px rgba(0, 0, 0, 0.5);
  --btn-bg: #f4f2ed;
  --btn-fg: #101012;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}
::selection { background: var(--ink); color: var(--bg); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
section { scroll-margin-top: var(--nav-h); }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--ink);
  z-index: 200;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--glass);
  border-bottom: 1px solid var(--line-soft);
}
/* wordmark logo — a bordered pill with a slide-fill on hover */
.nav-logo {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: border-color 0.25s var(--ease);
}
.nav-logo::before {
  content: ""; position: absolute; inset: 0;
  background: var(--ink);
  transform: translateX(-101%);
  transition: transform 0.4s var(--ease);
}
.nav-logo:hover { border-color: var(--ink); }
.nav-logo:hover::before { transform: translateX(0); }
.nav-word {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 700;
  font-size: 16.5px; letter-spacing: -0.015em;
  color: var(--ink);
  transition: color 0.3s var(--ease);
}
.nav-word em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  letter-spacing: 0; margin-right: 1px;
}
.nav-logo:hover .nav-word { color: var(--bg); }
.nav-links { display: flex; gap: clamp(18px, 2.5vw, 36px); align-items: center; }
.nav-links a {
  font-size: 13.5px; font-weight: 500; color: var(--text-dim);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta {
  color: var(--ink) !important;
  border: 1px solid var(--line);
  padding: 7px 16px; border-radius: 999px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.nav-cta:hover { background: var(--ink); color: var(--bg) !important; border-color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-yt { color: var(--text-dim); display: grid; place-items: center; padding: 6px; transition: color 0.2s; }
.nav-yt:hover { color: var(--ink); }
.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent;
  cursor: pointer; display: grid; place-items: center;
  transition: border-color 0.2s;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-icon { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); position: relative; overflow: hidden; }
[data-theme="dark"] .theme-icon::after {
  content: ""; position: absolute; inset: -3px 45% auto auto;
  width: 12px; height: 12px; border-radius: 50%; background: var(--surface);
}
.nav-burger { display: none; }
.mobile-menu { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 500; font-size: 14px;
  letter-spacing: 0.01em;
  padding: 13px 24px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { opacity: 0.88; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost::after { content: "→"; font-family: var(--font-body); transition: transform 0.2s var(--ease); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost:hover::after { transform: translateX(3px); }
.btn-block { width: 100%; justify-content: center; }
.btn-block::after { content: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: min(92svh, 940px);
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 48px) clamp(20px, 4vw, 56px) 0;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-video-wrap {
  position: absolute; inset: 0; overflow: hidden;
  opacity: 0.14; filter: saturate(0) contrast(1.05);
}
.hero-video-wrap iframe {
  position: absolute; top: 50%; left: 50%;
  width: max(100vw, 178vh); height: max(56.25vw, 100vh);
  transform: translate(-50%, -50%);
  pointer-events: none; border: 0;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 35%, black 0%, transparent 78%);
  opacity: 0.4;
}
.hero-vignette {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 30%, transparent 62%, var(--bg) 100%);
}

/* ---------- the map card (Where we drive) ---------- */
.map-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
  box-shadow: var(--card-shadow);
}
.map-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.mc-title {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.mc-cursor {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--text-faint); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sf-map {
  display: block; width: 100%; height: 500px;
  background: var(--bg-2);
  cursor: crosshair;
  z-index: 0; position: relative;
}
/* floating control console on the map */
.map-stage { position: relative; }
.map-console {
  position: absolute; left: 10px; bottom: 10px; z-index: 1000;
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px;
  max-width: calc(100% - 20px);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 6px 20px rgba(20, 20, 20, 0.12);
}
.mcn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mcn-tag {
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-faint); flex: none;
}
.mcn-btns { gap: 6px; }
.seg {
  display: inline-flex;
  border: 1px solid var(--line); border-radius: 999px;
  overflow: hidden;
}
.seg button {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim);
  background: none; border: 0; cursor: pointer;
  padding: 7px 12px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.seg button + button { border-left: 1px solid var(--line-soft); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--bg); }
.mc-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctl-toggle, .ctl-btn {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim);
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.ctl-btn:hover, .ctl-toggle:hover { color: var(--ink); border-color: var(--ink); }
.ctl-toggle::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-faint); margin-right: 8px;
  vertical-align: 1px;
  transition: background 0.2s;
}
.ctl-toggle.on { color: var(--ink); border-color: var(--line); }
.ctl-toggle.on::before { background: var(--accent); animation: blink 1.6s infinite; }

/* HUD scale inside the floating console */
.map-console .seg button { padding: 5px 9px; font-size: 8.5px; }
.map-console .ctl-toggle, .map-console .ctl-btn { padding: 5px 10px; font-size: 8.5px; background: var(--surface); }
.map-console .ctl-toggle::before { width: 5px; height: 5px; margin-right: 6px; }
.map-console .seg { background: var(--surface); }

/* maximize button + fullscreen card */
.mc-max {
  flex: none; width: 30px; height: 30px;
  display: grid; place-items: center;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text-dim); cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.mc-max:hover { color: var(--ink); border-color: var(--ink); }
.map-card.is-full {
  position: fixed; inset: clamp(10px, 2.5vw, 28px);
  z-index: 500; margin: 0;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.45);
}
.map-card.is-full .map-stage { flex: 1; min-height: 0; display: flex; }
.map-card.is-full .sf-map { height: auto; flex: 1; }
body.map-full { overflow: hidden; }
body.map-full .nav, body.map-full .scroll-progress { display: none; }

.map-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: nowrap; min-height: 42px;
}
.mc-passing {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-dim);
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-passing b { color: var(--accent); font-weight: 500; }
.mc-hint {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-faint);
  flex: none; white-space: nowrap;
}
@media (max-width: 600px) {
  .mc-hint { display: none; }
  .mc-ctl-label { width: 100%; }
}

/* Leaflet overlays */
.leaflet-container {
  font-family: var(--font-body);
  background: var(--bg-2);
}
.leaflet-container .leaflet-control-attribution {
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.75); color: #77716a;
}
.leaflet-container .leaflet-control-attribution a { color: #57544e; }
.leaflet-control-zoom a {
  font-family: var(--font-body);
  color: #141414 !important;
}

/* landmark markers */
.lm-marker-wrap { pointer-events: auto; }
.lm-marker {
  display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer; outline: none;
  white-space: nowrap;
}
.lmm-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: #141414; border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--ease), background 0.25s;
}
.lmm-txt {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em;
  font-weight: 500; color: #2b2925;
  text-shadow: 0 1px 0 #fff, 0 -1px 0 #fff, 1px 0 0 #fff, -1px 0 0 #fff, 0 0 6px #fff;
  transition: color 0.25s;
}
.lm-marker:hover .lmm-dot, .lm-marker:focus-visible .lmm-dot,
.lm-target .lmm-dot { background: var(--accent); transform: scale(1.35); }
.lm-marker:hover .lmm-txt, .lm-marker:focus-visible .lmm-txt,
.lm-target .lmm-txt { color: var(--accent); }

/* minor landmarks: dot only — label appears on hover or when zoomed in */
.lm-minor .lmm-dot { width: 7px; height: 7px; opacity: 0.85; }
.lm-minor .lmm-txt { opacity: 0; transition: opacity 0.2s, color 0.25s; }
.lm-minor:hover .lmm-txt, .lm-minor:focus-visible .lmm-txt,
.lm-minor.lm-target .lmm-txt, .zoomed-in .lm-minor .lmm-txt { opacity: 1; }

/* the pod marker */
.car-marker-wrap { pointer-events: none; }
.car-marker { position: relative; display: block; width: 14px; height: 14px; }
.cm-dot {
  position: absolute; inset: 1px;
  border-radius: 50%; background: #c8102e;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.cm-halo {
  position: absolute; inset: -9px;
  border: 2px solid #c8102e; border-radius: 50%;
  animation: cmhalo 2.4s var(--ease) infinite;
}
@keyframes cmhalo {
  0% { transform: scale(0.3); opacity: 0.9; }
  70% { transform: scale(1.1); opacity: 0; }
  100% { transform: scale(1.1); opacity: 0; }
}

/* ---------- Pickup Run: the game ---------- */
.hero-game {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 18px; padding: 10px 16px 10px 10px;
  border: 1px solid var(--line); border-radius: 999px;
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
  max-width: 100%;
}
.hero-game:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200, 16, 46, 0.1); }
.hg-badge {
  flex: none;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em;
  text-transform: uppercase; color: #fff; background: var(--accent);
  padding: 5px 10px; border-radius: 999px;
}
.hg-txt { font-size: 13px; color: var(--text-dim); line-height: 1.4; }
.hg-txt b { color: var(--ink); font-weight: 600; }
.hg-go {
  flex: none; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
  transition: transform 0.2s var(--ease);
}
.hero-game:hover .hg-go { transform: translateX(3px); }

.ctl-game { color: var(--accent); border-color: rgba(200, 16, 46, 0.4); }
.ctl-game:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.ctl-game.on { color: #fff; background: var(--accent); border-color: var(--accent); }

.game-hud {
  position: absolute; top: 0; left: 0; right: 0; z-index: 900;
  padding: 9px 16px;
  display: flex; flex-direction: column; gap: 5px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.game-hud[hidden] { display: none; }
/* nudge the zoom control below the HUD while a run is on */
.map-stage.playing .leaflet-top { top: 62px; }
.gh-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.gh-stat {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-faint);
}
.gh-stat b {
  color: var(--ink); font-weight: 500; margin-left: 6px;
  font-variant-numeric: tabular-nums;
}
.gh-stat b.crit { color: var(--accent); animation: blink 0.9s infinite; }
.gh-fare {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gh-fare b { color: var(--accent); font-weight: 500; }

.game-over {
  position: absolute; inset: 0; z-index: 1100;
  display: grid; place-items: center; padding: 20px;
  pointer-events: none;   /* the map & the pod stay visible and live behind it */
}
.game-over[hidden] { display: none; }
.go-panel {
  pointer-events: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 26px 30px;
  text-align: center; max-width: 320px;
  box-shadow: 0 20px 60px rgba(15, 20, 40, 0.28), 0 0 0 6px rgba(15, 20, 40, 0.04);
  animation: go-in 0.35s var(--ease);
}
@keyframes go-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.go-kicker {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.go-score { font-family: var(--font-display); font-weight: 600; font-size: 46px; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.go-score b { font-weight: 600; }
.go-meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); margin-top: 10px; }
.go-rank {
  font-family: var(--font-serif); font-style: italic; font-size: 21px;
  color: var(--ink); margin-top: 6px;
}
.go-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }

/* fare markers: green = pickup, red = drop-off */
.lm-fare .lmm-dot {
  background: #2fae74 !important; transform: scale(1.55);
  animation: fare-pulse 1.4s var(--ease) infinite;
}
.lm-fare .lmm-txt { opacity: 1 !important; color: #1f7a52 !important; }
.lm-dest .lmm-dot {
  background: var(--accent) !important; transform: scale(1.55);
  animation: fare-pulse-red 1.4s var(--ease) infinite;
}
.lm-dest .lmm-txt { opacity: 1 !important; color: var(--accent) !important; }
@keyframes fare-pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 174, 116, 0.55); }
  70%, 100% { box-shadow: 0 0 0 12px rgba(47, 174, 116, 0); }
}
@keyframes fare-pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.5); }
  70%, 100% { box-shadow: 0 0 0 12px rgba(200, 16, 46, 0); }
}

/* the pod's route: dots flow toward the destination, trail fades behind */
.pod-route-ahead {
  animation: pod-flow 0.9s linear infinite;
  filter: drop-shadow(0 1px 1px rgba(200, 16, 46, 0.25));
}
@keyframes pod-flow { to { stroke-dashoffset: -11.1; } }
.pod-route-behind { stroke-dasharray: none; }
@media (prefers-reduced-motion: reduce) { .pod-route-ahead { animation: none; } }

/* dark theme: dark tiles + light labels */
[data-theme="dark"] .lmm-dot { background: #f4f2ed; border-color: #1a1a1e; }
[data-theme="dark"] .lmm-txt {
  color: #d8d5cd;
  text-shadow: 0 1px 0 #101012, 0 -1px 0 #101012, 1px 0 0 #101012, -1px 0 0 #101012, 0 0 6px #101012;
}
[data-theme="dark"] .lm-marker:hover .lmm-dot, [data-theme="dark"] .lm-target .lmm-dot { background: var(--red-soft, #ff4d52); }
[data-theme="dark"] .leaflet-container .leaflet-control-attribution { background: rgba(16, 16, 18, 0.75); color: #8a877f; }
[data-theme="dark"] .leaflet-container .leaflet-control-attribution a { color: #a3a099; }

.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  max-width: 1240px; margin: 0 auto; width: 100%;
  flex: 1;
}
.hero-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 28px;
}
.rec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.04; font-weight: 600; letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0 0 28px;
  text-wrap: balance;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span {
  display: inline-block;
  transform: translateY(110%);
  animation: riseup 0.9s var(--ease) forwards;
}
.hero-title .line:nth-child(2) span { animation-delay: 0.08s; }
@keyframes riseup { to { transform: translateY(0); } }
.hero-title em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  letter-spacing: -0.01em;
}

.hero-title em { position: relative; }
.hero-title em::after {
  content: ""; position: absolute; left: 0.04em; right: 0.04em; bottom: 0.02em;
  height: 1px; background: var(--ink); opacity: 0.65;
  transform: scaleX(0); transform-origin: left;
  animation: rule-draw 0.8s var(--ease) 1.1s forwards;
}
@keyframes rule-draw { to { transform: scaleX(1); } }

.hero-sub {
  font-size: clamp(15px, 1.5vw, 17px); color: var(--text-dim);
  max-width: 46ch; line-height: 1.7;
  transition-delay: 0.1s;
}
.hero-ctas { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; align-items: center; transition-delay: 0.18s; }

.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin-top: 34px; padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-faint);
  transition-delay: 0.26s;
}
.hero-meta b { color: var(--text-dim); font-weight: 500; }
.hero-meta i { font-style: normal; color: var(--line); }
#heroMeta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.fsd-badge {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); letter-spacing: 0.18em;
}
.fsd-badge svg { flex: none; opacity: 0.9; }

/* latest ride card */
.latest-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.latest-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); }
.latest-thumb { position: relative; aspect-ratio: 16/9; cursor: pointer; overflow: hidden; }
.latest-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.latest-thumb:hover img { transform: scale(1.03); }
.latest-thumb .play-badge {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.45));
}
.play-badge span {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.94); color: #141414;
  display: grid; place-items: center;
  transition: transform 0.25s var(--ease);
}
.latest-thumb:hover .play-badge span { transform: scale(1.08); }
.latest-body { padding: 20px 22px 22px; }
.latest-tag {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em;
  color: var(--text-faint); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.latest-tag::before { content: ""; width: 20px; height: 1px; background: var(--accent); }
.latest-body h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 17.5px;
  line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 8px;
}
.latest-body p { font-size: 13px; color: var(--text-dim); }

/* up-next queue inside the latest card */
.up-next { border-top: 1px solid var(--line-soft); }
.up-next-label {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--text-faint);
  padding: 12px 22px 4px;
}
.up-next-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 22px; cursor: pointer;
  transition: background 0.2s;
}
.up-next-row:last-child { padding-bottom: 16px; }
.up-next-row:hover, .up-next-row:focus-visible { background: var(--surface-2); }
.up-next-row img {
  width: 68px; aspect-ratio: 16/9; object-fit: cover;
  border-radius: 4px; flex: none;
  border: 1px solid var(--line-soft);
}
.up-next-row .un-body { min-width: 0; }
.up-next-row .un-meta {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em;
  color: var(--text-faint); text-transform: uppercase;
}
.up-next-row .un-title {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  letter-spacing: -0.01em; color: var(--ink); line-height: 1.3;
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.up-next-row .un-go {
  margin-left: auto; color: var(--text-faint); flex: none;
  transition: transform 0.2s var(--ease), color 0.2s;
}
.up-next-row:hover .un-go { transform: translateX(3px); color: var(--ink); }

/* telemetry — quiet instrument strip */
.telemetry {
  position: relative; z-index: 2;
  max-width: 1240px; margin: 56px auto 0; width: 100%;
  display: flex; flex-wrap: wrap;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
}
.tel-item {
  flex: 1 1 160px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 20px 20px 0;
}
.tel-item + .tel-item { padding-left: 20px; border-left: 1px solid var(--line-soft); }
.tel-label { font-size: 9.5px; letter-spacing: 0.26em; color: var(--text-faint); }
.tel-value { font-size: 12px; letter-spacing: 0.06em; color: var(--text-dim); white-space: nowrap; }
.tel-ok { color: var(--text-dim); }
.tel-ok::before {
  content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); margin-right: 7px; vertical-align: 1px;
  animation: blink 1.6s infinite;
}

/* ---------- global focus + interaction cues ---------- */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.ep-card, .person-card, .feat-card { position: relative; }
.ep-card::after, .feat-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 2px;
  background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.ep-card:hover::after, .feat-card:hover::after { transform: scaleX(1); }

/* ---------- sections shared ---------- */
.section-head { max-width: 1240px; margin: 0 auto 56px; }
.eyebrow {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--ink); }
.section-head h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.03em; line-height: 1.08;
  color: var(--ink);
  text-wrap: balance;
}
.section-sub { color: var(--text-dim); margin-top: 16px; max-width: 58ch; font-size: 15px; }
.section-sub a { color: var(--ink); border-bottom: 1px solid var(--line); transition: border-color 0.2s; }
.section-sub a:hover { border-color: var(--ink); }

/* ---------- episodes ---------- */
.episodes {
  padding: clamp(80px, 10vw, 140px) clamp(20px, 4vw, 56px);
  background: var(--bg-2);
  border-block: 1px solid var(--line-soft);
}

.episode-featured { max-width: 1240px; margin: 0 auto 22px; }
.feat-card {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.feat-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); }
.feat-thumb { position: relative; min-height: 300px; overflow: hidden; }
.feat-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.feat-card:hover .feat-thumb img { transform: scale(1.03); }
.feat-body { padding: clamp(26px, 3vw, 46px); display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.feat-body h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(20px, 2.3vw, 28px); line-height: 1.22; letter-spacing: -0.02em;
  color: var(--ink);
}
.feat-body .ep-desc { color: var(--text-dim); font-size: 14.5px; }

.ep-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em;
  color: var(--text-faint); text-transform: uppercase;
}
.ep-chip { color: var(--text-faint); }
.ep-chip + .ep-chip::before { content: "/"; margin-right: 14px; color: var(--line); }
.ep-chip.hot { color: var(--ink); }
.ep-guest { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-family: var(--font-body); font-size: 14px; letter-spacing: 0; text-transform: none; }
.ep-guest b { color: var(--ink); font-weight: 600; }
/* on the small episode cards, let the guest + company flow inline and wrap */
.ep-card .ep-guest { display: block; line-height: 1.5; }
.ep-card .ep-guest b { margin-right: 2px; }

.episode-grid {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px;
}
.ep-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  display: flex; flex-direction: column;
}
.ep-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); }
.ep-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.ep-card:hover .ep-thumb img { transform: scale(1.04); }
.ep-thumb .dur, .latest-thumb .dur {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  font-family: var(--font-mono); font-size: 10.5px;
  background: rgba(10,10,10,0.75); color: #fff;
  padding: 3px 8px; border-radius: 4px; letter-spacing: 0.08em;
}
.ep-thumb .play-hover {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(10,10,10,0.28); opacity: 0; transition: opacity 0.25s;
}
.ep-card:hover .play-hover { opacity: 1; }
.play-hover span {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.94); color: #141414; display: grid; place-items: center;
}
.ep-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ep-body h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); flex: 1;
}
.ep-num {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--text-faint); text-transform: uppercase;
}

/* ---------- passengers ---------- */
.passengers { padding: clamp(80px, 10vw, 140px) clamp(20px, 4vw, 56px); }

.host-card {
  max-width: 1240px; margin: 0 auto 22px;
  display: grid; grid-template-columns: 300px 1fr;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  box-shadow: var(--card-shadow);
}
.host-photo { position: relative; min-height: 300px; }
.host-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) contrast(1.02); }
.host-body { padding: clamp(26px, 3.5vw, 48px); display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.host-label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.26em;
  color: var(--text-faint); text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.host-label::before { content: ""; width: 20px; height: 1px; background: var(--accent); }
.host-body h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -0.025em; color: var(--ink);
}
.host-body .host-role { color: var(--text-dim); font-size: 14px; }
.host-body p.host-bio { color: var(--text-dim); font-size: 14.5px; max-width: 58ch; margin-top: 8px; }
.host-sub { margin-top: 14px; align-self: flex-start; }

.people-grid {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px;
}
.person-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.person-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); }
.person-photo { aspect-ratio: 1/1.05; overflow: hidden; position: relative; background: var(--surface-2); }
.person-photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  transition: filter 0.45s, transform 0.6s var(--ease);
}
.person-card:hover .person-photo img { filter: grayscale(0); transform: scale(1.03); }
.person-initials {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 52px;
  color: var(--text-faint);
  background: var(--surface-2);
}
.person-body { padding: 15px 17px 17px; border-top: 1px solid var(--line-soft); }
.person-body h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 15.5px;
  line-height: 1.25; letter-spacing: -0.01em; color: var(--ink);
}
.person-body p {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-faint); margin-top: 6px;
}
.person-play {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em;
  background: rgba(10,10,10,0.7); color: #fff;
  padding: 5px 10px; border-radius: 999px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.25s, transform 0.25s;
}
.person-card:hover .person-play { opacity: 1; transform: translateY(0); }

/* company info tooltip — a tiny "i" next to a guest's company */
.co { white-space: nowrap; }
.co-i {
  display: inline-grid; place-items: center;
  width: 14px; height: 14px; margin-left: 5px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line);
  background: none; color: var(--text-faint);
  font-family: var(--font-serif); font-style: italic;
  font-size: 10px; line-height: 1; cursor: pointer;
  text-transform: none; vertical-align: middle;
  position: relative; top: -1px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.co-i:hover, .co-i:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }
.ep-guest .co-i { top: 0; }

.co-pop {
  position: fixed; left: 0; top: 0; z-index: 2000;
  width: max-content; max-width: 250px;
  padding: 13px 15px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(20, 20, 20, 0.18);
  display: flex; flex-direction: column; gap: 5px;
  opacity: 0; transform: translateY(5px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  pointer-events: none;
}
.co-pop.on { opacity: 1; transform: none; pointer-events: auto; }
.co-pop-name {
  font-family: var(--font-display); font-weight: 600; font-size: 13.5px;
  letter-spacing: -0.01em; color: var(--ink); text-transform: none;
}
.co-pop-about {
  font-family: var(--font-body); font-size: 12px; line-height: 1.5;
  letter-spacing: 0; text-transform: none; color: var(--text-dim);
}
.co-pop-link {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: none; color: var(--accent); margin-top: 2px; white-space: nowrap;
}
.co-pop-link:hover { text-decoration: underline; }

/* ---------- apply ---------- */
.apply {
  padding: clamp(80px, 10vw, 140px) clamp(20px, 4vw, 56px);
  background: var(--bg-2);
  border-top: 1px solid var(--line-soft);
}
.apply-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 96px);
  align-items: start;
}


/* ---------- the Tesla screen (guest form) ---------- */
.tesla-screen {
  /* Tesla day mode */
  --ts-bg: #f3f4f6;
  --ts-surface: #ffffff;
  --ts-line: rgba(15, 18, 24, 0.1);
  --ts-text: #171a1f;
  --ts-dim: #5b6472;
  --ts-faint: #9aa2ae;
  background: var(--ts-bg);
  border: 7px solid #0a0b0d;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(10, 12, 18, 0.28);
  display: flex; flex-direction: column;
}
.ts-statusbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--ts-line);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--ts-dim);
}
.ts-gears { display: flex; gap: 9px; font-size: 10.5px; color: var(--ts-faint); }
.ts-gears .on { color: var(--ts-text); font-weight: 700; }
.ts-brand {
  display: inline-flex; align-items: center; gap: 7px;
  letter-spacing: 0.22em; color: var(--ts-faint);
}
.ts-brand svg { color: var(--accent); opacity: 0.9; }
.ts-status-r { display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.ts-batt {
  width: 22px; height: 10px;
  border: 1px solid var(--ts-dim); border-radius: 2px;
  position: relative; display: inline-block;
}
.ts-batt::after {
  content: ""; position: absolute; right: -3px; top: 2.5px;
  width: 2px; height: 5px; background: var(--ts-dim); border-radius: 0 1px 1px 0;
}
.ts-batt i { position: absolute; inset: 1.5px; background: #2fae74; border-radius: 1px; display: block; }

.ts-body { padding: clamp(20px, 2.6vw, 32px); flex: 1; min-height: 480px; }
.ts-app { display: none; }
.ts-app.on { display: block; animation: ts-app-in 0.3s var(--ease); }
@keyframes ts-app-in { from { opacity: 0; transform: translateY(6px); } }

/* pod status app */
.ts-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ts-stat {
  background: var(--ts-surface); border: 1px solid var(--ts-line); border-radius: 10px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 3px;
  min-width: 0;
}
.ts-stat small {
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ts-faint);
}
.ts-stat b {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em;
  color: var(--ts-text); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ts-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.ts-chip {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ts-dim);
  background: var(--ts-surface); border: 1px solid var(--ts-line); border-radius: 999px;
  padding: 8px 14px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.ts-chip:hover { color: var(--ts-text); border-color: var(--ts-dim); }
.ts-note { margin-top: 16px; font-size: 11.5px; color: var(--ts-faint); }

/* climate app */
.ts-climate {
  display: flex; align-items: center; justify-content: center; gap: 22px;
  padding: 26px 0 10px;
}
.ts-temp-big {
  font-family: var(--font-display); font-weight: 600; font-size: 56px;
  letter-spacing: -0.03em; color: var(--ts-text);
  min-width: 120px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.ts-round {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ts-surface); border: 1px solid var(--ts-line);
  color: var(--ts-dim); font-size: 20px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.ts-round:hover { color: var(--ts-text); border-color: var(--ts-dim); }
.ts-round:active { transform: scale(0.94); }
.ts-fan-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.ts-fan-label {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ts-faint);
}
.ts-fan { display: inline-flex; border: 1px solid var(--ts-line); border-radius: 999px; overflow: hidden; background: var(--ts-surface); }
.ts-fan button {
  font-family: var(--font-mono); font-size: 10px; color: var(--ts-faint);
  background: none; border: 0; padding: 7px 13px; cursor: pointer;
}
.ts-fan button + button { border-left: 1px solid var(--ts-line); }
.ts-fan button.on { background: var(--ts-text); color: var(--ts-bg); }

/* on air app */
.ts-nowplaying { display: flex; flex-direction: column; gap: 14px; }
.ts-np-cover { border-radius: 10px; overflow: hidden; border: 1px solid var(--ts-line); }
.ts-np-cover img { width: 100%; display: block; }
.ts-np-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ts-text); line-height: 1.3; }
.ts-np-meta { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ts-faint); }
.ts-np-actions { display: flex; gap: 8px; }

/* lists (phone / settings) */
.ts-list { display: flex; flex-direction: column; gap: 8px; }
.ts-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ts-surface); border: 1px solid var(--ts-line); border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s;
}
a.ts-row:hover { border-color: var(--ts-dim); }
.ts-row-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ts-row-main b { font-size: 13.5px; font-weight: 600; color: var(--ts-text); }
.ts-row-main small { font-size: 11px; color: var(--ts-faint); }
.ts-row-go {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ts-dim); white-space: nowrap;
}
.ts-ok { color: #2fae74; }
.ts-seg { display: inline-flex; border: 1px solid var(--ts-line); border-radius: 999px; overflow: hidden; }
.ts-seg button {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ts-faint);
  background: none; border: 0; padding: 7px 13px; cursor: pointer;
}
.ts-seg button + button { border-left: 1px solid var(--ts-line); }
.ts-seg button.on { background: var(--ts-text); color: var(--ts-bg); }
.ts-app-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 20px; }
.ts-app-title {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  letter-spacing: -0.01em; color: var(--ts-text);
}
.ts-app-sub { font-size: 12.5px; color: var(--ts-dim); }

.ts-dock {
  display: flex; align-items: center; justify-content: space-evenly;
  padding: 10px 16px;
  border-top: 1px solid var(--ts-line);
  background: rgba(15, 18, 24, 0.04);
}
.ts-dock-icon {
  width: 40px; height: 36px;
  display: grid; place-items: center;
  color: var(--ts-faint); border-radius: 9px;
  background: none; border: 0; cursor: pointer;
  transition: color 0.2s, background 0.2s, transform 0.15s;
}
.ts-dock-icon:hover { color: var(--ts-dim); transform: translateY(-1px); }
.ts-dock-icon:active { transform: scale(0.94); }
.ts-dock-icon.ts-active {
  color: var(--accent);
  background: rgba(200, 16, 46, 0.1);
  box-shadow: inset 0 0 0 1px rgba(200, 16, 46, 0.28);
}

/* the form inside the screen */
.tesla-screen .apply-form { display: flex; flex-direction: column; gap: 16px; }
.tesla-screen .field label { color: var(--ts-faint); }
.tesla-screen .field input, .tesla-screen .field textarea {
  background: var(--ts-surface); color: var(--ts-text);
  border: 1px solid var(--ts-line); border-radius: 8px;
}
.tesla-screen .field input::placeholder, .tesla-screen .field textarea::placeholder { color: var(--ts-faint); }
.tesla-screen .field input:focus, .tesla-screen .field textarea:focus {
  border-color: var(--ts-dim); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.tesla-screen .ts-submit { background: var(--accent); color: #fff; }
.tesla-screen .ts-submit:hover { opacity: 0.9; }
.tesla-screen .form-fineprint { color: var(--ts-faint); }
.tesla-screen .form-success .fs-mark { border-color: var(--ts-text); color: var(--ts-text); }
.tesla-screen .form-success h3 { color: var(--ts-text); }
.tesla-screen .form-success p { color: var(--ts-dim); }
.tesla-screen .form-error { color: var(--accent); }

.apply-form {
  display: flex; flex-direction: column; gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-faint);
}
.field input, .field textarea {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; font-family: var(--font-body); font-size: 14.5px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field textarea:focus {
  border-color: var(--ink); box-shadow: 0 0 0 3px var(--line-soft);
}
.form-fineprint { font-size: 12px; color: var(--text-faint); text-align: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line-soft); background: var(--bg); }

.footer-cta {
  display: block;
  max-width: 1240px; margin: 0 auto;
  padding: clamp(44px, 6vw, 80px) clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line-soft);
}
.fc-kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--text-faint);
  margin-bottom: 16px;
}
.fc-kicker::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.fc-line {
  display: block;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 3.6vw, 44px); letter-spacing: -0.03em; line-height: 1.12;
  color: var(--ink);
  text-wrap: balance;
}
.fc-line em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.fc-arrow {
  display: inline-block; margin-left: 0.35em;
  transition: transform 0.3s var(--ease);
}
.footer-cta:hover .fc-arrow { transform: translateX(8px); }

.footer-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 30px; padding: clamp(44px, 6vw, 72px) clamp(20px, 4vw, 56px);
}
.footer-brand p { color: var(--text-faint); font-size: 13.5px; margin-top: 16px; }

.mx-badge {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 8px;
  margin-top: 22px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 10px;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.mx-badge:hover { border-color: var(--ink); transform: translateY(-2px); }
.mx-kicker {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-faint);
}
/* the full Marketrix wordmark (black-on-transparent) reads cleanly in light mode */
.mx-wordmark { height: 26px; width: auto; display: block; }
.mx-wordmark-fallback { display: none; }
/* dark mode: the black artwork disappears on a dark surface, so fall back
   to the theme-aware text label instead */
[data-theme="dark"] .mx-wordmark { display: none; }
[data-theme="dark"] .mx-wordmark-fallback {
  display: block;
  font-family: var(--font-display); font-weight: 600; font-size: 15.5px;
  letter-spacing: -0.01em; color: var(--ink);
}

.footer-fsd {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--text-dim);
}
.footer-fsd svg { flex: none; opacity: 0.85; }
.footer-road {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--text-faint);
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; font-weight: 500;
}
.footer-col a { color: var(--text-dim); font-size: 13.5px; transition: color 0.2s; }
.footer-col a:hover { color: var(--ink); }
.footer-bar {
  border-top: 1px solid var(--line-soft);
  max-width: 1240px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 18px clamp(20px, 4vw, 56px);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); letter-spacing: 0.1em;
}

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(12, 12, 12, 0.8); backdrop-filter: blur(6px); }
.modal-card {
  position: relative; width: min(960px, 100%);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.5);
  animation: modalin 0.35s var(--ease);
}
@keyframes modalin { from { opacity: 0; transform: translateY(20px) scale(0.985); } }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(10,10,10,0.6); color: #fff; border: 1px solid rgba(255,255,255,0.18);
  cursor: pointer; font-size: 14px;
  transition: background 0.2s;
}
.modal-close:hover { background: #141414; }
.modal-video { aspect-ratio: 16/9; background: #000; }
.modal-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-meta { padding: 20px 26px 26px; display: flex; flex-direction: column; gap: 10px; }
.modal-meta h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  line-height: 1.3; letter-spacing: -0.015em; color: var(--ink);
}
.modal-meta .ep-desc { color: var(--text-dim); font-size: 14px; }
.modal-links { display: flex; align-items: center; gap: 18px; }
.modal-yt {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-dim);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.modal-yt:hover { color: var(--ink); border-color: var(--ink); }
.modal-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-top: 1px solid var(--line-soft);
  margin-top: 8px; padding-top: 16px;
}
.modal-nav button {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 500;
  color: var(--text-dim); padding: 8px 16px; cursor: pointer;
  max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.modal-nav button:hover:not(:disabled) { color: var(--ink); border-color: var(--ink); }
.modal-nav button:disabled { opacity: 0.35; cursor: default; }
.modal-nav .mn-hint {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.2em;
  color: var(--text-faint); text-transform: uppercase;
}

/* form states */
.apply-form.sending #formSubmitBtn { opacity: 0.6; pointer-events: none; }
.form-success {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center; padding: 34px 10px;
}
.form-success .fs-mark {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--ink); color: var(--ink);
  display: grid; place-items: center; font-size: 18px;
}
.form-success h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 20px;
  letter-spacing: -0.015em; color: var(--ink);
}
.form-success p { color: var(--text-dim); font-size: 14px; max-width: 38ch; }
.form-error {
  color: var(--accent); font-size: 13px; text-align: center;
}

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .latest-card { max-width: 560px; }
  .feat-card { grid-template-columns: 1fr; }
  .feat-thumb { min-height: 0; aspect-ratio: 16/9; }
  .host-card { grid-template-columns: 1fr; }
  .host-photo { min-height: 0; aspect-ratio: 16/10; }
  .apply-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-logo { padding: 7px 14px; }
  .nav-word { font-size: 15px; }
  .nav-burger {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: 0; cursor: pointer; padding: 8px;
  }
  .nav-burger span { width: 20px; height: 1.5px; background: var(--ink); transition: transform 0.3s, opacity 0.3s; }
  .nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .mobile-menu {
    position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 99;
    background: var(--glass); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line-soft);
    flex-direction: column; padding: 8px 24px 20px;
    display: flex; visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }
  .mobile-menu.open { visibility: visible; opacity: 1; transform: none; }
  .mobile-menu a {
    padding: 13px 0; font-family: var(--font-display); font-size: 16px; font-weight: 600;
    letter-spacing: -0.01em; color: var(--ink);
    border-bottom: 1px solid var(--line-soft);
  }
  .mobile-menu a:last-child { border-bottom: 0; }

  /* hero — tighten vertical rhythm, top-align, size down for small screens */
  .hero {
    min-height: auto;
    justify-content: flex-start;
    padding-top: calc(var(--nav-h) + 26px);
    padding-bottom: 8px;
  }
  .hero-inner { flex: none; gap: 32px; }
  .hero-kicker { margin-bottom: 18px; }
  .hero-title { font-size: clamp(33px, 9vw, 46px); margin-bottom: 18px; }
  .hero-sub { font-size: 15px; line-height: 1.6; max-width: none; }
  .hero-ctas { margin-top: 26px; }
  .hero-game { margin-top: 22px; }
  .hero-meta { margin-top: 24px; }
  .latest-card { max-width: 100%; }

  .telemetry { margin-top: 36px; }
  .tel-item { flex: 1 1 50%; padding: 14px 16px 16px 0; }
  .tel-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .tel-value { white-space: normal; }

  .footer-inner { grid-template-columns: 1fr; }
  .hero-map { opacity: 0.55; }
}

@media (max-width: 560px) {
  /* full-width, easy-to-tap CTAs */
  .hero-ctas { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-title .line span { transform: none; }
}

/* ---------- insights pages ---------- */
.in-main { max-width: 1240px; margin: 0 auto; padding: calc(var(--nav-h) + 56px) clamp(20px, 4vw, 56px) 40px; }
.in-crumbs {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-faint); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px;
}
.in-crumbs a { color: var(--text-dim); }
.in-crumbs a:hover { color: var(--accent); }
.in-hero h1 {
  font-family: var(--font-display); font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.08; font-weight: 600; letter-spacing: -0.03em; color: var(--ink);
  margin: 0 0 18px; max-width: 22ch; text-wrap: balance;
}
.in-hero h1 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.in-sub { font-size: clamp(15px, 1.5vw, 17.5px); color: var(--text-dim); max-width: 62ch; line-height: 1.7; }
.in-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint);
}
.in-meta b { color: var(--text-dim); font-weight: 500; }

.insights-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.in-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  box-shadow: var(--card-shadow); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  color: inherit;
}
.in-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.in-card-thumb { aspect-ratio: 16/9; overflow: hidden; }
.in-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.in-card:hover .in-card-thumb img { transform: scale(1.04); }
.in-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.in-card-kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint); }
.in-card-body h2 { font-family: var(--font-display); font-size: 18.5px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; color: var(--ink); margin: 0; }
.in-card-body p { font-size: 13.5px; line-height: 1.6; color: var(--text-dim); margin: 0; flex: 1; }
.in-card-go { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }

.in-article { max-width: 720px; margin-top: 44px; }
.in-article > p { font-size: 16px; line-height: 1.8; color: var(--text-dim); margin: 0 0 22px; }
.in-article h2 {
  font-family: var(--font-display); font-size: 25px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); margin: 42px 0 16px;
}
.in-article h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); margin: 30px 0 10px; }
.in-takeaways { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 13px; }
.in-takeaways li { position: relative; padding-left: 26px; font-size: 15.5px; line-height: 1.65; color: var(--text-dim); }
.in-takeaways li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.in-takeaways b { color: var(--ink); font-weight: 600; }
.in-watch {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 40px 0 0; padding: 20px 22px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.in-watch span { font-size: 14px; color: var(--text-dim); flex: 1; min-width: 200px; }
.in-prevnext { display: flex; justify-content: space-between; gap: 14px; margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.in-prevnext a { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); max-width: 46%; }
.in-prevnext a:hover { color: var(--accent); }

@media (max-width: 1020px) { .insights-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .insights-grid { grid-template-columns: 1fr; } }

/* related insights + home teaser */
.in-related { margin-top: 74px; padding-top: 34px; border-top: 1px solid var(--line-soft); }
.in-related > h2, .home-insights .section-head h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.in-related > h2 { font-size: 24px; margin: 0 0 6px; }
.in-related .insights-grid { margin-top: 24px; }
.in-related .in-card-body h3, .home-insights .in-card-body h3 {
  font-family: var(--font-display); font-size: 17px; font-weight: 600;
  letter-spacing: -0.015em; line-height: 1.3; color: var(--ink); margin: 0;
}
.home-insights { padding: 40px clamp(20px, 4vw, 56px) 110px; max-width: 1240px; margin: 0 auto; }
.home-insights .insights-grid { margin-top: 34px; }
.home-insights-all {
  display: inline-block; margin-top: 26px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim);
}
.home-insights-all:hover { color: var(--accent); }
