:root {
  color-scheme: dark;
  --ink: #eef3fb;
  --muted: #aebbd0;
  --quiet: #8492aa;
  --night: #050911;
  --night-2: #09111f;
  --panel: rgba(12, 23, 40, 0.88);
  --panel-strong: #0d192b;
  --line: rgba(154, 177, 211, 0.2);
  --line-strong: rgba(196, 163, 93, 0.42);
  --gold: #d8b86a;
  --gold-bright: #f1d58f;
  --blue: #78aee8;
  --teal: #6fd2cb;
  --violet: #b9a1ec;
  --rose: #e5a4b7;
  --green: #98d8aa;
  --max: 1180px;
  --reading: 760px;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 4%, rgba(34, 76, 128, 0.3), transparent 28rem),
    radial-gradient(circle at 10% 30%, rgba(91, 54, 113, 0.16), transparent 24rem),
    linear-gradient(180deg, #050911 0%, #07101d 48%, #050910 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

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

a {
  color: var(--gold-bright);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: #fff1c8;
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
figure,
blockquote {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: #f8f2e7;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  max-width: 15ch;
  margin-bottom: 1.25rem;
  font-size: clamp(2.75rem, 7vw, 6.6rem);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.2vw, 3.8rem);
}

h3 {
  margin-bottom: 0.7rem;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
}

.shell {
  width: min(calc(100% - 2.2rem), var(--max));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  color: #050911;
  background: var(--gold-bright);
  border-radius: 999px;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 9, 17, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-row {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
}

.header-chat-link {
  order: 2;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.9rem;
  color: #07101d;
  background: var(--gold-bright);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.header-chat-link:hover,
.header-chat-link:focus-visible {
  color: #07101d;
  background: #ffe5a4;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--gold-bright);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: inset 0 0 20px rgba(216, 184, 106, 0.12);
}

.brand-mark::before {
  width: 0.42rem;
  height: 0.42rem;
  content: "";
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 14px currentColor;
}

.brand-copy {
  display: grid;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-copy small {
  margin-top: 0.34rem;
  color: var(--quiet);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.21em;
}

.nav-menu {
  position: relative;
  order: 1;
}

.nav-menu summary {
  display: none;
  cursor: pointer;
  list-style: none;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.62rem 0.7rem;
  color: #c8d3e4;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: #fff;
  background: rgba(120, 174, 232, 0.12);
}

.nav-links .nav-action {
  margin-left: 0;
  color: #c8d3e4;
  background: transparent;
}

.nav-links .nav-action:hover,
.nav-links .nav-action[aria-current="page"] {
  color: #fff;
  background: rgba(120, 174, 232, 0.12);
}

.hero,
.page-hero {
  position: relative;
  overflow: clip;
}

.hero {
  padding: clamp(4rem, 9vw, 8.5rem) 0 clamp(4rem, 8vw, 7rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7.5rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  color: var(--gold-bright);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 2.3rem;
  height: 1px;
  content: "";
  background: var(--gold);
}

.hero-lead,
.page-lead {
  max-width: 66ch;
  margin-bottom: 1.7rem;
  color: #c4d0e2;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.hero-art {
  position: relative;
  margin: 0;
}

.hero-art::before {
  position: absolute;
  inset: -1rem;
  z-index: -1;
  content: "";
  background: radial-gradient(circle, rgba(75, 129, 189, 0.28), transparent 67%);
  filter: blur(18px);
}

.hero-art img {
  width: 100%;
  max-height: 690px;
  object-fit: cover;
  object-position: 50% 35%;
  border: 1px solid var(--line-strong);
  border-radius: 48% 48% 14px 14px / 30% 30% 14px 14px;
  box-shadow: var(--shadow);
}

.hero-art figcaption {
  max-width: 36rem;
  margin: 0.9rem auto 0;
  color: var(--quiet);
  font-size: 0.78rem;
  text-align: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin: 1.6rem 0;
}

.button,
.button-disabled {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.015em;
  text-decoration: none;
}

.button--primary {
  color: #07101d;
  background: var(--gold-bright);
}

.button--primary:hover {
  color: #07101d;
  background: #ffe8ad;
}

.button--secondary {
  color: #e6edf8;
  background: rgba(120, 174, 232, 0.08);
}

.button-disabled {
  color: #95a2b7;
  background: rgba(149, 162, 183, 0.08);
  border-style: dashed;
  cursor: not-allowed;
}

.identity-note,
.boundary-note,
.review-note {
  max-width: 740px;
  margin-top: 2rem;
  padding: 1rem 1.1rem;
  color: #c8d4e5;
  background: rgba(12, 23, 40, 0.68);
  border: 1px solid var(--line);
  border-left: 3px solid var(--violet);
  border-radius: 12px;
  font-size: 0.92rem;
}

.review-note {
  border-left-color: var(--gold);
}

.boundary-note {
  border-left-color: var(--rose);
}

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

.section--quiet {
  background: rgba(4, 8, 15, 0.42);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 2.25rem;
}

.section-intro {
  max-width: 66ch;
  color: var(--muted);
  font-size: 1.06rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

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

.card,
.proof-card,
.role-card,
.kit-card,
.status-card {
  min-width: 0;
  padding: clamp(1.2rem, 2.5vw, 1.7rem);
  background: linear-gradient(145deg, rgba(15, 29, 49, 0.94), rgba(8, 16, 29, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
}

.card p:last-child,
.proof-card p:last-child,
.role-card p:last-child,
.kit-card p:last-child,
.status-card p:last-child {
  margin-bottom: 0;
}

.card-kicker,
.proof-id,
.role-status {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--gold-bright);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.proof-card {
  display: flex;
  flex-direction: column;
}

.proof-card .proof-link {
  margin-top: auto;
  padding-top: 1rem;
}

.claim-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.provenance,
.freshness {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 29px;
  padding: 0.36rem 0.62rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-transform: uppercase;
}

.provenance {
  color: #06101d;
  background: var(--blue);
}

.provenance::before {
  width: 0.45rem;
  height: 0.45rem;
  content: "";
  background: currentColor;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.provenance--archive {
  background: var(--teal);
}

.provenance--firsthand {
  background: var(--gold-bright);
}

.provenance--interpretation,
.provenance--research {
  background: var(--violet);
}

.provenance--future {
  background: var(--rose);
}

.freshness {
  color: #dce5f2;
  background: transparent;
  border: 1px solid rgba(220, 229, 242, 0.34);
}

.freshness::before {
  width: 0.5rem;
  height: 0.5rem;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.freshness--operating::before {
  color: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.freshness--dated::before {
  color: var(--gold-bright);
}

.freshness--source::before {
  color: var(--blue);
  border-radius: 1px;
}

.freshness--planned::before,
.freshness--held::before {
  color: var(--rose);
  background: transparent;
  border: 1px solid currentColor;
}

.evidence-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.75rem;
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.evidence-details dt {
  color: var(--quiet);
  font-weight: 700;
}

.evidence-details dd {
  margin: 0;
  color: #d5dfec;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.status-card {
  padding: 1rem;
}

.status-card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #fff;
}

.status-card span {
  color: var(--quiet);
  font-size: 0.8rem;
}

.page-hero {
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(3.5rem, 7vw, 6rem);
}

.page-hero h1 {
  max-width: 18ch;
  font-size: clamp(2.8rem, 6vw, 5.6rem);
}

.page-hero--split .shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.58fr);
  align-items: end;
  gap: 3rem;
}

.page-aside {
  padding: 1.35rem;
  color: #c6d1e2;
  background: rgba(12, 23, 40, 0.75);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
}

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

.timeline {
  position: relative;
  display: grid;
  gap: 1rem;
  max-width: 900px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1.08rem;
  width: 1px;
  content: "";
  background: linear-gradient(var(--gold), rgba(120, 174, 232, 0.22));
}

.timeline-item {
  position: relative;
  padding: 0 0 2rem 3.6rem;
}

.timeline-item::before {
  position: absolute;
  top: 0.28rem;
  left: 0.7rem;
  width: 0.8rem;
  height: 0.8rem;
  content: "";
  background: var(--night);
  border: 2px solid var(--gold-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(216, 184, 106, 0.09);
}

.timeline-date {
  margin-bottom: 0.35rem;
  color: var(--gold-bright);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.process {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: process;
}

.process li {
  position: relative;
  min-height: 175px;
  padding: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  counter-increment: process;
}

.process li::before {
  display: block;
  margin-bottom: 1.2rem;
  color: var(--gold-bright);
  content: "0" counter(process);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
}

.process strong {
  display: block;
  color: #fff;
}

.process span {
  color: var(--quiet);
  font-size: 0.84rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 2rem;
}

.placeholder {
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 2rem;
  color: #acb9ca;
  background:
    linear-gradient(135deg, rgba(120, 174, 232, 0.07), rgba(185, 161, 236, 0.05)),
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(255, 255, 255, 0.02) 12px 13px);
  border: 1px dashed rgba(174, 187, 208, 0.38);
  border-radius: var(--radius);
  text-align: center;
}

.placeholder strong {
  display: block;
  margin-bottom: 0.45rem;
  color: #e0e7f1;
}

.book-layout {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 680px);
  align-items: start;
  gap: clamp(2rem, 6vw, 5rem);
}

.book-cover {
  width: 100%;
  height: auto;
  align-self: start;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.download-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1.4rem 0;
  padding: 0;
  list-style: none;
}

.download-list a,
.download-list .download-held {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0.75rem 0.9rem;
  background: rgba(120, 174, 232, 0.07);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 750;
  text-decoration: none;
}

.download-list .download-held {
  color: var(--quiet);
  border-style: dashed;
}

.site-footer {
  padding: 3rem 0;
  color: var(--quiet);
  background: #04070d;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 0.5rem 1rem;
}

.footer-links a {
  color: #c7d2e3;
}

.footer-note {
  max-width: 64ch;
  margin: 0;
  font-size: 0.82rem;
}

@media (max-width: 1080px) {
  .header-chat-link {
    order: 1;
  }

  .nav-menu {
    order: 2;
  }

  .nav-menu summary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 0.85rem;
    color: #e4ecf7;
    background: rgba(120, 174, 232, 0.08);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 0.7rem);
    right: 0;
    width: min(84vw, 390px);
    max-height: min(70vh, 550px);
    display: none;
    align-items: stretch;
    padding: 0.65rem;
    overflow-y: auto;
    background: #0a1423;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  .nav-menu[open] .nav-links {
    display: grid;
  }

  .nav-links a {
    padding: 0.75rem 0.85rem;
    white-space: normal;
  }

  .nav-links .nav-action {
    margin: 0.3rem 0 0;
    text-align: center;
  }

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

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

@media (max-width: 760px) {
  h1 {
    font-size: clamp(2.65rem, 13vw, 4.6rem);
  }

  .hero-grid,
  .page-hero--split .shell,
  .book-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    max-width: 430px;
    margin-inline: auto;
  }

  .hero-art img {
    max-height: 560px;
  }

  .grid--2,
  .grid--3,
  .grid--4,
  .status-strip,
  .process,
  .download-list {
    grid-template-columns: 1fr;
  }

  .process li {
    min-height: 0;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 440px) {
  .shell {
    width: min(calc(100% - 1.25rem), var(--max));
  }

  .brand-copy small {
    display: none;
  }

  .nav-row {
    gap: 0.55rem;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .header-chat-link {
    min-height: 40px;
    padding: 0.55rem 0.7rem;
    font-size: 0.7rem;
  }

  .actions {
    align-items: stretch;
  }

  .button,
  .button-disabled {
    width: 100%;
  }

  .claim-meta {
    align-items: stretch;
  }

  .provenance,
  .freshness {
    width: 100%;
    border-radius: 8px;
  }
}

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

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

@media print {
  .site-header,
  .site-footer,
  .actions {
    display: none;
  }

  body {
    color: #111;
    background: #fff;
  }

  .card,
  .proof-card,
  .role-card,
  .kit-card,
  .status-card,
  .page-aside {
    color: #111;
    background: #fff;
    border-color: #bbb;
    box-shadow: none;
  }
}
