*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #ffffff;
  --surface:   #f7f8fa;
  --surface2:  #eef0f3;
  --border:    #e4e6ea;
  --border2:   #d0d3d9;
  --accent:    #2563eb;
  --accent-bg: #eff6ff;
  --text:      #111827;
  --muted:     #6b7280;
  --muted2:    #9ca3af;
  --green:     #16a34a;
  --green-bg:  #f0fdf4;
  --yellow:    #b45309;
  --yellow-bg: #fffbeb;
  --radius:    8px;
  --sidebar-w: 240px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ── TOPBAR ──────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-family: "DM Sans", sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: .02em;
}
.logo:hover { text-decoration: none; }

.topbar-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-links a {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color .15s, background .15s;
  text-decoration: none;
}
.topbar-links a:hover { color: var(--text); background: var(--surface); text-decoration: none; }

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border-radius: 6px;
}
.nav-cta:hover { background: #1d4ed8 !important; text-decoration: none; }

/* ── LAYOUT ──────────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: calc(100vh - 56px);
}

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 24px 12px 40px;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  background: var(--surface);
}

.sidebar-group { margin-bottom: 20px; }

.sg-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted2);
  padding: 4px 10px 6px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
  transition: color .12s, background .12s;
  text-decoration: none;
}
.sidebar a:hover { color: var(--text); background: var(--surface2); text-decoration: none; }
.sidebar a.active {
  color: var(--accent);
  background: var(--accent-bg);
  font-weight: 600;
}

/* ── CONTENT ─────────────────────────────────────────────────── */
.content {
  flex: 1;
  padding: 48px 60px 80px;
  max-width: 800px;
  min-width: 0;
}

.page-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.6px;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.2;
}

.lead {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 40px;
  line-height: 1.65;
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
}

h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.25px;
  color: var(--text);
  margin: 40px 0 12px;
  padding-top: 8px;
}

h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 8px;
}

p { color: var(--muted); margin-bottom: 14px; }
strong { color: var(--text); font-weight: 600; }
em { color: var(--text); }

ul, ol { padding-left: 20px; margin-bottom: 14px; color: var(--muted); }
li { margin-bottom: 5px; }
li strong { color: var(--text); }

/* ── CODE ────────────────────────────────────────────────────── */
code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: .84em;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent);
  white-space: nowrap;
}

pre {
  background: #1e2433;
  border-radius: var(--radius);
  padding: 18px 22px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #e2e8f0;
  margin: 16px 0 24px;
  border: 1px solid #2d3748;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  white-space: pre;
}

/* ── CALLOUTS ────────────────────────────────────────────────── */
.callout {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 20px 0 24px;
  font-size: 13.5px;
  line-height: 1.6;
  border: 1px solid;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.callout::before { flex-shrink: 0; font-size: 15px; margin-top: 1px; }

.callout-accent {
  background: var(--accent-bg);
  border-color: #bfdbfe;
  color: #1e40af;
}
.callout-accent::before { content: 'ℹ️'; }

.callout-warn {
  background: var(--yellow-bg);
  border-color: #fde68a;
  color: var(--yellow);
}
.callout-warn::before { content: '⚠️'; }

.callout-info {
  background: var(--green-bg);
  border-color: #bbf7d0;
  color: var(--green);
}
.callout-info::before { content: '✅'; }

/* ── DOC CARDS ───────────────────────────────────────────────── */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 20px 0 32px;
}

.doc-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color .15s, box-shadow .15s;
  text-decoration: none;
  color: var(--text);
}
.doc-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
  text-decoration: none;
  color: var(--text);
}
.doc-card .dc-icon { font-size: 20px; flex-shrink: 0; line-height: 1; margin-top: 1px; }
.doc-card strong { display: block; font-size: 13.5px; margin-bottom: 2px; color: var(--text); }
.doc-card p { font-size: 12px; color: var(--muted); margin: 0; }

/* ── STEPS ───────────────────────────────────────────────────── */
.steps-doc { margin: 16px 0 24px; display: flex; flex-direction: column; gap: 8px; }
.step-doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 14px;
  color: var(--muted);
}
.step-n {
  width: 26px; height: 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

/* ── TABLE ───────────────────────────────────────────────────── */
.opt-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 24px;
  font-size: 13.5px;
}
.opt-table thead tr {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
}
.opt-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.opt-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  color: var(--muted);
  vertical-align: top;
}
.opt-table td:first-child { color: var(--text); font-weight: 500; }
.opt-table tr:last-child td { border-bottom: none; }
.opt-table tr:hover td { background: var(--surface); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .content { padding: 28px 18px 60px; max-width: 100%; }
  h1 { font-size: 24px; }
  .topbar { padding: 0 16px; }
}
