:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --bg-soft: #eef2f6;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --paper: #fffefe;
  --line: rgba(28, 43, 62, 0.13);
  --line-strong: rgba(28, 43, 62, 0.24);
  --text: #172033;
  --muted: #536172;
  --faint: #8692a2;
  --primary: #1e40af;
  --primary-2: #0f9f7a;
  --accent: #f59e0b;
  --danger: #d83a4a;
  --warning: #b98300;
  --success: #1b8f55;
  --shadow: 0 10px 26px rgba(28, 43, 62, 0.07);
  --shadow-soft: 0 1px 2px rgba(28, 43, 62, 0.06);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--primary);
  background: #ffffff;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.top-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.top-meta span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  white-space: nowrap;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent 45%, rgba(255, 255, 255, 0.88) 45%, rgba(255, 255, 255, 0.88) 55%, transparent 55%),
    linear-gradient(0deg, transparent 45%, rgba(255, 255, 255, 0.88) 45%, rgba(255, 255, 255, 0.88) 55%, transparent 55%),
    var(--primary);
}

.report-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 24px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 28px 28px 80px;
}

.report-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.sidebar-title {
  padding: 6px 8px 10px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.06em;
}

.report-sidebar a {
  min-height: 34px;
  padding: 7px 9px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  font-size: 13px;
}

.report-sidebar a:hover,
.report-sidebar a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: rgba(30, 64, 175, 0.07);
}

.report-content {
  min-width: 0;
}

.section {
  scroll-margin-top: 84px;
  margin-bottom: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.report-cover {
  padding: 36px;
  border-top: 5px solid var(--primary);
  background: #ffffff;
}

.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 13px;
}

.cover-meta span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.cover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 36px;
  align-items: start;
}

.report-cover h1 {
  max-width: 860px;
  margin: 0 0 18px;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.12;
  letter-spacing: 0;
}

.report-cover p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.cover-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 860px;
  margin: 28px 0 0;
}

.cover-facts div {
  padding: 12px;
  border-top: 1px solid var(--line-strong);
  background: #fbfcfe;
}

.cover-facts dt {
  color: var(--faint);
  font-size: 12px;
}

.cover-facts dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 760;
  line-height: 1.1;
}

.executive-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--primary-2);
  border-radius: 8px;
  background: #fbfcfe;
}

.card-kicker,
.panel-kicker {
  margin: 0 0 6px;
  color: var(--primary-2);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.executive-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.executive-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.compact-head {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.52fr);
  align-items: end;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(23px, 2.4vw, 32px);
  line-height: 1.18;
  letter-spacing: 0;
}

.section-head p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  margin: 0;
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 8px;
}

.kpi-card {
  min-height: 98px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.kpi-card strong {
  display: block;
  margin: 10px 0 7px;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1;
}

.section-brief {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.section-brief div {
  padding: 12px 14px;
  background: #f8fafc;
}

.section-brief strong {
  display: block;
  color: var(--primary);
  font-size: 18px;
  line-height: 1.1;
}

.section-brief span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.kpi-card small {
  color: var(--faint);
}

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

.insight-grid {
  margin-top: 16px;
}

.insight-card,
.panel,
.callout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.insight-card {
  padding: 20px;
}

.insight-card h3,
.panel h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.insight-card ol {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 22px;
}

.insight-card li {
  color: var(--muted);
}

.insight-card li strong {
  color: var(--text);
}

.success {
  border-top: 3px solid var(--success);
}

.warning {
  border-top: 3px solid var(--accent);
}

.panel {
  min-width: 0;
  margin-bottom: 14px;
  padding: 16px;
}

.wide {
  grid-column: span 1;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
}

.chart {
  min-height: 270px;
}

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

.chart.compact {
  min-height: 230px;
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(88px, 160px) minmax(0, 1fr) minmax(54px, max-content);
  align-items: center;
  gap: 10px;
  min-height: 28px;
}

.bar-label {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.bar-track {
  position: relative;
  height: 12px;
  border-radius: 3px;
  background: #e7edf4;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.bar-fill.warn {
  background: var(--accent);
}

.bar-fill.danger {
  background: var(--danger);
}

.bar-value {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.table-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.full-platform-panel .bar-row {
  grid-template-columns: minmax(132px, 210px) minmax(0, 1fr) minmax(54px, max-content);
}

.full-platform-panel table {
  min-width: 560px;
}

.full-platform-panel th,
.full-platform-panel td {
  padding: 8px 10px;
}

.full-platform-panel td:first-child,
.full-platform-panel td:last-child {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.wide-table {
  border-color: rgba(30, 64, 175, 0.18);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.wide-data-table {
  min-width: 980px;
}

th,
td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--text);
  background: #f1f5f9;
  font-weight: 720;
}

td {
  color: var(--muted);
}

.wide-data-table th,
.wide-data-table td {
  padding: 11px 12px;
  line-height: 1.55;
}

.wide-data-table th:first-child,
.wide-data-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 92px;
  background: #ffffff;
  color: var(--text);
  font-weight: 680;
}

.wide-data-table th:first-child {
  z-index: 3;
  background: #f1f5f9;
}

.wide-data-table th:last-child,
.wide-data-table td:last-child {
  min-width: 220px;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: #fbfdff;
}

.stage-timeline {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.stage-card {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) 92px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  cursor: pointer;
}

.stage-card.active {
  border-color: rgba(21, 101, 216, 0.36);
  background: rgba(21, 101, 216, 0.07);
}

.stage-title {
  font-weight: 720;
}

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

.stage-meter {
  height: 10px;
  border-radius: 3px;
  background: #e8eef5;
  overflow: hidden;
}

.stage-meter span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.node-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.node-card {
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.node-date {
  color: var(--primary-2);
  font-weight: 780;
}

.node-card strong {
  display: block;
  margin: 8px 0;
  font-size: 24px;
}

.node-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.segmented button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.segmented button.active {
  color: #ffffff;
  background: var(--primary);
}

.focus-panel {
  border-top: 3px solid var(--primary);
  background: #ffffff;
}

.focus-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.focus-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.focus-item strong {
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
}

.focus-item span {
  color: var(--muted);
  font-size: 13px;
}

.stack {
  display: grid;
  gap: 16px;
}

.mini-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.heatmap-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.heatmap {
  display: grid;
  min-width: 760px;
}

.heat-cell,
.heat-head {
  min-height: 34px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.heat-head {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--text);
  background: #eef4fb;
  font-weight: 720;
}

.heat-cell.artist {
  position: sticky;
  left: 0;
  z-index: 1;
  color: var(--text);
  background: #ffffff;
  font-weight: 680;
}

.callout {
  padding: 18px;
  color: var(--muted);
}

.callout strong {
  color: var(--text);
}

.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  min-height: 170px;
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.topic-token {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--text);
  line-height: 1;
}

.topic-token:nth-child(3n) {
  color: var(--primary);
}

.topic-token:nth-child(3n + 1) {
  color: var(--primary-2);
}

.topic-token:nth-child(3n + 2) {
  color: var(--accent);
}

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

.rank-card,
.risk-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.rank-card h3,
.risk-card h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.rank-card ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.rank-card li {
  color: var(--muted);
  font-size: 13px;
}

.risk-card {
  display: grid;
  gap: 10px;
}

.risk-card.red {
  border-color: rgba(216, 58, 74, 0.34);
}

.risk-card.yellow {
  border-color: rgba(185, 131, 0, 0.30);
}

.risk-card.green {
  border-color: rgba(27, 143, 85, 0.30);
}

.risk-badge {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
}

.red .risk-badge {
  color: #8f1f2b;
  background: rgba(216, 58, 74, 0.12);
}

.yellow .risk-badge {
  color: #7a5500;
  background: rgba(185, 131, 0, 0.12);
}

.green .risk-badge {
  color: #12623c;
  background: rgba(27, 143, 85, 0.12);
}

.risk-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-panel {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.overview-detail {
  border-top-color: var(--primary-2);
}

.module-detail {
  max-height: none;
  overflow: visible;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
}

.module-detail h2 {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 21px;
}

.module-detail h3 {
  margin: 24px 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
  font-size: 17px;
}

.module-detail h4 {
  margin: 18px 0 8px;
  color: var(--text);
  font-size: 15px;
}

.module-detail p,
.module-detail li {
  color: var(--muted);
  font-size: 14px;
}

.module-detail pre {
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
}

.module-detail .table-wrap {
  margin: 12px 0;
}

.risk-detail {
  padding-top: 12px;
}

.risk-detail h2 {
  margin-bottom: 18px;
}

.risk-detail h3 {
  margin-top: 30px;
  color: #7f1d1d;
  border-left-color: var(--danger);
}

.risk-detail h4 {
  margin-top: 24px;
  padding: 10px 12px;
  border: 1px solid rgba(216, 58, 74, 0.14);
  border-radius: 8px;
  color: var(--text);
  background: #fff8f7;
}

.risk-detail .table-wrap {
  margin: 14px 0 20px;
}

.risk-detail table {
  font-size: 13px;
}

.risk-detail th {
  background: #fff1f1;
}

.risk-detail tbody tr:nth-child(even) td {
  background: #fffdfd;
}

.risk-detail td strong {
  color: #8f1f2b;
}

.risk-detail p {
  max-width: 980px;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 25;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.back-top.visible {
  opacity: 1;
  pointer-events: auto;
}

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

.axis text {
  fill: var(--muted);
  font-size: 11px;
}

.axis line,
.axis path,
.grid-line {
  stroke: rgba(30, 48, 70, 0.14);
}

.tooltip {
  position: fixed;
  z-index: 40;
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  pointer-events: none;
  transform: translate(12px, 12px);
}

.tooltip strong {
  display: block;
  margin-bottom: 4px;
}

.tooltip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 1180px) {
  .grid.two .wide {
    grid-column: span 1;
  }
}

@media (max-width: 1100px) {
  .report-shell {
    grid-template-columns: 1fr;
    padding: 16px 16px 72px;
  }

  .report-sidebar {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar-title {
    grid-column: 1 / -1;
  }

  .cover-grid,
  .compact-head,
  .cover-facts,
  .section-brief {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 18px;
  }

  .grid.two,
  .insight-grid,
  .rank-grid,
  .risk-grid {
    grid-template-columns: 1fr;
  }

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

.detail-panel,
.module-detail,
.table-wrap {
  scrollbar-color: rgba(30, 48, 70, 0.28) transparent;
}

@media (max-width: 640px) {
  .section {
    padding: 18px;
  }

  .report-sidebar {
    grid-template-columns: 1fr 1fr;
  }

  .top-meta {
    justify-content: flex-start;
  }

  .report-cover {
    padding: 22px;
  }

  .report-cover h1 {
    font-size: 34px;
  }

  .panel,
  .insight-card,
  .detail-panel {
    padding: 14px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .bar-row {
    grid-template-columns: 92px minmax(0, 1fr) 56px;
  }

  .stage-card {
    grid-template-columns: 1fr;
  }
}
