:root {
  color-scheme: dark;
  --void: #030308;
  --void-2: #080914;
  --ink: #e7e8f3;
  --muted: #a9adbf;
  --soft: #d6d8e5;
  --line: rgba(231, 232, 243, 0.16);
  --line-strong: rgba(255, 212, 117, 0.42);
  --panel: rgba(12, 14, 28, 0.78);
  --panel-strong: rgba(17, 20, 38, 0.92);
  --gold: #ffd475;
  --blue: #4a9eff;
  --mint: #76e0c1;
  --coral: #ff9a80;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  --radius: 8px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--ink);
  font-family: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(74, 158, 255, 0.14), transparent 34%),
    linear-gradient(245deg, rgba(255, 212, 117, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(3, 3, 8, 0.12), var(--void) 88%);
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  background: var(--void);
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

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

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.02;
  text-wrap: balance;
}

h1 {
  max-width: 900px;
  font-size: 4.2rem;
}

h2 {
  font-size: 2.65rem;
}

h3 {
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

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

th {
  color: var(--gold);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

td {
  color: var(--soft);
}

pre {
  margin: 1.2rem 0 0;
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(3, 3, 8, 0.62);
}

code {
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
  color: var(--gold);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 3, 8, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  min-width: max-content;
}

.brand-mark {
  color: var(--gold);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.2rem;
  font-weight: 700;
}

.brand-text {
  color: var(--ink);
  font-weight: 600;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  min-width: max-content;
  padding: 0.55rem 0.78rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  border-color: rgba(255, 212, 117, 0.28);
  background: rgba(255, 212, 117, 0.08);
  color: var(--ink);
}

.hero {
  width: min(100% - 3rem, var(--content));
  min-height: 76vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.82fr);
  align-items: center;
  gap: 3rem;
  padding: 5.6rem 0 4.2rem;
}

.hero-copy {
  display: grid;
  gap: 1.4rem;
}

.eyebrow {
  color: var(--gold);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lead {
  max-width: 760px;
  color: var(--soft);
  font-size: 1.22rem;
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 212, 117, 0.46);
  background: rgba(255, 212, 117, 0.09);
}

.button.primary {
  border-color: rgba(255, 212, 117, 0.72);
  background: linear-gradient(135deg, rgba(255, 212, 117, 0.98), rgba(118, 224, 193, 0.88));
  color: #080914;
}

.hero-panel,
.article-panel,
.text-panel,
.metric-card,
.route-item,
.figure-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 1rem;
}

.panel-label {
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.hero-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.signal-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0 0;
}

.signal-list div {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.signal-list dt {
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.signal-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.section {
  padding: 5.2rem 0;
  border-top: 1px solid var(--line);
}

.section-tight {
  padding-top: 3.8rem;
}

.section-inner {
  width: min(100% - 3rem, var(--content));
  margin: 0 auto;
}

.section-heading {
  display: grid;
  gap: 0.65rem;
  max-width: 820px;
  margin-bottom: 2rem;
}

.section-heading.compact {
  max-width: 680px;
}

.section-copy {
  max-width: 620px;
  margin-top: 1rem;
  color: var(--soft);
  font-size: 1.08rem;
}

.overview-grid,
.metric-grid,
.figure-grid {
  display: grid;
  gap: 1rem;
}

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

.text-panel {
  padding: 1.25rem;
}

.text-panel p,
.article-panel p {
  margin-top: 0.75rem;
  color: var(--soft);
}

.evidence-band {
  background: linear-gradient(180deg, rgba(255, 212, 117, 0.06), rgba(74, 158, 255, 0.07));
}

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

.metric-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
}

.metric-card.caution {
  border-color: rgba(255, 154, 128, 0.48);
}

.metric-value {
  color: var(--gold);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.metric-label {
  color: var(--soft);
  font-weight: 600;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 2rem;
  align-items: start;
}

.split-layout > *,
.source-grid > *,
.article-layout > * {
  min-width: 0;
}

.route-list {
  display: grid;
  gap: 0.8rem;
}

.route-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.route-item:hover {
  transform: translateY(-2px);
  border-color: rgba(74, 158, 255, 0.5);
  background: rgba(74, 158, 255, 0.08);
}

.route-index {
  color: var(--blue);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
}

.route-item strong {
  display: block;
  color: var(--ink);
}

.route-item em {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-style: normal;
}

.figure-section {
  background: rgba(255, 255, 255, 0.025);
}

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

.figure-card {
  margin: 0;
  overflow: hidden;
  background: var(--panel-strong);
}

.figure-card.wide {
  grid-column: span 2;
}

.figure-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  padding: 0.5rem;
  background: #f7f7fb;
}

.figure-card figcaption {
  padding: 0.85rem 1rem 1rem;
  color: var(--soft);
  font-weight: 700;
}

.source-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(0, 1.14fr);
  gap: 2rem;
  align-items: start;
}

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

.resource-list a {
  min-height: 62px;
  display: flex;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
  transition: border-color 160ms ease, background 160ms ease;
}

.resource-list a:hover {
  border-color: rgba(255, 212, 117, 0.46);
  background: rgba(255, 212, 117, 0.08);
}

.page-hero {
  width: min(100% - 3rem, 980px);
  margin: 0 auto;
  padding: 5.4rem 0 3.4rem;
}

.page-hero h1 {
  margin-top: 0.75rem;
  font-size: 3.6rem;
}

.page-hero p:not(.eyebrow) {
  max-width: 780px;
  margin-top: 1.1rem;
  color: var(--soft);
  font-size: 1.18rem;
}

.article-layout {
  display: grid;
  gap: 1rem;
}

.article-panel {
  padding: 1.35rem;
  background: rgba(12, 14, 28, 0.84);
}

.article-panel h2 {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1.35rem;
  line-height: 1.25;
}

.table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.clean-list,
.ordered-route {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--soft);
}

.clean-list li,
.ordered-route li {
  margin: 0.45rem 0;
}

.ordered-route a {
  color: var(--ink);
  border-bottom: 1px solid rgba(255, 212, 117, 0.42);
}

.timeline-panel {
  border-color: rgba(118, 224, 193, 0.38);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 3rem, var(--content));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: var(--ink);
  border-bottom: 1px solid rgba(255, 212, 117, 0.42);
}

@media (max-width: 1040px) {
  h1 {
    font-size: 3.35rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 4rem;
  }

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

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

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  h1,
  .page-hero h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.8rem 1rem;
  }

  .site-nav {
    width: 100%;
    padding-bottom: 0.1rem;
  }

  .hero,
  .section-inner,
  .page-hero,
  .site-footer {
    width: min(100% - 2rem, var(--content));
  }

  .hero {
    gap: 2rem;
    padding: 3rem 0 3.2rem;
  }

  .lead,
  .page-hero p:not(.eyebrow) {
    font-size: 1.05rem;
  }

  .signal-list,
  .overview-grid,
  .metric-grid,
  .figure-grid,
  .resource-list {
    grid-template-columns: 1fr;
  }

  .figure-card.wide {
    grid-column: auto;
  }

  .section {
    padding: 3.5rem 0;
  }

  .page-hero {
    padding: 3.2rem 0 2.4rem;
  }

  .route-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .metric-card {
    min-height: 132px;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 0.75rem;
  }

  tr {
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
  }

  td {
    padding: 0.42rem 0;
    border-bottom: 0;
    color: var(--ink);
    overflow-wrap: anywhere;
  }

  td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.1rem;
    color: var(--gold);
    font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.7rem;
    font-weight: 700;
  }
}

@media (max-width: 440px) {
  h1,
  .page-hero h1 {
    font-size: 2.1rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  .brand {
    gap: 0.5rem;
  }

  .brand-mark {
    font-size: 1.05rem;
  }

  .brand-text {
    font-size: 0.95rem;
  }

  .site-nav a {
    padding: 0.5rem 0.68rem;
    font-size: 0.9rem;
  }

  .hero-actions,
  .inline-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }
}
