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

:root {
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --blue-light: #eff6ff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --red: #ef4444;
  --green: #22c55e;
  --yellow: #f59e0b;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--slate-50);
  color: var(--slate-700);
  line-height: 1.6;
  font-size: 15px;
}

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

/* ── NAV ─────────────────────────────────────────── */
nav {
  background: #fff;
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--slate-900);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand .icon {
  width: 32px;
  height: 32px;
  background: var(--blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
}
.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: 6px;
  color: var(--slate-600);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.nav-links a:hover { background: var(--slate-100); color: var(--slate-900); }
.nav-links a.active { background: var(--blue-light); color: var(--blue-dark); }
.nav-github {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-600);
  padding: 6px 12px;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.nav-github:hover { border-color: var(--slate-400); color: var(--slate-900); text-decoration: none; }

/* ── PAGE LAYOUT ─────────────────────────────────── */
.page { max-width: 1100px; margin: 0 auto; padding: 0 24px 80px; }

/* ── HERO ────────────────────────────────────────── */
.hero {
  padding: 72px 0 64px;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: 48px;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -.02em;
}
.hero h1 span { color: var(--blue); }
.hero p {
  font-size: 18px;
  color: var(--slate-500);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  border: none;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 2px rgba(59,130,246,.3);
}
.btn-primary:hover { background: var(--blue-dark); text-decoration: none; color: #fff; }
.btn-outline {
  background: #fff;
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow);
}
.btn-outline:hover { border-color: var(--slate-300); color: var(--slate-900); text-decoration: none; }

/* ── FEATURE GRID ────────────────────────────────── */
.section { margin-top: 64px; }
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}
.section-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 10px;
  letter-spacing: -.01em;
}
.section-sub {
  color: var(--slate-500);
  font-size: 16px;
  max-width: 520px;
  margin-bottom: 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, border-color .15s;
}
.feature-card:hover { box-shadow: var(--shadow-md); border-color: var(--slate-300); }
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
}
.feature-card h3 { font-size: 15px; font-weight: 700; color: var(--slate-900); margin-bottom: 6px; }
.feature-card p  { font-size: 13px; color: var(--slate-500); line-height: 1.6; }

/* ── STEPS / GUIDE ───────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  position: relative;
}
.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 48px;
  width: 2px;
  height: calc(100% - 16px);
  background: var(--slate-200);
}
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--blue-light);
}
.step-body { padding-bottom: 40px; }
.step-body h3 { font-size: 17px; font-weight: 700; color: var(--slate-900); margin-bottom: 8px; padding-top: 10px; }
.step-body p  { color: var(--slate-500); font-size: 14px; }
.step-body ul { margin-top: 8px; padding-left: 18px; }
.step-body li { color: var(--slate-500); font-size: 14px; margin-bottom: 4px; }

/* ── CONTENT PAGE (guide) ────────────────────────── */
.content-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding-top: 40px;
}
.sidebar-toc {
  position: sticky;
  top: 80px;
  align-self: start;
}
.sidebar-toc h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate-400);
  margin-bottom: 10px;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 2px; }
.toc-list a {
  display: block;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--slate-500);
  text-decoration: none;
  transition: background .12s, color .12s;
}
.toc-list a:hover { background: var(--slate-100); color: var(--slate-900); }
.toc-list .toc-sub a { padding-left: 22px; font-size: 12px; }

.article h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--slate-900);
  margin: 48px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--slate-200);
  letter-spacing: -.01em;
}
.article h2:first-child { margin-top: 0; border-top: none; }
.article h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--slate-800);
  margin: 28px 0 8px;
}
.article p { color: var(--slate-600); margin-bottom: 12px; font-size: 14px; line-height: 1.75; }
.article ul, .article ol { padding-left: 20px; margin-bottom: 12px; }
.article li { color: var(--slate-600); font-size: 14px; margin-bottom: 5px; line-height: 1.65; }

/* ── CODE / KBD ──────────────────────────────────── */
code {
  background: var(--slate-100);
  color: var(--slate-800);
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--slate-200);
}
pre {
  background: var(--slate-900);
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 13px;
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  overflow-x: auto;
  margin: 12px 0 20px;
  line-height: 1.7;
}
pre code { background: none; border: none; color: inherit; padding: 0; font-size: inherit; }

kbd {
  display: inline-flex;
  align-items: center;
  background: var(--slate-100);
  border: 1px solid var(--slate-300);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 7px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-700);
  white-space: nowrap;
}

/* ── KEYBOARD SHORTCUTS TABLE ────────────────────── */
.shortcut-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 24px;
  font-size: 13px;
}
.shortcut-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--slate-200);
}
.shortcut-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-600);
}
.shortcut-table tr:last-child td { border-bottom: none; }
.shortcut-table td:first-child { white-space: nowrap; }

/* ── CALLOUT ─────────────────────────────────────── */
.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.65;
}
.callout-info { background: var(--blue-light); color: #1d4ed8; border-left: 3px solid var(--blue); }
.callout-warn { background: #fffbeb; color: #92400e; border-left: 3px solid var(--yellow); }
.callout-icon { font-size: 15px; flex-shrink: 0; }

/* ── FOOTER ──────────────────────────────────────── */
footer {
  background: var(--slate-900);
  color: var(--slate-400);
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  margin-top: 80px;
}
footer strong { color: var(--slate-200); }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .content-layout { grid-template-columns: 1fr; }
  .sidebar-toc { display: none; }
  .nav-github { display: none; }
}
