:root {
  --paper: #fcfcfc;
  --white: #ffffff;
  --slate: #373a46;
  --ink: #1a1a1a;
  --charcoal: #2d2d2d;
  --line: rgba(0, 0, 0, 0.08);
  --soft-shadow: rgba(194, 194, 194, 0.25);
  --muted-paper: #f3f2ef;
  --warm-paper: #eeeae2;
  --font-sans: "Geist", "Avenir Next", "Segoe UI", sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-mono: "SFMono-Regular", Consolas, monospace;
  --radius: 8px;
  --section-gap: clamp(4rem, 8vw, 8rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

p,
li,
label,
input,
button,
figcaption,
.site-foot a {
  font-size: 1rem;
}

p {
  max-width: 72ch;
  margin: 0 0 1rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 13ch;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 560;
}

h1 em {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(3.3rem, 7vw, 6.25rem);
  font-weight: 400;
  line-height: 0.98;
}

h2 {
  max-width: 20ch;
  font-size: 1.5rem;
  font-weight: 650;
}

h3 {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.u-wrap {
  width: min(1280px, calc(100% - 3rem));
  margin-inline: auto;
}

.u-section {
  margin-top: var(--section-gap);
}

.u-grid {
  display: grid;
  min-width: 0;
  gap: 1rem;
}

.u-grid-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.u-split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: start;
}

.u-card {
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 220ms ease, opacity 220ms ease;
}

.u-card:hover {
  transform: scale(1.03);
}

.u-card p,
.u-check-item p,
.source-item p,
.glossary-item p {
  margin: 0.75rem 0 0;
  color: var(--slate);
}

.u-eyebrow {
  margin: 0 0 1rem;
  color: var(--slate);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.u-button {
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.3rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.08);
  color: var(--white);
  font-weight: 650;
  text-decoration: none;
  transition: transform 220ms ease, opacity 220ms ease;
}

.u-button:hover {
  transform: scale(1.03);
}

.u-text-link {
  padding-inline: 0.25rem;
  font-weight: 600;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-150%);
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-head {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-mark,
.directory-jump {
  font-weight: 650;
  text-decoration: none;
}

.site-mark {
  gap: 0.7rem;
}

.mark-dot {
  width: 13px;
  height: 13px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
}

.directory-jump {
  border-bottom: 1px solid var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-home {
  min-height: 880px;
  padding: 290px 0 7rem;
}

.hero-inner {
  padding: 220px 0 7rem;
}

.hero-inner .hero-grid {
  grid-template-columns: minmax(0, 820px);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(3rem, 8vw, 9rem);
  align-items: end;
}

.hero-copy {
  min-width: 0;
}

.hero-summary {
  max-width: 62ch;
  margin-top: 1.75rem;
  color: var(--slate);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

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

.hero-finder {
  max-width: 680px;
  margin-top: 2rem;
}

.hero-term-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.hero-term-results article {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
}

.hero-term-results p {
  margin: 0.4rem 0 0;
  color: var(--slate);
}

.hero-note {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.hero-note p:not(.u-eyebrow) {
  color: var(--slate);
}

.hero-art {
  position: absolute;
  top: 90px;
  right: 0;
  width: min(55vw, 860px);
  max-width: 100%;
  overflow: hidden;
  transform: rotate(180deg);
  opacity: 0.25;
}

.hero-art img {
  width: 100%;
}

.hero-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 26%, var(--paper) 67%);
  content: "";
}

.evidence-badge {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--slate);
  font-size: 1rem;
}

.motion-item {
  animation: settle 540ms both;
}

.motion-item:nth-child(2) {
  animation-delay: 120ms;
}

.motion-item:nth-child(3) {
  animation-delay: 240ms;
}

.motion-item:nth-child(4) {
  animation-delay: 360ms;
}

.motion-item:nth-child(5) {
  animation-delay: 480ms;
}

@keyframes settle {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem 4rem;
  align-items: end;
  margin-bottom: 2rem;
}

.section-head .u-eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.section-head > p:last-child,
.section-lead > p:last-child {
  margin: 0;
  color: var(--slate);
}

.section-lead {
  position: sticky;
  top: 2rem;
}

.u-checklist {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.u-check-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

.u-check-item:last-child {
  border-bottom: 1px solid var(--line);
}

.check-mark {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  border: 1px solid var(--slate);
  border-radius: 50%;
}

.u-note-line {
  margin: 1.25rem 0 0;
  padding: 1rem;
  border-left: 3px solid var(--charcoal);
  color: var(--slate);
}

.paper-note {
  position: relative;
  max-width: 870px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--muted-paper);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.paper-note::before {
  position: absolute;
  top: -12px;
  left: 12%;
  width: 96px;
  height: 26px;
  transform: rotate(-2deg);
  background: var(--warm-paper);
  content: "";
}

.paper-note h2 {
  margin-bottom: 1.4rem;
}

.paper-note p {
  color: var(--slate);
}

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

.paper-figure {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.paper-figure::before {
  position: absolute;
  z-index: -1;
  inset: 1rem -0.75rem -0.75rem 1rem;
  transform: rotate(1.2deg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--warm-paper);
  content: "";
}

.paper-figure img {
  width: 100%;
  border-radius: calc(var(--radius) - 2px);
}

.paper-figure figcaption {
  padding-top: 1rem;
  color: var(--slate);
}

.source-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: reading;
}

.source-item {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  counter-increment: reading;
}

.source-item:last-child {
  border-bottom: 1px solid var(--line);
}

.source-item a {
  font-weight: 650;
}

.source-item p {
  padding-left: 0;
}

.glossary-panel {
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.filter-label {
  display: block;
  margin-bottom: 0.65rem;
  font-weight: 650;
}

.glossary-filter {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 0.8rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 40px;
  outline: none;
  background: var(--white);
  box-shadow: 0 10px 40px 5px var(--soft-shadow);
  color: var(--ink);
  font-family: inherit;
}

.glossary-filter:focus {
  border-color: var(--slate);
  box-shadow: 0 10px 40px 5px var(--soft-shadow), 0 0 0 3px rgba(55, 58, 70, 0.12);
}

.filter-status {
  margin-top: 0.8rem;
  color: var(--slate);
}

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

.glossary-item {
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

.glossary-item[hidden],
.empty-state[hidden] {
  display: none;
}

.empty-state {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--muted-paper);
}

.next-route {
  padding-bottom: var(--section-gap);
  text-align: center;
}

.next-route h2 {
  margin: 0 auto 1.5rem;
}

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 7vw, 7rem);
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.footer-intro p:last-child {
  margin-top: 1rem;
  color: var(--slate);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  width: 100%;
  border-bottom: 1px solid var(--line);
  font-weight: 560;
  text-decoration: none;
}

.footer-links a[aria-current="page"] {
  font-style: italic;
  text-decoration: underline;
}

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

.footer-bottom p {
  margin: 0;
  color: var(--slate);
}

@media (max-width: 900px) {
  .u-grid-cards,
  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .u-wrap {
    width: min(100% - 2rem, 1280px);
  }

  .site-head {
    min-height: 72px;
  }

  .site-mark {
    font-size: 0.95rem;
  }

  .directory-jump {
    max-width: 9rem;
    justify-content: flex-end;
    text-align: right;
  }

  .hero-home {
    min-height: auto;
    padding: 190px 0 5rem;
  }

  .hero-inner {
    padding: 170px 0 5rem;
  }

  .hero-grid,
  .u-split,
  .section-head,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid {
    gap: 2rem;
  }

  .hero-art {
    top: 74px;
    right: 0;
    width: 100%;
    opacity: 0.18;
  }

  .section-head {
    align-items: start;
  }

  .section-lead {
    position: static;
  }

  .glossary-grid,
  .u-grid-cards,
  .footer-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-term-results {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
