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

body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  line-height: 1.65;
  color: #202020;
  background: #faf9f6;
}

.site { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* ── Header ── */
header {
  border-bottom: 1px solid #c8c8c0;
  padding: 14px 0 0;
  margin-bottom: 24px;
}
.site-name {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: bold;
  margin-bottom: 8px;
}
.site-name a { color: #202020; text-decoration: none; }
.site-name a:hover { text-decoration: underline; }

nav { font-family: Arial, Helvetica, sans-serif; font-size: 13px; }
nav a {
  display: inline-block;
  color: #0645ad;
  text-decoration: none;
  padding: 4px 10px 7px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
nav a:hover { color: #0b0080; text-decoration: underline; }
nav a.active { border-bottom-color: #202020; color: #202020; font-weight: bold; }

/* ── Typography ── */
main { padding-bottom: 40px; }

h1 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: bold;
  border-bottom: 1px solid #c8c8c0;
  padding-bottom: 6px;
  margin: 0 0 14px;
}
h2 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
  padding-bottom: 3px;
  margin: 26px 0 10px;
}

p { margin-bottom: 10px; }
.lead { font-style: italic; color: #444; margin-bottom: 12px; }

ul, ol { margin: 0 0 10px 24px; }
li { margin-bottom: 4px; }

a { color: #0645ad; }
a:hover { color: #0b0080; }

/* ── Stats row ── */
.stats-row {
  display: flex;
  border: 1px solid #c8c8c0;
  margin: 16px 0 20px;
  font-family: Arial, Helvetica, sans-serif;
}
.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  border-right: 1px solid #c8c8c0;
}
.stat:last-child { border-right: none; }
.stat-n { font-size: 20px; font-weight: bold; line-height: 1.2; }
.stat-l {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 3px;
}

/* ── Tables ── */
table {
  border-collapse: collapse;
  width: 100%;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  margin-bottom: 10px;
}
th {
  background: #f0efe8;
  border: 1px solid #c8c8c0;
  padding: 5px 8px;
  text-align: left;
  font-weight: bold;
  font-size: 12px;
  white-space: nowrap;
}
td {
  border: 1px solid #ddddd5;
  padding: 4px 8px;
  vertical-align: middle;
}
tr:nth-child(even) td { background: #f5f4f0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

table.meta { width: auto; margin-bottom: 16px; }
table.meta td:first-child {
  color: #555;
  font-style: italic;
  padding-right: 20px;
  white-space: nowrap;
  border-color: #ddd;
}
table.meta td { border-color: #ddd; }

tr.baseline-row td { color: #555; }

/* ── Badges ── */
.badge {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: bold;
  padding: 1px 6px;
}
.badge-lo { background: #d4edda; color: #155724; }
.badge-md { background: #fff3cd; color: #856404; }
.badge-hi { background: #f8d7da; color: #721c24; }

/* ── Misc ── */
.tbl-note {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #555;
  margin-bottom: 6px;
}
.show-note {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #666;
  font-style: italic;
  margin-bottom: 14px;
}
.source { color: #888; font-size: 12px; }
.muted  { color: #999; }

.var-flag {
  color: #856404;
  font-size: 11px;
  cursor: help;
  font-family: Arial, Helvetica, sans-serif;
}
.var-note { margin-top: 4px; }

/* ── Preset controls ── */
.preset-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}
.preset-bar label { color: #555; white-space: nowrap; }
.preset-bar select { font-size: 13px; padding: 2px 5px; }
.preset-desc { color: #888; font-style: italic; font-size: 12px; }

.custom-weights {
  border: 1px solid #c8c8c0;
  background: #f5f4f0;
  padding: 10px 14px 6px;
  margin-bottom: 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}
.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.slider-row label {
  width: 170px;
  color: #444;
  flex-shrink: 0;
}
.slider-row input[type=range] { flex: 1; max-width: 220px; }
.weight-val {
  font-family: monospace;
  font-weight: bold;
  font-size: 12px;
  min-width: 32px;
  text-align: right;
}

/* ── Footer ── */
footer {
  border-top: 1px solid #c8c8c0;
  padding: 12px 0 28px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #666;
  margin-top: 24px;
}
