/* ==========================================================================
   Identidad: señalización vial española.
   Tipografía Overpass (inspirada en la rotulación de carreteras), azul de autopista,
   rojo de señal, amarillo de obras. Colores de categorías = src/categories.ts.
   ========================================================================== */
:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #f1f0eb;
  --surface-glass: rgba(255, 255, 255, 0.9);
  --line: #e4e2da;
  --line-strong: #cfccc2;
  --ink: #111316;
  --ink-2: #434a55;
  --ink-3: #6d7480;

  --brand: #0a4da2; /* azul autopista */
  --brand-2: #073a7c;
  --red: #d7141a; /* rojo señal */
  --yellow: #ffc400; /* amarillo obras */
  --orange: #f39200;
  --green: #1a9d4b;
  --live: #1fb455;

  --c-accident: #e11d48;
  --c-congestion: #f97316;
  --c-roadwork: #eab308;
  --c-hazard: #8b5cf6;
  --c-weather: #0ea5e9;
  --c-stopped_vehicle: #ff9f0a;
  --c-other: #64748b;

  --shadow-sm: 0 1px 2px rgba(17, 19, 22, 0.06);
  --shadow: 0 1px 2px rgba(17, 19, 22, 0.06), 0 10px 30px -12px rgba(17, 19, 22, 0.22);
  --shadow-lg: 0 2px 6px rgba(17, 19, 22, 0.08), 0 24px 60px -20px rgba(17, 19, 22, 0.35);
  --r-lg: 20px;
  --r: 14px;
  --r-sm: 10px;

  --font: "Overpass", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --topbar-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f13;
    --surface: #15181e;
    --surface-2: #1c2028;
    --surface-glass: rgba(21, 24, 30, 0.9);
    --line: #262b34;
    --line-strong: #353b46;
    --ink: #f2f3f5;
    --ink-2: #b9bfc9;
    --ink-3: #8a919c;
    --brand: #4d8dff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 24px 60px -20px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f13;
  --surface: #15181e;
  --surface-2: #1c2028;
  --surface-glass: rgba(21, 24, 30, 0.9);
  --line: #262b34;
  --line-strong: #353b46;
  --ink: #f2f3f5;
  --ink-2: #b9bfc9;
  --ink-3: #8a919c;
  --brand: #4d8dff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
button {
  font: inherit;
  color: inherit;
}
svg {
  display: block;
}
.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 768px) {
  .wrap {
    padding: 0 28px;
  }
}
.num {
  font-variant-numeric: tabular-nums;
}

/* ---------- Placas de carretera ---------- */
.plate {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.92), 0 0 0 1px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
}
.plate-sm {
  font-size: 0.72rem;
  padding: 4px 6px 2.5px;
}
.plate-md {
  font-size: 0.82rem;
  padding: 5px 7px 3px;
}
.plate-lg {
  font-size: 1.15rem;
  padding: 7px 11px 5px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.92), 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.plate-motorway {
  background: #0a4da2;
  color: #fff;
}
.plate-national {
  background: #d7141a;
  color: #fff;
}
.plate-regional {
  background: #f39200;
  color: #111;
}
.plate-local {
  background: #ffc400;
  color: #111;
}

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-h);
  background: #0e1116;
  color: #fff;
}
.topbar::after {
  /* marca vial discontinua */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 22px, transparent 22px 36px);
  opacity: 0.9;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
  max-width: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}
.brand-sign {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand);
  box-shadow: inset 0 0 0 2px #fff;
  display: grid;
  place-items: center;
}
.brand small {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9aa3ae;
  margin-top: 1px;
}
.topnav {
  display: flex;
  gap: 2px;
  margin-left: 8px;
}
.topnav a {
  padding: 8px 12px 6px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.93rem;
  color: #c9ced6;
}
.topnav a:hover,
.topnav a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.theme-toggle {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}
.theme-toggle .moon,
:root[data-theme="dark"] .theme-toggle .sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .moon {
  display: block;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  padding: 7px 12px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--live);
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.stale .pulse {
  background: #f59e0b;
}
.stale .pulse::after {
  display: none;
}
@keyframes ping {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pulse::after {
    animation: none;
  }
}
@media (max-width: 640px) {
  .topnav {
    display: none;
  }
  .brand small {
    display: none;
  }
}

/* ---------- Bloque en vivo: mapa + panel ---------- */
.live {
  position: relative;
  background: var(--surface-2);
}
#map {
  position: relative;
  height: 62vh;
  min-height: 380px;
  background: var(--surface-2);
}
.map-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-weight: 600;
  font-size: 0.9rem;
  pointer-events: none;
}
.map-ready .map-loading {
  display: none;
}
.jumps {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 34px;
  display: flex;
  gap: 6px;
}
.jumps button {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 12px 6px;
  border-radius: 999px;
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.jumps button:hover {
  background: var(--surface);
}

.panel {
  position: relative;
  z-index: 4;
  background: var(--surface);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  margin-top: -22px;
  box-shadow: 0 -12px 30px -18px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}
.panel-head {
  padding: 22px 18px 6px;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.panel h1 {
  margin-top: 8px;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.15rem);
  font-weight: 900;
}
.lead {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.45;
}
.lead b {
  color: var(--ink);
  font-weight: 700;
}
.updated {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--ink-3);
}
.updated time {
  font-weight: 700;
  color: var(--ink-2);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 18px 4px;
}
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 11px 11px 9px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s, transform 0.15s;
}
.stat:hover {
  border-color: var(--line-strong);
}
.stat:active {
  transform: scale(0.98);
}
.stat svg {
  width: 30px;
  height: 30px;
}
.stat .n {
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat .l {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  line-height: 1.1;
}
/* Filtros: todo activo de base; al desactivar una categoría se atenúa */
.stat[aria-pressed="false"],
.toggle[aria-pressed="false"] {
  opacity: 0.42;
  background: var(--surface-2);
}
.stat[aria-pressed="false"] svg,
.toggle[aria-pressed="false"] svg {
  filter: grayscale(1);
}
.stat[aria-pressed="false"] .n {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
/* Conmutador "solo vías cortadas" (independiente de las categorías) */
.closure-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 18px 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.closure-switch > svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.closure-switch .sw {
  position: relative;
  flex: none;
  width: 36px;
  height: 22px;
  border-radius: 99px;
  background: var(--line-strong);
  transition: background 0.15s;
}
.closure-switch .sw::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.closure-switch[aria-checked="true"] {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}
.closure-switch[aria-checked="true"] .sw {
  background: var(--red);
}
.closure-switch[aria-checked="true"] .sw::after {
  transform: translateX(14px);
}
.cs-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.cs-text b {
  font-size: 0.92rem;
  font-weight: 800;
}
.cs-text span {
  font-size: 0.74rem;
  color: var(--ink-3);
}
.closure-switch:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.stat:focus-visible,
.toggle:focus-visible,
.inc:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 18px 10px;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 11px 4px 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.toggle svg {
  width: 20px;
  height: 20px;
}
.toggle .n {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.panel-list {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 18px 6px;
}
.list-head h2 {
  font-size: 1.02rem;
  font-weight: 800;
}
.list-head span {
  font-size: 0.78rem;
  color: var(--ink-3);
}
.incs {
  list-style: none;
  margin: 0;
  padding: 2px 8px 10px;
  overflow-y: auto;
}

/* Tarjeta de incidencia */
.inc {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.12s;
}
.inc + .inc {
  border-top: 1px solid var(--line);
}
.inc:hover {
  background: var(--surface-2);
}
.inc:hover + .inc {
  border-top-color: transparent;
}
.inc-ico svg {
  width: 38px;
  height: 38px;
}
.inc-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.inc-km {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.inc-time {
  margin-left: auto;
  font-size: 0.76rem;
  color: var(--ink-3);
  white-space: nowrap;
}
.inc-title {
  margin-top: 4px;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.25;
}
.inc-meta {
  margin-top: 2px;
  font-size: 0.84rem;
  color: var(--ink-2);
  line-height: 1.35;
}
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 7px 1.5px;
  border-radius: 5px;
}
.tag-red {
  background: #d7141a;
  color: #fff;
}
.tag-amber {
  background: color-mix(in srgb, var(--yellow) 30%, var(--surface));
  color: #7a4d00;
}
:root:not([data-theme="light"]) .tag-amber {
  color: var(--ink);
}
.empty {
  padding: 22px 18px;
  color: var(--ink-3);
}

@media (max-width: 1099px) {
  .live {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    padding-bottom: 8px;
  }
  .panel {
    display: contents;
  }
  .panel-head {
    order: 1;
  }
  .stats {
    order: 2;
  }
  .toggles {
    order: 3;
  }
  .closure-switch {
    order: 3;
  }
  #map {
    order: 4;
    margin: 4px 16px 0;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 64vh;
  }
  .panel-list {
    order: 5;
    margin-top: 18px;
  }
  .jumps {
    bottom: 12px;
  }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  #map {
    height: clamp(600px, calc(100vh - var(--topbar-h)), 900px);
  }
  .panel {
    position: absolute;
    top: 16px;
    left: 16px;
    bottom: 16px;
    width: 410px;
    margin: 0;
    border-radius: var(--r-lg);
    background: var(--surface-glass);
    backdrop-filter: blur(14px) saturate(1.3);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
  }
  .panel-list {
    flex: 1;
  }
  .jumps {
    bottom: 34px;
  }
}

/* ---------- Secciones ---------- */
.section {
  margin-top: 56px;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 18px;
}
.section-head h2 {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  font-weight: 900;
}
.section-head p {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.92rem;
}
.eyebrow {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}

.regions {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.region {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-sm);
}
.region-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.region h3 {
  font-size: 1.05rem;
  font-weight: 800;
}
.region .total {
  font-size: 1.6rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.bar {
  display: flex;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--surface-2);
  margin: 12px 0 10px;
}
.bar i {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--c);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--ink-2);
}
.legend li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}
.legend svg {
  width: 16px;
  height: 16px;
}
.legend b {
  color: var(--ink);
}

.roads {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.road {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.road .count {
  white-space: nowrap;
  text-align: right;
  font-size: 0.72rem;
  color: var(--ink-3);
  line-height: 1.1;
}
.road .count b {
  display: block;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.road .count .sev {
  color: var(--red);
  font-weight: 700;
}

.cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.card .inc {
  cursor: default;
  padding: 14px;
}
.card .inc:hover {
  background: none;
}

/* ---------- Publicidad (hueco reservado, sin saltos) ---------- */
.ad-slot {
  display: grid;
  place-items: center;
  min-height: 250px;
  margin: 40px 0 0;
  border-radius: var(--r);
  border: 1px dashed var(--line-strong);
  color: var(--ink-3);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
@media (min-width: 768px) {
  .ad-slot {
    min-height: 120px;
  }
}

/* ---------- Pie ---------- */
.footer {
  margin-top: 72px;
  background: #0e1116;
  color: #b9bfc9;
  font-size: 0.9rem;
  position: relative;
}
.footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: repeating-linear-gradient(90deg, #fff 0 22px, transparent 22px 36px);
  opacity: 0.15;
}
.footer .wrap {
  padding-top: 40px;
  padding-bottom: 48px;
  display: grid;
  gap: 28px;
}
@media (min-width: 900px) {
  .footer .wrap {
    grid-template-columns: 1.1fr 2fr;
  }
}
.footer .brand {
  color: #fff;
}
.footer h2 {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 3px;
}
.sources {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.sources span {
  display: block;
  color: #8a919c;
  font-size: 0.82rem;
}
.disclaimer {
  margin: 16px 0 0;
  color: #8a919c;
  font-size: 0.84rem;
  max-width: 60ch;
}

/* ---------- Mapa: popup ---------- */
.maplibregl-popup-content {
  background: var(--surface) !important;
  color: var(--ink);
  border-radius: 14px !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0 !important;
  font: 14px/1.4 var(--font);
  min-width: 250px;
}
.maplibregl-popup-tip {
  border-top-color: var(--surface) !important;
  border-bottom-color: var(--surface) !important;
}
.maplibregl-popup-close-button {
  font-size: 18px;
  padding: 4px 8px;
  color: var(--ink-3);
}
.maplibregl-popup-content .inc {
  cursor: default;
  padding: 14px 16px 14px 14px;
}
.maplibregl-popup-content .inc:hover {
  background: none;
}
.maplibregl-ctrl-group {
  border-radius: 12px !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden;
}
.maplibregl-ctrl-attrib {
  font-family: var(--font);
}

/* ==========================================================================
   Fase 2: menú, fichas de carretera y zona, índice de carreteras
   ========================================================================== */

/* ---------- Menú (details) ---------- */
.menu {
  position: relative;
}
.menu > summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px 6px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.93rem;
  color: #c9ced6;
}
.menu > summary::-webkit-details-marker {
  display: none;
}
.menu > summary::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 0 3px 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.menu[open] > summary,
.menu > summary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
/* Panel del menú: oscuro como la barra, a todo lo ancho y pegado a la marca vial amarilla */
.menu-panel {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  z-index: 29;
  padding: 22px 0 26px;
  background: #0e1116;
  color: #fff;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.6);
  border-top: 3px solid transparent; /* deja ver la marca vial de la barra */
}
.menu-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  gap: 18px 40px;
  grid-template-columns: 240px minmax(0, 1fr);
}
@media (max-width: 760px) {
  .menu-inner {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
}
.menu-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.menu-main a {
  padding: 11px 14px 9px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 800;
  font-size: 0.98rem;
  color: #fff;
}
.menu-title {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a919c;
  margin-bottom: 8px;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 2px 16px;
}
.menu-grid a,
.menu-grid span {
  display: block;
  padding: 7px 10px 5px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 0.93rem;
  color: #e6e9ee;
  border-left: 3px solid transparent;
}
.menu-grid span {
  color: #5d6570;
  cursor: default;
}
.menu-grid span small {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 6px;
}
.menu-grid a:hover,
.menu-main a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-left-color: var(--yellow);
}
.menu-mobile {
  display: none;
  margin-left: auto;
}
@media (max-width: 760px) {
  .topnav {
    display: none;
  }
  .menu-mobile {
    display: block;
  }
  .theme-toggle {
    margin-left: 0;
  }
  .live-badge {
    display: none;
  }
}

/* ---------- Enlaces en tarjetas ---------- */
a.region,
a.road {
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
a.region:hover,
a.road:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.plate-link {
  display: inline-flex;
}
.plate-link:hover .plate {
  filter: brightness(1.08);
  box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 2px var(--brand);
}
.inc-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--brand);
}
.more {
  font-weight: 800;
  color: var(--brand);
}

/* ---------- Páginas y fichas ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--ink-3);
}
.crumbs a:hover {
  color: var(--brand);
}
.crumbs [aria-current] {
  color: var(--ink);
  font-weight: 700;
}
.page .page-head {
  margin: 18px 0 8px;
  max-width: 820px;
}
.page-head h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem);
  font-weight: 900;
}
.page-head .lead {
  font-size: 1.05rem;
}
.page-head a,
.prose a {
  color: var(--brand);
  font-weight: 700;
}
.road-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}
.road-hero p {
  margin: 0;
  color: var(--ink-2);
}
.prose {
  max-width: 78ch;
  margin: 0 0 18px;
  font-size: 1.04rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.prose b {
  color: var(--ink);
}
.muted {
  color: var(--ink-3);
}
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.kpi {
  padding: 16px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.kpi b {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi span {
  font-size: 0.82rem;
  color: var(--ink-3);
  font-weight: 700;
}
.kpi.red b {
  color: var(--red);
}
.stat-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.card.pad {
  padding: 16px 18px;
}
.card h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.card .muted {
  margin: -4px 0 10px;
  font-size: 0.86rem;
}
.segments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.segments li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 0.88rem;
}
.seg-km {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.seg-bar {
  height: 10px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.seg-bar i {
  display: block;
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, #f97316, #e11d48);
  border-radius: 99px;
}
.seg-n {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.seg-n em {
  font-style: normal;
  font-weight: 700;
  color: var(--red);
  font-size: 0.8rem;
}
.bars {
  margin: 0;
}
.bars-plot {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 90px;
}
.bars-plot .b {
  flex: 1;
  height: max(3px, var(--h));
  border-radius: 4px 4px 1px 1px;
  background: color-mix(in srgb, var(--brand) 35%, var(--surface-2));
}
.bars-plot .b.hot {
  background: var(--brand);
}
.bars-axis {
  display: flex;
  gap: 3px;
  margin-top: 5px;
}
.bars-axis span {
  flex: 1;
  font-size: 0.68rem;
  color: var(--ink-3);
  white-space: nowrap;
}
.types {
  list-style: none;
  margin: 0;
  padding: 0;
}
.types li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.types li:first-child {
  border-top: 0;
}
.types b {
  font-variant-numeric: tabular-nums;
}
.hotspots {
  margin-top: 12px;
  max-width: 560px;
}
.chips-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips-links a {
  padding: 9px 14px 7px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.92rem;
}
.chips-links a:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.plate-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.plate-cloud a {
  display: inline-flex;
  transition: transform 0.12s;
}
.plate-cloud a:hover {
  transform: translateY(-1px) scale(1.04);
}

/* Zonas aún no publicadas (publicación progresiva) */
.region.locked {
  opacity: 0.55;
  box-shadow: none;
  background: var(--surface-2);
}
.region.locked h3::after {
  content: "Pronto";
  margin-left: 8px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  vertical-align: 2px;
}
.chips-links span {
  padding: 9px 14px 7px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  color: var(--ink-3);
  font-weight: 700;
  font-size: 0.92rem;
}

/* ---------- Cámaras ---------- */
.cams {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.cam {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cam-img {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #1b1f26;
}
.cam-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cam-live {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px 1px;
  border-radius: 5px;
  background: rgba(215, 20, 26, 0.92);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cam figcaption {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 10px 12px;
  font-size: 0.86rem;
  font-weight: 700;
}
.cam figcaption em {
  margin-left: auto;
  font-style: normal;
  font-weight: 600;
  color: var(--ink-3);
  font-size: 0.8rem;
}
.more-cams {
  margin-top: 12px;
}
.more-cams > summary {
  cursor: pointer;
  display: inline-block;
  font-weight: 800;
  color: var(--brand);
  padding: 8px 0;
  list-style: none;
}
.more-cams > summary::-webkit-details-marker {
  display: none;
}
.more-cams[open] > summary {
  margin-bottom: 12px;
}
.cam-note {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--ink-3);
}
.empty-note {
  padding: 18px;
  border-radius: var(--r);
  border: 1px dashed var(--line-strong);
  color: var(--ink-3);
  max-width: 78ch;
}

/* ---------- El tiempo en la vía (visual) ---------- */
.wx-sum {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.wx-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9rem;
}
.wx-chip svg {
  margin-top: -2px;
  color: var(--ink-3);
}
.wx-chip b {
  color: var(--ink);
  font-weight: 800;
}
.wx-chip.on {
  border-color: color-mix(in srgb, #3b82f6 45%, var(--line));
  background: color-mix(in srgb, #3b82f6 10%, var(--surface));
}
.wx-strip,
.wx-grid {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Tira a lo largo de la carretera: una "calzada" con los hitos kilométricos encima */
.wx-strip {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, 1fr);
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 0 8px;
  scrollbar-width: thin;
}
/* Cada parada lleva su trozo de calzada: así la carretera se desplaza con la tira */
.wx-strip .wx-stop::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  right: -10px;
  height: 10px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0 12px, transparent 12px 22px) 0 4px / 100% 2px no-repeat, #3d434d;
}
.wx-strip .wx-stop:first-child::before {
  border-radius: 5px 0 0 5px;
}
.wx-strip .wx-stop:last-child::before {
  right: 0;
  border-radius: 0 5px 5px 0;
}
.wx-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.wx-stop {
  position: relative;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.wx-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}
.wx-grid .wx-stop,
.wx-strip .wx-card {
  padding: 0 10px 12px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.wx-strip .wx-card {
  flex: 1;
  margin-top: 8px;
  padding-top: 4px;
}
.wx-where {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink-2);
  padding-top: 12px;
  line-height: 1.2;
}
/* Hito kilométrico sobre la calzada */
.wx-strip .wx-where {
  position: relative;
  z-index: 1;
  padding: 4px 8px 1px;
  margin-top: 4px;
  border-radius: 5px;
  background: #fff;
  color: #111316;
  border: 1.5px solid #111316;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wx-pic {
  margin-top: 8px;
  line-height: 0;
}
.wx-t {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-top: 2px;
}
.wx-cond {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.wx-stop.alert .wx-cond {
  color: #0369a1;
}
.wx-wind .wx-cond,
.wx-fog .wx-cond {
  color: #b45309 !important;
}
.wx-grid .wx-stop.alert,
.wx-strip .wx-stop.alert .wx-card {
  border-color: color-mix(in srgb, #3b82f6 45%, var(--line));
  background: color-mix(in srgb, #3b82f6 6%, var(--surface));
}
:root[data-theme="dark"] .wx-stop.alert .wx-cond {
  color: #7dd3fc;
}
.wx-nums {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 10px;
  margin-top: 6px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.wx-nums span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.wx-nums svg {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
}
.wx-nums small {
  font-weight: 600;
  color: var(--ink-3);
  font-size: 0.72rem;
}
.wx-name {
  margin-top: 6px;
  font-size: 0.74rem;
  color: var(--ink-3);
  line-height: 1.2;
}
.wx-dot {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #f97316);
  color: #fff;
  font-weight: 900;
  font-size: 0.8rem;
}

/* ---------- Radares ---------- */
.radars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px 16px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.radars li {
  display: grid;
  grid-template-columns: 30px 92px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}
.radars svg {
  grid-row: span 2;
}
.rd-km {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.rd-kind {
  font-weight: 700;
  font-size: 0.86rem;
}
.rd-meta {
  grid-column: 2 / 4;
  font-size: 0.78rem;
  color: var(--ink-3);
}

/* ---------- Popups de capas ---------- */
.pop-cam img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  background: #1b1f26;
}
.pop-cam-body,
.pop-simple {
  padding: 12px 14px;
}
.pop-note {
  margin-top: 4px;
  font-size: 0.74rem;
  color: var(--ink-3);
}
.pop-wx {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 2px;
  font-size: 0.82rem;
  color: var(--ink-2);
}
.pop-wx b {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--ink);
}

/* ---------- Incidencias ahora (lista completa bajo el mapa) ---------- */
.eyebrow .pulse {
  display: inline-block;
  margin: 0 6px 1px 1px;
  vertical-align: middle;
}
.ig-cuts {
  color: var(--red);
}
.igs {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.ig-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}
.ig-head h3 {
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
}
.ig-head h3 a {
  text-decoration: none;
  color: inherit;
}
.ig-n {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 8px 1px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
}
.ig-meta {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.ig-link {
  font-weight: 800;
  color: var(--brand);
  text-decoration: none;
}
.ig-other {
  font-weight: 900;
}
.inc-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  padding: 0;
  overflow: visible;
}
.inc-grid .inc,
.inc-grid .inc + .inc {
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.inc-grid .inc:hover {
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.inc-grid .inc:hover + .inc {
  border-top-color: var(--line);
}
/* En la ficha de una carretera todas son de esa vía: la placa sobra */
.by-province .inc-top > .plate,
.by-province .inc-top > .plate-link {
  display: none;
}
.inc-grid .inc.inc-cut {
  border-left: 4px solid var(--red);
}
.ig-more {
  margin-top: 10px;
}
.ig-more > summary {
  cursor: pointer;
  display: inline-block;
  font-weight: 800;
  color: var(--brand);
  padding: 6px 0;
  list-style: none;
}
.ig-more > summary::-webkit-details-marker {
  display: none;
}
.ig-more[open] > summary {
  margin-bottom: 10px;
}
.ig-rest[open] {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.ig-v16 {
  margin-top: 28px;
}
.ig-v16 .inc-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.inc-grid .inc.inc-v16 {
  padding: 10px 12px;
  box-shadow: none;
}
.list-all {
  display: block;
  margin: 2px 18px 14px;
  padding: 11px 14px 9px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--brand);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}
.list-all:hover {
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}
@media (max-width: 1099px) {
  /* En móvil la lista completa está justo debajo: el panel no la repite */
  .live.has-all .panel-list {
    display: none;
  }
}
@media (max-width: 640px) {
  .inc-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ig-meta {
    margin-left: 0;
    width: 100%;
  }
}

/* ---------- Cámaras: paginador ---------- */
.cams-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.cams-arrow {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: 900 1.5rem/1 var(--font);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding-bottom: 3px;
}
.cams-arrow:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}
.cams-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}
.cams-go {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-3);
}
.cams-go select {
  min-width: 0;
  max-width: 320px;
  flex: 1;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: 700 0.92rem var(--font);
}
.cams-count {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .cams-count,
  .cams-go > span {
    display: none;
  }
}

/* ---------- Historial navegable ---------- */
.hx {
  margin-top: 6px;
}
.hx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.hx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 2px 13px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: 700 0.9rem var(--font);
  cursor: pointer;
}
.hx-chip svg {
  margin-top: -2px;
}
.hx-chip span {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.hx-chip:hover {
  border-color: var(--brand);
}
.hx-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}
.hx-chip[aria-pressed="true"] span {
  color: inherit;
  opacity: 0.7;
}
.hx-chart {
  margin-bottom: 14px;
  padding: 14px 16px 8px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
}
.hx-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 70px;
}
.hx-bars button {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.hx-bars i {
  display: block;
  width: 100%;
  height: max(3px, var(--h));
  border-radius: 3px 3px 0 0;
  background: color-mix(in srgb, var(--brand) 55%, var(--surface));
  transition: background 0.12s;
}
.hx-bars button:hover i {
  background: var(--brand);
}
.hx-bars button.on i {
  background: var(--red);
}
.hx-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.74rem;
  color: var(--ink-3);
}
.hx-dayf {
  display: none;
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.hx.has-day .hx-dayf {
  display: block;
}
.hx-dayf button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--brand);
  font: 800 0.9rem var(--font);
  cursor: pointer;
}
.hx-list {
  list-style: none;
  margin: 0;
  padding: 0 16px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: opacity 0.15s;
}
.hx.busy .hx-list {
  opacity: 0.5;
}
.hx-day {
  padding: 16px 0 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  border-bottom: 2px solid var(--line);
}
.hx-row {
  display: grid;
  grid-template-columns: 46px 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 0;
}
.hx-row + .hx-row {
  border-top: 1px solid var(--line);
}
.hx-t {
  padding-top: 5px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.hx-ico svg {
  width: 30px;
  height: 30px;
}
.hx-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.hx-top b {
  font-weight: 800;
}
.hx-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 3px;
  font-size: 0.84rem;
  color: var(--ink-2);
}
.hx-dur,
.hx-live {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 7px 0;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.hx-live {
  background: color-mix(in srgb, var(--live) 16%, var(--surface));
  color: #137a3a;
}
:root[data-theme="dark"] .hx-live {
  color: #6ee7a0;
}
.hx-none {
  padding: 22px 0;
  color: var(--ink-3);
}
.hx-more {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--brand);
  font: 800 0.95rem var(--font);
  cursor: pointer;
}
.hx-more[hidden] {
  display: none;
}
.hx-more small {
  font-weight: 600;
  color: var(--ink-3);
}
.hx-more:hover {
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}
@media (max-width: 640px) {
  .hx-list {
    padding: 0 12px;
  }
  .hx-row {
    grid-template-columns: 40px 26px minmax(0, 1fr);
    gap: 8px;
  }
  .hx-ico svg {
    width: 26px;
    height: 26px;
  }
  .hx-chip {
    height: 34px;
    font-size: 0.84rem;
  }
}
