:root {
  --bg: #0c0f14;
  --bg-elevated: #141a22;
  --bg-card: #1a222d;
  --border: #2a3544;
  --text: #e8edf4;
  --text-muted: #94a3b8;
  --accent: #22c55e;
  --accent-dim: #16a34a33;
  --link: #4ade80;
  --code-bg: #0d1117;
  --warn: #fbbf24;
  --danger: #f87171;
  --sidebar-w: 260px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.sidebar-brand h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.sidebar-brand span {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.sidebar nav section {
  margin-bottom: 1.25rem;
}

.sidebar nav h2 {
  margin: 0 0 0.35rem;
  padding: 0 1.25rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

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

.sidebar nav li a {
  display: block;
  padding: 0.4rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-left: 2px solid transparent;
}

.sidebar nav li a:hover,
.sidebar nav li a.active {
  color: var(--text);
  background: rgba(34, 197, 94, 0.08);
  border-left-color: var(--accent);
  text-decoration: none;
}

.main {
  flex: 1;
  padding: 2rem 2.5rem 4rem;
  max-width: 900px;
}

.main h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.main .lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
}

.main h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.main h2:first-of-type {
  border-top: none;
  margin-top: 0;
}

.main h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}

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

.main li strong {
  color: var(--text);
}

.main ul,
.main ol {
  padding-left: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
}

.card h3 {
  margin-top: 0;
}

.card .path {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0;
}

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

th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td code {
  font-size: 0.8rem;
}

code,
pre {
  font-family: var(--mono);
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.5;
}

:not(pre) > code {
  background: var(--code-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
}

.callout.warn {
  border-left-color: var(--warn);
  background: rgba(251, 191, 36, 0.1);
}

.callout.danger {
  border-left-color: var(--danger);
  background: rgba(248, 113, 113, 0.1);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .main {
    padding: 1.5rem;
  }
}

/* CTA link buttons used at the bottom of long pages. */
.cta {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent-dim);
  transition: background 120ms ease, color 120ms ease;
}

.cta:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}
