/* Docs-style minimal theme (discord.js-docs-inspired): dark, sidebar + content. */
:root {
  color-scheme: dark;
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-2: #222636;
  --border: #2d3143;
  --text: #e2e4e9;
  --muted: #8b8fa3;
  --accent: #5b8cff;
  --accent-soft: rgba(91, 140, 255, 0.12);
  --code-bg: #222636;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Inter,
    sans-serif;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* -- Top bar ---------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem 1.25rem;
  background: rgba(15, 17, 23, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand span {
  color: var(--muted);
  font-weight: 400;
}

/* -- Layout ------------------------------------------------------------ */
.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  align-items: start;
  flex: 1;
}

.sidebar {
  position: sticky;
  top: 57px;
  max-height: calc(100vh - 57px);
  overflow-y: auto;
  padding: 1.5rem 1rem 2rem 1.25rem;
  border-right: 1px solid var(--border);
  font-size: 0.9rem;
}

.sidebar h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 1.25rem 0 0.4rem;
}

.sidebar h3:first-child {
  margin-top: 0;
}

.sidebar h3 a {
  color: inherit;
  text-decoration: none;
}

.sidebar h3 a:hover {
  color: var(--text);
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li {
  margin: 0.15rem 0;
}

.sidebar a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.sidebar a:hover {
  color: var(--text);
  background: var(--surface);
}

.sidebar a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.content {
  padding: 2.5rem 2.5rem 4rem;
  max-width: 78ch;
}

.crumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

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

h1 {
  font-size: 1.9rem;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.2rem;
  margin: 2em 0 0.5em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border);
}

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

.small {
  font-size: 0.85rem;
}

ul.body-list {
  padding-left: 1.4em;
}

ul.body-list li {
  margin: 0.35em 0;
}

code {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}

a {
  color: var(--accent);
}

footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

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

  .sidebar {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
  }

  .content {
    padding: 1.5rem 1.25rem 3rem;
  }
}
