:root {
  --bg: #f3efe7;
  --panel: rgba(255, 251, 245, 0.88);
  --panel-strong: #fffdf8;
  --ink: #1f2a28;
  --muted: #5e6b67;
  --line: rgba(31, 42, 40, 0.12);
  --brand: #a63d2f;
  --accent: #2d6a6a;
  --gold: #c18c2d;
  --indigo: #586f98;
  --violet: #8c5caa;
  --shadow: 0 24px 50px rgba(54, 38, 22, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(166, 61, 47, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(45, 106, 106, 0.12), transparent 28%),
    linear-gradient(180deg, #fcf7ef 0%, var(--bg) 100%);
}

.page-shell {
  width: min(1360px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
  padding: 28px;
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(135deg, rgba(255, 252, 246, 0.96), rgba(248, 241, 230, 0.94)),
    linear-gradient(135deg, rgba(166, 61, 47, 0.08), rgba(45, 106, 106, 0.08));
  border: 1px solid rgba(166, 61, 47, 0.14);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.06;
}

.hero-text {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.compact-hero h1 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.hero-stat,
.card {
  backdrop-filter: blur(16px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}

.hero-stat {
  padding: 18px 20px;
  border-radius: 18px;
}

.hero-stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 1.75rem;
}

.page-tabs,
.section-nav,
.toolbar,
.panel,
.card {
  border-radius: var(--radius);
}

.page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.page-tabs a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  font-weight: 700;
}

.page-tabs a.active {
  background: rgba(166, 61, 47, 0.12);
  border-color: rgba(166, 61, 47, 0.28);
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding: 16px 18px;
}

.section-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  font-weight: 600;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

.kpi-grid,
.content-grid {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.compare-grid {
  align-items: start;
}

.kpi-card {
  padding: 18px 20px;
}

.kpi-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.kpi-value {
  margin: 12px 0 6px;
  font-size: 1.8rem;
  font-weight: 800;
}

.kpi-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.panel {
  padding: 18px 20px 20px;
}

.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.section-title {
  margin-top: 28px;
  padding: 0 4px;
}

.section-title h2 {
  margin: 0;
  font-size: 1.45rem;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.detail-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-value {
  margin: 8px 0 0;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.45;
}

.insight-list {
  display: grid;
  gap: 12px;
}

.insight-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.95), rgba(246, 240, 232, 0.92));
  border: 1px solid var(--line);
  line-height: 1.65;
}

.compare-table {
  display: grid;
  gap: 10px;
}

.compare-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) 1fr 1fr 0.8fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.compare-row.header {
  font-weight: 700;
}

.compare-row .winner {
  color: var(--brand);
  font-weight: 700;
}

.chart {
  min-height: 320px;
}

.chart-tall {
  min-height: 420px;
}

.province-map {
  display: grid;
  grid-template-columns: repeat(8, minmax(70px, 1fr));
  gap: 10px;
}

.map-layout {
  align-items: start;
}

.china-map-stage {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.china-map-mount {
  position: relative;
  z-index: 1;
  padding: 8px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(244, 237, 226, 0.98));
  border: 1px solid rgba(31, 42, 40, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.china-svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-province {
  stroke: rgba(255, 250, 243, 0.98);
  stroke-width: 1.8;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease, filter 160ms ease, stroke-width 160ms ease;
  filter: url(#province-shadow);
}

.map-province:hover,
.map-province.active {
  filter: brightness(0.98) saturate(1.12) url(#province-shadow);
  stroke: #5a2d27;
  stroke-width: 2.8;
}

.map-province-label {
  font-size: 14px;
  fill: #243230;
  pointer-events: none;
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(255, 252, 247, 0.92);
  stroke-width: 3.6px;
}

.map-province-label.active {
  fill: #7f2017;
}

.map-leader-line {
  stroke: rgba(62, 51, 44, 0.55);
  stroke-width: 1.2;
  fill: none;
  stroke-dasharray: 3 3;
}

.map-leader-line.active {
  stroke: rgba(127, 32, 23, 0.8);
  stroke-width: 1.35;
}

.map-inset-frame {
  fill: rgba(255, 252, 247, 0.84);
  stroke: rgba(31, 42, 40, 0.18);
  stroke-width: 1.2;
}

.map-inset-title {
  fill: #5e6b67;
  font-size: 12px;
  font-weight: 700;
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  flex-wrap: wrap;
}

.map-legend-bar {
  width: 220px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fbf1ea, #dc9a74, #9a3726);
  border: 1px solid rgba(31, 42, 40, 0.12);
}

.map-legend-text {
  color: var(--muted);
  font-size: 0.92rem;
}

.map-tooltip {
  position: absolute;
  z-index: 9999;
  min-width: 180px;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(30, 28, 26, 0.92);
  color: #fff7ef;
  box-shadow: 0 18px 30px rgba(27, 19, 13, 0.22);
  pointer-events: none;
  transform: translate(12px, 12px);
}

.map-tooltip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.map-tooltip span {
  display: block;
  line-height: 1.55;
  font-size: 0.88rem;
  color: rgba(255, 247, 239, 0.88);
}

.province-tile {
  min-height: 84px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(31, 42, 40, 0.08);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.province-tile:hover,
.province-tile.active {
  transform: translateY(-3px);
  box-shadow: 0 16px 24px rgba(50, 37, 27, 0.12);
}

.province-name {
  font-weight: 700;
  font-size: 0.96rem;
}

.province-meta {
  font-size: 0.78rem;
  line-height: 1.45;
  opacity: 0.94;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 700;
}

.region-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.region-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.region-card:hover,
.region-card.active {
  transform: translateY(-3px);
  border-color: rgba(166, 61, 47, 0.35);
  box-shadow: 0 16px 28px rgba(74, 45, 24, 0.1);
}

.region-card h3 {
  margin: 0 0 10px;
}

.region-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.region-card-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.svg-chart {
  width: 100%;
  height: 100%;
}

.empty-state {
  color: var(--muted);
  padding: 16px 0;
}

@media (max-width: 1180px) {
  .hero,
  .content-grid,
  .toolbar,
  .kpi-grid,
  .region-cards {
    grid-template-columns: 1fr;
  }

  .province-map {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100vw - 18px, 1360px);
    padding-top: 12px;
  }

  .hero {
    padding: 20px;
  }

  .panel-head {
    display: block;
  }

  .panel-head p {
    margin-top: 6px;
    text-align: left;
  }

  .detail-grid,
  .province-map {
    grid-template-columns: 1fr;
  }

  .compare-row {
    grid-template-columns: 1fr;
  }
}
