:root {
  --paper: #f3eee3;
  --paper-deep: #e4dacb;
  --ink: #20302e;
  --muted: #5f6f6a;
  --line: #c7bcae;
  --red: #c85d47;
  --red-dark: #8e3f36;
  --teal: #277d76;
  --yellow: #d5ad5c;
  --cream: #fffdf7;
  --shadow: 0 18px 40px rgba(32, 48, 46, 0.12);
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  line-height: 1.55;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(32, 48, 46, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 48, 46, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
}

a {
  color: var(--red-dark);
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--teal);
}

a:focus-visible,
button:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

img,
svg {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.site-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  display: flex;
  min-height: 5.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 2.2rem;
  height: 2.2rem;
  margin-right: 0.55rem;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--red);
  color: var(--cream);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0;
  vertical-align: middle;
}

.site-nav,
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.2rem;
}

.site-nav a,
.footer-nav a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav a:last-child {
  padding: 0 0.75rem;
  border: 1px solid var(--ink);
  text-decoration: none;
}

main {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  min-height: 38rem;
  padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(2.5rem, 4vw, 3.5rem);
  align-items: center;
}

.eyebrow,
.kicker,
.step,
.source-type,
.stamp {
  color: var(--red-dark);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 13ch;
  margin: 1rem 0 1.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 5.4vw, 5.25rem);
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.dek {
  max-width: 48rem;
  margin: 0;
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  line-height: 1.45;
}

.answer-line {
  max-width: 45rem;
  margin: 1.4rem 0 0;
  padding: 1rem 1.1rem;
  border-left: 6px solid var(--teal);
  background: rgba(255, 253, 247, 0.72);
  font-size: 1rem;
}

.answer-line strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--teal);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
}

.button,
.text-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  font-weight: 700;
}

.button {
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
}

.button:hover {
  background: var(--teal);
  color: var(--cream);
}

.text-link {
  color: var(--ink);
}

.trust-line {
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
}

.provenance-figure {
  position: relative;
  margin: 0;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--ink);
  background: var(--ink);
  box-shadow: var(--shadow);
  color: var(--cream);
}

.provenance-figure::before {
  position: absolute;
  inset: 0.6rem -0.6rem -0.6rem 0.6rem;
  z-index: -1;
  border: 1px solid var(--red);
  content: "";
}

.figure-label {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 253, 247, 0.25);
}

.figure-label .kicker {
  color: var(--yellow);
}

.figure-label p {
  max-width: 16ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 2.15rem);
  line-height: 1.05;
}

.relay {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.7rem;
  align-items: stretch;
  margin: 1.5rem 0;
}

.relay-card {
  display: flex;
  min-height: 10.8rem;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 253, 247, 0.32);
  background: rgba(255, 253, 247, 0.08);
}

.relay-card strong {
  display: block;
  margin-top: 0.5rem;
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.1;
}

.relay-card p {
  margin: 0;
  color: #cbd6cf;
  font-size: 0.9rem;
}

.relay-card.source .step {
  color: var(--yellow);
}

.relay-card.catalogue .step {
  color: #ed9e85;
}

.relay-arrow {
  display: grid;
  min-width: 2.4rem;
  place-items: center;
  color: var(--yellow);
  font-size: 1.6rem;
}

.figure-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 253, 247, 0.25);
  color: #cbd6cf;
  font-size: 0.86rem;
}

.figure-foot strong {
  color: var(--yellow);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.toc a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: var(--ink);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.toc a:hover {
  background: var(--yellow);
}

.content-section {
  padding: clamp(3.25rem, 7vw, 6rem) 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(170px, 0.32fr) minmax(0, 1fr);
  gap: 1rem 3rem;
  align-items: start;
  margin-bottom: 2rem;
}

.section-heading h2 {
  max-width: 20ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

.section-heading p {
  max-width: 45rem;
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.finding-grid,
.method-grid,
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.finding-card,
.method-card,
.why-card {
  min-height: 11rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.65);
}

.finding-card:nth-child(2),
.method-card:nth-child(2),
.why-card:nth-child(2) {
  transform: translateY(1rem);
  border-top: 5px solid var(--red);
}

.finding-card:nth-child(3),
.method-card:nth-child(3),
.why-card:nth-child(3) {
  border-top: 5px solid var(--teal);
}

.finding-card strong,
.method-card strong,
.why-card strong {
  display: block;
  margin: 0.65rem 0 0.45rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.1;
}

.finding-card p,
.method-card p,
.why-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 2rem;
  background: var(--line);
}

.stat {
  padding: 1.2rem;
  background: var(--paper);
}

.stat strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink);
  background: var(--cream);
  box-shadow: 8px 8px 0 var(--paper-deep);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  text-align: left;
}

caption {
  padding: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: left;
}

th,
td {
  padding: 1rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--ink);
  color: var(--cream);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

tbody tr:nth-child(even) td {
  background: #f9f3e9;
}

td:first-child,
th:first-child {
  width: 22%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 700;
}

tbody th[scope="row"] {
  background: var(--cream);
  color: var(--ink);
  text-align: left;
}

tbody tr:nth-child(even) th[scope="row"] {
  background: #f9f3e9;
}

td a {
  display: inline-block;
  min-height: 2.75rem;
  padding-top: 0.25rem;
}

.table-note {
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.method-list,
.limits-list,
.checklist {
  display: grid;
  gap: 0.8rem;
  max-width: 55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.method-list li,
.limits-list li,
.checklist li {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.method-list li:last-child,
.limits-list li:last-child,
.checklist li:last-child {
  border-bottom: 1px solid var(--line);
}

.list-number,
.checkmark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  background: var(--red);
  color: var(--cream);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.77rem;
  font-weight: 700;
}

.checkmark {
  background: var(--teal);
}

.method-list strong,
.limits-list strong,
.checklist strong {
  display: block;
  margin-bottom: 0.15rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
}

.method-list span:not(.list-number),
.limits-list span:not(.list-number),
.checklist span:not(.checkmark) {
  color: var(--muted);
}

.warning-box {
  max-width: 55rem;
  margin-top: 1.8rem;
  padding: 1.25rem;
  border: 1px solid var(--red-dark);
  background: rgba(200, 93, 71, 0.1);
}

.warning-box strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--red-dark);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.warning-box p {
  margin: 0;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 3rem;
}

.source-group {
  padding-top: 1rem;
  border-top: 4px solid var(--ink);
}

.source-group h3 {
  margin: 0 0 0.7rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1.1;
}

.source-list {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-list li {
  border-bottom: 1px solid var(--line);
}

.source-list a {
  display: block;
  min-height: 2.75rem;
  padding: 0.65rem 0;
}

.source-list small {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
}

.closing-note {
  max-width: 52rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer p {
  max-width: 38rem;
  margin: 0;
}

.site-footer .footer-nav a {
  color: var(--muted);
  font-size: 0.74rem;
}

.not-found {
  max-width: 48rem;
  min-height: 70vh;
  padding: 7rem 0;
}

.not-found h1 {
  margin: 0.8rem 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 7rem);
  letter-spacing: -0.06em;
  line-height: 0.94;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero h1 {
    max-width: 16ch;
  }

  .provenance-figure {
    max-width: 44rem;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .finding-grid,
  .method-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .finding-card:nth-child(2),
  .method-card:nth-child(2),
  .why-card:nth-child(2) {
    transform: none;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 1.2rem, 1180px);
  }

  .site-header {
    align-items: flex-start;
    padding: 1rem 0;
  }

  .site-nav {
    justify-content: flex-end;
  }

  .hero {
    padding-top: 2.25rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.7rem);
  }

  .relay {
    grid-template-columns: 1fr;
  }

  .relay-arrow {
    min-height: 1.4rem;
    transform: rotate(90deg);
  }

  .relay-card {
    min-height: 8rem;
  }

  .figure-foot {
    align-items: start;
    flex-direction: column;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow: visible;
  }

  table {
    display: block;
    min-width: 0;
  }

  caption {
    display: block;
    width: 100%;
    line-height: 1.4;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  tbody,
  tbody tr {
    display: block;
  }

  tbody tr {
    padding: 1rem;
    border-top: 1px solid var(--line);
  }

  tbody tr:nth-child(even) {
    background: #f9f3e9;
  }

  tbody th[scope="row"] {
    width: auto;
    padding: 0 0 0.65rem;
    background: transparent;
    border: 0;
  }

  tbody td {
    display: grid;
    grid-template-columns: minmax(125px, 42%) minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
  }

  tbody td::before {
    color: var(--muted);
    content: attr(data-label);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.3;
    text-transform: uppercase;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
