/* Routes Page - Cartographic Atlas Aesthetic
   - Bold, route-first browsing
   - Mobile-first, responsive grid
*/

.routes-page {
  --routes-bg: var(--surface-0);
  --routes-bg-elevated: var(--surface-1);
  --routes-bg-subtle: var(--surface-2);
  --routes-border: rgb(var(--border-rgb) / 22%);
  --routes-text: var(--text-primary);
  --routes-text-muted: var(--text-secondary);
  --routes-primary: var(--primary);
  --routes-primary-rgb: var(--primary-rgb);
  --routes-accent: var(--accent);
  --routes-shadow: var(--shadow-md);
  --routes-radius: var(--radius-xl);

  min-height: 100vh;
  background: var(--routes-bg);
  color: var(--routes-text);
  position: relative;
  overflow-x: hidden;
}

.routes-ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.routes-ambient-gradient {
  position: absolute;
  inset: -40% -25% auto auto;
  width: min(1200px, 100vw);
  height: min(900px, 100vh);
  background: radial-gradient(
    circle at 20% 20%,
    rgb(var(--routes-primary-rgb) / 14%) 0%,
    rgb(var(--cat-amber-rgb) / 8%) 35%,
    transparent 70%
  );
  filter: blur(2px);
  opacity: 0.9;
}

.routes-ambient-grid {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 6%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 6%) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 40% 30%, black 0%, transparent 66%);
}

.routes-ambient-noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.routes-container {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--space-8) var(--page-gutter);
}

@media (width <= 768px) {
  .routes-container {
    padding: var(--space-5) var(--page-gutter-tight);
  }
}

/* Hero */
.routes-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

@media (width >= 992px) {
  .routes-hero {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.routes-badge {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  background: rgb(var(--routes-primary-rgb) / 12%);
  border: 1px solid rgb(var(--routes-primary-rgb) / 24%);
  color: var(--routes-text);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
}

.routes-title {
  font-family: var(--font-family-display);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.02em;
  margin: var(--space-3) 0 var(--space-2);
  line-height: var(--line-height-tight);
  font-size: clamp(2rem, 1.6rem + 2.4vw, 3.4rem);
}

.routes-title-accent {
  color: var(--routes-accent);
  position: relative;
}

.routes-title-accent::after {
  content: "";
  position: absolute;
  left: -0.1em;
  right: -0.1em;
  bottom: 0.06em;
  height: 0.22em;
  background: rgb(var(--cat-amber-rgb) / 28%);
  z-index: -1;
  border-radius: 9999px;
  transform: rotate(-1deg);
}

.routes-subtitle {
  margin: 0;
  color: var(--routes-text-muted);
  max-width: 60ch;
}

/* Hero Insight Tiles */
.routes-hero-insights {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.routes-insight-tile {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: 0.9rem;
  border: 1px solid rgb(var(--routes-primary-rgb) / 18%);
  background: rgb(var(--routes-primary-rgb) / 6%);
}

.routes-insight-tile.accent {
  border-color: rgb(var(--cat-amber-rgb) / 18%);
  background: rgb(var(--cat-amber-rgb) / 6%);
}

.routes-insight-icon {
  color: rgb(var(--routes-primary-rgb) / 70%);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.routes-insight-tile.accent .routes-insight-icon {
  color: rgb(var(--cat-amber-rgb) / 70%);
}

.routes-insight-text {
  font-size: var(--font-size-sm);
  color: var(--routes-text-muted);
  line-height: 1.45;
}

/* Stats Toggle */
.routes-stats-toggle {
  border: 0;
  background: transparent;
  color: var(--text-tertiary);
  font-size: var(--font-size-xs);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  padding: var(--space-2) 0;
  margin-top: var(--space-2);
}

.routes-stats-toggle:hover {
  color: var(--routes-text-muted);
}

.routes-stats-toggle i {
  transition: transform 0.2s ease;
  font-size: 0.65rem;
}

.routes-stats-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.routes-hero-stats.collapsed {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition:
    max-height 0.3s ease,
    opacity 0.2s ease,
    margin-top 0.2s ease;
}

.routes-hero-stats.expanded {
  max-height: 200px;
  opacity: 1;
  margin-top: var(--space-3);
  transition:
    max-height 0.3s ease,
    opacity 0.2s ease,
    margin-top 0.2s ease;
}

/* Build Card */
.routes-build-card {
  background:
    linear-gradient(
      180deg,
      rgb(var(--routes-primary-rgb) / 10%) 0%,
      rgb(var(--routes-primary-rgb) / 5%) 40%,
      rgb(0 0 0 / 0%) 100%
    ),
    var(--routes-bg-elevated);
  border: 1px solid rgb(var(--routes-primary-rgb) / 22%);
  border-radius: var(--routes-radius);
  box-shadow: var(--routes-shadow);
  padding: var(--space-5);
}

.build-card-top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-4);
}

.build-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.build-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 9999px;
  background: rgb(var(--routes-primary-rgb) / 40%);
  box-shadow: 0 0 0 6px rgb(var(--routes-primary-rgb) / 0%);
}

.build-dot[data-state="running"] {
  background: var(--routes-primary);
  animation: routesPulse 1.35s ease-in-out infinite;
}

.build-dot[data-state="error"] {
  background: var(--danger);
}

.build-dot[data-state="success"] {
  background: var(--success);
}

@keyframes routesPulse {
  0% {
    box-shadow: 0 0 0 0 rgb(var(--routes-primary-rgb) / 38%);
  }

  70% {
    box-shadow: 0 0 0 10px rgb(var(--routes-primary-rgb) / 0%);
  }

  100% {
    box-shadow: 0 0 0 0 rgb(var(--routes-primary-rgb) / 0%);
  }
}

.build-text {
  font-weight: var(--font-weight-semibold);
}

.build-meta {
  display: flex;
  gap: var(--space-2);
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
}

.build-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (width >= 520px) {
  .build-actions {
    grid-template-columns: 1fr auto;
  }
}

.routes-build-btn {
  min-height: 44px;
}

.routes-cancel-btn {
  min-height: 44px;
}

.build-progress-wrap {
  margin-top: var(--space-4);
}

.build-progress {
  height: 10px;
  background: rgb(255 255 255 / 6%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 9999px;
  overflow: hidden;
}

.build-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--routes-primary), var(--routes-accent));
  border-radius: 9999px;
  transition: width var(--transition-normal);
}

.build-progress-labels {
  margin-top: var(--space-2);
  display: flex;
  justify-content: space-between;
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
}

/* Controls */
.routes-controls {
  margin-bottom: var(--space-6);
}

.routes-controls-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--routes-border);
  background: rgb(var(--surface-rgb) / 55%);
  border-radius: var(--routes-radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

@media (width >= 992px) {
  .routes-controls-inner {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }
}

.routes-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  border-radius: 9999px;
  border: 1px solid rgb(var(--border-rgb) / 26%);
  background: rgb(0 0 0 / 18%);
}

.routes-search i {
  color: rgb(var(--routes-primary-rgb) / 70%);
}

.routes-search-input {
  width: 100%;
  padding: 0.85rem 0.2rem;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--routes-text);
}

.routes-search-input::placeholder {
  color: rgb(255 255 255 / 38%);
}

.routes-search-clear {
  border: 0;
  background: transparent;
  color: rgb(255 255 255 / 55%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.routes-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: flex-start;
  align-items: center;
}

.routes-filter {
  display: grid;
  gap: 0.3rem;
}

.routes-filter-label {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.routes-filter-select {
  min-height: var(--touch-target);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border-subtle);
  background-color: var(--glass-input);
  color: var(--text-primary);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  padding: var(--space-2) calc(var(--space-3) + 16px + var(--space-3)) var(--space-2) var(--space-3);
  transition: all var(--transition-fast);
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba(255,255,255,0.65)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: 16px 12px;
}

.routes-filter-select:hover {
  border-color: var(--glass-border-medium);
}

.routes-filter-select:focus {
  border-color: var(--primary);
  outline: 0;
  background-color: var(--glass-input-focus);
  box-shadow: var(--focus-ring);
}

.routes-filter-select option {
  color: var(--text-primary);
  background: rgb(var(--surface-rgb) / 96%);
}

.routes-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  user-select: none;
  cursor: pointer;
  min-height: 44px;
}

.routes-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.routes-toggle-ui {
  width: 44px;
  height: 26px;
  border-radius: 9999px;
  border: 1px solid rgb(var(--border-rgb) / 26%);
  background: rgb(255 255 255 / 6%);
  position: relative;
  transition: background var(--transition-fast);
}

.routes-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background: rgb(255 255 255 / 78%);
  transition: transform var(--transition-fast);
}

.routes-toggle input:checked + .routes-toggle-ui {
  background: rgb(var(--routes-primary-rgb) / 26%);
  border-color: rgb(var(--routes-primary-rgb) / 40%);
}

.routes-toggle input:checked + .routes-toggle-ui::after {
  transform: translateX(16px);
  background: rgb(255 255 255 / 92%);
}

.routes-toggle-text {
  color: var(--routes-text-muted);
  font-size: var(--font-size-sm);
}

/* Results */
.routes-results-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: baseline;
  margin-bottom: var(--space-4);
}

.routes-results-title {
  font-weight: var(--font-weight-bold);
}

.routes-results-hint {
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
}

.routes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (width >= 768px) {
  .routes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (width >= 1200px) {
  .routes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.routes-loading {
  grid-column: 1 / -1;
  padding: var(--space-6);
  display: grid;
  place-items: center;
  background: var(--routes-bg-elevated);
  border: 1px solid var(--routes-border);
  border-radius: var(--routes-radius);
}

.routes-empty {
  margin-top: var(--space-6);
  padding: var(--space-8);
  text-align: center;
  background: var(--routes-bg-elevated);
  border: 1px solid var(--routes-border);
  border-radius: var(--routes-radius);
  box-shadow: var(--shadow-md);
}

.routes-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-3);
  border-radius: 18px;
  background: rgb(var(--routes-primary-rgb) / 14%);
  border: 1px solid rgb(var(--routes-primary-rgb) / 26%);
  display: grid;
  place-items: center;
  color: var(--routes-primary);
}

.routes-empty-title {
  font-family: var(--font-family-display);
  margin: 0 0 var(--space-2);
}

.routes-empty-text {
  margin: 0 auto var(--space-4);
  max-width: 60ch;
  color: var(--routes-text-muted);
}

/* Route card */
.route-card {
  background: var(--routes-bg-elevated);
  border: 1px solid var(--routes-border);
  border-radius: var(--routes-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal);
  min-height: 160px;

  --route-stroke: rgb(var(--routes-primary-rgb) / 90%);
}

.route-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgb(var(--routes-primary-rgb) / 30%);
}

.route-card-top {
  padding: var(--space-3) var(--space-4) var(--space-2);
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
}

.route-personality-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--routes-primary-rgb) / 85%);
  background: rgb(var(--routes-primary-rgb) / 10%);
  border: 1px solid rgb(var(--routes-primary-rgb) / 20%);
  border-radius: 9999px;
  padding: 0.15rem 0.55rem;
}

.route-card-indicators {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
}

.route-freshness-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgb(255 255 255 / 30%);
  flex-shrink: 0;
}

.route-freshness-dot.fresh {
  background: rgb(var(--success-rgb) / 90%);
  box-shadow: 0 0 4px rgb(var(--success-rgb) / 40%);
}

.route-freshness-dot.recent {
  background: rgb(var(--routes-primary-rgb) / 90%);
}

.route-freshness-dot.aging {
  background: rgb(var(--cat-amber-rgb) / 80%);
}

.route-freshness-dot.stale {
  background: rgb(255 255 255 / 20%);
}

.route-card-labels {
  padding: 0 var(--space-4) var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.route-label-start,
.route-label-end {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-label-arrow {
  color: rgb(255 255 255 / 36%);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.route-card-visual {
  padding: 0 var(--space-4);
  height: 5.5rem;
  position: relative;
  overflow: hidden;
  border-radius: 0.6rem;
  margin: 0 var(--space-3);
  background: linear-gradient(135deg, rgb(var(--routes-primary-rgb) / 4%), transparent 70%);
}

.route-card-visual .route-preview-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.route-card-insight {
  padding: var(--space-2) var(--space-4) 0;
  font-size: var(--font-size-sm);
  color: var(--routes-text-muted);
  font-style: italic;
  border-left: 2px solid rgb(var(--routes-primary-rgb) / 25%);
  margin: var(--space-2) var(--space-4) 0;
  padding-left: var(--space-3);
}

.route-card-stats {
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  border-top: 1px solid rgb(var(--border-rgb) / 10%);
  margin-top: var(--space-2);
}

.route-card-stats .stat-sep {
  opacity: 0.5;
}

.route-pill {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  font-size: var(--font-size-xs);
  border: 1px solid rgb(255 255 255 / 12%);
  background: rgb(255 255 255 / 6%);
  color: rgb(255 255 255 / 80%);
}

.route-pill.primary {
  border-color: rgb(var(--routes-primary-rgb) / 30%);
  background: rgb(var(--routes-primary-rgb) / 14%);
  color: rgb(255 255 255 / 92%);
}

.route-card-preview {
  padding: 0 var(--space-4) var(--space-4);
  display: grid;
  gap: var(--space-3);
}

.route-preview-frame {
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgb(255 255 255 / 10%);
  background: linear-gradient(135deg, rgb(255 255 255 / 6%), rgb(0 0 0 / 0%));
  position: relative;
  overflow: hidden;
}

.route-preview-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 60%, rgb(var(--routes-primary-rgb) / 22%), transparent 55%),
    radial-gradient(circle at 80% 40%, rgb(var(--cat-amber-rgb) / 16%), transparent 55%);
  opacity: 0.35;
}

.route-preview-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.route-preview-svg path {
  fill: none;
  stroke: var(--route-stroke);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.route-metric {
  display: grid;
  gap: 0.1rem;
}

.route-metric-label {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

.route-metric-value {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-sm);
  color: rgb(255 255 255 / 88%);
}

/* Modal */
.routes-modal-content {
  background: var(--routes-bg-elevated);
  border: 1px solid var(--routes-border);
  border-radius: var(--routes-radius);
  overflow: hidden;
}

.routes-modal-header {
  background: linear-gradient(
    90deg,
    rgb(var(--routes-primary-rgb) / 14%),
    rgb(var(--cat-amber-rgb) / 10%)
  );
  border-bottom: 1px solid rgb(var(--border-rgb) / 18%);
}

.routes-modal-map-col {
  min-height: 340px;
}

@media (width >= 992px) {
  .routes-modal-map-col {
    min-height: 520px;
  }
}

.routes-modal-map {
  position: absolute;
  inset: 0;
}

.routes-modal-panel {
  border-left: 1px solid rgb(var(--border-rgb) / 16%);
  background: var(--routes-bg-subtle);
}

@media (width <= 991px) {
  .routes-modal-panel {
    border-left: 0;
    border-top: 1px solid rgb(var(--border-rgb) / 16%);
  }
}

.routes-modal-panel-inner {
  padding: var(--space-4);
  display: grid;
  gap: var(--space-4);
}

.routes-modal-label {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

.routes-modal-name-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  align-items: center;
}

.routes-modal-color {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgb(255 255 255 / 12%);
  background: transparent;
  padding: 0;
}

.routes-modal-edit-hint {
  margin-top: 0.35rem;
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

.routes-modal-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.routes-stat {
  padding: var(--space-3);
  border-radius: 14px;
  border: 1px solid rgb(var(--border-rgb) / 18%);
  background: rgb(0 0 0 / 14%);
  display: grid;
  gap: 0.15rem;
}

.routes-stat-label {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

.routes-stat-value {
  font-family: var(--font-family-mono);
  color: rgb(255 255 255 / 90%);
}

.routes-modal-section-title {
  margin: 0;
  font-weight: var(--font-weight-semibold);
}

.routes-modal-trips-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
}

.routes-modal-trips-count {
  font-family: var(--font-family-mono);
  color: var(--text-tertiary);
}

.routes-modal-trips-list {
  display: grid;
  gap: var(--space-2);
  max-height: 280px;
  overflow: auto;
  padding-right: 0.25rem;
}

.route-trip-row {
  display: grid;
  gap: 0.1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgb(var(--border-rgb) / 18%);
  background: rgb(0 0 0 / 12%);
  text-decoration: none;
  color: inherit;
}

.route-trip-row:hover {
  border-color: rgb(var(--routes-primary-rgb) / 24%);
}

.route-trip-row-top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
}

.route-trip-row-title {
  font-size: var(--font-size-sm);
  color: rgb(255 255 255 / 88%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-trip-row-meta {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

.route-trip-row-sub {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.routes-modal-footer {
  padding-top: var(--space-2);
}

/* Light theme tweaks */
html[data-bs-theme="light"] .routes-page {
  --routes-bg: #fafafa;
  --routes-bg-elevated: #fff;
  --routes-bg-subtle: #f3f4f6;
  --routes-border: rgb(15 23 42 / 12%);
  --routes-text: rgb(15 23 42 / 92%);
  --routes-text-muted: rgb(15 23 42 / 70%);
}

html[data-bs-theme="light"] .routes-search {
  background: rgb(255 255 255 / 65%);
}

html[data-bs-theme="light"] .routes-search-input::placeholder {
  color: rgb(15 23 42 / 42%);
}

html[data-bs-theme="light"] .routes-filter-select,
body.light-mode .routes-filter-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba(0,0,0,0.6)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

html[data-bs-theme="light"] .route-preview-frame {
  border-color: rgb(15 23 42 / 10%);
  background: linear-gradient(135deg, rgb(15 23 42 / 6%), rgb(0 0 0 / 0%));
}

html[data-bs-theme="light"] .route-preview-svg path {
  stroke: rgb(var(--routes-primary-rgb) / 100%);
}

/* Contract alignment + progressive-disclosure refinements */
.routes-hero-left {
  display: grid;
  gap: var(--space-4);
}

.routes-hero-right {
  display: grid;
  align-self: stretch;
}

.routes-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

@media (width >= 768px) {
  .routes-hero-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.routes-hero-stat-card {
  border: 1px solid rgb(var(--border-rgb) / 18%);
  border-radius: 0.9rem;
  background: rgb(0 0 0 / 12%);
  padding: var(--space-3);
  display: grid;
  gap: 0.1rem;
}

.routes-hero-stat-label {
  color: var(--text-tertiary);
  font-size: var(--font-size-xs);
}

.routes-hero-stat-value {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
}

.route-card {
  display: grid;
  grid-template-rows: auto auto auto;
}

.route-card-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-4) var(--space-4) var(--space-3);
}

.route-card-path-indicator {
  width: 0.35rem;
  border-radius: 999px;
  min-height: 3.5rem;
  opacity: 0.95;
}

.route-card-direction {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  min-width: 0;
}

.route-card-endpoint {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgb(255 255 255 / 88%);
}

.endpoint-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  background: rgb(255 255 255 / 72%);
}

.endpoint-dot.start {
  background: rgb(var(--routes-primary-rgb) / 95%);
}

.endpoint-dot.end {
  background: rgb(var(--cat-amber-rgb) / 95%);
}

.endpoint-label {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-card-arrow {
  color: rgb(255 255 255 / 46%);
  font-size: 0.8rem;
}

.route-card-pills {
  display: inline-flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.route-pill.pinned {
  color: rgb(var(--routes-primary-rgb) / 98%);
  border-color: rgb(var(--routes-primary-rgb) / 35%);
  background: rgb(var(--routes-primary-rgb) / 12%);
}

.route-pill.hidden-pill {
  color: rgb(255 255 255 / 78%);
}

.route-card-preview {
  padding: 0 var(--space-4) var(--space-3);
}

.route-preview-svg {
  width: 100%;
  height: 3.8rem;
}

.route-card-footer {
  border-top: 1px solid rgb(var(--border-rgb) / 14%);
  padding: var(--space-3) var(--space-4);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-3);
  align-items: center;
}

@media (width >= 560px) {
  .route-card-footer {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.route-card-metric {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  color: rgb(255 255 255 / 82%);
  font-size: var(--font-size-sm);
}

.route-card-metric .metric-icon {
  color: rgb(255 255 255 / 52%);
}

.route-card-metric .metric-value {
  font-family: var(--font-family-mono);
  font-weight: var(--font-weight-medium);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-card-metric .metric-label {
  color: var(--text-tertiary);
}

.route-card-freshness {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 9999px;
  border: 1px solid rgb(var(--border-rgb) / 22%);
  padding: 0.25rem 0.6rem;
  font-size: var(--font-size-xs);
}

.route-card-freshness .freshness-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 44%);
}

.route-card-freshness.fresh {
  border-color: rgb(var(--success-rgb) / 36%);
  color: rgb(var(--success-rgb) / 98%);
}

.route-card-freshness.fresh .freshness-dot {
  background: rgb(var(--success-rgb) / 90%);
}

.route-card-freshness.recent {
  border-color: rgb(var(--routes-primary-rgb) / 36%);
  color: rgb(var(--routes-primary-rgb) / 98%);
}

.route-card-freshness.recent .freshness-dot {
  background: rgb(var(--routes-primary-rgb) / 90%);
}

.route-card-freshness.aging {
  border-color: rgb(var(--cat-amber-rgb) / 36%);
  color: rgb(var(--cat-amber-rgb) / 98%);
}

.route-card-freshness.aging .freshness-dot {
  background: rgb(var(--cat-amber-rgb) / 90%);
}

.route-card-freshness.stale {
  color: var(--text-tertiary);
}

/* Explorer Teaser / Collapse */
.routes-explorer-teaser {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--routes-radius);
  cursor: pointer;
}

.routes-explorer-teaser-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.routes-explorer-teaser-left > i {
  color: rgb(var(--routes-primary-rgb) / 70%);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.routes-explorer-teaser-left > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.routes-explorer-teaser-title {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
}

.routes-explorer-teaser-desc {
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
}

.routes-explorer-expand-btn {
  border: 1px solid rgb(var(--routes-primary-rgb) / 30%);
  border-radius: 9999px;
  background: rgb(var(--routes-primary-rgb) / 10%);
  color: var(--routes-text);
  padding: 0.45rem 0.85rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
  white-space: nowrap;
}

.routes-explorer-expand-btn:hover {
  background: rgb(var(--routes-primary-rgb) / 18%);
  border-color: rgb(var(--routes-primary-rgb) / 40%);
}

.routes-explorer-expand-btn i {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.routes-explorer-teaser.is-expanded .routes-explorer-expand-btn i {
  transform: rotate(180deg);
}

.routes-explorer-body {
  padding-top: var(--space-2);
}

.routes-explorer-insight-sentence {
  font-size: var(--font-size-sm);
  color: var(--routes-text-muted);
  font-style: italic;
  padding: var(--space-2) var(--space-3);
  border-left: 2px solid rgb(var(--routes-primary-rgb) / 30%);
  background: rgb(var(--routes-primary-rgb) / 4%);
  border-radius: 0 0.5rem 0.5rem 0;
}

.routes-explorer {
  margin: 0 0 var(--space-8);
  border: 1px solid rgb(var(--routes-primary-rgb) / 25%);
  border-radius: var(--routes-radius);
  background:
    linear-gradient(165deg, rgb(var(--routes-primary-rgb) / 10%), transparent 35%),
    var(--routes-bg-elevated);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: var(--space-4);
}

@media (width >= 768px) {
  .routes-explorer {
    padding: var(--space-5);
  }
}

.routes-explorer-header {
  display: grid;
  gap: var(--space-2);
}

.routes-explorer-title {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.95rem);
}

.routes-explorer-subtitle {
  margin: 0;
  color: var(--routes-text-muted);
  max-width: 70ch;
}

.routes-explorer-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (width >= 992px) {
  .routes-explorer-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.routes-explorer-control {
  display: grid;
  gap: 0.3rem;
}

.routes-explorer-toggle {
  align-self: end;
  min-height: 44px;
}

.routes-explorer-timeframe {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.routes-timeframe-option {
  min-height: 44px;
  border: 1px solid rgb(var(--border-rgb) / 24%);
  border-radius: 9999px;
  background: rgb(0 0 0 / 18%);
  padding: 0.45rem 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--routes-text-muted);
}

.routes-timeframe-option input {
  accent-color: var(--routes-primary);
}

.routes-timeframe-option:has(input:checked) {
  border-color: rgb(var(--routes-primary-rgb) / 35%);
  background: rgb(var(--routes-primary-rgb) / 14%);
  color: var(--routes-text);
}

.routes-explorer-run-btn {
  min-height: 44px;
  justify-self: start;
}

.routes-explorer-status {
  border-radius: 0.8rem;
  border: 1px solid rgb(var(--border-rgb) / 18%);
  background: rgb(0 0 0 / 14%);
  color: var(--routes-text-muted);
  padding: 0.7rem 0.85rem;
  font-size: var(--font-size-sm);
}

.routes-explorer-status.is-success {
  border-color: rgb(var(--success-rgb) / 34%);
  color: rgb(var(--success-rgb) / 92%);
}

.routes-explorer-status.is-error {
  border-color: rgb(var(--danger-rgb) / 34%);
  color: rgb(var(--danger-rgb) / 92%);
}

.routes-explorer-results {
  display: grid;
  gap: var(--space-4);
}

.routes-explorer-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

@media (width >= 992px) {
  .routes-explorer-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.routes-summary-kpi {
  border: 1px solid rgb(var(--border-rgb) / 20%);
  border-radius: 0.85rem;
  padding: var(--space-3);
  background: rgb(255 255 255 / 4%);
  display: grid;
  gap: 0.15rem;
}

.routes-summary-kpi-label {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

.routes-summary-kpi-value {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.routes-explorer-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (width >= 992px) {
  .routes-explorer-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.routes-chart-panel {
  border: 1px solid rgb(var(--border-rgb) / 18%);
  border-radius: 0.9rem;
  padding: var(--space-3);
  background: rgb(0 0 0 / 14%);
  display: grid;
  gap: var(--space-3);
}

.routes-chart-panel-lg {
  grid-column: 1 / -1;
}

.routes-chart-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.routes-chart-panel-title {
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

.routes-chart-wrap {
  border: 1px dashed rgb(var(--border-rgb) / 20%);
  border-radius: 0.75rem;
  min-height: 11rem;
  height: 11rem;
  padding: 0.45rem;
  position: relative;
}

.routes-chart-canvas {
  width: 100% !important;
  height: 100% !important;
}

.routes-chart-empty {
  position: absolute;
  inset: 0.35rem;
  border-radius: 0.6rem;
  background: rgb(0 0 0 / 16%);
  border: 1px solid rgb(var(--border-rgb) / 16%);
  color: var(--text-tertiary);
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-3);
  font-size: var(--font-size-sm);
}

.routes-variant-share-list,
.routes-explorer-variants-list {
  display: grid;
  gap: var(--space-2);
}

.routes-variant-share-item,
.routes-variant-item {
  border: 1px solid rgb(var(--border-rgb) / 18%);
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 4%);
  padding: 0.6rem 0.75rem;
}

.routes-variant-share-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}

.routes-variant-share-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.routes-variant-share-value {
  font-family: var(--font-family-mono);
  color: var(--routes-text-muted);
}

.routes-variant-main {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
}

.routes-variant-title {
  font-weight: var(--font-weight-semibold);
}

.routes-variant-meta {
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
}

.routes-variant-chip {
  border: 1px solid rgb(var(--routes-primary-rgb) / 33%);
  border-radius: 9999px;
  background: rgb(var(--routes-primary-rgb) / 14%);
  color: rgb(var(--routes-primary-rgb) / 95%);
  padding: 0.2rem 0.6rem;
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
}

.routes-variant-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.routes-variant-link {
  min-height: 44px;
  border: 1px solid rgb(var(--border-rgb) / 24%);
  border-radius: 0.65rem;
  padding: 0.45rem 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
}

.routes-modal-subtitle {
  margin-top: 0.2rem;
  color: var(--routes-text-muted);
}

.route-modal-place-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
  padding: 0.28rem 0.62rem;
  border: 1px solid rgb(var(--border-rgb) / 20%);
  background: rgb(0 0 0 / 14%);
  min-height: 32px;
}

.route-modal-place-link:hover {
  border-color: rgb(var(--routes-primary-rgb) / 34%);
}

.route-modal-place-sep {
  margin: 0 0.35rem;
  color: var(--text-tertiary);
}

.routes-modal-map-controls {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  z-index: 3;
}

.routes-map-toggle-btn {
  min-height: 44px;
}

.routes-map-toggle-btn.active {
  background: rgb(var(--routes-primary-rgb) / 18%);
  border-color: rgb(var(--routes-primary-rgb) / 40%);
  color: var(--text-on-primary);
}

.routes-modal-tabs {
  border: 1px solid rgb(var(--border-rgb) / 18%);
  border-radius: 0.75rem;
  padding: 0.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
  background: rgb(0 0 0 / 14%);
}

.routes-modal-tab {
  min-height: 44px;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--routes-text-muted);
  font-weight: var(--font-weight-medium);
}

.routes-modal-tab.active {
  background: rgb(var(--routes-primary-rgb) / 18%);
  color: var(--routes-text);
}

.routes-modal-tab-content {
  display: none;
  gap: var(--space-3);
}

.routes-modal-tab-content.active {
  display: grid;
}

/* Modal Insight Banner */
.route-insight-banner {
  padding: var(--space-3);
  border-radius: 0.8rem;
  background: linear-gradient(135deg, rgb(var(--routes-primary-rgb) / 8%), transparent);
  border: 1px solid rgb(var(--routes-primary-rgb) / 14%);
  display: grid;
  gap: var(--space-1);
}

.route-insight-banner-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(var(--routes-primary-rgb) / 90%);
}

.route-insight-banner-sentence {
  font-size: var(--font-size-sm);
  color: var(--routes-text-muted);
  line-height: 1.45;
}

/* Key Facts */
.route-key-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

@media (width <= 768px) {
  .route-key-facts {
    grid-template-columns: 1fr;
  }
}

.route-key-fact {
  text-align: center;
  padding: var(--space-3);
  border-radius: 0.8rem;
  border: 1px solid rgb(var(--border-rgb) / 18%);
  background: rgb(0 0 0 / 10%);
  display: grid;
  gap: 0.25rem;
  justify-items: center;
}

.route-key-fact-icon {
  color: rgb(var(--routes-primary-rgb) / 60%);
  font-size: 1rem;
}

.route-key-fact-value {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.route-key-fact-label {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

/* Expandable Details */
.route-details-expand {
  margin-top: var(--space-1);
}

.route-details-expand summary {
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
  padding: var(--space-2) 0;
  user-select: none;
}

.route-details-expand summary:hover {
  color: var(--routes-text-muted);
}

.route-details-expand[open] .routes-modal-stats {
  margin-top: var(--space-3);
}

/* Chart Insights */
.routes-chart-insight {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  font-style: italic;
  padding: 0 0 var(--space-1);
  min-height: 0;
}

.routes-chart-insight:empty {
  display: none;
}

.routes-modal-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.routes-modal-places {
  display: grid;
  gap: var(--space-2);
}

.routes-connected-places {
  display: grid;
  gap: var(--space-2);
}

.connected-place-link {
  min-height: 44px;
  border: 1px solid rgb(var(--border-rgb) / 18%);
  border-radius: 0.7rem;
  background: rgb(0 0 0 / 14%);
  color: inherit;
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.connected-place-link:hover {
  border-color: rgb(var(--routes-primary-rgb) / 34%);
}

.connected-place-kind {
  border: 1px solid rgb(var(--routes-primary-rgb) / 28%);
  border-radius: 9999px;
  padding: 0.1rem 0.5rem;
  font-size: var(--font-size-xs);
  color: rgb(var(--routes-primary-rgb) / 95%);
}

.routes-inline-empty {
  border: 1px dashed rgb(var(--border-rgb) / 24%);
  border-radius: 0.8rem;
  padding: var(--space-3);
  color: var(--text-tertiary);
  text-align: center;
}

.route-trip-row {
  display: grid;
  gap: var(--space-2);
  border: 1px solid rgb(var(--border-rgb) / 18%);
  background: rgb(0 0 0 / 14%);
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
}

.route-trip-row-places {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.route-trip-place-sep {
  color: var(--text-tertiary);
}

.route-trip-place-chip {
  min-height: 32px;
  border: 1px solid rgb(var(--border-rgb) / 22%);
  border-radius: 9999px;
  padding: 0.2rem 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
}

.route-trip-place-chip:hover {
  border-color: rgb(var(--routes-primary-rgb) / 34%);
}

.route-trip-row-actions {
  display: flex;
  justify-content: flex-end;
}

.route-trip-open-link {
  min-height: 44px;
  border: 1px solid rgb(var(--border-rgb) / 22%);
  border-radius: 0.65rem;
  padding: 0.45rem 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
}

.route-trip-open-link:hover {
  border-color: rgb(var(--routes-primary-rgb) / 34%);
}

html[data-bs-theme="light"] .routes-hero-stat-card,
html[data-bs-theme="light"] .routes-summary-kpi,
html[data-bs-theme="light"] .routes-chart-panel,
html[data-bs-theme="light"] .routes-explorer-status,
html[data-bs-theme="light"] .routes-inline-empty,
html[data-bs-theme="light"] .route-trip-row {
  background: rgb(15 23 42 / 3%);
}

html[data-bs-theme="light"] .routes-insight-tile {
  background: rgb(var(--routes-primary-rgb) / 5%);
  border-color: rgb(var(--routes-primary-rgb) / 16%);
}

html[data-bs-theme="light"] .routes-insight-tile.accent {
  background: rgb(var(--cat-amber-rgb) / 5%);
  border-color: rgb(var(--cat-amber-rgb) / 16%);
}

html[data-bs-theme="light"] .route-personality-tag {
  color: rgb(var(--routes-primary-rgb) / 90%);
  background: rgb(var(--routes-primary-rgb) / 8%);
  border-color: rgb(var(--routes-primary-rgb) / 18%);
}

html[data-bs-theme="light"] .route-card-visual {
  background: linear-gradient(135deg, rgb(var(--routes-primary-rgb) / 3%), transparent 70%);
}

html[data-bs-theme="light"] .route-label-arrow {
  color: rgb(15 23 42 / 30%);
}

html[data-bs-theme="light"] .route-card-insight {
  border-left-color: rgb(var(--routes-primary-rgb) / 20%);
}

html[data-bs-theme="light"] .route-card-stats {
  border-top-color: rgb(15 23 42 / 8%);
}

html[data-bs-theme="light"] .route-insight-banner {
  background: linear-gradient(135deg, rgb(var(--routes-primary-rgb) / 5%), transparent);
  border-color: rgb(var(--routes-primary-rgb) / 12%);
}

html[data-bs-theme="light"] .route-key-fact {
  background: rgb(15 23 42 / 3%);
}

html[data-bs-theme="light"] .routes-explorer-teaser {
  border-color: rgb(var(--routes-primary-rgb) / 18%);
}

html[data-bs-theme="light"] .routes-explorer-insight-sentence {
  background: rgb(var(--routes-primary-rgb) / 3%);
  border-left-color: rgb(var(--routes-primary-rgb) / 20%);
}

html[data-bs-theme="light"] .route-freshness-dot.stale {
  background: rgb(15 23 42 / 18%);
}
