:root {
  --bg: #eef3f8;
  --paper: rgba(255, 255, 255, 0.96);
  --ink: #17212f;
  --muted: #647285;
  --accent: #234d7d;
  --accent-soft: rgba(35, 77, 125, 0.1);
  --teal: #0f6d73;
  --gold: #8a6a12;
  --red: #a53a3a;
  --green: #1f6a4b;
  --shadow: 0 18px 48px rgba(17, 32, 55, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --font-display: "Baskerville", "Times New Roman", "Songti SC", "STSong", serif;
  --font-ui: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at top left, rgba(35, 77, 125, 0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(15, 109, 115, 0.08), transparent 26%),
    linear-gradient(180deg, #f7f9fc 0%, var(--bg) 100%);
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.hero {
  padding: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.98));
  border: 1px solid rgba(23, 33, 47, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(35, 77, 125, 0.08);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.title {
  margin: 14px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.subtitle {
  max-width: 880px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  min-width: 340px;
}

.hero-stat {
  padding: 14px 16px;
  background: rgba(248, 251, 255, 0.96);
  border: 1px solid rgba(23, 33, 47, 0.08);
  border-radius: 18px;
}

.hero-stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 22px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tabs:empty {
  display: none;
}

.tab {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  background: rgba(248, 251, 255, 0.96);
  color: var(--ink);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(23, 33, 47, 0.08);
}

.tab.active {
  background: var(--ink);
  color: #fff;
  box-shadow: none;
}

.tab.current {
  cursor: default;
}

.section-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.section-tools:empty {
  display: none;
}

.range-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.96);
  border: 1px solid rgba(23, 33, 47, 0.08);
}

.range-label {
  color: var(--muted);
  font-size: 12px;
  padding: 0 8px 0 4px;
}

.range-option {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.range-option.active {
  background: var(--ink);
  color: #fff;
}

.section {
  margin-top: 26px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-meta {
  color: var(--muted);
  font-size: 13px;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.decision-banner {
  margin-bottom: 16px;
}

.decision-inner {
  display: grid;
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(250, 252, 255, 0.98), rgba(241, 247, 255, 0.96));
}

.decision-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.decision-label {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(35, 77, 125, 0.08);
  color: var(--muted);
  font-size: 12px;
}

.decision-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.decision-copy {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

.decision-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.96);
  border: 1px solid rgba(23, 33, 47, 0.08);
  font-size: 13px;
}

.chip .label {
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.main-stack,
.sidebar-stack {
  display: grid;
  gap: 16px;
}

.card {
  background: var(--paper);
  border: 1px solid rgba(23, 33, 47, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.card-inner {
  padding: 18px;
}

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

.chart-card {
  min-height: 280px;
  overflow: hidden;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.03em;
  margin: 0;
}

.chart-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
}

.chart-current {
  font-size: 28px;
  font-family: var(--font-display);
  margin-bottom: 6px;
}

.chart-sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.chart-shell {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 10px 0 30px;
}

.y-axis-item {
  font-size: 11px;
  color: var(--muted);
  line-height: 1;
}

.spark-wrap {
  min-width: 0;
}

.home-role-card .chart-current {
  font-size: 24px;
  margin-bottom: 12px;
}

.home-copy {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.8;
  min-height: 92px;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.chart-note {
  margin-top: 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.7;
}

.chart-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chart-link {
  color: var(--teal);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.spark {
  width: 100%;
  height: 128px;
  display: block;
  margin-bottom: 8px;
}

.x-axis-grid {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.x-axis-item {
  min-width: 0;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.x-axis-item.muted {
  color: rgba(100, 114, 133, 0.32);
}

.axis-summary {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.analysis-card {
  min-height: 280px;
}

.analysis-lines,
.list {
  display: grid;
  gap: 12px;
}

.analysis-line {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.98);
  border: 1px solid rgba(23, 33, 47, 0.06);
  line-height: 1.7;
  font-size: 14px;
}

.list-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.98);
  border: 1px solid rgba(23, 33, 47, 0.06);
}

.list-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.list-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.list-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.pill {
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(23, 33, 47, 0.08);
  color: var(--ink);
  white-space: nowrap;
}

.pill.red {
  background: rgba(160, 50, 35, 0.14);
  color: var(--red);
}

.pill.gold {
  background: rgba(155, 107, 22, 0.14);
  color: var(--gold);
}

.pill.green {
  background: rgba(47, 106, 66, 0.14);
  color: var(--green);
}

.pill.teal {
  background: rgba(28, 107, 104, 0.14);
  color: var(--teal);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.actions:empty {
  display: none;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  color: var(--ink);
  background: rgba(248, 251, 255, 0.98);
  border: 1px solid rgba(23, 33, 47, 0.08);
}

.action.primary {
  background: var(--ink);
  color: white;
}

.empty {
  padding: 18px;
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.98);
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    width: 100%;
    min-width: 0;
  }

  .chart-shell {
    grid-template-columns: 44px minmax(0, 1fr);
  }

}

@media (max-width: 720px) {
  .page {
    padding: 20px 14px 28px;
  }

  .hero {
    padding: 20px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .tabs {
    gap: 8px;
  }

  .tab {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
  }

  .section-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .range-switch {
    width: 100%;
    justify-content: space-between;
  }

  .decision-copy {
    font-size: 14px;
  }
}
