*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px;
  line-height: 1.85;
  color: #1a1a2e;
  background: #fafaf8;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ─────────────────────────────────────── */
header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 2px solid #e74c3c;
  margin-bottom: 2.5rem;
}

header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

header .subtitle {
  font-size: 1.05rem;
  color: #555;
  font-style: italic;
  max-width: 600px;
}

/* ── Lead / About ──────────────────────────────── */
.lead {
  font-size: 1.05rem;
  color: #444;
  font-style: italic;
  border-left: 4px solid #e74c3c;
  padding: 0.6rem 1.2rem;
  margin: 0 0 2.5rem 0;
  background: #fff8f7;
  border-radius: 0 6px 6px 0;
}

/* ── Section heading ───────────────────────────── */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  border-bottom: 2px solid #e74c3c;
  padding-bottom: 5px;
  margin-bottom: 1.5rem;
}

/* ── Report cards ──────────────────────────────── */
.report-list {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-bottom: 3rem;
}

.report-card {
  background: #ffffff;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 1.5rem 1.6rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.report-card:hover {
  border-color: #1a3c5e;
  box-shadow: 0 4px 16px rgba(26, 26, 46, 0.08);
}

.report-card .card-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #888;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.report-card .card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.report-card .card-desc {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 0.7rem;
}

.report-card .card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.report-card .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #1a1a2e;
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
}

.tag.red   { background: #e74c3c; }
.tag.amber { background: #e67e22; }
.tag.blue  { background: #1a3c5e; }
.tag.purple{ background: #8e44ad; }

/* ── Stat row (mirrors report) ─────────────────── */
.stat-row {
  display: flex;
  gap: 14px;
  margin: 1.4rem 0 2.5rem;
  flex-wrap: wrap;
}

.stat-box {
  flex: 1;
  min-width: 140px;
  background: #1a1a2e;
  color: white;
  border-radius: 8px;
  padding: 1rem 0.9rem;
  text-align: center;
}

.stat-box .stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  display: block;
  line-height: 1.1;
}

.stat-num.red   { color: #e74c3c; }
.stat-num.blue  { color: #5dade2; }
.stat-num.green { color: #58d68d; }
.stat-num.amber { color: #f39c12; }

.stat-box .stat-sub {
  font-size: 0.68rem;
  opacity: 0.45;
  margin-top: 2px;
  display: block;
}

.stat-box .stat-label {
  font-size: 0.7rem;
  opacity: 0.65;
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: block;
}

/* ── Footer ────────────────────────────────────── */
footer {
  border-top: 1px solid #e0e0e0;
  padding: 1.5rem 0 2rem;
  margin-top: 2rem;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #888;
}

footer a {
  color: #1a3c5e;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}


.main-container {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Title block ── */
.title {
  font-family: 'Playfair Display', serif !important;
  font-size: 2.4rem !important;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
}
.date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Section headings (Rmd h1/h2 override) ── */
h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #1a1a2e;
  border-bottom: 2px solid #e74c3c;
  padding-bottom: 5px;
  margin-top: 2.2rem;
}
h2 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #2c3e50;
  margin-top: 1.6rem;
}

/* ── Pull quote ── */
.pullquote {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: #1a3c5e;
  border-top: 2px solid #1a3c5e;
  border-bottom: 2px solid #1a3c5e;
  padding: 0.9rem 0.5rem;
  margin: 1.8rem 1.5rem;
  text-align: center;
  line-height: 1.6;
}

/* ── Callout boxes ── */
.callout {
  background: #fff3cd;
  border-left: 4px solid #f39c12;
  padding: 0.7rem 1.1rem;
  margin: 1rem 0;
  border-radius: 0 6px 6px 0;
  font-size: 0.95rem;
}
.callout.red   { background: #fdecea; border-left-color: #e74c3c; }
.callout.blue  { background: #eaf4fb; border-left-color: #1a3c5e; }
.callout.green { background: #eafaf1; border-left-color: #27ae60; }

/* ── Tables ── */
table {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0 1.4rem 0;
}
thead tr { background: #1a1a2e; color: white; }
thead th { padding: 9px 13px; text-align: center; font-weight: 500; }
tbody tr:nth-child(even) { background: #f7f9fc; }
tbody tr:nth-child(odd)  { background: #ffffff; }
tbody td { padding: 7px 13px; text-align: center; border-bottom: 1px solid #e8eaed; }
tbody td:first-child { text-align: left; font-weight: 600; }

/* ── Code blocks ── */
pre, code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.81rem;
  background: #f4f4f8;
  border-radius: 4px;
}

/* ── Plot captions ── */
.plot-caption {
  font-size: 0.81rem;
  color: #888;
  text-align: center;
  margin-top: -0.4rem;
  margin-bottom: 1.4rem;
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 1.8rem 0;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 600px) {
  header h1 { font-size: 1.8rem; }
  .report-card { padding: 1.1rem; }
  .report-card .card-title { font-size: 1.1rem; }
  .stat-row { flex-direction: column; }


