@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;1,300&family=IBM+Plex+Sans:wght@300;400&display=swap');

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

:root {
  --bg: #080808;
  --bg2: #0f0f0f;
  --border: #1e1e1e;
  --text: #c8c8c8;
  --dim: #444;
  --accent: #e8e8e8;
  --c1: #6ab187;
  --c2: #c0392b;
  --c3: #a8d5b5;
  --c4: #c39bd3;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── header ── */
header {
  border-bottom: 1px solid var(--border);
  padding: 48px 64px 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
}

.header-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--dim);
  text-transform: uppercase;
  margin-bottom: 12px;
}

h1 {
  font-weight: 300;
  font-size: clamp(22px, 3vw, 34px);
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 em { font-style: italic; color: var(--dim); }

.header-meta {
  text-align: right;
  color: var(--dim);
  font-size: 11px;
  line-height: 2;
}

/* ── layout ── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 64px 120px;
}

section {
  margin-bottom: 96px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

section.visible { opacity: 1; transform: translateY(0); }

.section-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--dim);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

h2 {
  font-weight: 400;
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

h3 {
  font-weight: 300;
  font-size: 13px;
  color: var(--dim);
  margin-bottom: 20px;
  font-style: italic;
}

p {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: #777;
  max-width: 680px;
  margin-bottom: 12px;
  line-height: 1.85;
}

/* ── condition header ── */
.condition-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.condition-swatch {
  width: 3px;
  height: 40px;
  border-radius: 2px;
  flex-shrink: 0;
}

.condition-tag {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ── stat pills ── */
.stats-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 28px;
}

.stat {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 12px 18px;
  min-width: 120px;
}

.stat-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
}

.stat-val {
  font-size: 20px;
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.stat-unit {
  font-size: 10px;
  color: var(--dim);
  margin-left: 3px;
}

/* ── chart ── */
.chart-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 28px 28px 20px;
  margin-bottom: 24px;
}

/* ── legend ── */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.legend-item.hidden { opacity: 0.25; }

.legend-line {
  width: 22px;
  height: 2px;
  border-radius: 1px;
  flex-shrink: 0;
}

.legend-text { font-size: 11px; color: var(--text); }
.legend-val  { font-size: 10px; color: var(--dim); margin-left: 2px; }

/* ── methodology table ── */
.spec-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.spec-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  vertical-align: top;
}
.spec-table td:first-child { color: var(--dim); width: 220px; padding-right: 24px; }
.spec-table td:last-child  { color: var(--text); }

/* ── footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 64px;
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 11px;
}

@media (max-width: 700px) {
  header, main, footer { padding-left: 24px; padding-right: 24px; }
  header { grid-template-columns: 1fr; }
  .header-meta { text-align: left; }
}