:root {
  --ink: #171914;
  --ink-soft: #262a22;
  --paper: #ece8dc;
  --paper-deep: #d8d1c1;
  --olive: #78805a;
  --olive-dark: #4e5538;
  --rust: #ad5b35;
  --rule: #6e7167;
  --white: #fffdf7;
  --shadow: 0 18px 50px rgba(14, 15, 12, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 25, 20, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 20, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.72;
}

a { color: var(--olive-dark); text-underline-offset: 0.2em; }
a:hover { color: var(--rust); }
img { display: block; max-width: 100%; height: auto; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  color: var(--white);
  background: var(--rust);
}
.skip-link:focus { top: 1rem; }

.site-header {
  color: var(--paper);
  background: var(--ink);
  border-bottom: 4px solid var(--rust);
}
.masthead {
  width: min(1380px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.05rem 0 0.8rem;
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) 1.6fr;
  gap: 2rem;
  align-items: end;
}
.wordmark {
  color: var(--paper);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  line-height: 1.05;
}
.wordmark small {
  display: block;
  margin-top: 0.35rem;
  color: #b7b9ac;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.19em;
}
.nav-toggle {
  display: none;
  padding: 0.55rem 0.75rem;
  border: 1px solid #777b6d;
  color: var(--paper);
  background: transparent;
  font: inherit;
}
.primary-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem 1.1rem;
}
.primary-nav a {
  padding: 0.3rem 0;
  color: #d9d6cb;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { color: var(--white); border-color: var(--rust); }

.hero {
  color: var(--paper);
  background: var(--ink-soft);
  border-bottom: 1px solid #3d4037;
}
.hero-grid {
  width: min(1380px, calc(100% - 2rem));
  min-height: 490px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
}
.hero-copy {
  position: relative;
  padding: clamp(3rem, 8vw, 7.5rem) clamp(2rem, 6vw, 6rem) 3.5rem 0;
  align-self: center;
}
.hero-copy::before {
  content: attr(data-index);
  position: absolute;
  top: 1.4rem;
  left: 0;
  color: var(--rust);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.22em;
}
.kicker {
  margin: 0 0 1rem;
  color: #bdc0b1;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
h1, h2, h3 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.12;
}
h1 { margin-bottom: 1.25rem; font-size: clamp(2.7rem, 6.4vw, 6.7rem); letter-spacing: -0.045em; }
.hero p { max-width: 48rem; color: #d0cec5; font-size: 1.1rem; }
.hero-media { min-height: 490px; background: #20231d; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.82) contrast(1.05); }

.page-intro {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4rem 0 2rem;
}
.page-intro .kicker { color: var(--rust); }
.page-intro h1 { max-width: 930px; font-size: clamp(2.8rem, 6vw, 5.8rem); }
.dek { max-width: 840px; font-size: 1.22rem; color: #44483e; }

.page-grid {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 5rem;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.section-index {
  position: sticky;
  top: 1.2rem;
  padding-top: 0.7rem;
  border-top: 3px solid var(--ink);
}
.section-index strong {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--rust);
  font-size: 0.7rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.section-index a {
  display: block;
  padding: 0.35rem 0;
  color: #4d5146;
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.35;
}
.section-index a:hover { color: var(--rust); }

.article { min-width: 0; }
.article > :first-child { margin-top: 0; }
.article h2 {
  margin: 3.3rem 0 1rem;
  padding-top: 0.85rem;
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  border-top: 1px solid #aaa797;
}
.article h3 { margin: 2rem 0 0.65rem; font-size: 1.35rem; }
.article p, .article li { max-width: 780px; }
.article li + li { margin-top: 0.4rem; }
.article figure { margin: 2.4rem 0; }
.article figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; box-shadow: var(--shadow); }
.article figcaption {
  margin-top: 0.65rem;
  color: #67695f;
  font-size: 0.79rem;
  letter-spacing: 0.02em;
}
.lead-rule {
  margin: 1.6rem 0 2.3rem;
  padding: 1.15rem 1.25rem;
  border-left: 5px solid var(--rust);
  background: rgba(255, 253, 247, 0.64);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
}
.note {
  margin: 2rem 0;
  padding: 1.2rem 1.35rem;
  background: var(--ink-soft);
  color: #dedbd0;
  border-top: 3px solid var(--olive);
}
.note strong { color: var(--white); }
.notice {
  padding: 1.2rem 1.35rem;
  background: #dcd7c9;
  border: 1px solid #aaa596;
  font-size: 0.9rem;
}

.data-table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  background: rgba(255, 253, 247, 0.62);
  font-size: 0.9rem;
}
.data-table th,
.data-table td { padding: 0.85rem 0.8rem; text-align: left; vertical-align: top; border-bottom: 1px solid #b6b1a3; }
.data-table th { color: var(--paper); background: var(--olive-dark); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }
.data-table tr:nth-child(even) td { background: rgba(120, 128, 90, 0.08); }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0; }
.card {
  padding: 1.3rem;
  border: 1px solid #aaa596;
  background: rgba(255, 253, 247, 0.56);
}
.card .label { color: var(--rust); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.card h3 { margin: 0.4rem 0 0.55rem; }
.card p { margin-bottom: 0; font-size: 0.93rem; }

.timeline { margin: 2.2rem 0; border-left: 3px solid var(--olive); }
.timeline-item { position: relative; padding: 0.2rem 0 1.8rem 2rem; }
.timeline-item::before { content: ""; position: absolute; left: -0.52rem; top: 0.35rem; width: 0.85rem; height: 0.85rem; background: var(--rust); border: 3px solid var(--paper); }
.timeline-item time { color: var(--rust); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; }

.resource-list { list-style: none; margin: 2rem 0; padding: 0; }
.resource-list li { padding: 1.2rem 0; border-top: 1px solid #aaa596; }
.resource-list a { font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; font-weight: 600; }

.site-footer { color: #d1cfc5; background: var(--ink); }
.footer-inner { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 2.6rem 0 3.2rem; }
.footer-notice { max-width: 980px; margin: 0 0 1.6rem; padding-left: 1rem; border-left: 4px solid var(--rust); font-size: 0.86rem; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.2rem; border-top: 1px solid #44473e; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-meta a { color: #d1cfc5; }

.error-panel { min-height: 56vh; display: grid; place-items: center; padding: 4rem 1rem; }
.error-panel > div { max-width: 760px; }
.error-code { color: var(--rust); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.25em; }
.error-panel h1 { font-size: clamp(3rem, 9vw, 7rem); }
.home-link { display: inline-block; margin-top: 1rem; padding: 0.7rem 1rem; color: var(--paper); background: var(--olive-dark); text-decoration: none; }

@media (max-width: 900px) {
  .masthead { grid-template-columns: 1fr auto; align-items: center; }
  .nav-toggle { display: inline-block; }
  .primary-nav { grid-column: 1 / -1; display: none; justify-content: flex-start; padding-top: 0.8rem; }
  .primary-nav.is-open { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-right: 0; }
  .hero-media { min-height: 310px; }
  .page-grid { grid-template-columns: 1fr; }
  .section-index { position: static; columns: 2; }
  .section-index strong { column-span: all; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .section-index { columns: 1; }
  .data-table { display: block; overflow-x: auto; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
