:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #ded8cf;
  --navy: #0f172a;
  --teal: #0f766e;
  --blue: #2563eb;
  --amber: #c27a12;
  --red: #dc2626;
  --green: #15803d;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.topnav a,
.secondary-action,
.primary-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
}

.topnav a {
  color: var(--muted);
}

.topnav a:hover {
  color: var(--ink);
  background: rgba(15, 23, 42, 0.06);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100svh - 70px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding: 48px 0 42px;
}

.hero-copy h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
}

.hero-copy p:not(.eyebrow) {
  max-width: 680px;
  color: #374151;
  font-size: clamp(17px, 2vw, 21px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-panel,
.chart-block,
.report-reader,
.metric-card {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: clamp(22px, 4vw, 34px);
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.hero-panel h2 {
  margin: 18px 0 10px;
  font-size: 28px;
  line-height: 1.2;
}

.hero-panel p {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.primary-action {
  background: var(--navy);
  color: #fff;
}

.secondary-action {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
}

.section {
  padding: 36px 0;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
}

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

.metric-card {
  padding: 18px;
}

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

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1;
}

.metric-card em {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.chart-block {
  padding: 18px;
  overflow: hidden;
}

.chart-block.wide {
  grid-column: 1 / -1;
}

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

.chart-title h3 {
  margin: 0;
  font-size: 18px;
}

.chart-title span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.chart {
  min-height: 280px;
}

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

.bar-row {
  display: grid;
  grid-template-columns: 112px 1fr 70px;
  gap: 10px;
  align-items: center;
  margin: 11px 0;
  font-size: 13px;
}

.bar-track {
  height: 12px;
  border-radius: 99px;
  background: #eee7dc;
  overflow: hidden;
}

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

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

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

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

.type-chart {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.type-item {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 12px;
  align-items: center;
}

.type-label strong,
.type-label span {
  display: block;
}

.type-label span {
  color: var(--muted);
  font-size: 12px;
}

.multi-bars {
  display: grid;
  gap: 6px;
}

.mini-bar {
  display: grid;
  grid-template-columns: 62px 1fr 56px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #fff;
}

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

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #ece7df;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td a {
  color: var(--blue);
  font-weight: 700;
}

.report-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.report-list {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 10px;
}

.report-button {
  width: 100%;
  display: block;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.report-button:hover,
.report-button.active {
  border-color: rgba(15, 118, 110, 0.5);
  background: #f1fbf8;
}

.report-button strong,
.report-button span {
  display: block;
}

.report-button span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.report-reader {
  min-width: 0;
  padding: clamp(18px, 3vw, 34px);
}

.reader-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #ece7df;
}

.reader-toolbar h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.2;
}

.markdown-body {
  min-height: 360px;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  line-height: 1.28;
}

.markdown-body h1 {
  font-size: clamp(30px, 5vw, 46px);
}

.markdown-body h2 {
  margin-top: 34px;
  font-size: 26px;
}

.markdown-body h3 {
  margin-top: 24px;
  font-size: 20px;
}

.markdown-body p,
.markdown-body li {
  color: #333b49;
}

.markdown-body blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--teal);
  background: #f1fbf8;
}

.markdown-body code {
  border-radius: 5px;
  background: #f3f4f6;
  padding: 2px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.markdown-body table {
  min-width: 680px;
}

.markdown-body .table-scroll {
  overflow-x: auto;
  margin: 16px 0;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 24px 0 36px;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .topbar {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .topnav {
    width: 100%;
  }

  .topnav a {
    flex: 1;
  }

  .hero,
  .chart-layout,
  .report-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 38px;
  }

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

  .report-list {
    position: static;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

@media (max-width: 620px) {
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .brand strong {
    font-size: 15px;
  }

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

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-actions,
  .reader-toolbar,
  footer {
    flex-direction: column;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .bar-row {
    grid-template-columns: 88px 1fr 54px;
  }

  .type-item {
    grid-template-columns: 1fr;
  }
}
