/* Documentation page additions.
 *
 * This file is always loaded *after* styles.css, which owns the colour
 * variables. Do not redeclare :root here: an identical selector later in the
 * cascade wins outright, and doing so silently defeated the
 * prefers-color-scheme block and left the help page white in dark mode. */

.docs-hero {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  background:
    radial-gradient(50rem 24rem at 50% -10rem, var(--accent-soft), transparent 70%),
    var(--bg);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.docs-hero .container { max-width: 48rem; }
.docs-hero h1 { margin-bottom: 0.75rem; }
.docs-hero .lede { margin: 0 auto; }

.docs-layout {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: 3.5rem;
  padding-top: 3rem;
  padding-bottom: 4rem;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.docs-nav-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}
.docs-nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.3125rem 0.5rem;
  border-radius: var(--radius-sm);
}
.docs-nav a:hover {
  color: var(--text);
  background: var(--bg-elevated);
  text-decoration: none;
}

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .docs-nav { position: static; }
}

.docs-body { max-width: 44rem; }

.docs-body section {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 5.5rem;
}
.docs-body section:last-child { border-bottom: none; }

.docs-body h2 {
  font-size: 1.5rem;
  margin-bottom: 0.875rem;
}

.docs-body h3 {
  font-size: 1.0625rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.docs-body p { color: var(--text-muted); margin-bottom: 1rem; }
.docs-body ul,
.docs-body ol { color: var(--text-muted); margin: 0 0 1rem 1.25rem; }
.docs-body li { margin-bottom: 0.5rem; }
.docs-body strong { color: var(--text); }

.docs-body code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  word-break: break-word;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 0 0 1.25rem;
}
.docs-table th,
.docs-table td {
  text-align: left;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.docs-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.docs-table td:first-child { font-weight: 600; color: var(--text); white-space: nowrap; }

.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.875rem 1.125rem;
  margin: 1.25rem 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.callout strong { color: var(--text); }

.callout-warn {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: var(--warning);
}

/* Figure rules live in styles.css, which this page loads first. */
