:root {
  --bg: #14171c;
  --bg-elevated: #1a1e25;
  --bg-sidebar: #11141a;
  --border: #262b34;
  --text: #d7dbe2;
  --text-dim: #8b929e;
  --text-bright: #f3f5f7;
  --accent: #e8a33d;
  --accent-dim: #b97f2c;
  --accent-soft: rgba(232, 163, 61, 0.12);
  --code-bg: #1d2128;
  --green: #6fbf73;
  --blue: #6fa8d6;
  --radius: 6px;
  --sidebar-width: 280px;
  --content-max: 760px;
}

* {
  box-sizing: border-box;
}

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

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

a:hover {
  text-decoration: underline;
}

code, pre, .mono {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15em 0.45em;
  font-size: 0.88em;
  color: var(--accent);
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
}

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

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

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

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand .mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #1a1208;
  flex-shrink: 0;
}

.sidebar-brand .name {
  font-weight: 600;
  color: var(--text-bright);
  font-size: 15px;
}

.sidebar-search {
  margin: 14px 16px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--text-dim);
  font-size: 13px;
}

.sidebar-section {
  padding: 0 12px;
}

.sidebar-section + .sidebar-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.sidebar-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 4px 12px;
  margin-bottom: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 500;
}

.sidebar-link:hover {
  background: var(--bg-elevated);
  color: var(--text-bright);
  text-decoration: none;
}

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

.sidebar-link .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.sidebar-link.active .dot {
  background: var(--accent);
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.content {
  max-width: var(--content-max);
  width: 100%;
  padding: 56px 40px 100px;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 18px;
}

h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-bright);
  margin: 40px 0 14px;
  padding-top: 6px;
}

h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-bright);
  margin: 28px 0 10px;
}

p {
  margin: 0 0 16px;
  color: var(--text);
}

.lead {
  font-size: 16.5px;
  color: var(--text-dim);
  margin-bottom: 28px;
}

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

li {
  margin-bottom: 6px;
}

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 14px;
}

.callout.warn {
  border-left-color: #d6766f;
}

.callout.info {
  border-left-color: var(--blue);
}

.callout .callout-title {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  color: var(--text-bright);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0;
}

.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--bg-elevated);
}

.card:hover {
  border-color: var(--accent-dim);
  text-decoration: none;
}

.card .card-title {
  font-weight: 600;
  color: var(--text-bright);
  font-size: 14px;
  margin-bottom: 4px;
}

.card .card-desc {
  font-size: 12.5px;
  color: var(--text-dim);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 13.5px;
}

th {
  text-align: left;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
}

td {
  border-bottom: 1px solid var(--border);
  padding: 9px 10px;
  vertical-align: top;
}

td code {
  white-space: nowrap;
}

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-left: 6px;
}

.pill.green {
  background: rgba(111, 191, 115, 0.14);
  color: var(--green);
}

.pill.blue {
  background: rgba(111, 168, 214, 0.14);
  color: var(--blue);
}

.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
}

.page-nav a {
  color: var(--text-dim);
}

.page-nav a:hover {
  color: var(--accent);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

@media (max-width: 860px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .content {
    padding: 32px 20px 60px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
}
