:root {
  --bg: #0b1020;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-soft: rgba(30, 41, 59, 0.7);
  --border: rgba(148, 163, 184, 0.2);
  --text: #e5eefc;
  --muted: #9fb0cc;
  --accent: #67e8f9;
  --accent-soft: rgba(103, 232, 249, 0.14);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.15), transparent 28%),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.10), transparent 20%),
    linear-gradient(180deg, #020617 0%, #0f172a 100%);
  color: var(--text);
  line-height: 1.65;
}

.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(18px);
}

.sidebar__inner {
  height: 100%;
  overflow-y: auto;
  padding: 28px 18px 28px 24px;
}

.brand {
  margin-bottom: 24px;
}

.brand__tag,
.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand h1 {
  margin: 0 0 8px;
  font-size: 1.95rem;
  line-height: 1.05;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.toc {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc__link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: 0.22s ease;
  border: 1px solid transparent;
}

.toc__link:hover,
.toc__link.active {
  color: var(--text);
  background: rgba(30, 41, 59, 0.7);
  border-color: var(--border);
}

.toc__link--child {
  margin-left: 10px;
  font-size: 0.95rem;
}

.content {
  padding: 36px 48px 72px;
}

.section {
  scroll-margin-top: 24px;
  margin-bottom: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero {
  padding: 34px;
}

.hero h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
}

.lead {
  margin: 0;
  max-width: 850px;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero__cards,
.grid {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

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

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

.card,
.mini-card,
.note {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel-soft);
}

.card {
  padding: 20px;
}

.mini-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
}

.note {
  margin-top: 18px;
  padding: 16px 18px;
}

h2, h3, h4 {
  margin-top: 0;
}

h2 {
  font-size: 1.9rem;
  margin-bottom: 10px;
}

h3 {
  font-size: 1.45rem;
  margin-bottom: 14px;
}

h4 {
  font-size: 1.08rem;
  margin-bottom: 10px;
}

p, li {
  color: var(--text);
}

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

ul, ol {
  padding-left: 22px;
  margin: 0;
}

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

.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  background: rgba(15, 23, 42, 0.9);
}

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

th {
  background: rgba(30, 41, 59, 0.85);
}

tr:last-child td {
  border-bottom: none;
}

code, pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.9);
  color: #c4f1ff;
}

pre {
  margin: 0;
  white-space: pre-wrap;
}

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

.command-grid code {
  display: block;
  padding: 12px 14px;
}

.columns {
  column-count: 2;
  column-gap: 32px;
}

.columns li {
  break-inside: avoid;
  margin-bottom: 10px;
}

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

  .sidebar {
    position: sticky;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar__inner {
    height: auto;
    padding-bottom: 18px;
  }

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

  .toc__link--child {
    margin-left: 0;
  }

  .content {
    padding: 24px;
  }
}

@media (max-width: 820px) {
  .grid-2,
  .grid-3,
  .hero__cards,
  .command-grid,
  .toc {
    grid-template-columns: 1fr;
  }

  .section,
  .hero {
    padding: 20px;
    border-radius: 20px;
  }

  .columns {
    column-count: 1;
  }

  .content {
    padding: 16px;
  }
}
