:root {
  --paper: #F5F6F3;
  --paper-raised: #FFFFFF;
  --ink: #1D2B2E;
  --ink-soft: #4E5C5F;
  --ink-faint: #7C8A8C;
  --line: #D9DDD6;
  --line-soft: #E8EAE5;
  --chart: #2C5A67;
  --chart-deep: #1F424C;
  --status-normal: #3E7A54;
  --status-elevated: #A0722C;
  --status-heightened: #A3402C;
  --max: 780px;
  --wide: 1040px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}

p { margin: 0 0 16px; }

a {
  color: var(--chart-deep);
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

a:hover { text-decoration-color: var(--chart-deep); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--chart);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header ---------- */

header {
  background: var(--chart);
  border-bottom: 3px solid var(--chart-deep);
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 32px;
  padding: 20px 0;
}

.wordmark {
  font-family: "Newsreader", serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #FFFFFF;
  text-decoration: none;
}

footer .wordmark { color: var(--ink); }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}

nav a {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

nav a:hover,
nav a[aria-current="page"] {
  color: #FFFFFF;
  border-bottom-color: #FFFFFF;
}

/* ---------- Homepage hero ---------- */

.hero {
  padding: 64px 0 52px;
  background: #EEF2F0;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.25;
  max-width: 14ch;
}

.hero p {
  max-width: 62ch;
  margin-top: 22px;
  font-size: 1.06rem;
  color: var(--ink-soft);
}

.hero .tagline {
  margin-top: 14px;
  font-size: 1.06rem;
  color: var(--ink);
}

/* ---------- Interior page hero (About / Methodology / etc.) ---------- */

.page-hero {
  padding: 48px 0 40px;
  background: #EEF2F0;
  border-bottom: 1px solid var(--line);
}

.page-hero .eyebrow {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--chart-deep);
  margin-bottom: 10px;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.25rem);
  line-height: 1.3;
  max-width: 20ch;
}

.page-hero p {
  max-width: 60ch;
  margin-top: 16px;
  font-size: 1.03rem;
  color: var(--ink-soft);
}

/* ---------- Section shell ---------- */

section.block {
  padding: 52px 0;
  border-bottom: 1px solid var(--line);
}

section.block:last-of-type { border-bottom: none; }

.block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-bottom: 30px;
}

.block-head h2 {
  font-size: 1.5rem;
}

.block-note {
  font-size: 0.88rem;
  color: var(--ink-faint);
  font-style: italic;
  max-width: 34ch;
}

/* ---------- Prose (long-form reading) ---------- */

.prose {
  max-width: var(--max);
}

.prose h2 {
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.prose h2:not(:first-child) { margin-top: 36px; }

.prose p, .prose li {
  max-width: 66ch;
  color: var(--ink-soft);
  font-size: 1.01rem;
}

.prose strong { color: var(--ink); }

.prose ul, .prose ol {
  padding-left: 22px;
  margin: 0 0 16px;
}

.prose li { margin-bottom: 8px; }

/* ---------- Callout box ---------- */

.callout {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--chart);
  padding: 22px 26px;
  margin: 24px 0;
  max-width: var(--max);
}

.callout h3 {
  font-size: 1.05rem;
  font-family: "Public Sans", sans-serif;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* ---------- Definition pairs ---------- */

.definitions {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.definition {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 6px 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.definition:first-child { border-top: 1px solid var(--line); padding-top: 0; }

.definition dt {
  font-family: "Newsreader", serif;
  font-size: 1.08rem;
  font-weight: 500;
}

.definition dd {
  margin: 0;
  max-width: 60ch;
  color: var(--ink-soft);
}

.definition dd p { margin: 0 0 10px; }
.definition dd p:last-child { margin-bottom: 0; }

/* ---------- Two-column plain list (flag states, resources) ---------- */

.plain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 30px;
  max-width: var(--wide);
}

.plain-grid div {
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 0.96rem;
  color: var(--ink-soft);
}

/* ---------- Resource / link list ---------- */

.link-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: var(--max);
}

.link-list .res {
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.link-list .res:first-child { border-top: 1px solid var(--line); padding-top: 0; }

.link-list .res-name {
  font-size: 1.02rem;
  font-weight: 600;
}

.link-list .res-desc {
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin-top: 4px;
}

/* ---------- Chokepoint log (homepage) ---------- */

.log-entry {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 4px 32px;
  padding: 26px 0;
  border-top: 1px solid var(--line-soft);
}

.log-entry:first-of-type { border-top: 1px solid var(--line); }
.log-entry:last-of-type { border-bottom: 1px solid var(--line); }

.log-name {
  font-family: "Newsreader", serif;
  font-size: 1.18rem;
  font-weight: 500;
}

.log-region {
  font-size: 0.86rem;
  color: var(--ink-faint);
  margin-top: 3px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 4px 11px 4px 9px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #FFFFFF;
  border-radius: 2px;
}

.status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  flex: none;
}

.status.normal { background: var(--status-normal); }
.status.elevated { background: var(--status-elevated); }
.status.heightened { background: var(--status-heightened); }

.log-body p {
  margin: 0 0 12px;
  max-width: 66ch;
}

.log-source {
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ---------- Verification tiers (homepage) ---------- */

.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.tier {
  border-top: 3px solid var(--chart);
  padding-top: 16px;
}

.tier h3 {
  font-size: 1.02rem;
  font-family: "Public Sans", sans-serif;
  font-weight: 700;
  color: var(--chart-deep);
  margin-bottom: 10px;
}

.tier p {
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin: 0;
}

.rule-line {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.96rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

.rule-line strong { color: var(--ink); }

.read-more {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.94rem;
}

/* ---------- Footer ---------- */

footer {
  padding: 44px 0 56px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.footer-about {
  max-width: 40ch;
}

.footer-about .wordmark { font-size: 1.2rem; }

.footer-about p {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-nav a {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-nav a:hover { color: var(--ink); }

.fine-print {
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--ink-faint);
  max-width: 68ch;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .log-entry { grid-template-columns: 1fr; gap: 10px; }
  .tiers { grid-template-columns: 1fr; gap: 26px; }
  .definition { grid-template-columns: 1fr; gap: 6px; }
  .plain-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 48px 0 40px; }
  .page-hero { padding: 36px 0 32px; }
  section.block { padding: 40px 0; }
}

@media (max-width: 480px) {
  .plain-grid { grid-template-columns: 1fr; }
}
