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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #fff;
  color: #334155;
  line-height: 1.6;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0f172a;
  color: white;
  padding: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #1e293b;
}

.sidebar-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  background: #3b82f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.sidebar-title { font-size: 18px; font-weight: 600; }
.sidebar-version { font-size: 11px; background: #1e293b; padding: 2px 8px; border-radius: 4px; color: #94a3b8; }

.sidebar-nav { padding: 16px 0; }
.nav-section { margin-bottom: 24px; }
.nav-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #64748b; padding: 0 20px; margin-bottom: 8px; }
.nav-links { list-style: none; }
.nav-links a { display: block; padding: 8px 20px; color: #cbd5e1; text-decoration: none; font-size: 14px; }
.nav-links a:hover { background: #1e293b; color: white; }
.nav-links a.active { background: #3b82f6; color: white; }

.main-content {
  padding: 40px;
  background: #fff;
  overflow-y: auto;
}

.content-wrapper { max-width: 900px; }

.doc-section h1 { font-size: 32px; font-weight: 700; color: #0f172a; margin-bottom: 12px; }
.lead { font-size: 18px; color: #64748b; margin-bottom: 32px; }

h2 { font-size: 22px; font-weight: 600; color: #0f172a; margin: 32px 0 16px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
h3 { font-size: 16px; font-weight: 600; color: #0f172a; margin: 24px 0 12px; }
p { margin-bottom: 16px; }
ul, ol { margin-bottom: 16px; padding-left: 24px; }
li { margin-bottom: 8px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin: 24px 0; }
.feature-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 24px; }
.feature-card:hover { border-color: #3b82f6; }
.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h4 { font-size: 16px; font-weight: 600; color: #0f172a; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: #64748b; margin: 0; }

.rule-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.rule-card h3 { margin-top: 0; border: none; padding: 0; }

.info-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.info-table th { background: #0f172a; color: white; font-weight: 600; text-align: left; padding: 12px 16px; }
.info-table th:first-child { border-radius: 8px 0 0 0; }
.info-table th:last-child { border-radius: 0 8px 0 0; }
.info-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; }
.info-table tr:nth-child(even) { background: #f8fafc; }
.info-table code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 13px; }

.flow-diagram { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 24px 0; padding: 20px; background: #f8fafc; border-radius: 12px; }
.flow-step { background: white; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 16px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.flow-step span { background: #3b82f6; color: white; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.flow-arrow { color: #94a3b8; font-size: 18px; }

pre { background: #0f172a; color: #e2e8f0; padding: 20px; border-radius: 12px; overflow-x: auto; margin: 16px 0; font-family: 'JetBrains Mono', monospace; font-size: 13px; }
code { font-family: 'JetBrains Mono', monospace; }

.callout { padding: 16px 20px; border-radius: 8px; margin: 16px 0; font-size: 14px; }
.callout.info { background: #eff6ff; border-left: 4px solid #3b82f6; }
.callout.warning { background: #fffbeb; border-left: 4px solid #f59e0b; }

.changelog { margin: 24px 0; }
.changelog-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.badge { font-size: 10px; font-weight: 600; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; white-space: nowrap; }
.badge.new { background: #dcfce7; color: #166534; }
.badge.improved { background: #dbeafe; color: #1e40af; }

.mobile-nav-toggle, .sidebar-overlay { display: none; }

@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 20px; }
}
