:root {
  color-scheme: light;
  --page: #f4f6f9;
  --paper: #ffffff;
  --ink: #1f2430;
  --soft-ink: #374151;
  --muted: #6f768a;
  --hairline: #dfe4ec;
  --panel: #f8fafc;
  --accent: #3f5f8f;
  --accent-soft: #eef3fb;
  --good: #527d45;
  --bad: #b8614f;
  --warn: #9b7441;
  --shadow: 0 12px 32px rgba(31, 36, 48, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Microsoft YaHei", "Noto Sans SC", "Inter", "Segoe UI", system-ui, sans-serif;
}

.report {
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 32px 0 64px;
  counter-reset: report-section;
}

.report-hero,
.executive-summary,
.report-section {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.report-hero {
  position: relative;
  overflow: hidden;
  padding: 36px 40px 38px;
}

.report-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), #8aa2c8 48%, #d9c46b);
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 38px;
}

.brand-mark {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .2em;
}

.month-pill {
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--soft-ink);
  background: var(--panel);
  font-size: 12px;
  font-weight: 750;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: end;
}

.eyebrow,
.section-kicker,
.aside-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 10px 0 16px;
  color: var(--ink);
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1;
  letter-spacing: -.045em;
}

.hero-copy {
  max-width: 780px;
  margin: 0;
  color: var(--soft-ink);
  font-size: 15px;
  line-height: 1.8;
}

.hero-aside {
  padding: 18px 0 18px 18px;
  border-left: 1px solid var(--hairline);
}

.aside-value {
  margin-top: 8px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -.035em;
}

.aside-note {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.executive-summary {
  margin-top: 16px;
  padding: 30px 34px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.executive-summary h2 {
  grid-column: 1;
  grid-row: 2;
  margin: 9px 0 0;
  color: var(--ink);
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -.035em;
}

.executive-summary .section-kicker {
  grid-column: 1;
  grid-row: 1;
}

.summary-body {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding-left: 30px;
  border-left: 1px solid var(--hairline);
}

.summary-body p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 16px;
  line-height: 1.9;
}

.summary-body p + p { margin-top: 12px; }

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.kpi-card {
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--paper);
}

.kpi-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.kpi-value {
  margin-top: 16px;
  color: var(--ink);
  font-size: 31px;
  font-weight: 850;
  letter-spacing: -.04em;
}

.kpi-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.kpi-card.good { border-top-color: var(--good); }
.kpi-card.bad { border-top-color: var(--bad); }
.kpi-card.warn { border-top-color: var(--warn); }
.kpi-card.good .kpi-note { color: var(--good); }
.kpi-card.bad .kpi-note { color: var(--bad); }
.kpi-card.warn .kpi-note { color: var(--warn); }

.report-section {
  counter-increment: report-section;
  margin-top: 16px;
  padding: 30px 34px 34px;
}

.section-heading {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
}

.section-heading::before {
  content: counter(report-section, decimal-leading-zero);
  grid-row: 1 / span 3;
  color: #b8c1cf;
  font-family: "Consolas", "SF Mono", monospace;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: .95;
}

.section-heading .section-kicker,
.section-heading h2,
.section-conclusion {
  grid-column: 2;
}

.section-heading h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -.035em;
}

.section-conclusion {
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid #dbe5f4;
  border-radius: 8px;
  background: var(--accent-soft);
  color: #28456d;
  font-size: 14px;
  line-height: 1.75;
}

.section-evidence {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.chart-img {
  width: 100%;
  min-height: 280px;
  object-fit: contain;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
}

.section-evidence > .chart-img:only-child,
.section-evidence > .table-wrap,
.section-evidence > .action-table {
  grid-column: 1 / -1;
}

.table-wrap,
.action-table {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
}

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

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

th {
  background: var(--panel);
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}

td { color: #2d3748; }
tbody tr:nth-child(even) { background: #fbfcfe; }
tr:last-child td { border-bottom: 0; }

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

.issue-card {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 17px;
  background: #ffffff;
}

.issue-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
}

.issue-card p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 13px;
  line-height: 1.7;
}

.issue-card.warn { border-top-color: var(--warn); }
.issue-card.good { border-top-color: var(--good); }
.issue-card.bad { border-top-color: var(--bad); }

.action-table { margin-top: 16px; }

.report-footer {
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

@media (max-width: 980px) {
  .report { width: min(100vw - 24px, 1180px); }
  .hero-grid,
  .executive-summary,
  .section-heading,
  .section-evidence,
  .kpi-strip,
  .issue-grid {
    grid-template-columns: 1fr;
  }
  .summary-body {
    grid-column: 1;
    grid-row: auto;
    border-left: 0;
    padding-left: 0;
  }
  .section-heading::before,
  .section-heading .section-kicker,
  .section-heading h2,
  .section-conclusion {
    grid-column: 1;
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm 8mm;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  html,
  body {
    width: 210mm;
    background: #ffffff;
  }

  .report {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .report-hero,
  .executive-summary,
  .report-section {
    box-shadow: none;
    border-color: #d9e0ea;
  }

  .report-hero {
    padding: 24px 28px 28px;
  }

  .hero-meta {
    margin-bottom: 24px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 26px;
  }

  h1 {
    font-size: 36px;
    line-height: 1.08;
  }

  .hero-copy {
    font-size: 13px;
    line-height: 1.7;
  }

  .hero-aside {
    padding: 14px 0 14px 16px;
  }

  .aside-value {
    font-size: 22px;
  }

  .executive-summary {
    margin-top: 12px;
    padding: 24px 28px;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 22px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .executive-summary h2 {
    grid-column: 1;
    grid-row: 2;
    font-size: 24px;
  }

  .executive-summary .section-kicker {
    grid-column: 1;
    grid-row: 1;
  }

  .summary-body {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding-left: 22px;
    border-left: 1px solid var(--hairline);
  }

  .summary-body p {
    font-size: 13px;
    line-height: 1.78;
  }

  .kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0;
    gap: 10px;
    break-before: page;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .kpi-card {
    min-height: 104px;
    padding: 14px;
    break-inside: avoid;
  }

  .kpi-value {
    margin-top: 10px;
    font-size: 25px;
  }

  .report-section {
    margin-top: 0;
    padding: 24px 28px 28px;
    break-before: page;
  }

  .kpi-strip + .report-section {
    margin-top: 12px;
    break-before: auto;
  }

  .section-heading {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 20px;
    padding-bottom: 18px;
  }

  .section-heading::before {
    grid-column: 1;
    grid-row: 1 / span 3;
    font-size: 40px;
  }

  .section-heading .section-kicker,
  .section-heading h2,
  .section-conclusion {
    grid-column: 2;
  }

  .section-heading h2 {
    font-size: 24px;
    line-height: 1.22;
  }

  .section-conclusion {
    font-size: 12px;
    line-height: 1.65;
    padding: 11px 13px;
  }

  .section-evidence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
    gap: 12px;
  }

  .chart-img,
  .table-wrap,
  .action-table,
  .issue-card,
  .kpi-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .chart-img {
    min-height: 0;
    max-height: 190mm;
  }

  th,
  td {
    padding: 9px 10px;
    font-size: 11px;
  }

  th {
    font-size: 10px;
  }

  .issue-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    break-inside: avoid;
  }

  .issue-card {
    padding: 13px;
  }

  .issue-card h3 {
    font-size: 13px;
  }

  .issue-card p {
    font-size: 11px;
    line-height: 1.6;
  }

  .action-table {
    margin-top: 12px;
  }

  .report-footer {
    display: none;
  }
}
