/* ==========================================================================
   Zenith DSL Documentation — Modern, Sober, Developer-First Stylesheet
   Pure neutral zinc palette, high contrast, clean typography, zero neon glow.
   ========================================================================== */

:root {
  --bg-app: #09090b;
  --bg-sidebar: #0d0d11;
  --bg-surface: #141418;
  --bg-surface-hover: #1c1c22;
  --bg-code: #0b0b0e;
  
  --border-muted: #27272a;
  --border-subtle: #1e1e24;
  --border-active: #3f3f46;

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-dim: #52525b;

  --accent: #3b82f6;
  --accent-muted: rgba(59, 130, 246, 0.12);
  --accent-text: #60a5fa;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, "Courier New", monospace;

  --header-height: 56px;
  --sidebar-width: 270px;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-app);
}

/* Header */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  color: var(--text-secondary);
}

.badge-pro-pill {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  letter-spacing: 0.6px;
  vertical-align: middle;
  display: inline-block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap svg {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 12px;
  padding: 6px 12px 6px 32px;
  width: 210px;
  transition: all 0.15s ease;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
  background: var(--bg-app);
}

.btn-github {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-github:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-active);
}

/* Layout */
.docs-layout {
  display: flex;
  flex: 1;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* Sidebar */
.docs-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 24px 16px;
  border-right: 1px solid var(--border-muted);
  background: var(--bg-sidebar);
}

.docs-sidebar::-webkit-scrollbar {
  width: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-muted);
  border-radius: 2px;
}

.sidebar-category {
  margin-bottom: 24px;
}

.category-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 8px;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.12s ease;
  line-height: 1.4;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.sidebar-link.active {
  color: var(--accent-text);
  background: var(--accent-muted);
  font-weight: 500;
}

/* Main Content Area */
.docs-main {
  flex: 1;
  min-width: 0;
  padding: 36px 48px 80px 48px;
  max-width: 960px;
}

/* Typography */
h1.docs-page-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.docs-lead {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

h2.section-heading {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  scroll-margin-top: 76px;
}

h3.sub-heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 8px;
  scroll-margin-top: 76px;
}

p {
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.65;
  margin-bottom: 14px;
}

ul, ol {
  margin-bottom: 16px;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 13.5px;
}

li {
  margin-bottom: 6px;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Inline Code */
code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  padding: 2px 5px;
  border-radius: 4px;
  color: #e4e4e7;
}

/* Code Blocks */
.code-block-wrap {
  position: relative;
  background: var(--bg-code);
  border: 1px solid var(--border-muted);
  border-radius: 8px;
  margin: 14px 0 24px 0;
  overflow: hidden;
}

.code-block-header {
  height: 32px;
  background: #111115;
  border-bottom: 1px solid var(--border-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.code-block-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.code-copy-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-family: var(--font-sans);
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.12s ease;
}

.code-copy-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

pre.code-content {
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
  color: #e4e4e7;
}

pre.code-content code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* Syntax Highlighting */
.syn-kw { color: #93c5fd; font-weight: 600; }     /* Keyword (config, model, enum) */
.syn-type { color: #6ee7b7; }                     /* Type (String, Int, UUID) */
.syn-str { color: #fde047; }                      /* String literal */
.syn-num { color: #fca5a5; }                      /* Number */
.syn-ann { color: #c084fc; font-weight: 500; }    /* Annotation (@id, @relation) */
.syn-com { color: #64748b; font-style: italic; }  /* Comment */
.syn-prop { color: #e4e4e7; }                     /* Property identifier */
.syn-fn { color: #38bdf8; }                       /* Function (notify, create) */

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 14px 0 24px 0;
  border: 1px solid var(--border-muted);
  border-radius: 8px;
  background: var(--bg-surface);
}

table.docs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

table.docs-table th {
  background: #111115;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-muted);
  font-size: 12px;
}

table.docs-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  line-height: 1.5;
}

table.docs-table tr:last-child td {
  border-bottom: none;
}

table.docs-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

/* Callout Box */
.callout {
  padding: 12px 16px;
  border-radius: 6px;
  margin: 16px 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  border-left: 3px solid var(--accent);
  font-size: 13px;
  line-height: 1.5;
}

.callout strong {
  color: var(--accent-text);
}

.callout p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* Quick Navigation Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 20px 0 32px 0;
}

.feature-pill-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  border-radius: 8px;
  padding: 14px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease;
}

.feature-pill-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-active);
  transform: translateY(-1px);
}

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

.pill-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 900px) {
  .docs-sidebar {
    display: none;
  }
  .docs-main {
    padding: 24px 20px 60px 20px;
  }
}
