:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --paper-deep: #e9e1d4;
  --surface: #fbf9f4;
  --ink: #1d2522;
  --muted: #62706a;
  --line: #cfc7ba;
  --moss: #415f50;
  --moss-soft: #dce7df;
  --rust: #a24f31;
  --rust-soft: #f0ddd3;
  --gold-soft: #eee2bc;
  --shadow: 0 18px 45px rgba(40, 45, 39, 0.08);
  --radius: 18px;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 92% 2%, rgba(162, 79, 49, 0.11), transparent 24rem),
    linear-gradient(180deg, var(--paper) 0, #f8f5ef 42rem, var(--paper) 100%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
}

a {
  color: var(--moss);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

a:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  transform: translateY(-180%);
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: white;
  border-radius: 999px;
}

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

.status-bar {
  border-bottom: 1px solid rgba(29, 37, 34, 0.16);
  background: rgba(251, 249, 244, 0.78);
  backdrop-filter: blur(10px);
}

.status-inner,
.shell {
  width: calc(100vw - 2.5rem);
  max-width: 1180px;
  margin: 0 auto;
}

.status-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  font-size: 0.82rem;
}

.wordmark {
  font-weight: 760;
  letter-spacing: -0.02em;
}

.closed-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--rust);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.closed-label::before {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--rust);
  content: "";
}

main {
  padding-bottom: 7rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(17rem, 0.55fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: end;
  padding: clamp(4.5rem, 10vw, 8.5rem) 0 5rem;
}

.hero > *,
.section-heading > *,
.boundary > *,
.legend-card,
.source-card,
.asset-card {
  min-width: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 1rem;
  color: var(--moss);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 15ch;
  margin-bottom: 1.5rem;
  font-size: clamp(3rem, 7.5vw, 6.8rem);
  font-weight: 720;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.hero-copy {
  max-width: 43rem;
  margin-bottom: 0;
  color: #43504b;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
}

.gate-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 249, 244, 0.86);
  box-shadow: var(--shadow);
}

.gate-card strong {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 1.05rem;
}

.gate-card p {
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
  margin-bottom: 3rem;
}

h2 {
  max-width: 18ch;
  margin-bottom: 0;
  font-size: clamp(2.15rem, 4.5vw, 4rem);
  font-weight: 690;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.section-intro {
  max-width: 45rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.legend-grid,
.source-grid,
.asset-grid {
  display: grid;
  gap: 1rem;
}

.legend-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.legend-card,
.source-card,
.asset-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 249, 244, 0.72);
}

.legend-card {
  min-height: 12rem;
  padding: 1.4rem;
}

.legend-number {
  display: block;
  margin-bottom: 2.2rem;
  color: var(--rust);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.legend-card h3,
.source-card h3,
.asset-card h3 {
  margin-bottom: 0.55rem;
  font-size: 1.03rem;
  letter-spacing: -0.015em;
}

.legend-card p,
.source-card p,
.asset-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.source-card {
  display: flex;
  flex-direction: column;
  min-height: 20rem;
  padding: 1.4rem;
}

.source-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fictional-chip {
  display: inline-flex;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  background: var(--rust-soft);
  color: #7d351f;
  font-weight: 700;
}

.excerpt {
  margin: auto 0 1.5rem;
  padding: 1rem;
  border-left: 3px solid var(--moss);
  background: var(--moss-soft);
  color: #2e453a;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.65;
}

.source-link {
  font-size: 0.82rem;
  font-weight: 700;
}

.table-frame {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

caption {
  padding: 1.25rem 1.4rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: left;
}

th,
td {
  padding: 1.15rem 1rem;
  border-bottom: 1px solid #ded7cc;
  vertical-align: top;
}

th {
  background: #eee8de;
  color: #46524d;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td {
  font-size: 0.84rem;
}

td strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.91rem;
}

.muted {
  color: var(--muted);
}

.state {
  display: inline-flex;
  margin-bottom: 0.4rem;
  padding: 0.28rem 0.52rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.state-direct,
.state-confirmed {
  background: var(--moss-soft);
  color: #294737;
}

.state-derived {
  background: var(--gold-soft);
  color: #6d5620;
}

.state-conflict,
.state-check {
  background: var(--rust-soft);
  color: #7d351f;
}

.state-notfound {
  background: #e5e2db;
  color: #58615d;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(12.5rem, 1fr));
  gap: 0.7rem;
  min-width: 34rem;
}

.fact {
  padding: 0.72rem;
  border: 1px solid #ded7cc;
  border-radius: 10px;
  background: #f8f5ef;
}

.fact-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fact strong {
  margin-bottom: 0.42rem;
}

.fact small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.asset-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.asset-card {
  padding: clamp(1.4rem, 3vw, 2.2rem);
}

.asset-card pre {
  overflow-x: auto;
  margin: 1.4rem 0;
  padding: 1rem;
  border-radius: 12px;
  background: #28312d;
  color: #eef1ec;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.asset-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.84rem;
  font-weight: 700;
}

.boundary {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 2rem;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: calc(var(--radius) + 8px);
  background: var(--ink);
  color: white;
}

.boundary h2 {
  color: white;
}

.boundary-copy p {
  color: #c7d0cb;
}

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

footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 900px) {
  .hero,
  .section-heading,
  .boundary {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 2.5rem;
  }

  .gate-card {
    max-width: 34rem;
  }

  .legend-grid,
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .status-inner,
  .shell {
    width: calc(100vw - 1.5rem);
    max-width: 1180px;
  }

  .status-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    min-height: 4.6rem;
    gap: 0.2rem;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.8rem, 12.8vw, 3.55rem);
    overflow-wrap: normal;
  }

  .hero-copy,
  .gate-card,
  .section-intro,
  .boundary-copy {
    max-width: 100%;
  }

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

  .legend-card {
    min-height: auto;
  }

  .legend-number {
    margin-bottom: 1.2rem;
  }

  .footer-inner {
    flex-direction: column;
  }
}

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