:root {
  --bg: #ebe6df;
  --card: #fafaf7;
  --text: #14181b;
  --muted: #3d4348;
  --faint: #6a6f72;
  --line: #cdc7be;
  --accent: #8a3a1f;
  --accent-soft: #f0e2db;
  --grid: #ddd6cb;
  --max: 920px;
  --radius: 12px;
}

html { color-scheme: light; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px 18px 80px;
}

header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 26px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.brand-link { display: inline-flex; color: var(--text); }
.brand-link:hover { color: var(--accent); text-decoration: none; }

.brand-mark { width: 36px; height: 36px; display: block; }

.brand-row .site { margin: 0; }

.site {
  font-size: 13px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .18em;
}

h1 {
  margin: 8px 0 0;
  font-size: clamp(26px, 3.3vw, 36px);
  font-weight: 650;
  letter-spacing: -.005em;
}

.subtitle {
  margin-top: 10px;
  color: var(--muted);
  max-width: 64ch;
  font-size: 15px;
}

nav {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

nav a {
  border: 1px solid var(--line);
  background: #fafaf7;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
}

nav a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
nav a.current { border-color: var(--accent); color: var(--accent); }

main section {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

main section:first-child { border-top: 0; padding-top: 0; }

h2 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 650;
}

h3 {
  margin: 18px 0 8px;
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: .01em;
}

p {
  margin: 0 0 12px;
  color: var(--muted);
}

ul, ol {
  margin: 10px 0 14px 18px;
  color: var(--muted);
}

li { margin: 6px 0; }

strong { color: var(--text); }

footer {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--faint);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Headline / fact strip used on the homepage */

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.fact-label {
  font-size: 11px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.fact-value {
  font-size: 22px;
  font-weight: 650;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.fact-detail {
  margin-top: 4px;
  font-size: 12px;
  color: var(--faint);
}

/* Tables (constituents, audit trail, schedule) */

.table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data thead th {
  position: sticky;
  top: 0;
  background: #f5f1ea;
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 650;
  white-space: nowrap;
}

table.data tbody td {
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  color: var(--text);
  vertical-align: top;
}

table.data tbody td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table.data tbody td.muted { color: var(--faint); }

table.data tbody td.nowrap { white-space: nowrap; }

table.data tbody tr.cap-bound { background: var(--accent-soft); }

table.data tbody tr.cap-bound td.num.weight::after {
  content: ' \2605';
  color: var(--accent);
}

/* Sector summary block */

.sector-summary {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.sector-summary dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
}

.sector-summary dt {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.sector-summary dd { margin: 0; font-variant-numeric: tabular-nums; }

/* Notes / callouts */

.note {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.note p:last-child { margin-bottom: 0; }

/* Long-form prose pages (methodology, constituent note) */

.prose h2 {
  margin-top: 28px;
  font-size: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.prose section:first-of-type h2,
.prose > h2:first-of-type {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.prose h3 {
  margin: 22px 0 8px;
  font-size: 16px;
}

.prose p, .prose li { color: var(--muted); }

.prose .keyval {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 14px 0;
  font-size: 14px;
}

.prose .keyval dt { color: var(--text); font-weight: 650; }
.prose .keyval dd { margin: 0; color: var(--muted); }

/* Reconstitution log entry */

.log-entry {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 14px;
}

.log-entry .log-date {
  font-size: 12px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.log-entry h3 {
  margin: 4px 0 8px;
  font-size: 16px;
}

.log-entry .log-counts {
  margin-top: 8px;
  font-size: 13px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* Contact form */

form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  max-width: 540px;
}

label {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

input, textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #ffffff;
}

textarea { min-height: 140px; resize: vertical; }

button {
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: #fafaf7;
  border-radius: 10px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

button:hover { border-color: var(--accent); color: var(--accent); }

@media print {
  nav { display: none !important; }
}
