:root {
  color-scheme: dark;
  --bg: #0f1115;
  --panel: #161a21;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --line: #2f3440;
  --mint: #6fe7b7;
  --gold: #f0c45a;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  margin: 0;
}

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

.topbar {
  align-items: center;
  background: rgba(15, 17, 21, 0.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand,
.topnav {
  align-items: center;
  display: flex;
  gap: 0.85rem;
}

.brand {
  font-weight: 800;
}

.brand-mark {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.topnav a,
.sidebar a {
  color: var(--muted);
}

.topnav a:hover,
.sidebar a:hover,
.sidebar a[aria-current="page"] {
  color: var(--text);
}

.sidebar a[aria-current="page"] {
  font-weight: 700;
}

.shell {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  min-height: calc(100vh - 4.1rem);
}

.sidebar {
  border-right: 1px solid var(--line);
  padding: 2rem clamp(1rem, 3vw, 2rem);
}

.nav-section {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.6rem;
}

.nav-section p {
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
}

.content {
  max-width: 54rem;
  padding: clamp(2rem, 5vw, 4rem);
}

h1,
h2,
h3 {
  line-height: 1.16;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin-top: 0;
}

h2 {
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
  padding-top: 2rem;
}

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

strong {
  color: var(--text);
}

code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--gold);
  padding: 0.1rem 0.32rem;
}

pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  padding: 1rem;
}

pre code {
  background: transparent;
  color: var(--text);
  padding: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

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

@media (max-width: 820px) {
  .topbar,
  .shell {
    display: block;
  }

  .topnav {
    margin-top: 0.85rem;
  }

  .sidebar {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }
}
