#cv { background: #0a0c10 url("./frames/traffic/f_0001.webp") center / cover no-repeat; }
nav { gap: 12px; background: linear-gradient(#0a0c10f5, #0a0c10c9 65%, transparent); }
nav div { color: var(--fg); }
section, footer { scroll-margin-top: 70px; }
.action {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 24px;
  padding: 10px 18px;
  border: 1px solid var(--gold);
  border-radius: 9px;
  color: #100d08;
  background: #e9b957;
  font: 700 15px/1.4 "Space Grotesk", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.decide .action { margin-top: 0; }
.replay {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 70px);
  align-items: center;
  margin-top: 36px;
}
.replay-screen {
  position: relative;
  width: 100%;
  max-width: 420px;
  justify-self: center;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #000;
}
.replay-screen video { display: block; width: 100%; aspect-ratio: 4 / 5; }
.replay-screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.replay-data h3 { font-size: clamp(24px, 3vw, 38px); font-weight: 500; line-height: 1.1; }
.replay-metrics, .replay-counts { display: grid; gap: 8px 16px; margin-top: 20px; }
.replay-metrics div, .replay-counts div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.replay-metrics div { padding: 7px 0; border-bottom: 1px solid var(--line); }
.replay-metrics dd { font-weight: 700; color: var(--gold); }
.replay-counts { grid-template-columns: 1fr 1fr; font-size: 15px; color: var(--mut); }
.replay-counts dt::before { content: ""; display: inline-block; background: var(--class-color); width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.replay-counts dd { color: var(--fg); font-variant-numeric: tabular-nums; }
.toggle { display: flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 15px; }
.toggle input { width: 16px; height: 16px; accent-color: var(--gold); }
.media-motion video { aspect-ratio: 4 / 3; }
@media (hover: hover) and (pointer: fine) { .action:hover { background: #ffd886; } }
@media (max-width: 760px) {
  .replay { grid-template-columns: 1fr; }
  .replay-screen { max-width: 320px; }
  nav div { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px 14px; }
  nav .tag { display: none; }
}
@media (max-height: 710px) { .ch[data-i="3"] > .tx p { margin-top: 8px; } .decide { padding: 13px; gap: 8px; } .cue { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .ch, #emg { transition: none; }
  #emg, .cue::after, .pv, .chakra { animation: none; }
}
.nav-workspace { display: grid; gap: clamp(18px, 4vw, 44px); margin-top: 35px; align-items: start; }
.nav-workspace { grid-template-columns: minmax(0, 1.8fr) minmax(250px, 1fr); }
.nav-stage { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #10151e; }
.nav-stage-head, .nav-stage-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 15px 18px; }
.nav-stage-head { border-bottom: 1px solid var(--line); }
.nav-stage-head span, .chat-head p { color: var(--mut); font-size: 14px; }
.nav-stage-foot { border-top: 1px solid var(--line); }
.nav-stage-foot > span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
#signal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--signal-color, var(--green)); }
#road-map { display: block; width: 100%; height: auto; background: #0c1119; }
#road-map text { font: 600 15px "Space Grotesk", system-ui, sans-serif; fill: #e7edf5; text-anchor: middle; paint-order: stroke; stroke: #0c1119; stroke-width: 4px; stroke-linejoin: round; }
.trip-controls { display: grid; gap: 14px; }
.trip-controls label { display: grid; gap: 5px; font-size: 14px; }
.trip-controls select, #chat-question { min-width: 0; width: 100%; color: var(--fg); background: #0d121b; border: 1px solid #59616d; border-radius: 9px; padding: 10px 12px; font: inherit; color-scheme: dark; }
#route-result { padding-top: 12px; border-top: 1px solid var(--line); }
#route-result strong { display: block; color: #f3c76f; }
#route-result p { font-size: 15px; }
#route-result + .note { margin-top: 0; font-size: 14px; }
.nav-stage-foot .action, #chat-form .action { margin: 0; }
.chat { min-width: 0; }
.chat-head { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.chat-head h3 { font-size: 26px; line-height: 1.2; }
.chat-head > span { color: #f3c76f; font-size: 14px; }
.chat-log { display: flex; flex-direction: column; gap: 10px; height: clamp(210px, 29vh, 310px); overflow-y: auto; padding: 14px 4px 14px 0; }
.message { max-width: 92%; width: fit-content; background: #171e2b; border: 1px solid var(--line); border-radius: 12px 12px 12px 3px; padding: 9px 12px; font-size: 16px; overflow-wrap: anywhere; }
.message b { display: block; color: #f3c76f; font-size: 13px; }
.user-message { align-self: flex-end; border-radius: 12px 12px 3px 12px; background: #30281c; }
.chat-prompts { margin: 4px 0 13px; }
.chat-prompts button { font-size: 14px; }
#chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 800px) {
  .nav-workspace { grid-template-columns: 1fr; }
}
.nav-assistant {
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.assistant-dock {
  position: fixed;
  z-index: 45;
  inset-inline-end: max(14px, env(safe-area-inset-right));
  inset-block-end: max(14px, env(safe-area-inset-bottom));
  --assistant-ease: cubic-bezier(.23, 1, .32, 1);
}
.assistant-launch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-inline-start: auto;
  background: none;
  border: 0;
  border-radius: 14px;
  padding: 0;
  cursor: pointer;
}
.assistant-cloud {
  position: relative;
  padding: 9px 14px;
  border: 1px solid #dfb96a;
  border-radius: 20px;
  background: #fff4d9;
  color: #372715;
  font: 700 14px/1.25 "Space Grotesk", system-ui, sans-serif;
  text-align: left;
  box-shadow: 0 5px 20px #0005;
}
.assistant-cloud::after {
  content: "";
  position: absolute;
  inset-inline-end: -8px;
  top: 48%;
  border-block: 6px solid transparent;
  border-inline-start: 8px solid #fff4d9;
}
.assistant-avatar {
  display: block;
  width: 70px;
  height: 70px;
  overflow: hidden;
  border: 2px solid #efc674;
  border-radius: 50%;
  background: #91d1e2;
  box-shadow: 0 4px 20px #0009;
}
.assistant-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.assistant-dock:not([data-interacted]) .assistant-avatar { animation: sanjaya-float 2.4s var(--assistant-ease) 2; }
.assistant-launch:focus-visible .assistant-avatar { animation-play-state: paused; }
@keyframes sanjaya-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.assistant-dock[data-interacted] .assistant-cloud { display: none; }
.assistant-panel {
  position: absolute;
  inset-inline-end: 0;
  inset-block-end: calc(100% + 12px);
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 28px));
  max-height: calc(100dvh - 140px);
  padding: 16px;
  border-color: #695a3f;
  background: #10151f;
  box-shadow: 0 16px 54px #0009;
  opacity: 0;
  visibility: hidden;
  transform: translateY(7px) scale(.97);
  transform-origin: bottom right;
  transition: opacity 180ms var(--assistant-ease), transform 180ms var(--assistant-ease), visibility 0s linear 180ms;
}
.assistant-dock[data-open] .assistant-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.assistant-panel .chat-head { flex-wrap: nowrap; }
.assistant-panel .chat-head h3 { font-size: 22px; }
.assistant-panel .chat-log { min-height: 45px; height: clamp(110px, 27dvh, 245px); overscroll-behavior: contain; }
.assistant-panel .message { flex: 0 0 auto; }
.assistant-minimize {
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg);
  background: #202838;
  font: 600 22px/1 system-ui, sans-serif;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .nav-assistant:hover { color: #f3c76f; }
  .assistant-launch:hover .assistant-avatar { animation-play-state: paused; }
}
@media (max-width: 460px) {
  .assistant-dock { inset-inline-end: max(10px, env(safe-area-inset-right)); }
  .assistant-avatar { width: 58px; height: 58px; }
  .assistant-panel { width: calc(100vw - 20px); }
}
@media (max-height: 430px) {
  .assistant-panel { padding: 10px; }
  .assistant-panel .chat-head { padding-bottom: 6px; }
  .assistant-panel .chat-prompts { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .assistant-dock:not([data-interacted]) .assistant-avatar { animation: none; }
  .assistant-panel { transform: none; transition-property: opacity, visibility; }
}
nav div { gap: clamp(4px, 1vw, 12px); justify-content: flex-end; align-items: stretch; }
nav div > :is(a, button) {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  line-height: 1.24;
  text-align: center;
  white-space: nowrap;
}
nav [lang="hi"] {
  margin-top: 3px;
  color: #d4be98;
  font: 400 13px/1.25 "Noto Sans Devanagari", system-ui, sans-serif;
}
nav :is(a[aria-current="location"], button[aria-expanded="true"]) {
  background: #322819;
  border-color: #bf9651;
  color: #fff1ce;
}
nav :is(a[aria-current="location"], button[aria-expanded="true"]) [lang="hi"] { color: #ffda8e; }
.assistant-avatar {
  transform-origin: bottom right;
  transition: transform 220ms var(--assistant-ease);
}
.assistant-dock[data-open] .assistant-avatar { transform: scale(1.48); }
.assistant-panel {
  inset-block-end: calc(100% + 45px);
  max-height: calc(100dvh - 205px);
}
@media (hover: hover) and (pointer: fine) {
  nav div > :is(a, button):hover { background: #322819; color: #fff1ce; }
}
@media (max-width: 520px) {
  nav { gap: 4px; padding-inline: 8px; }
  nav b { gap: 4px; font-size: 13px; }
  nav .chakra { width: 17px; height: 17px; }
  nav div { gap: 2px; }
  nav div > :is(a, button) { padding: 4px 5px; font-size: clamp(10px, 2.8vw, 13px); }
  nav [lang="hi"] { font-size: clamp(10px, 2.8vw, 13px); }
  .assistant-panel {
    inset-block-end: calc(100% + 39px);
    max-height: calc(100dvh - 195px);
  }
}
@media (prefers-reduced-motion: reduce) { .assistant-avatar { transition: none; } }
