:root {
  --bg0: #050c18;
  --bg1: #0b1d3a;
  --panel: rgba(7, 18, 42, 0.88);
  --panel-soft: rgba(9, 25, 53, 0.74);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(247, 211, 106, 0.35);
  --text: #eaf2ff;
  --muted: #b8c7e6;
  --gold: #f7d36a;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --max: 1140px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 18% -10%, rgba(42, 171, 238, 0.18), transparent 58%),
    radial-gradient(920px 520px at 82% 6%, rgba(247, 211, 106, 0.16), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 52%, #07122a 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.7;
}

body::before {
  top: 14%;
  left: -120px;
  width: 280px;
  height: 280px;
  background: rgba(42, 171, 238, 0.12);
}

body::after {
  right: -60px;
  bottom: 14%;
  width: 240px;
  height: 240px;
  background: rgba(247, 211, 106, 0.1);
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: #fff1bd;
}

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

code {
  padding: 0.18em 0.42em;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffe9a8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(5, 12, 24, 0.92);
  color: var(--text);
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.container {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 12, 24, 0.74);
  backdrop-filter: blur(18px);
}

.topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.crest {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(12px 12px at 30% 25%, rgba(255, 255, 255, 0.25), transparent 60%),
    linear-gradient(135deg, rgba(42, 171, 238, 0.36), rgba(247, 211, 106, 0.18));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.crest img {
  width: 100%;
  height: 100%;
}

.brand__name {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.brand__name strong {
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand__name span {
  font-size: 12px;
  color: var(--muted);
}

.topbar__actions,
.hero__meta,
.footer__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.pill:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(247, 211, 106, 0.1);
  color: var(--text);
}

.pill.is-current {
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(247, 211, 106, 0.2), rgba(42, 171, 238, 0.12));
  color: var(--text);
}

.page {
  padding: 40px 0 80px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(10, 30, 61, 0.86), rgba(6, 15, 31, 0.96));
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(247, 211, 106, 0.18), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.lede {
  max-width: 52rem;
  margin: 8px 0;
  color: rgba(234, 242, 255, 0.88);
  font-size: 1.05rem;
  line-height: 1.75;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.toc,
.document,
.footer__card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.toc {
  position: sticky;
  top: 90px;
  padding: 22px;
}

.toc h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.toc p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.toc a {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--muted);
  line-height: 1.45;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.toc a:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.document {
  padding: 0 28px;
}

.document section {
  padding: 28px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.document section:last-child {
  border-bottom: 0;
}

.document h2 {
  margin: 0 0 16px;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  line-height: 1.2;
}

.document p,
.document li {
  margin: 0;
  color: rgba(234, 242, 255, 0.93);
  font-size: 1rem;
  line-height: 1.8;
}

.document p + p,
.document p + ul,
.document ul + p {
  margin-top: 14px;
}

.document ul {
  margin: 14px 0 0;
  padding-left: 1.3rem;
}

.document li + li {
  margin-top: 10px;
}

.document strong {
  color: #fff4c8;
}

.document em {
  color: #dfe7ff;
}

.document a {
  text-decoration: underline;
  text-decoration-color: rgba(247, 211, 106, 0.45);
  text-underline-offset: 0.18em;
}

.footer {
  padding-bottom: 40px;
}

.footer__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 22px 24px;
  background: var(--panel-soft);
}

.footer__copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.footer__copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

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

@media (max-width: 640px) {
  .container {
    width: min(var(--max), calc(100% - 20px));
  }

  .topbar__row {
    align-items: flex-start;
  }

  .hero {
    padding: 24px;
    border-radius: 24px;
  }

  .document {
    padding: 0 20px;
  }

  .document section {
    padding: 22px 0;
  }

  .pill {
    min-height: 40px;
    padding: 9px 13px;
    font-size: 13px;
  }
}
