:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --panel: #ffffff;
  --text: #1f2328;
  --muted: #656d76;
  --border: #d0d7de;
  --border-muted: #d8dee4;
  --accent: #0969da;
  --accent-muted: #ddf4ff;
  --success: #1a7f37;
  --danger: #cf222e;
  --shadow: 0 10px 30px rgba(31, 35, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.brand {
  color: var(--text);
  font-weight: 700;
}

.topbar nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.page-shell {
  width: min(1280px, calc(100% - 48px));
  margin: 28px auto 64px;
}

.index-hero,
.report-meta {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.index-hero h1,
.report-meta h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.2;
}

.index-hero p,
.report-meta p {
  margin: 0;
  color: var(--muted);
}

.meta-line {
  color: var(--text) !important;
  font-size: 15px;
  font-weight: 600;
}

.eyebrow {
  margin-bottom: 8px !important;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.report-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 24px 0 32px;
}

.report-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.report-card:hover {
  text-decoration: none;
  border-color: #8c959f;
}

.report-card span,
.report-card small {
  color: var(--muted);
}

.report-card strong {
  font-size: 24px;
}

.report-list h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.markdown-body {
  max-width: none;
  margin-top: 24px;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow-wrap: break-word;
}

.markdown-body > :first-child {
  margin-top: 0 !important;
}

.markdown-body > :last-child {
  margin-bottom: 0 !important;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 24px 0 16px;
  font-weight: 600;
  line-height: 1.25;
}

.markdown-body h1,
.markdown-body h2 {
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border-muted);
}

.markdown-body h1 {
  font-size: 2em;
}

.markdown-body h2 {
  font-size: 1.5em;
}

.markdown-body h3 {
  font-size: 1.25em;
}

.markdown-body p,
.markdown-body ul {
  margin: 0 0 16px;
}

.markdown-body ul {
  padding-left: 2em;
}

.markdown-body li + li {
  margin-top: 0.25em;
}

.table-wrap {
  width: 100%;
  margin: 0 0 16px;
  overflow-x: auto;
}

table {
  width: max-content;
  min-width: 100%;
  border-spacing: 0;
  border-collapse: collapse;
}

th,
td {
  padding: 6px 13px;
  border: 1px solid var(--border);
  vertical-align: middle;
}

th {
  background: #f6f8fa;
  font-weight: 600;
}

tr:nth-child(even) td {
  background: #f6f8fa;
}

.align-right {
  text-align: right;
}

.align-center {
  text-align: center;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.markdown-body td img {
  display: block;
  width: 520px;
  max-width: 48vw;
  min-width: 360px;
}

code {
  padding: 0.2em 0.4em;
  background: rgba(175, 184, 193, 0.2);
  border-radius: 6px;
  font-size: 85%;
}

.empty-state {
  color: var(--muted);
}

@media (max-width: 760px) {
  .topbar {
    padding: 0 16px;
  }

  .page-shell {
    width: min(100% - 24px, 1280px);
    margin-top: 16px;
  }

  .index-hero h1,
  .report-meta h1 {
    font-size: 26px;
  }

  .report-meta {
    align-items: start;
    flex-direction: column;
  }

  .markdown-body {
    padding: 18px;
  }

  .markdown-body td img {
    max-width: 520px;
    min-width: 320px;
  }
}
