:root {
  color-scheme: dark;
  --bg: #0f1117;
  --panel: #171a23;
  --panel-soft: #1f2330;
  --text: #f4f7fb;
  --muted: #a9b1c3;
  --line: #2b3142;
  --accent: #5865f2;
  --accent-2: #23c7a4;
  --warning: #f0b85a;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(88, 101, 242, 0.22), transparent 34rem),
    linear-gradient(180deg, #111420 0%, var(--bg) 42rem);
  color: var(--text);
  line-height: 1.7;
}

a {
  color: inherit;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.topbar {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand,
.support-link {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 10px 26px rgba(88, 101, 242, 0.28);
}

.support-link {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.support-link:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(88, 101, 242, 0.12);
}

.hero {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 64px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2 {
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
}

.hero-text {
  max-width: 780px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.meta-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 820px;
}

.meta-grid span {
  display: block;
  border: 1px solid var(--line);
  background: rgba(23, 26, 35, 0.72);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--muted);
}

.meta-grid strong {
  color: var(--text);
}

.content {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
}

.toc {
  position: sticky;
  top: 20px;
  align-self: start;
  border: 1px solid var(--line);
  background: rgba(23, 26, 35, 0.86);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.toc a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.95rem;
}

.toc a:hover {
  color: var(--text);
  background: var(--panel-soft);
}

.document {
  min-width: 0;
}

.section {
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(23, 26, 35, 0.78);
  border-radius: 8px;
  margin-bottom: 18px;
}

.section h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.section p {
  margin: 0 0 14px;
  color: var(--muted);
}

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

ul {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

li + li {
  margin-top: 8px;
}

.section a,
.footer a {
  color: #dbe1ff;
  text-decoration-color: rgba(88, 101, 242, 0.65);
  text-underline-offset: 3px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  background: #0b0d12;
}

.footer p {
  margin: 4px 0;
}

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

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

@media (max-width: 620px) {
  .topbar {
    min-height: 64px;
  }

  .hero {
    padding: 48px 0;
  }

  .meta-grid,
  .toc {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 22px 18px;
  }
}
