:root {
  --green-950: #002f26;
  --green-900: #003f32;
  --green-800: #075f46;
  --green-700: #0b6f50;
  --green-600: #18865e;
  --green-300: #7ccfa1;
  --green-200: #c7ead7;
  --green-100: #edf7f1;
  --ink: #0f172a;
  --text: #1f2937;
  --muted: #64748b;
  --line: #d9e2de;
  --paper: #f7faf8;
  --card: #ffffff;
  --neutral-600: #64748b;
  --neutral-700: #475569;
  --radius: 8px;
  --shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  --shadow-hover: 0 16px 34px rgba(15, 23, 42, 0.13);
  --shadow-pressed: 0 5px 14px rgba(15, 23, 42, 0.09);
  --motion-fast: 160ms ease;
  --motion-med: 240ms cubic-bezier(.2, .8, .2, 1);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(237, 247, 241, 0.82), rgba(248, 250, 252, 0.92)),
    var(--paper);
  overflow: hidden;
}

button, select { font: inherit; }

button:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(11, 111, 80, 0.36);
  outline-offset: 2px;
}

.metric-value,
.kpi-value,
.make-count,
.featured-panel strong,
.table-row,
.city-row,
.framework-row,
.evidence-row {
  font-variant-numeric: tabular-nums;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-content: center;
  gap: 16px;
  background: var(--paper);
  color: var(--green-900);
}

.loading-screen.hidden { display: none; }

.loading-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 5px solid var(--green-100);
  border-top-color: var(--green-700);
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 120px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0 18px;
  gap: 9px;
  color: #fff;
  background: linear-gradient(180deg, #064e3b, #022c22);
  box-shadow: 8px 0 20px rgba(15, 23, 42, 0.14);
}

.brand-mark {
  width: 72px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
}

.brand-mark svg { width: 44px; height: 44px; stroke-width: 1.65; }

.nav-item {
  width: 104px;
  height: 74px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  gap: 5px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: transform var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast), color var(--motion-fast);
}

.nav-item:hover,
.nav-item.active {
  background: rgba(22, 159, 100, 0.55);
}

.nav-item:hover { transform: translateY(-1px); }
.nav-item:active { transform: translateY(0) scale(.985); }
.nav-item.active { box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 8px 18px rgba(0, 44, 34, .18); }

.nav-item svg { width: 28px; height: 28px; stroke-width: 1.85; }
.nav-item span { font-size: 14px; line-height: 1.12; font-weight: 650; }

.app-shell {
  margin-left: 120px;
  height: 100vh;
  padding: 14px 24px 16px 20px;
  overflow: hidden;
}

.topbar {
  height: 94px;
  display: grid;
  grid-template-columns: minmax(250px, 0.74fr) minmax(520px, 1.28fr) auto;
  align-items: start;
  gap: 14px;
  padding-bottom: 10px;
}

.topbar:not(.filter-mode) {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.topbar.info-mode {
  height: 58px;
  padding-bottom: 4px;
  align-items: start;
}

.topbar.filter-mode {
  position: relative;
  z-index: 950;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 10px;
  overflow: visible;
}

.topbar h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 2.3vw, 34px);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 760;
}

.topbar.filter-mode h1 {
  max-width: 330px;
  line-height: 1.16;
  padding-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar.filter-mode .title-block {
  flex: 0 0 auto;
  min-width: 0;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.filter-summary {
  max-width: min(46vw, 620px);
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #cfded6;
  border-radius: 8px;
  color: #334155;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 5px 14px rgba(0, 54, 37, 0.04);
  font-size: 13px;
  line-height: 1.15;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-summary strong {
  color: var(--green-900);
  font-weight: 850;
  margin-right: 4px;
}

.filter-summary[hidden] { display: none; }

.topbar.filter-mode .filter-summary {
  flex: 0 1 260px;
  max-width: 260px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #334155;
  font-size: 12px;
  line-height: 1.16;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  align-self: center;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.topbar.filter-mode .page-subtitle {
  display: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
  justify-content: flex-end;
}

.topbar.filter-mode .top-actions {
  flex: 0 0 auto;
  padding-top: 0;
  align-self: center;
}

.date-chip,
.filter-button,
.ghost-btn {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid #cfded6;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  box-shadow: 0 5px 14px rgba(0, 54, 37, 0.04);
  font-size: 14px;
  font-weight: 620;
  transition: transform var(--motion-fast), box-shadow var(--motion-fast), border-color var(--motion-fast), background var(--motion-fast);
}

.header-filters {
  grid-column: auto;
  width: 100%;
  padding: 7px 9px;
  grid-template-columns: minmax(118px, .9fr) minmax(132px, 1fr) minmax(150px, 1.12fr) minmax(118px, .9fr);
  gap: 8px;
  align-self: start;
}

.topbar.filter-mode .header-filters {
  flex: 1 1 540px;
  width: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  grid-template-columns: minmax(92px, .9fr) minmax(96px, 1fr) minmax(112px, 1.1fr) minmax(90px, .86fr);
  gap: 6px;
  align-self: center;
  overflow: visible;
}

.header-filters[hidden] {
  display: none;
}

.header-filters label {
  gap: 4px;
  font-size: 12px;
  line-height: 1;
}

.topbar.filter-mode .header-filters label {
  display: block;
  min-width: 0;
  font-size: 0;
  line-height: 0;
}

.header-filters select {
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.topbar.filter-mode .header-filters select {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 760;
  background-color: rgba(255, 255, 255, 0.92);
}

.filter-button,
.ghost-btn { cursor: pointer; }

.filter-button[hidden],
.ghost-btn[hidden],
.date-chip[hidden] {
  display: none;
}

.topbar.filter-mode .filter-button {
  height: 36px;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

.filter-button:hover,
.ghost-btn:hover,
.nav-item:hover {
  filter: brightness(1.02);
}

.filter-button:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 111, 80, .38);
  box-shadow: var(--shadow-hover);
}

.filter-button:active,
.ghost-btn:active {
  transform: translateY(0) scale(.985);
  box-shadow: var(--shadow-pressed);
}

.page { display: none; height: calc(100vh - 124px); }
body.filter-mode .page { height: calc(100vh - 94px); }
body.info-mode .page { height: calc(100vh - 88px); }
.page.active {
  display: block;
  animation: pageIn 220ms ease-out both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel,
.metric-card,
.filter-panel,
.map-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--motion-med), box-shadow var(--motion-med), border-color var(--motion-med), background var(--motion-med);
}

.panel:hover,
.metric-card:hover,
.filter-panel:hover,
.map-card:hover {
  border-color: rgba(11, 111, 80, .28);
  box-shadow: var(--shadow-hover);
}

.map-dashboard {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-rows: minmax(0, 1fr);
  gap: 14px 16px;
}

.map-card {
  position: relative;
  overflow: hidden;
  min-height: 0;
}

#map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #e1f0e8;
}

.map-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--green-900);
  background: linear-gradient(135deg, #f7faf8, #edf7f1);
  font-size: 16px;
  font-weight: 750;
  text-align: center;
}

.chart-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 8px;
  color: var(--green-900);
  background: linear-gradient(135deg, #f8fafc, #edf7f1);
  font-size: 15px;
  font-weight: 750;
  text-align: center;
}

.leaflet-control-zoom a {
  font-size: 25px;
}

.leaflet-control-attribution { font-size: 13px; font-weight: 600; }

.metric-rail {
  display: grid;
  gap: 10px;
}

.metric-card {
  min-height: 86px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.metric-card:hover {
  transform: translateY(-2px);
}

.metric-icon,
.kpi-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: radial-gradient(circle at 30% 25%, #2db173, var(--green-900));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 8px 16px rgba(0, 63, 50, .18);
  transition: transform var(--motion-med), box-shadow var(--motion-med);
}

.metric-card:hover .metric-icon,
.kpi-card:hover .kpi-icon {
  transform: scale(1.04);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 12px 22px rgba(0, 63, 50, .22);
}

.metric-icon svg,
.kpi-icon svg { width: 26px; height: 26px; stroke-width: 1.75; }

.metric-label,
.kpi-label {
  font-size: 14px;
  color: var(--text);
  font-weight: 680;
}

.metric-value {
  margin-top: 4px;
  color: var(--green-900);
  font-size: 27px;
  line-height: 1.16;
  font-weight: 760;
  white-space: nowrap;
}

.metric-sub,
.kpi-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
}

.filter-panel {
  grid-column: 1 / 2;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #334b42;
  font-size: 15px;
  font-weight: 780;
}

.filter-panel select {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast), background var(--motion-fast);
}

.filter-panel select:hover {
  border-color: rgba(11, 111, 80, .45);
  box-shadow: 0 0 0 3px rgba(11, 111, 80, .08);
}

.map-tooltip {
  position: absolute;
  z-index: 500;
  min-width: 266px;
  pointer-events: none;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.map-tooltip h3 { margin: 0 0 7px; color: var(--ink); font-size: 19px; }
.map-tooltip p { margin: 4px 0; color: var(--muted); font-size: 16px; font-weight: 560; }

.map-legend {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 420;
  width: 224px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.map-legend h3 { margin: 0 0 8px; font-size: 14px; }
.map-legend div {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 5px 0;
  color: #334b42;
  font-size: 12px;
  font-weight: 600;
}

.legend-swatch {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid rgba(0, 70, 45, 0.08);
}

.s1 { background: #d8f2e3; }
.s2 { background: #b4e7cb; }
.s3 { background: #76ce9f; }
.s4 { background: #2ea46e; }
.s5 { background: #006246; }

.map-scale {
  display: none;
}

.leaflet-control-scale {
  margin-left: 18px !important;
  margin-bottom: 16px !important;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.leaflet-control-scale-line {
  height: auto;
  padding: 3px 7px 2px;
  border-color: #1e2e28;
  border-width: 0 2px 2px;
  color: #273a33;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.15;
  text-shadow: none;
}

.city-marker {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green-800);
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0, 45, 32, 0.32);
  animation: markerPulse 2.2s ease-in-out infinite;
}

.city-marker span {
  position: absolute;
  left: 18px;
  top: -5px;
  padding: 2px 5px;
  border-radius: 5px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  text-shadow: 0 1px 0 #fff;
}

@keyframes markerPulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(0, 45, 32, 0.32), 0 0 0 0 rgba(11, 111, 80, .24); }
  50% { box-shadow: 0 6px 16px rgba(0, 45, 32, 0.36), 0 0 0 8px rgba(11, 111, 80, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

.map-insight {
  position: absolute;
  right: 18px;
  top: 16px;
  z-index: 430;
  max-width: 380px;
  padding: 8px 11px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.kpi-strip {
  height: 112px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.kpi-value {
  margin-top: 4px;
  color: var(--green-900);
  font-size: clamp(22px, 1.45vw, 27px);
  line-height: 1.16;
  font-weight: 760;
  white-space: nowrap;
}

.make-model-screen,
.structure-screen {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.make-board {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(390px, 0.85fr);
  gap: 18px;
}

.panel {
  min-height: 0;
  padding: 14px;
  overflow: hidden;
}

.panel h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.panel-caption {
  margin: -2px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.summary-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #334155;
  background: #eef2f7;
  border: 1px solid #d7dee8;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.ghost-btn {
  height: 34px;
  padding: 0 14px;
  font-size: 16px;
}

.make-cards {
  height: calc(100% - 62px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.make-card {
  position: relative;
  display: grid;
  grid-template-rows: 40px 24px 56px 28px 6px;
  align-content: center;
  align-items: center;
  justify-items: center;
  gap: 5px;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  transition: transform var(--motion-med), box-shadow var(--motion-med), border-color var(--motion-med), background var(--motion-med);
}

.make-card:hover {
  transform: translateY(-4px);
  border-color: rgba(11, 111, 80, .32);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 28px rgba(15, 23, 42, .12);
}

.make-rank {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  background: var(--green-800);
  font-weight: 720;
  font-size: 12px;
}

.make-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green-900);
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 780;
  font-size: 17px;
  overflow: hidden;
}

.make-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.make-name {
  max-width: 100%;
  color: #111c18;
  font-weight: 720;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-car {
  width: 128px;
  max-width: 92%;
  max-height: 58px;
  object-fit: contain;
  transition: transform var(--motion-med), filter var(--motion-med);
}

.make-card:hover .mini-car {
  transform: scale(1.04);
  filter: drop-shadow(0 8px 10px rgba(15, 23, 42, .12));
}

.make-count {
  color: var(--green-900);
  font-size: 15px;
  font-weight: 760;
}

.make-share {
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: #dbeee5;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-800), var(--green-600));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24);
}

.right-stack {
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr 0.92fr;
  gap: 12px;
}

.featured-panel {
  position: relative;
  text-align: center;
}

.featured-rank {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 6px 10px;
  border-radius: 5px;
  color: white;
  background: var(--green-800);
  font-size: 23px;
  font-weight: 800;
}

.featured-panel h2 {
  margin-top: 8px;
  font-size: 27px;
  color: var(--ink);
}

.featured-car {
  width: 88%;
  height: 155px;
  object-fit: contain;
  margin: 6px auto 0;
  transition: transform var(--motion-med), filter var(--motion-med);
}

.featured-panel:hover .featured-car {
  transform: scale(1.025);
  filter: drop-shadow(0 12px 16px rgba(15, 23, 42, .13));
}

.featured-panel p {
  margin: 0;
  color: var(--muted);
}

.featured-panel strong {
  display: block;
  color: var(--green-900);
  font-size: 34px;
  line-height: 1.24;
  margin: 5px 0 12px;
}

.featured-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  background: #d7eae1;
}

.featured-meta div {
  padding: 10px;
  background: #edf8f2;
  color: var(--ink);
}

.featured-meta span {
  display: block;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.compact-table,
.city-table {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.2fr) minmax(0, 0.8fr) 86px 70px;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-bottom: 1px solid #edf3ef;
  font-size: 16px;
  font-weight: 560;
  transition: background var(--motion-fast), color var(--motion-fast);
}

.table-row:not(.header):hover {
  background: rgba(237, 247, 241, .86);
}

.table-row.header {
  min-height: 34px;
  color: white;
  background: var(--green-900);
  font-size: 16px;
  font-weight: 720;
}

.table-row:last-child { border-bottom: 0; }
.table-row div { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.structure-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.36fr 0.58fr 0.86fr;
  grid-template-rows: minmax(0, 1.06fr) minmax(0, 1fr);
  gap: 16px;
}

.growth-panel { grid-column: 1 / 3; }
.compare-panel { grid-column: 3 / 4; }
.city-ranking-panel { grid-column: 1 / 2; }
.insight-panel { grid-column: 2 / 3; }
.cafv-panel { grid-column: 3 / 4; }

.panel canvas {
  width: 100% !important;
  height: 100% !important;
}

.compare-panel {
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  text-align: center;
  padding: 16px 20px 18px;
}

.compare-cars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-content: center;
  align-items: stretch;
  height: 100%;
}

.compare-car {
  min-width: 0;
  display: grid;
  grid-template-rows: 28px 38px 24px minmax(112px, 1fr) 42px;
  align-items: center;
  justify-items: center;
  border-right: 1px solid var(--line);
}

.compare-car:last-child { border-right: 0; }

.compare-car h3 {
  margin: 0;
  color: var(--green-700);
  font-size: 16px;
  font-weight: 800;
}

.compare-car strong {
  display: block;
  color: var(--green-900);
  font-size: 27px;
  line-height: 1.16;
  margin-top: 3px;
}

.compare-car span {
  display: block;
  color: var(--muted);
  margin-bottom: 2px;
  font-size: 16px;
  font-weight: 820;
}

.vehicle-symbol {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #edf7f1);
}

.vehicle-symbol svg {
  width: 58px;
  height: 58px;
  stroke-width: 1.65;
}

.bev-symbol { color: var(--green-800); }
.phev-symbol { color: var(--neutral-700); background: linear-gradient(180deg, #ffffff, #f1f5f9); }

.compare-label {
  width: 92%;
  margin: 0;
  padding: 10px 8px;
  border-radius: 7px;
  background: #e8f5ee;
  font-size: 12px;
  font-weight: 620;
}

.city-ranking-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.city-table {
  overflow: auto;
}

.city-table .city-row {
  display: grid;
  grid-template-columns: 48px minmax(96px, 1fr) 82px 82px 98px 84px;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 5px 10px;
  border-bottom: 1px solid #edf3ef;
  font-size: 13px;
  font-weight: 560;
  transition: background var(--motion-fast), color var(--motion-fast);
}

.city-table .city-row:not(.header):not(.total):hover {
  background: rgba(237, 247, 241, .86);
}

.city-table .city-row.header {
  color: #111c18;
  font-weight: 720;
}

.city-table .city-row.total {
  min-height: 48px;
  color: var(--green-900);
  background: rgba(231, 247, 238, 0.72);
  border-top: 2px solid var(--line);
  font-weight: 780;
}

.city-table .rank-badge {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  color: white;
  background: var(--green-700);
  font-weight: 750;
}

.share-bar {
  height: 7px;
  border-radius: 99px;
  background: #dbeee5;
  overflow: hidden;
}

.share-bar i {
  display: block;
  height: 100%;
  background: var(--green-300);
}

.insight-panel {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 22px 24px;
}

.insight-head {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.insight-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green-800);
  background: var(--green-100);
}

.insight-icon svg { width: 38px; height: 38px; }
.insight-panel h2 { margin: 0; font-size: 24px; line-height: 1.2; }
.insight-panel p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 17px; font-weight: 560; }
.insight-panel strong { color: var(--green-900); font-size: 30px; }

.insight-divider {
  height: 1px;
  background: var(--line);
}

.insight-stat span {
  display: block;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}

.insight-stat strong {
  display: block;
  margin-top: 5px;
  font-size: 28px;
}

.two-column-screen,
.validation-screen {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wide-panel { grid-column: span 2; }

.validation-screen {
  grid-template-columns: 1.12fr 0.88fr;
  grid-template-rows: minmax(310px, 1fr) minmax(210px, 0.68fr) minmax(238px, 0.72fr);
  gap: 14px;
}

.framework-panel {
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr);
}

.framework-table-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.source-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

#validationSourceList {
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1.55fr);
  gap: 10px 16px;
  align-content: stretch;
  min-height: 0;
}

.validation-badge {
  padding: 7px 12px;
  border-radius: 999px;
  color: white;
  background: var(--green-800);
  font-size: 16px;
  font-weight: 760;
}

.framework-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 6px 0 9px;
}

.framework-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf8;
}

.framework-card.mapreduce { border-left: 4px solid #003f32; }
.framework-card.spark { border-left: 4px solid #0b6f50; }
.framework-card.flink { border-left: 4px solid #7ccfa1; }

.framework-logo {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: white;
  border: 1px solid var(--line);
}

.framework-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.framework-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.1;
}

.framework-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.framework-table {
  min-height: 0;
  overflow: auto;
}

.framework-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 4px 7px;
  border-bottom: 1px solid #edf3ef;
  font-size: 13px;
  line-height: 1.08;
  font-weight: 600;
  transition: background var(--motion-fast);
}

.framework-row:not(.header):hover {
  background: rgba(237, 247, 241, .78);
}

.framework-row.header {
  min-height: 34px;
  color: white;
  background: var(--green-900);
  border-radius: 7px 7px 0 0;
  font-weight: 760;
}

.framework-row.batch-row {
  grid-template-columns: .8fr 1fr 1fr .8fr;
}

.framework-row.total {
  color: var(--green-900);
  background: rgba(231, 247, 238, 0.76);
  font-weight: 800;
}

.framework-row .ok { color: var(--green-800); font-weight: 850; }
.framework-row .warn { color: var(--neutral-700); font-weight: 850; }

.framework-conclusion {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 5px solid var(--green-700);
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(90deg, rgba(237, 247, 241, .98), rgba(248, 250, 252, .92));
  font-size: 16px;
  line-height: 1.42;
  font-weight: 680;
}

.framework-conclusion strong {
  color: var(--green-900);
  font-weight: 900;
}

.framework-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.framework-dot {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0, 75, 56, 0.08);
}

.framework-dot.mapreduce { background: #004b38; }
.framework-dot.spark { background: #0b7f57; }
.framework-dot.flink { background: #83e0aa; }

.validation-note {
  margin: 7px 0 0;
  padding: 7px 10px;
  border-radius: 8px;
  color: #334b42;
  background: #edf8f2;
  font-size: 15px;
  line-height: 1.28;
  font-weight: 580;
}

.sample-note {
  margin-top: 7px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 620;
}

.route-block {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  align-content: start;
  height: 100%;
  margin-bottom: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(237, 247, 241, .86), rgba(248, 250, 252, .95));
}

.route-block svg {
  width: 16px;
  height: 16px;
  color: #64748b;
}

.route-step {
  min-height: 34px;
  display: grid;
  place-items: center;
  flex: 1 1 132px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #0f172a;
  background: #eef2f7;
  border: 1px solid #d7dee8;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.evidence-grid {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: #fff;
  min-height: 0;
}

.evidence-row {
  display: grid;
  grid-template-columns: 150px minmax(320px, 1.1fr) minmax(320px, 1fr);
  gap: 10px;
  min-width: 900px;
  padding: 6px 10px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  overflow-wrap: anywhere;
  transition: background var(--motion-fast);
}

.evidence-row:not(.header):hover {
  background: rgba(237, 247, 241, .8);
}

.evidence-row.header {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #fff;
  background: var(--green-900);
  font-weight: 800;
}

.table-row.header,
.city-table .city-row.header,
.framework-row.header,
.evidence-row.header {
  min-height: 38px;
  color: #fff;
  background: linear-gradient(90deg, var(--green-900), var(--green-700));
  border-bottom: 0;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: 0;
}

.table-row.header div,
.city-table .city-row.header div,
.framework-row.header div,
.evidence-row.header div {
  color: inherit;
  font-weight: inherit;
}

.source-panel p,
.about-panel p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.source-panel p {
  margin: 0;
  line-height: 1.42;
}

.about-screen {
  height: 100%;
  display: grid;
  grid-template-columns: 1.08fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.about-main { grid-row: auto; }

.about-panel {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
}

.about-panel h2 {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.18;
}

.about-panel p {
  margin: 0;
  color: #334b42;
  font-size: 16px;
  font-weight: 580;
  line-height: 1.48;
}

.about-panel strong {
  color: var(--green-900);
  font-weight: 800;
}

.about-panel a {
  color: var(--green-800);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-hero {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.about-hero-icon,
.about-section-title i,
.about-section-title > svg {
  display: grid;
  place-items: center;
  color: #fff;
  background: radial-gradient(circle at 28% 18%, #2db173, var(--green-900));
  box-shadow: 0 8px 18px rgba(0, 63, 50, 0.14);
}

.about-hero-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
}

.about-hero-icon svg { width: 34px; height: 34px; stroke-width: 1.8; }

.about-hero h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.about-hero p {
  color: #40505a;
  font-size: 16px;
}

.about-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.about-stat-grid div {
  min-width: 0;
  padding: 12px 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, #edf7f1, #f8fafc);
  border: 1px solid #d9e2de;
}

.about-stat-grid strong {
  display: block;
  color: var(--green-900);
  font-size: 23px;
  line-height: 1.08;
  white-space: nowrap;
}

.about-stat-grid span {
  display: block;
  margin-top: 5px;
  color: #475569;
  font-size: 13px;
  font-weight: 720;
}

.about-callout,
.about-note {
  padding: 10px 12px;
  border-radius: 8px;
  background: #edf7f1;
  border: 1px solid #d9e2de;
}

.compact-note {
  padding: 8px 10px;
  line-height: 1.34 !important;
}

.about-section-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.about-section-title i,
.about-section-title > svg {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 9px;
  border-radius: 12px;
}

.about-section-title svg { stroke-width: 1.8; }

.about-section-title h2 { margin: 0; }

.about-info-list {
  display: grid;
  gap: 9px;
}

.about-info-list p {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf2f7;
}

.about-info-list p:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.about-info-list span {
  color: #334b42;
}

.about-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  color: #fff !important;
  background: var(--green-800);
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 780;
}

.field-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.field-chip-grid span {
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: 6px 8px;
  border-radius: 7px;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #dbe4ea;
  font-size: 14px;
  font-weight: 720;
  text-align: center;
}

.route-visual {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.route-visual span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: #073b2d;
  background: #edf7f1;
  border: 1px solid #cfe2d9;
  font-size: 15px;
  font-weight: 780;
}

.route-visual svg {
  width: 18px;
  height: 18px;
  color: var(--green-700);
}

.role-cards {
  display: grid;
  gap: 10px;
}

.role-cards div {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc, #edf7f1);
  border: 1px solid #d9e2de;
}

.role-cards strong {
  color: var(--green-900);
  font-size: 16px;
  font-weight: 820;
}

.role-cards span {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 820;
  white-space: nowrap;
}

.disclaimer-block {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 8px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #dbe4ea;
}

.disclaimer-block i,
.disclaimer-block > svg {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 14px;
  color: var(--green-800);
  background: #edf7f1;
}

.disclaimer-block svg { stroke-width: 1.8; }

.disclaimer-block p {
  color: #334155;
  font-size: 16px;
  line-height: 1.48;
}

@media (max-width: 1536px), (max-height: 900px) {
  .sidebar {
    width: 96px;
    padding: 12px 0;
    gap: 6px;
  }

  .brand-mark {
    width: 58px;
    height: 48px;
    margin-bottom: 2px;
  }

  .brand-mark svg { width: 34px; height: 34px; }

  .nav-item {
    width: 82px;
    height: 58px;
    gap: 3px;
  }

  .nav-item svg { width: 22px; height: 22px; }
  .nav-item span { font-size: 12px; line-height: 1.04; }

  .app-shell {
    margin-left: 96px;
    padding: 9px 14px 10px 14px;
  }

  .topbar {
    height: 82px;
    grid-template-columns: minmax(230px, .68fr) minmax(500px, 1.28fr) auto;
    gap: 12px;
    padding-bottom: 6px;
  }

  .topbar.info-mode {
    height: 48px;
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 2px;
  }

  .topbar h1 {
    font-size: clamp(24px, 2vw, 30px);
    line-height: 1;
  }

  .title-row {
    gap: 8px;
  }

  .filter-summary {
    max-width: min(38vw, 430px);
    min-height: 26px;
    padding: 4px 8px;
    font-size: 11px;
  }

  .topbar p {
    margin-top: 4px;
    font-size: 13px;
  }

  .top-actions {
    gap: 7px;
    padding-top: 2px;
  }

  .date-chip,
  .filter-button,
  .ghost-btn {
    height: 34px;
    gap: 7px;
    padding: 0 12px;
    font-size: 12px;
  }

  .date-chip svg,
  .filter-button svg,
  .ghost-btn svg {
    width: 17px;
    height: 17px;
  }

  .header-filters {
    padding: 6px 7px;
    grid-template-columns: minmax(105px, .86fr) minmax(122px, 1fr) minmax(138px, 1.08fr) minmax(105px, .86fr);
    gap: 6px;
  }

  .header-filters label {
    gap: 3px;
    font-size: 11px;
    font-weight: 800;
  }

  .header-filters select {
    height: 31px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 720;
  }

  .page { height: calc(100vh - 101px); }
  body.info-mode .page { height: calc(100vh - 67px); }

  .panel { padding: 10px; }
  .panel h2 { font-size: 15px; }
  .panel-head { margin-bottom: 5px; }
  .panel-caption { margin: -1px 0 5px; font-size: 12px; }
  .summary-pill { min-height: 26px; padding: 0 8px; font-size: 11px; }

  .metric-icon,
  .kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .metric-icon svg,
  .kpi-icon svg {
    width: 21px;
    height: 21px;
  }

  .metric-card {
    min-height: 68px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    padding: 9px 10px;
  }

  .metric-label,
  .kpi-label { font-size: 12px; }

  .metric-value {
    margin-top: 2px;
    font-size: 21px;
  }

  .metric-sub,
  .kpi-sub {
    margin-top: 3px;
    font-size: 11px;
  }

  .map-dashboard {
    grid-template-columns: minmax(0, 1fr) 270px;
    grid-template-rows: minmax(0, 1fr);
    gap: 8px 10px;
  }

  .metric-rail { gap: 7px; }

  .filter-panel {
    padding: 8px 10px;
    gap: 10px;
  }

  .filter-panel label {
    gap: 5px;
    font-size: 13px;
    font-weight: 780;
  }

  .filter-panel select {
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 650;
  }

  .filter-panel.header-filters {
    padding: 6px 7px;
    gap: 6px;
  }

  .filter-panel.header-filters label {
    gap: 3px;
    font-size: 11px;
    font-weight: 800;
  }

  .filter-panel.header-filters select {
    height: 31px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 720;
  }

  .map-legend {
    right: 12px;
    bottom: 12px;
    width: 178px;
    padding: 8px 9px;
  }

  .map-legend h3 { font-size: 12px; }
  .map-legend div { gap: 8px; margin: 4px 0; font-size: 10px; }

  .map-scale {
    display: none;
  }

  .leaflet-control-scale {
    margin-left: 14px !important;
    margin-bottom: 12px !important;
    padding: 6px 8px;
  }

  .leaflet-control-scale-line {
    padding: 2px 6px 2px;
    font-size: 11px;
  }

  .map-insight {
    right: 12px;
    top: 12px;
    max-width: 300px;
    font-size: 11px;
  }

  .kpi-strip {
    height: 78px;
    gap: 8px;
  }

  .kpi-card {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    padding: 8px 10px;
  }

  .kpi-value {
    margin-top: 2px;
    font-size: clamp(19px, 1.35vw, 23px);
  }

  .make-model-screen,
  .structure-screen {
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
  }

  .make-board {
    grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.85fr);
    gap: 10px;
  }

  .make-cards {
    height: calc(100% - 46px);
    gap: 8px;
  }

  .make-card {
    grid-template-rows: 52px 18px 76px 22px 5px;
    gap: 2px;
    padding: 6px;
  }

  .make-rank {
    top: 7px;
    left: 7px;
    min-width: 24px;
    height: 24px;
    font-size: 14px;
    border-radius: 6px;
  }

  .make-logo {
    width: 48px;
    height: 48px;
    font-size: 16px;
  }

  .make-logo img {
    width: 38px;
    height: 38px;
  }

  .make-name {
    font-size: 11.5px;
    line-height: 1;
  }

  .mini-car {
    width: 136px;
    max-width: 98%;
    max-height: 76px;
  }

  .make-count {
    font-size: 14.5px;
    line-height: 1;
  }
  .make-share {
    font-size: 10px;
    line-height: 1;
  }
  .progress-track { height: 5px; }

  .right-stack {
    grid-template-rows: 0.92fr 0.88fr;
    gap: 8px;
  }

  .featured-rank {
    top: 12px;
    left: 12px;
    padding: 4px 8px;
    font-size: 18px;
  }

  .featured-panel h2 { font-size: 20px; }

  .featured-car {
    height: 105px;
    margin-top: 2px;
  }

  .featured-panel strong {
    font-size: 26px;
    margin: 2px 0 7px;
  }

  .featured-meta div { padding: 7px; }
  .featured-meta span { font-size: 12px; margin-bottom: 2px; }

  .table-row {
    min-height: 25px;
    padding: 4px 7px;
    font-size: 12px;
  }

  .table-row.header { min-height: 27px; font-size: 12px; }

  .structure-grid {
    grid-template-columns: 1.26fr 0.54fr 0.86fr;
    grid-template-rows: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 8px;
  }

  .compare-panel {
    grid-template-rows: 26px minmax(0, 1fr);
    padding: 10px 12px;
  }

  .compare-cars { gap: 8px; }

  .compare-car {
    grid-template-rows: 22px 30px 18px minmax(76px, 1fr) 32px;
  }

  .compare-car h3 { font-size: 12px; }
  .compare-car strong { font-size: 21px; }
  .compare-car span { font-size: 13px; font-weight: 820; }

  .vehicle-symbol {
    width: 76px;
    height: 76px;
  }

  .vehicle-symbol svg {
    width: 40px;
    height: 40px;
  }

  .compare-label {
    padding: 7px 5px;
    font-size: 10px;
  }

  .city-table .city-row {
    grid-template-columns: 38px minmax(82px, 1fr) 68px 68px 78px 62px;
    min-height: 22px;
    padding: 2px 7px;
    font-size: 10.5px;
  }

  .city-table .city-row.total { min-height: 29px; }

  .city-table .rank-badge {
    width: 17px;
    height: 17px;
    font-size: 10px;
  }

  .share-bar { height: 5px; }

  .insight-panel {
    gap: 9px;
    padding: 14px 16px;
  }

  .insight-head {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
  }

  .insight-icon {
    width: 48px;
    height: 48px;
  }

  .insight-icon svg {
    width: 28px;
    height: 28px;
  }

  .insight-panel h2 { font-size: 18px; }
  .insight-panel p { font-size: 13px; line-height: 1.42; }
  .insight-panel strong { font-size: 23px; }
  .insight-stat span { font-size: 13px; }
  .insight-stat strong { font-size: 22px; }

  .two-column-screen,
  .validation-screen,
  .about-screen {
    gap: 8px;
  }

  .validation-screen {
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-rows: minmax(0, 0.92fr) minmax(0, 0.62fr) minmax(0, 0.52fr);
    gap: 8px;
  }

  .framework-panel {
    grid-template-rows: 36px minmax(0, 1fr);
  }

  .framework-table-panel {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .validation-badge {
    padding: 5px 10px;
    font-size: 12px;
  }

  .framework-cards {
    gap: 6px;
    margin: 3px 0 6px;
  }

  .framework-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 7px;
    padding: 7px;
  }

  .framework-logo {
    width: 38px;
    height: 38px;
  }

  .framework-logo img {
    width: 29px;
    height: 29px;
  }

  .framework-card strong { font-size: 11px; }
  .framework-card small { font-size: 10px; }

  .framework-row {
    min-height: 24px;
    padding: 3px 6px;
    font-size: 10.5px;
  }

  .framework-row.header {
    min-height: 25px;
  }

  .framework-conclusion {
    margin-top: 10px;
    padding: 9px 11px;
    font-size: 13px;
    line-height: 1.32;
  }

  .validation-note,
  .sample-note {
    margin-top: 5px;
    padding: 5px 8px;
    font-size: 11px;
    line-height: 1.2;
  }

  .route-block {
    gap: 4px;
    margin-bottom: 5px;
  }

  .route-step {
    min-height: 27px;
    flex: 1 1 112px;
    padding: 3px 6px;
    font-size: 10px;
  }

  .evidence-row {
    min-width: 760px;
    grid-template-columns: 110px minmax(260px, 1.1fr) minmax(260px, 1fr);
    padding: 4px 7px;
    font-size: 10px;
    line-height: 1.2;
  }

  .table-row.header,
  .city-table .city-row.header,
  .framework-row.header,
  .evidence-row.header {
    min-height: 29px;
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 13px;
    font-weight: 850;
  }

  #validationSourceList {
    grid-template-columns: minmax(210px, 0.44fr) minmax(0, 1.56fr);
    gap: 6px 10px;
  }

  .about-screen {
    gap: 8px;
  }

  .about-panel {
    padding: 10px;
    gap: 8px;
  }

  .about-panel h2 { font-size: 15px; }
  .about-panel p { font-size: 12px; line-height: 1.34; }

  .about-hero {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 9px;
  }

  .about-hero-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .about-hero-icon svg {
    width: 26px;
    height: 26px;
  }

  .about-hero h2 {
    margin-bottom: 5px;
    font-size: 15px;
  }

  .about-hero p { font-size: 12px; line-height: 1.34; }

  .about-stat-grid {
    gap: 5px;
  }

  .about-stat-grid div {
    padding: 7px 8px;
  }

  .about-stat-grid strong {
    font-size: 18px;
  }

  .about-stat-grid span {
    margin-top: 3px;
    font-size: 10px;
  }

  .about-callout,
  .about-note {
    padding: 7px 9px;
  }

  .about-section-title {
    gap: 8px;
  }

  .about-section-title i,
  .about-section-title > svg {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    padding: 7px;
    border-radius: 10px;
  }

  .about-info-list {
    gap: 5px;
  }

  .about-info-list p {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px;
    padding-bottom: 5px;
  }

  .about-link {
    min-height: 34px;
    font-size: 12px;
  }

  .field-chip-grid {
    gap: 5px;
  }

  .field-chip-grid span {
    min-height: 27px;
    padding: 4px 5px;
    font-size: 11px;
  }

  .route-visual {
    gap: 5px;
  }

  .route-visual span {
    min-height: 31px;
    padding: 0 9px;
    font-size: 12px;
  }

  .role-cards {
    gap: 7px;
  }

  .role-cards div {
    gap: 4px;
    padding: 7px;
  }

  .role-cards strong { font-size: 13px; }
  .role-cards span { font-size: 12px; font-weight: 820; }

  .disclaimer-block {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .disclaimer-block i,
  .disclaimer-block > svg {
    width: 36px;
    height: 36px;
    padding: 8px;
  }

  .disclaimer-block p {
    font-size: 12px;
    line-height: 1.34;
  }
}

@media (max-width: 1536px), (max-height: 900px) {
  body.filter-mode .topbar {
    height: 60px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0 8px;
  }

  body.filter-mode .page {
    height: calc(100vh - 79px);
  }

  .topbar.filter-mode h1 {
    max-width: 310px;
    font-size: clamp(21px, 1.7vw, 27px);
    line-height: 1.18;
    padding-bottom: 2px;
  }

  .topbar.filter-mode .header-filters {
    flex: 1 1 510px;
    grid-template-columns: minmax(88px, .9fr) minmax(92px, 1fr) minmax(108px, 1.1fr) minmax(86px, .86fr);
    gap: 5px;
    padding: 0;
  }

  .topbar.filter-mode .header-filters select {
    height: 31px;
    padding: 0 7px;
    font-size: 11px;
    font-weight: 760;
  }

  .topbar.filter-mode .filter-summary {
    flex-basis: 230px;
    max-width: 230px;
    min-height: 0;
    padding: 0;
    font-size: 11px;
    line-height: 1.14;
  }

  .topbar.filter-mode .filter-button {
    height: 32px;
    padding: 0 10px;
    font-size: 11px;
  }
}

@media (max-width: 1320px) {
  .topbar.filter-mode h1 {
    max-width: 305px;
    font-size: clamp(20px, 1.58vw, 24px);
    line-height: 1.18;
  }

  .topbar.filter-mode .header-filters {
    flex-basis: 470px;
    grid-template-columns: minmax(78px, .9fr) minmax(84px, 1fr) minmax(96px, 1.08fr) minmax(78px, .84fr);
  }

  .topbar.filter-mode .header-filters select {
    padding: 0 6px;
    font-size: 10.5px;
  }

  .topbar.filter-mode .filter-summary {
    flex-basis: 190px;
    max-width: 190px;
    font-size: 10.5px;
  }
}

@media (max-width: 900px) {
  body { overflow: auto; }
  .app-shell { height: auto; overflow: visible; }
  .page { height: auto; min-height: calc(100vh - 122px); }
  .map-dashboard,
  .make-board,
  .structure-grid,
  .two-column-screen,
  .validation-screen,
  .about-screen {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .metric-rail,
  .kpi-strip,
  .make-cards,
  .filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #validationSourceList {
    grid-template-columns: 1fr;
  }
  .map-card { height: 560px; }
  .growth-panel,
  .compare-panel,
  .city-ranking-panel,
  .insight-panel,
  .cafv-panel,
  .wide-panel { grid-column: auto; }
}

/* 随作品集附带的手机布局：保留全部筛选和仪表盘页面。 */
@media (max-width: 900px) {
  html, body { width: 100%; height: auto; min-height: 100%; }
  .sidebar { position: sticky; inset: auto; top: 0; width: 100%; height: 66px; flex-direction: row; justify-content: space-around; padding: 5px 7px; gap: 2px; }
  .sidebar .brand-mark { display: none; }
  .sidebar .nav-item { width: auto; flex: 1; height: 55px; padding: 5px 2px; gap: 3px; }
  .sidebar .nav-item svg { width: 20px; height: 20px; }
  .sidebar .nav-item span { font-size: 9px; line-height: 1.2; }
  .app-shell { margin-left: 0; padding: 15px 12px 30px; height: auto; overflow: visible; }
  .topbar, body.filter-mode .topbar, .topbar.filter-mode, .topbar.info-mode, .topbar:not(.filter-mode) { display: flex; flex-wrap: wrap; height: auto; min-height: 0; gap: 12px; padding: 0 0 16px; position: static; }
  .topbar .title-block, .topbar.filter-mode .title-block { width: 100%; flex: 0 0 100%; }
  .topbar h1, .topbar.filter-mode h1 { font-size: 25px; max-width: 100%; white-space: normal; line-height: 1.2; }
  .topbar .page-subtitle, .topbar.filter-mode .page-subtitle { display: block; font-size: 11px; line-height: 1.5; }
  .topbar .header-filters, .topbar.filter-mode .header-filters { flex: 0 0 100%; width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 0; min-width: 0; }
  .topbar .header-filters[hidden] { display: none; }
  .topbar .header-filters label, .topbar.filter-mode .header-filters label { font-size: 10px; line-height: 1.5; display: block; min-width: 0; }
  .topbar .header-filters select, .topbar.filter-mode .header-filters select { width: 100%; height: 39px; font-size: 12px; margin-top: 4px; padding: 0 7px; }
  .topbar .filter-summary, .topbar.filter-mode .filter-summary { flex: 1 1 45%; min-width: 0; max-width: none; font-size: 10px; line-height: 1.5; white-space: normal; }
  .topbar .top-actions, .topbar.filter-mode .top-actions { padding: 0; flex: 0 1 auto; margin-left: auto; }
  .topbar .date-chip { height: 32px; font-size: 10px; }
  .topbar .filter-button, .topbar.filter-mode .filter-button { height: 35px; font-size: 10px; padding: 0 10px; }
  .page, body.filter-mode .page { height: auto; min-height: 0; overflow: visible; }
  .map-dashboard, .make-model-screen, .structure-screen, .make-board, .structure-grid, .two-column-screen, .validation-screen, .about-screen { height: auto; min-height: 0; grid-template-columns: minmax(0,1fr); grid-template-rows: auto; gap: 16px; }
  .map-card { height: 415px; width: 100%; min-width: 0; }
  .map-dashboard { grid-template-rows: 415px auto; }
  .map-legend { right: 8px; bottom: 12px; width: auto; max-width: 140px; padding: 9px; }
  .map-legend h3 { font-size: 10px; }
  .map-legend div { font-size: 8px; }
  .map-insight { font-size: 9px; max-width: 190px; left: 10px; top: 10px; }
  .metric-rail { height: auto; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto; gap: 10px; }
  .metric-rail > * { min-width: 0; min-height: 95px; }
  .make-cards { height: auto; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .make-card { min-height: 180px; }
  .right-stack { grid-template-rows: auto; gap: 16px; }
  .featured-panel { min-height: 310px; }
  .panel { min-width: 0; width: 100%; height: auto; overflow: hidden; }
  .panel-head { flex-wrap: wrap; gap: 10px; }
  .panel-caption { font-size: 11px; line-height: 1.5; }
  .panel-head h2 { font-size: 17px; }
  .growth-panel, .cafv-panel, .two-column-screen>.panel, .validation-screen>.panel:has(canvas) { height: 335px; }
  .structure-grid>* { grid-area: auto; }
  .validation-screen>* { grid-area: auto; }
  .two-column-screen>* { grid-area: auto; }
  .framework-table-panel, .city-ranking-panel, .model-table-panel { overflow-x: auto; }
  .framework-table { min-width: 640px; }
  .about-screen>* { grid-area: auto; }
  .about-stat-grid, .role-cards { grid-template-columns: 1fr; }
  .about-stat-grid { gap: 10px; }
  .about-stat-grid>div { padding: 15px; }
  .about-hero { display: block; }
  .about-hero-icon { margin-bottom: 15px; }
  .about-hero h2 { font-size: 22px; line-height: 1.3; }
  .about-info-list p { grid-template-columns: 1fr; gap: 5px; }
  .about-section-title h2 { font-size: 19px; }
  .route-visual { flex-wrap: wrap; }
  .about-main { overflow: visible; }
  #validationSourceList { grid-template-columns: 1fr; }
}
