:root {
  color-scheme: light;
  --bg: #e9dfcf;
  --bg-deep: #d8c7ae;
  --paper: rgba(255, 251, 244, 0.9);
  --paper-strong: #fffaf2;
  --ink: #1f1a14;
  --muted: #665e51;
  --line: rgba(130, 103, 62, 0.2);
  --accent: #b6522f;
  --accent-dark: #7d2f15;
  --accent-soft: #f6ddcf;
  --accent-glow: rgba(182, 82, 47, 0.16);
  --forest: #24443e;
  --forest-soft: rgba(36, 68, 62, 0.08);
  --gold: #b58b3a;
  --shadow: 0 24px 64px rgba(56, 36, 16, 0.11);
  --shadow-soft: 0 14px 34px rgba(56, 36, 16, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(182, 82, 47, 0.17), transparent 26%),
    radial-gradient(circle at 85% 10%, rgba(36, 68, 62, 0.12), transparent 24%),
    linear-gradient(180deg, #f6f0e5, var(--bg) 54%, #e3d5c1);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.22), transparent 35%),
    repeating-linear-gradient(
      90deg,
      rgba(99, 77, 49, 0.03) 0,
      rgba(99, 77, 49, 0.03) 1px,
      transparent 1px,
      transparent 24px
    );
  opacity: 0.65;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
pre {
  margin: 0;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 84px;
}

.page-stack {
  display: grid;
  gap: 24px;
}

.glow {
  position: fixed;
  inset: auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(50px);
  opacity: 0.4;
}

.glow-a {
  top: -120px;
  left: -100px;
  background: rgba(182, 82, 47, 0.18);
}

.glow-b {
  right: -120px;
  bottom: 10%;
  background: rgba(101, 63, 18, 0.12);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 12px;
  border: 1px solid rgba(130, 103, 62, 0.18);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.mark {
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.nav a:hover,
.mark:hover {
  color: var(--accent-dark);
}

.nav a:hover {
  background: rgba(182, 82, 47, 0.08);
  transform: translateY(-1px);
}

.hero,
.panel,
.hero-panel,
.route-card,
.mini-card,
.page-hero,
.path-card,
.code-panel,
.status-card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 24px;
  backdrop-filter: blur(8px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.8fr);
  gap: 20px;
  padding: 44px;
  background:
    linear-gradient(130deg, rgba(255, 251, 244, 0.92), rgba(246, 221, 207, 0.88)),
    radial-gradient(circle at top right, rgba(36, 68, 62, 0.08), transparent 32%);
}

.page-hero {
  padding: 34px;
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.98), rgba(246, 221, 207, 0.62));
}

.hero-panel,
.panel,
.route-card,
.mini-card,
.path-card,
.code-panel,
.status-card {
  padding: 26px;
}

.hero-panel {
  align-self: end;
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.85), rgba(246, 221, 207, 0.92));
}

.badge,
.eyebrow {
  display: inline-block;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--accent);
}

.badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(182, 82, 47, 0.08);
  border: 1px solid rgba(182, 82, 47, 0.16);
}

h1 {
  margin-top: 14px;
  font-size: clamp(44px, 7vw, 78px);
  line-height: 0.95;
  max-width: 12ch;
}

h2,
h3 {
  margin-top: 10px;
}

.lede,
.panel p,
.route-card p,
.mini-card p,
.path-card p,
.status-card p {
  color: var(--muted);
  line-height: 1.7;
}

.lede {
  margin-top: 18px;
  font-size: 21px;
  max-width: 760px;
}

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.actions a {
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 12px 24px rgba(182, 82, 47, 0.18);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.actions a.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.actions a:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(182, 82, 47, 0.22);
}

.section {
  display: grid;
  gap: 16px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 2px 0;
}

.route-grid,
.card-grid,
.path-grid,
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.route-card,
.path-card {
  text-decoration: none;
}

.route-card,
.mini-card,
.path-card,
.panel,
.hero-panel,
.status-card {
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.route-card:hover,
.path-card:hover,
.mini-card:hover,
.panel:hover,
.hero-panel:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 26px 56px rgba(56, 36, 16, 0.13);
}

.accent-card {
  background: linear-gradient(180deg, var(--paper), var(--accent-soft));
}

.route-card.featured,
.mini-card.featured {
  background:
    linear-gradient(145deg, rgba(255, 251, 244, 0.98), rgba(246, 221, 207, 0.88)),
    radial-gradient(circle at top right, rgba(36, 68, 62, 0.1), transparent 32%);
  border-color: rgba(182, 82, 47, 0.26);
}

.text-link {
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

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

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

.accent {
  background: linear-gradient(180deg, var(--paper), var(--accent-soft));
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.signal-card {
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.86), rgba(255, 250, 242, 0.74));
  box-shadow: var(--shadow-soft);
}

.signal-card strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  line-height: 1;
}

.signal-card p {
  margin-top: 10px;
  color: var(--muted);
}

.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(36, 68, 62, 0.16);
  background:
    linear-gradient(135deg, rgba(32, 57, 51, 0.94), rgba(28, 27, 24, 0.9)),
    radial-gradient(circle at top right, rgba(181, 139, 58, 0.16), transparent 34%);
  color: #f6efe4;
  box-shadow: 0 30px 80px rgba(24, 22, 19, 0.24);
}

.spotlight .eyebrow,
.spotlight p {
  color: rgba(246, 239, 228, 0.82);
}

.spotlight h2 {
  margin-top: 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.spotlight p {
  margin-top: 14px;
  max-width: 58ch;
  line-height: 1.75;
}

.spotlight .actions a.secondary {
  color: #f6efe4;
  border-color: rgba(246, 239, 228, 0.28);
}

.spotlight-meta {
  display: grid;
  gap: 14px;
}

.spotlight-stat {
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(246, 239, 228, 0.12);
}

.spotlight-stat strong {
  display: block;
  font-size: 26px;
  line-height: 1.05;
  margin-top: 8px;
}

.spotlight-stat span {
  display: block;
  color: rgba(246, 239, 228, 0.72);
  margin-top: 6px;
  line-height: 1.6;
}

.hero-band {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-band span {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(130, 103, 62, 0.18);
  background: rgba(255, 251, 244, 0.76);
  color: var(--ink);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pill-row span {
  padding: 10px 14px;
  border-radius: 999px;
  background: #f7f2e7;
  border: 1px solid var(--line);
}

.checklist,
.ordered {
  padding-left: 18px;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.75;
}

.ordered li + li,
.checklist li + li {
  margin-top: 6px;
}

.subnav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.subnav a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.72);
}

.subnav a.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.subnav a:hover {
  color: var(--ink);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.breadcrumbs a {
  text-decoration: none;
}

.code-panel {
  background: #1f1b18;
  color: #f8f3eb;
}

.code-panel .eyebrow,
.code-panel p {
  color: rgba(248, 243, 235, 0.78);
}

pre {
  overflow: auto;
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8f3eb;
  line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

@media (max-width: 820px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding: 20px 0 40px;
  }

  .hero,
  .spotlight,
  .split,
  .route-grid,
  .card-grid,
  .path-grid,
  .status-grid,
  .signal-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .page-hero {
    padding: 28px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 28px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    max-width: none;
  }
}
