:root {
  --bg: #fdfbf7;
  --text: #1a1a1a;
  --text-2: #555;
  --text-3: #888;
  --accent: #b34233;
  --accent-light: #f0e0dc;
  --border: #e0dcd5;
  --surface: #f3efe8;
  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'SF Mono', 'Cascadia Code', Menlo, monospace;
}

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

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

.col { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }
.col-wide { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }

/* Navigation */
nav.site-nav {
  font-family: var(--sans);
  font-size: 0.82rem;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}
nav.site-nav a {
  color: var(--text-2);
  text-decoration: none;
}
nav.site-nav a:hover { color: var(--accent); }
nav.site-nav a.active { color: var(--accent); font-weight: 700; }
nav.site-nav .home { font-weight: 700; color: var(--text); margin-right: 0.5rem; }

/* Header */
header {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
header h1 {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}
header .subtitle {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 560px;
}
header .meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 0.8rem;
}

/* Sections */
section { margin-bottom: 3rem; }
h2 {
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.8rem;
  padding-top: 0.5rem;
}
h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}
h4 {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  margin: 1.2rem 0 0.4rem;
  color: var(--text-2);
}
p { margin-bottom: 0.9rem; }
ul, ol { margin: 0.5rem 0 1rem 1.5rem; line-height: 1.7; }
li { margin-bottom: 0.3rem; }

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.84rem;
  margin: 1rem 0 1.5rem;
}
.data-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 2px solid var(--text);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
}
.data-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table .num {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-align: right;
  white-space: nowrap;
}
.data-table .total td {
  border-top: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  font-weight: 700;
}

/* Pull quote */
.pull {
  border-left: 3px solid var(--accent);
  padding: 0.15rem 0 0.15rem 1.2rem;
  margin: 1.5rem 0;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.5;
}
.pull cite {
  display: block;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--text-3);
  margin-top: 0.3rem;
  font-family: var(--sans);
}

/* Confidence badge */
.conf {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-3);
  font-weight: 600;
}

/* Stat row */
.stat-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 1rem 0 1.2rem; }
.stat-item { flex: 1; min-width: 120px; }
.stat-val { font-family: var(--sans); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); line-height: 1.2; }
.stat-lbl { font-family: var(--sans); font-size: 0.76rem; color: var(--text-2); margin-top: 0.1rem; }

/* Bar chart */
.bar-chart { margin: 1.2rem 0 1.5rem; }
.bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 90px;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-family: var(--sans);
  font-size: 0.8rem;
}
@media (max-width: 600px) {
  .bar-row { grid-template-columns: 120px 1fr 70px; font-size: 0.73rem; }
}
.bar-label { text-align: right; color: var(--text-2); line-height: 1.3; }
.bar-track { height: 20px; background: var(--surface); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; background: var(--accent); }
.bar-value { font-family: var(--mono); font-size: 0.76rem; color: var(--text); font-weight: 600; }

/* Case cards */
.case-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.1rem;
  margin-bottom: 1rem;
}
.case-card h4 { margin-top: 0; margin-bottom: 0.3rem; color: var(--text); }
.case-card p { font-size: 0.88rem; color: var(--text-2); margin-bottom: 0.4rem; }

/* Divider */
hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.6;
}

/* Source ref */
.src {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--text-3);
}

/* Legislation reference */
.leg {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
}

/* Section number */
.s-num {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}

a { color: var(--accent); }

/* Small text section */
.small { font-size: 0.9rem; color: var(--text-2); }
.small h3 { font-size: 0.95rem; color: var(--text); }

/* ToC for detail pages */
.page-toc {
  font-family: var(--sans);
  font-size: 0.84rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.3rem;
  margin: 1.5rem 0;
}
.page-toc .toc-title {
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 0.4rem;
}
.page-toc ol { padding-left: 1.1rem; }
.page-toc li { margin-bottom: 0.15rem; line-height: 1.4; }
.page-toc a { color: var(--text); text-decoration: none; }
.page-toc a:hover { color: var(--accent); }
