:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4d;
  --text: #e8edf4;
  --muted: #8b9cb3;
  --accent: #f59e0b;
  --cluster-reach: #38bdf8;
  --cluster-intelligence: #a78bfa;
  --cluster-foundation: #f59e0b;
  --trip: #f59e0b;
  --roadtrip-hot: #ff6b35;
  --roadtrip-purple: #a855f7;
  --site-header-h: 6.25rem;
  --site-footer-h: 2.25rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  min-height: var(--site-header-h);
}

.header-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.brand {
  flex: 0 1 auto;
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-tagline {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--muted);
}

.trip-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--trip);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
}

.trip-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--trip);
}

.trip-dates {
  font-weight: 600;
  font-size: 0.95rem;
}

/* De Groot Brothers Roadtrip promo — static gradient (no infinite anim: Brave-friendly) */
.roadtrip-promo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 0.5rem 0.6rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--roadtrip-hot) 0%, var(--trip) 50%, var(--roadtrip-purple) 100%);
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.25);
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.roadtrip-promo:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.35);
}

.roadtrip-promo__bike {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2rem;
  color: #fff;
}

.harley-icon {
  width: 100%;
  height: 100%;
  display: block;
}

.harley-icon--lg {
  width: 4rem;
  height: 2.5rem;
  margin: 0 auto 0.5rem;
  color: var(--trip);
}

.roadtrip-promo__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.roadtrip-promo__eyebrow,
.roadtrip-promo__title,
.roadtrip-promo__cta {
  white-space: nowrap;
}

.roadtrip-promo__eyebrow {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.92;
  font-weight: 700;
}

.roadtrip-promo__title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.roadtrip-promo__cta {
  font-size: 0.72rem;
  opacity: 0.9;
}

/* Newsletter modal */
.newsletter-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.newsletter-modal.hidden {
  display: none !important;
}

.newsletter-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.newsletter-modal__panel {
  position: relative;
  width: 100%;
  max-width: 26rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.35rem 1.35rem 1.5rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.newsletter-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
}

.newsletter-modal__close:hover {
  color: var(--text);
}

.newsletter-modal__hero {
  text-align: center;
  margin-bottom: 0.75rem;
}

.newsletter-modal__brand {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--trip);
  font-weight: 700;
}

.newsletter-modal__panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  text-align: center;
}

.newsletter-modal__lead {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.newsletter-field span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.newsletter-field .required {
  color: var(--roadtrip-hot);
}

.newsletter-field .optional {
  font-size: 0.72rem;
}

.newsletter-field input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

.newsletter-field input:focus {
  outline: none;
  border-color: var(--trip);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.newsletter-consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}

.newsletter-consent input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  accent-color: var(--trip);
}

.newsletter-consent a {
  color: #60a5fa;
}

.newsletter-submit {
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--roadtrip-hot), var(--trip));
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.newsletter-submit:hover:not(:disabled) {
  filter: brightness(1.08);
}

.newsletter-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.newsletter-msg {
  margin: 0;
  font-size: 0.85rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
}

.newsletter-msg.ok {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.newsletter-msg.err {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.view-panel {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  z-index: 1;
  height: calc(100vh - var(--site-header-h) - var(--site-footer-h));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.view-panel.hidden {
  display: none !important;
}

#view-map.view-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: calc(100vh - var(--site-header-h) - var(--site-footer-h));
  overflow: hidden;
}

#view-map.layout {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1rem 0.75rem;
  box-sizing: border-box;
}

.map-column {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.map-panel-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.map-panel-header__text {
  min-width: 0;
  flex: 1 1 auto;
}

.map-panel-header__controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.map-mode-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
}

.map-mode-btn {
  padding: 0.35rem 0.65rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.map-mode-btn + .map-mode-btn {
  border-left: 1px solid var(--border);
}

.map-mode-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.map-mode-btn.active {
  color: var(--text);
  background: rgba(245, 158, 11, 0.18);
  font-weight: 600;
}

.filter-select-label--compact {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.8rem;
  white-space: nowrap;
}

.filter-select-label--compact select {
  margin: 0;
  padding: 0.3rem 0.45rem;
  font-size: 0.8rem;
  min-width: 7.5rem;
}

.map-panel-header .view-title {
  margin: 0;
  font-size: 1.15rem;
}

.map-panel-header__sub {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}

.map-toolbar {
  display: none;
}

.map-legend-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.map-legend-bar__label {
  flex-shrink: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.legend.legend--map {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 0.25rem 0.75rem;
}

.legend.legend--map .legend-item {
  font-size: 0.75rem;
  white-space: nowrap;
}

.map-wrap {
  flex: 1 1 auto;
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  contain: layout paint;
  min-height: 360px;
}

.map-column--trip .map-wrap {
  min-height: 300px;
}

.map-column--trip.map-column--routes .map-wrap {
  min-height: 280px;
}

.map-column--musk .map-wrap {
  min-height: 390px;
}

#view-map .leaflet-container {
  z-index: 1;
}

.route-legend {
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  max-height: 9rem;
  overflow-y: auto;
}

.route-legend__details {
  margin: 0;
}

.route-legend__summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text);
  list-style: none;
}

.route-legend__summary::-webkit-details-marker {
  display: none;
}

.route-legend__summary::before {
  content: "▸";
  color: var(--accent);
  font-size: 0.7rem;
  transition: transform 0.15s;
}

.route-legend__details[open] > .route-legend__summary::before {
  transform: rotate(90deg);
}

.route-legend__summary-meta {
  margin-left: auto;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--muted);
}

.route-legend__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.35rem;
  padding: 0 0.65rem 0.6rem;
  max-height: 9.5rem;
  overflow-y: auto;
}

.map-column--musk .route-legend {
  display: none;
}

.route-legend[hidden] {
  display: none !important;
}

.route-legend__segment {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.3rem 0.45rem;
  background: var(--surface-2, rgba(15, 20, 25, 0.6));
  border: 1px solid var(--border, #2d3a4d);
  border-radius: 6px;
  min-width: 0;
}

.route-legend__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text, #e8edf4);
  font-weight: 600;
  font-size: 0.76rem;
}

.route-legend__total {
  margin-left: auto;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.72rem;
}

.route-legend__legs {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-left: 0.85rem;
}

.route-legend__leg {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.route-legend__leg-route {
  flex: 1;
  min-width: 0;
}

.route-legend__leg-hours {
  color: var(--text, #e8edf4);
  font-weight: 600;
  white-space: nowrap;
}

.route-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  white-space: nowrap;
}

.route-legend__swatch {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.route-legend__hours {
  color: var(--text, #e8edf4);
  font-weight: 600;
}

.route-duration-label {
  background: none !important;
  border: none !important;
}

.route-duration-label span {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  color: #0f1419;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-left-width: 3px;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  pointer-events: none;
}

.sidebar-section {
  margin-bottom: 1.25rem;
}

.sidebar h2 {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.filter-trip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 0.85rem;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.loc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.loc-item {
  margin-bottom: 0.5rem;
}

.loc-btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  transition: border-color 0.15s, background 0.15s;
}

.loc-btn:hover,
.loc-btn.active {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.06);
}

.loc-btn .name {
  font-weight: 600;
  display: block;
}

.loc-btn .meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.loc-btn .trip-tag {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--trip);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 3px;
}

.sidebar {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 1rem 1.1rem;
  background: var(--surface);
}

.disclaimer {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 1rem 0 0.5rem;
}

.updated {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
}

#map {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
}

/* Leaflet popup dark theme */
.leaflet-popup {
  margin-bottom: 12px;
}

.leaflet-popup-content-wrapper {
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.leaflet-popup-close-button {
  color: var(--text) !important;
  font-size: 1.25rem !important;
  padding: 6px 8px 0 0 !important;
  z-index: 2;
}

.leaflet-popup-content {
  margin: 8px 10px 8px 8px;
  width: 340px !important;
  max-height: 200px;
}

.popup--compact .popup-layout {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.popup-media {
  flex: 0 0 112px;
  width: 112px;
}

.popup-main {
  flex: 1;
  min-width: 0;
}

.popup--compact h3 {
  margin: 0.15rem 0 0.2rem;
  font-size: 0.92rem;
  line-height: 1.2;
}

.popup-city,
.popup-produces,
.popup-meta {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--muted);
}

.popup-produces strong,
.popup-meta span {
  color: var(--text);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 0.25rem;
}

.popup-links {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
}

.popup--compact .company {
  margin-bottom: 0.25rem;
}

.popup--compact .popup-badges,
.popup--compact .popup-tech {
  margin: 0.15rem 0;
}

.popup--compact .popup-badges .badge,
.popup--compact .popup-tech .badge {
  font-size: 0.6rem;
  padding: 0.08rem 0.28rem;
}

.popup--compact .visit {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.35;
}

.popup h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.popup .company {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.popup dl {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
}

.popup dt {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  margin-top: 0.45rem;
}

.popup dd {
  margin: 0.15rem 0 0;
  line-height: 1.4;
}

.popup .visit {
  margin-top: 0.5rem;
  padding: 0.45rem;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 4px;
  font-size: 0.78rem;
}

.popup a {
  color: #60a5fa;
}

.popup-badges {
  margin: 0.35rem 0 0.5rem;
}

.popup-badges .badge {
  font-size: 0.65rem;
  margin-right: 0.25rem;
}

/* Navigation */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 0 0.6rem;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.nav-btn__icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: var(--muted);
}

.nav-btn__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.nav-btn:hover .nav-btn__icon,
.nav-btn.active .nav-btn__icon {
  color: var(--accent);
}

.nav-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.nav-btn.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
}

.view-panel.hidden {
  display: none !important;
}

.panel-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem;
}

.panel-intro {
  margin-bottom: 1rem;
}

.panel-intro h2,
.view-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.view-title__icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--accent);
}

.view-title__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.view-title--compact {
  display: inline-flex;
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
  gap: 0.35rem;
}

.view-title--compact .view-title__icon {
  width: 1rem;
  height: 1rem;
}

.view-heading {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.view-heading__sub {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.panel-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.journal-about {
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.journal-about__title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.journal-about p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filter-bar label {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-bar select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  min-width: 140px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-inv-direct {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-inv-partial {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.badge-inv-indirect {
  background: rgba(139, 156, 179, 0.15);
  color: var(--muted);
  border: 1px dashed var(--border);
}

.badge-phase-active {
  border: 2px solid #22c55e;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.08);
}

.badge-phase-idea {
  border: 2px dotted #a855f7;
  color: #e9d5ff;
  background: rgba(168, 85, 247, 0.08);
}

.badge-phase-advisory {
  border: 2px solid #3b82f6;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.08);
}

.badge-phase-winding_down {
  border: 2px dashed #f59e0b;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.08);
}

.badge-phase-dormant {
  border: 2px dotted var(--muted);
  color: var(--muted);
  background: transparent;
}

.badge-phase-severed {
  color: var(--muted);
  text-decoration: line-through;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.badge-impact-scale_up {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.badge-impact-scale_down {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.badge-impact-structural {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.badge-impact-neutral {
  background: rgba(139, 156, 179, 0.15);
  color: var(--muted);
}

.badge-tech {
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.25);
  margin: 0.1rem 0.15rem 0.1rem 0;
}

.tech-cell {
  min-width: 120px;
}

.tech-cell .badge {
  display: inline-block;
  margin-bottom: 0.15rem;
}

.filter-select-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
}

.filter-select-label select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.popup-tech {
  margin: 0.35rem 0 0.5rem;
}

.indicator-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.ind-block .badge {
  margin-left: 0.25rem;
}

/* Entity table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.entity-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.entity-table th {
  text-align: left;
  padding: 0.55rem 0.6rem;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  vertical-align: bottom;
  white-space: nowrap;
}

.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-size: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
}

.th-sort:hover {
  color: var(--text);
}

.th-sort.sorted {
  color: var(--accent);
}

.sort-ind {
  font-size: 0.62rem;
  line-height: 1;
  min-width: 0.65rem;
}

.entity-filter-row th,
.entity-sort-row th {
  padding: 0.4rem 0.5rem 0.35rem;
  vertical-align: bottom;
  border-bottom: none;
}

.entity-filter-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0.35rem 0 0.5rem;
}

.filter-reset-btn {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.filter-reset-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.entity-sort-row th {
  padding-top: 0;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.th-filter {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
}

.th-filter select {
  padding: 0.2rem 0.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  max-width: 100%;
  min-width: 0;
}

.entity-table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.entity-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.entity-row.entity-phase-severed td {
  opacity: 0.75;
}

.entity-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.summary-cell {
  width: 42%;
  line-height: 1.45;
}

.logo-col {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding: 0.5rem 0.35rem !important;
  text-align: center;
  vertical-align: middle;
}

.entity-name-col {
  width: 11%;
}

.tech-col,
.tech-cell {
  width: 12%;
}

.role-col,
.role-cell {
  width: 9%;
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-col {
  width: 8%;
}

.badge-col {
  width: 6%;
  white-space: nowrap;
  text-align: center;
}

.badge-compact {
  padding: 0.1rem 0.3rem;
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}

.entity-cell {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.entity-cell-text {
  min-width: 0;
}

.entity-logo {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  object-fit: contain;
  background: #e8edf4;
  border-radius: 5px;
  padding: 3px;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.entity-dot-empty {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.cat-tag {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: capitalize;
}

.meta {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
  margin-left: 0.5rem;
}

.timeline-item {
  position: relative;
  padding: 0 0 1.25rem 1.25rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.timeline-item.impact-scale_up::before {
  background: #22c55e;
}

.timeline-item.impact-scale_down::before {
  background: #ef4444;
}

.timeline-item.impact-structural::before {
  background: #3b82f6;
}

.timeline-item time {
  font-size: 0.75rem;
  color: var(--muted);
}

.timeline-body h3 {
  margin: 0.25rem 0 0.35rem;
  font-size: 1rem;
}

.timeline-meta {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.timeline-body p {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.timeline-body a {
  color: #60a5fa;
}

code {
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

.journal-grid {
  display: grid;
  gap: 1.25rem;
}

.journal-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  background: var(--surface);
}

.journal-card time {
  font-size: 0.75rem;
  color: var(--muted);
}

.journal-loc {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.25rem 0;
}

.journal-card h3 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.1rem;
}

.journal-card p {
  margin: 0.35rem 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.journal-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 0.65rem;
}

.journal-video {
  position: relative;
  margin-top: 0.65rem;
  border-radius: 8px;
  overflow: hidden;
  background: #0a0e14;
}

.journal-video--youtube {
  padding-bottom: 56.25%;
  height: 0;
}

.journal-video--youtube iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.journal-video__player {
  display: block;
  width: 100%;
  max-height: 480px;
  background: #000;
}

.journal-empty {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Insights — NL analysis series */
.insights-series-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.insights-series-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.insights-whitepaper-btn {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: not-allowed;
  opacity: 0.7;
}

.insights-list {
  display: grid;
  gap: 0.85rem;
}

.insight-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.insight-card:hover {
  border-color: var(--accent);
}

.insight-card--scheduled {
  opacity: 0.88;
}

.insight-card__link {
  display: flex;
  gap: 1rem;
  padding: 0.85rem 1rem;
  color: inherit;
  text-decoration: none;
}

.insight-card__thumb {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg);
}

.insight-card__body {
  flex: 1;
  min-width: 0;
}

.insight-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.insight-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.insight-card__hook {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.insight-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent);
}

.insight-badge--scheduled {
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
}

.insight-badge--draft {
  background: rgba(139, 156, 179, 0.12);
  color: var(--muted);
}

.insight-tech-pill {
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.insights-detail.hidden {
  display: none !important;
}

.insight-back {
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

.insight-article {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  background: var(--surface);
}

.insight-article__header h2 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.35rem;
}

.insight-article__hook {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.4;
}

.insight-roadmap-link {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
}

.insight-detail__figure {
  margin: 1rem 0;
}

.insight-detail__figure img {
  display: block;
  width: 100%;
  max-width: 540px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

.insight-article__body p {
  margin: 0 0 0.85rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.insight-article__body strong {
  color: var(--text);
  font-weight: 600;
}

.insight-article__body ol.insight-list {
  margin: 0 0 0.85rem;
  padding-left: 1.35rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.insight-article__body ol.insight-list li {
  margin-bottom: 0.45rem;
}

.insight-article__body ol.insight-list li:last-child {
  margin-bottom: 0;
}

.insight-linkedin {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

.insight-linkedin strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Data links */
a.data-link {
  color: #60a5fa;
  text-decoration: none;
  border-bottom: 1px solid rgba(96, 165, 250, 0.35);
}

a.data-link:hover {
  color: #93c5fd;
  border-bottom-color: #93c5fd;
}

a.badge-tech-link {
  text-decoration: none;
  border: none;
}

a.badge-tech-link:hover .badge-tech {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.12);
}

.entity-row-highlight {
  background: rgba(245, 158, 11, 0.12) !important;
  outline: 1px solid rgba(245, 158, 11, 0.45);
}

.timeline-item-highlight {
  background: rgba(245, 158, 11, 0.06);
  margin-left: -0.5rem;
  padding-left: 1.75rem;
  border-radius: 6px;
}

/* Technology roadmaps */
.roadmap-grid {
  display: grid;
  gap: 0.65rem;
}

.roadmap-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 auto;
}

.roadmap-cluster {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
}

.roadmap-cluster-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  padding-left: 0.15rem;
  border-left: 3px solid var(--cluster-color, var(--accent));
}

.roadmap-cluster-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--cluster-color, var(--accent));
}

.roadmap-cluster-sub {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.roadmap-cluster-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: start;
}

#view-technology .panel-inner {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--site-header-h) - var(--site-footer-h) - 2rem);
}

#view-technology .panel-intro {
  margin-bottom: 0.65rem;
}

#view-technology .panel-intro p {
  margin-bottom: 0.35rem;
}

#view-technology .updated {
  margin-top: 0.5rem;
}

.roadmap-card {
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-left-color: var(--cluster-color, var(--accent));
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.roadmap-card.open {
  border-color: var(--border);
  border-left-color: var(--cluster-color, var(--accent));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cluster-color, var(--accent)) 45%, transparent);
  height: auto;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.roadmap-card-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.roadmap-card-head:hover {
  background: rgba(255, 255, 255, 0.02);
}

.roadmap-icon {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  color: var(--cluster-color, var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
}

.roadmap-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.roadmap-card-head-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.roadmap-card-title {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.25;
}

.roadmap-card-goal {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.roadmap-card-chevron {
  color: var(--muted);
  transition: transform 0.15s;
}

.roadmap-card.open .roadmap-card-chevron {
  transform: rotate(180deg);
}

.roadmap-body {
  display: none;
  padding: 0 0.85rem 0.75rem;
  border-top: 1px solid var(--border);
}

.roadmap-card.open .roadmap-body {
  display: block;
}

.roadmap-fields {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
}

.roadmap-fields dt {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.75rem;
}

.roadmap-fields dt:first-child {
  margin-top: 0;
}

.roadmap-fields dd {
  margin: 0.25rem 0 0;
  line-height: 1.5;
}

.roadmap-promised {
  margin: 0.25rem 0 0;
  padding-left: 1.15rem;
}

.roadmap-promised li {
  margin-bottom: 0.35rem;
}

.roadmap-more {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (min-width: 900px) {
  #view-technology .roadmap-stack {
    flex: 1 1 auto;
    justify-content: flex-start;
    gap: 0.35rem;
  }

  #view-technology .roadmap-cluster {
    flex: 0 0 auto;
  }

  #view-technology .roadmap-cluster-cards {
    align-items: start;
  }

  #view-technology .roadmap-card:not(.open) {
    min-height: 4.75rem;
  }

  #view-technology .roadmap-card-head {
    padding: 0.45rem 0.65rem;
    min-height: 4.75rem;
    box-sizing: border-box;
  }

  #view-technology .roadmap-card-title {
    font-size: 0.86rem;
  }

  #view-technology .roadmap-card-goal {
    font-size: 0.72rem;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 899px) {
  .roadmap-cluster-cards {
    grid-template-columns: 1fr;
  }
}

/* Media — photos, logos, lightbox */
.media-strip {
  display: flex;
  gap: 0.5rem;
  margin: 0.85rem 0 0.25rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.media-strip-btn {
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: visible;
  background: var(--bg);
  cursor: pointer;
  width: 140px;
  aspect-ratio: 16 / 9;
  position: relative;
}

.media-strip-btn:hover,
.media-strip-btn:focus-visible {
  border-color: rgba(245, 158, 11, 0.5);
  z-index: 2;
}

.media-strip-roadmap .media-strip-btn {
  width: 128px;
}

.media-strip-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  min-width: 10rem;
  max-width: 14rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: center;
  color: var(--text);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s, visibility 0.12s;
  z-index: 5;
}

.media-strip-tip-title {
  display: block;
  font-weight: 600;
  color: #f8fafc;
}

.media-strip-tip-credit {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.media-strip-tip-date {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.6rem;
}

.media-strip-tip-source {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.6rem;
}

.media-strip-tip-source a {
  color: #93c5fd;
  text-decoration: none;
}

.media-strip-tip-source a:hover {
  text-decoration: underline;
}

.media-strip-feedback {
  display: block;
  margin-top: 0.35rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.58rem;
  cursor: pointer;
  text-decoration: underline;
}

.media-strip-feedback:hover {
  color: #fbbf24;
}

.media-strip-btn:hover .media-strip-tip,
.media-strip-btn:focus-visible .media-strip-tip {
  opacity: 1;
  visibility: visible;
}

.media-strip-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
}

.media-figure {
  margin: 0;
}

.media-img {
  display: block;
  max-width: 100%;
  height: auto;
}

.media-credit {
  font-size: 0.7rem;
  color: var(--muted);
}

.media-credit a {
  color: var(--accent);
}

.popup-hero-wrap {
  margin: 0 0 0.65rem;
}

.popup-hero-wrap .media-figure {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
}

.leaflet-popup-tip {
  background: var(--surface);
}

/* Location tiles (SVG substitute until real photos) */
.loc-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-align: center;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, #243044 0%, #1a2332 100%);
  color: var(--text);
  overflow: hidden;
  box-sizing: border-box;
}

.loc-tile--ai { background: linear-gradient(145deg, #2d2a5e 0%, #1a1a2e 100%); }
.loc-tile--robotics { background: linear-gradient(145deg, #3d2e24 0%, #292524 100%); }
.loc-tile--energy { background: linear-gradient(145deg, #2a3d1f 0%, #1c1917 100%); }
.loc-tile--manufacturing { background: linear-gradient(145deg, #334155 0%, #1e293b 100%); }
.loc-tile--space { background: linear-gradient(145deg, #1e3a5f 0%, #0c1929 100%); }
.loc-tile--connectivity { background: linear-gradient(145deg, #164e63 0%, #0c4a6e 100%); }
.loc-tile--infrastructure { background: linear-gradient(145deg, #312e81 0%, #1e1b4b 100%); }
.loc-tile--neurotech { background: linear-gradient(145deg, #4c1d95 0%, #2e1065 100%); }
.loc-tile--platforms { background: linear-gradient(145deg, #1e3a5f 0%, #172554 100%); }
.loc-tile--other { background: linear-gradient(145deg, #243044 0%, #1a2332 100%); }
.loc-tile--slotcar { background: linear-gradient(145deg, #7c2d12 0%, #431407 100%); }
.loc-tile--science { background: linear-gradient(145deg, #0c4a6e 0%, #082f49 100%); }
.loc-tile--coffee { background: linear-gradient(145deg, #422006 0%, #292524 100%); }
.loc-tile--desert-art { background: linear-gradient(145deg, #78350f 0%, #451a03 100%); }
.loc-tile--landscape { background: linear-gradient(145deg, #365314 0%, #1a2e05 100%); }
.loc-tile--tech-art { background: linear-gradient(145deg, #312e81 0%, #1e1b4b 100%); }
.loc-tile--hifi { background: linear-gradient(145deg, #4c1d95 0%, #2e1065 100%); }

.loc-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  opacity: 0.95;
}

.loc-tile-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.loc-tile-name {
  font-size: 0.58rem;
  line-height: 1.2;
  color: #cbd5e1;
  padding: 0 0.2rem 0.15rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.media-strip-tile-wrap {
  cursor: default;
  padding: 0;
  border: none;
  background: none;
}

.media-strip-tile {
  width: 140px;
  height: 79px;
}

.loc-thumb-tile.loc-thumb-sm {
  width: 48px;
  height: 48px;
  padding: 0.15rem;
}

.loc-thumb-tile .loc-tile-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.loc-thumb-tile .loc-tile-name {
  font-size: 0.5rem;
  -webkit-line-clamp: 1;
}

.popup-media .loc-tile,
.popup-media .popup-hero {
  width: 112px;
  height: 84px;
}

.popup-media .loc-tile-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.popup-media .loc-tile-name {
  font-size: 0.55rem;
}

img.popup-hero {
  width: 112px;
  height: 84px;
  min-height: 0;
  max-height: 84px;
  object-fit: cover;
  border-radius: 6px;
  cursor: zoom-in;
  background: #1e293b;
  display: block;
}

.media-strip-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1e293b;
}

.loc-thumb {
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: cover;
  background: #1e293b;
  border: 1px solid var(--border);
}

.loc-thumb-sm {
  width: 48px;
  height: 48px;
}

.loc-thumb--svg,
.loc-visual--placeholder {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1e293b;
}

.loc-thumb--svg {
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.popup-media .loc-visual--placeholder {
  width: 112px;
  height: 84px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.loc-img-fallback {
  object-fit: contain;
  background: #1e293b;
}

.loc-thumb--placeholder,
.loc-media--placeholder,
.popup-hero.loc-media--placeholder {
  object-fit: contain;
  background: #1e293b;
}

.popup-photo-credit {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  color: var(--muted);
}

.popup-hero-wrap .media-figure {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
}

.loc-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.entity-logo {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  object-fit: contain;
  background: #e8edf4;
  border-radius: 5px;
  padding: 3px;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.entity-dot-empty {
  background: var(--border);
}

.lightbox-modal,
.credits-modal,
.media-feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-modal.hidden,
.credits-modal.hidden,
.media-feedback-modal.hidden {
  display: none;
}

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

.lightbox-modal__backdrop,
.credits-modal__backdrop,
.media-feedback-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.lightbox-modal__panel {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 960px);
  max-height: 90vh;
  margin: 1rem;
}

.lightbox-modal__img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-modal__caption {
  margin: 0.65rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.lightbox-modal__close,
.credits-modal__close,
.media-feedback-modal__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.media-feedback-modal__panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 28rem);
  max-height: 90vh;
  overflow-y: auto;
  margin: 1rem;
  padding: 1.25rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.media-feedback-modal__panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.media-feedback-modal__context {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.media-feedback-form label {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
}

.media-feedback-actions {
  margin: 0 0 0.85rem;
  padding: 0;
  border: none;
}

.media-feedback-actions label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 1rem;
  cursor: pointer;
}

.media-feedback-field textarea,
.media-feedback-field input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.media-feedback-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.55rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.media-feedback-msg {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
}

.media-feedback-msg.ok {
  color: #86efac;
}

.media-feedback-msg.err {
  color: #fca5a5;
}

.credits-modal__panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 520px);
  max-height: 80vh;
  overflow-y: auto;
  margin: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.credits-modal__lead {
  margin: 0.5rem 0 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.credits-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.85rem;
  line-height: 1.55;
}

.credits-list li {
  margin-bottom: 0.5rem;
}

.credits-modal__more {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.site-footer {
  flex-shrink: 0;
  min-height: var(--site-footer-h);
  padding: 0.35rem 1rem;
  text-align: center;
  font-size: 0.65rem;
  line-height: 1.4;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.site-footer p,
.site-footer__line {
  margin: 0;
  max-width: 72rem;
  margin-inline: auto;
}

.footer-link {
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-left: 0.35rem;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  html, body {
    overflow: auto;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .roadtrip-promo {
    width: 100%;
    max-width: 100%;
  }

  .roadtrip-promo__eyebrow,
  .roadtrip-promo__title,
  .roadtrip-promo__cta {
    white-space: normal;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .nav-btn {
    width: 100%;
    justify-content: center;
    padding: 0.4rem 0.25rem;
    font-size: 0.72rem;
    gap: 0.25rem;
  }

  .nav-btn__icon {
    width: 0.85rem;
    height: 0.85rem;
  }

  .site-nav .nav-btn:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .insight-card__link {
    flex-direction: column;
  }

  .insight-card__thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    max-height: 200px;
  }

  .view-panel {
    height: calc(100vh - var(--site-header-h) - var(--site-footer-h));
    min-height: 0;
  }

  #view-map.view-panel {
    height: calc(100vh - var(--site-header-h) - var(--site-footer-h));
    min-height: 0;
    overflow: hidden;
  }

  #view-map.layout {
    padding-bottom: 0.75rem;
  }

  #view-map .map-panel-header {
    flex-direction: column;
    align-items: stretch;
    padding: 0.65rem 0.75rem;
    gap: 0.55rem;
  }

  #view-map .map-panel-header__controls {
    justify-content: flex-start;
  }

  #view-map .map-mode-toggle {
    flex: 1 1 auto;
  }

  #view-map .map-mode-btn {
    flex: 1 1 50%;
    text-align: center;
  }

  #view-map .filter-select-label--compact {
    width: 100%;
    justify-content: space-between;
  }

  #view-map .filter-select-label--compact select {
    flex: 1;
    min-width: 0;
  }

  #view-map .map-legend-bar {
    padding: 0.35rem 0.65rem;
    gap: 0.45rem;
    align-items: flex-start;
  }

  #view-map .legend.legend--map .legend-item {
    font-size: 0.7rem;
  }

  #view-map .map-wrap {
    min-height: 270px;
  }

  #view-map .map-column--trip.map-column--routes .map-wrap {
    min-height: 240px;
  }

  #view-map .route-legend__grid {
    grid-template-columns: 1fr;
    max-height: 8rem;
    padding: 0 0.55rem 0.5rem;
  }

  .leaflet-popup-content {
    width: min(300px, 88vw) !important;
    max-height: none;
  }

  /* Ecosystem — scrollable table, hide role column */
  #view-ecosystem .panel-inner {
    padding: 0.75rem;
  }

  #view-ecosystem .panel-intro p {
    font-size: 0.85rem;
  }

  #view-ecosystem .table-wrap {
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.25rem;
  }

  #view-ecosystem .entity-table {
    min-width: 680px;
    font-size: 0.78rem;
  }

  #view-ecosystem .entity-table .role-col,
  #view-ecosystem .entity-table .role-cell {
    display: none;
  }

  #view-ecosystem .summary-col {
    width: 36%;
  }

  #view-ecosystem .entity-name-col {
    width: 14%;
  }

  #view-ecosystem .filter-reset-btn {
    width: 100%;
  }

  #view-ecosystem .indicator-legend {
    font-size: 0.75rem;
  }
}
