/* Handler Docs — shared styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: #0A0A0B; color: #FAFAFA; line-height: 1.7; }
.font-mono, code, pre { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
a { color: #22C55E; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.docs-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(10,10,11,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid #27272A; height: 56px;
}
.docs-nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 56px; display: flex; align-items: center; justify-content: space-between;
}
.docs-nav-logo { display: flex; align-items: center; gap: 10px; color: #FAFAFA; text-decoration: none; }
.docs-nav-logo span { font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 500; }
.docs-nav-links { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.docs-nav-links a { color: #71717A; font-size: 14px; text-decoration: none; transition: color 0.2s; }
.docs-nav-links a:hover, .docs-nav-links a.active { color: #FAFAFA; }
.docs-nav-cta {
  font-size: 12px; font-weight: 600; color: #0A0A0B; background: #FAFAFA;
  padding: 6px 16px; border-radius: 6px; text-decoration: none; transition: background 0.2s;
}
.docs-nav-cta:hover { background: rgba(250,250,250,0.85); text-decoration: none; }

/* Layout */
.docs-layout {
  display: flex; max-width: 1200px; margin: 0 auto; padding-top: 56px; min-height: 100vh;
}

/* Sidebar */
.docs-sidebar {
  width: 240px; flex-shrink: 0; padding: 32px 16px 32px 24px;
  position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto;
  border-right: 1px solid #1C1C1F;
}
.docs-sidebar-section { margin-bottom: 24px; }
.docs-sidebar-title {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: #71717A; margin-bottom: 8px; padding-left: 12px;
}
.docs-sidebar a {
  display: block; padding: 6px 12px; border-radius: 6px; font-size: 13px;
  color: #A1A1AA; text-decoration: none; transition: all 0.15s;
}
.docs-sidebar a:hover { color: #FAFAFA; background: #1C1C1F; }
.docs-sidebar a.active { color: #22C55E; background: rgba(34,197,94,0.08); }

/* Content */
.docs-content {
  flex: 1; min-width: 0; padding: 40px 48px 80px;
  max-width: 820px;
}
.docs-content h1 { font-size: 32px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.02em; line-height: 1.2; }
.docs-content h2 { font-size: 22px; font-weight: 600; margin-top: 48px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid #1C1C1F; }
.docs-content h3 { font-size: 17px; font-weight: 600; margin-top: 32px; margin-bottom: 12px; }
.docs-content p { margin-bottom: 16px; color: #D4D4D8; font-size: 15px; }
.docs-content ul, .docs-content ol { margin-bottom: 16px; padding-left: 24px; color: #D4D4D8; font-size: 15px; }
.docs-content li { margin-bottom: 6px; }
.docs-content strong { color: #FAFAFA; }
.docs-content .lead { font-size: 17px; color: #A1A1AA; margin-bottom: 32px; }

/* Code blocks */
pre {
  background: #141416; border: 1px solid #27272A; border-radius: 8px;
  padding: 16px 20px; margin-bottom: 20px; overflow-x: auto;
  font-size: 13px; line-height: 1.6;
}
code {
  font-size: 13px; background: #1C1C1F; padding: 2px 6px; border-radius: 4px;
}
pre code { background: none; padding: 0; }

/* Syntax colors */
.syn-kw { color: #C9D1D9; font-weight: 500; }
.syn-fn { color: #FAFAFA; }
.syn-str { color: #A5D6FF; }
.syn-num { color: #79C0FF; }
.syn-comment { color: #3F3F46; }
.syn-key { color: #C9D1D9; }
.syn-bool { color: #FF7B72; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 14px; }
th { text-align: left; padding: 10px 12px; border-bottom: 2px solid #27272A; color: #71717A; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
td { padding: 10px 12px; border-bottom: 1px solid #1C1C1F; color: #D4D4D8; }
tr:hover td { background: rgba(28,28,31,0.5); }

/* Badges */
.badge {
  display: inline-block; font-size: 11px; font-family: 'JetBrains Mono', monospace;
  padding: 2px 8px; border-radius: 4px; font-weight: 500;
}
.badge-green { color: #22C55E; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); }
.badge-amber { color: #F59E0B; background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2); }
.badge-red { color: #EF4444; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); }
.badge-dim { color: #71717A; background: #1C1C1F; border: 1px solid #27272A; }

/* Callouts */
.callout {
  padding: 16px 20px; border-radius: 8px; margin-bottom: 20px; font-size: 14px;
  border-left: 3px solid;
}
.callout-info { background: rgba(34,197,94,0.05); border-color: #22C55E; }
.callout-warn { background: rgba(245,158,11,0.05); border-color: #F59E0B; }
.callout-tip { background: rgba(59,130,246,0.05); border-color: #3B82F6; }

/* Cards grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.card {
  background: #141416; border: 1px solid #27272A; border-radius: 10px; padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: #3F3F46; transform: translateY(-1px); }
.card h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.card p { font-size: 13px; color: #71717A; margin-bottom: 0; }

/* Steps */
.steps { counter-reset: step; }
.step { display: flex; gap: 16px; margin-bottom: 24px; }
.step::before {
  counter-increment: step; content: counter(step);
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2);
  color: #22C55E; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.step-content { flex: 1; }
.step-content h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.step-content p { font-size: 14px; color: #A1A1AA; margin-bottom: 8px; }

/* Mobile hamburger for sidebar */
.docs-sidebar-toggle {
  display: none; position: fixed; bottom: 20px; right: 20px; z-index: 60;
  width: 48px; height: 48px; border-radius: 50%; background: #22C55E; border: none;
  color: #0A0A0B; cursor: pointer; font-size: 20px;
  box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #27272A; border-radius: 3px; }

/* Responsive */
@media (max-width: 768px) {
  .docs-sidebar {
    position: fixed; left: -260px; top: 56px; bottom: 0; width: 260px;
    z-index: 55; background: #0A0A0B; border-right: 1px solid #27272A;
    transition: left 0.25s ease;
  }
  .docs-sidebar.open { left: 0; }
  .docs-sidebar-toggle { display: flex; align-items: center; justify-content: center; }
  .docs-sidebar-overlay {
    display: none; position: fixed; inset: 0; z-index: 54;
    background: rgba(0,0,0,0.5); top: 56px;
  }
  .docs-sidebar.open + .docs-sidebar-overlay { display: block; }
  .docs-content { padding: 24px 20px 80px; }
  .docs-content h1 { font-size: 26px; }
  .docs-content h2 { font-size: 20px; }
  .docs-nav-links { gap: 16px; }
  .docs-nav-links a { font-size: 13px; }
  .card-grid { grid-template-columns: 1fr; }
  pre { font-size: 12px; padding: 12px 14px; }
}
