:root {
  /* Light Mode Palette */
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-tertiary: #eaeef2;
  --border-color: #d0d7de;
  --text-primary: #1f2328;
  --text-secondary: #656d76;
  --text-muted: #8c959f;
  --accent-color: #0969da;
  --accent-hover: #0550ae;
  --accent-glow: rgba(9, 105, 218, 0.08);
  --success-color: #1a7f37;
  --code-bg: #f6f8fa;
  --font-sans: 'Google Sans Code', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-mono: 'Google Sans Code', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sidebar-width: 290px;
}

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

body {
  font-family: var(--font-mono);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 14px;
  overflow-x: hidden;
}


/* Header & Mobile Navbar */
.mobile-header {
  display: none;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 18px;
  position: sticky;
  top: 0;
  z-index: 100;
  align-items: center;
  justify-content: space-between;
}

.hamburger-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 17px;
}

/* Layout */
.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border-color);
}

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

.brand-logo {
  font-size: 26px;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 6px 12px;
  margin-bottom: 4px;
}

.nav-link {
  display: block;
  padding: 6px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12.5px;
  border-radius: 6px;
  transition: all 0.15s ease;
  font-weight: 500;
}

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

.nav-link.active {
  color: var(--accent-color);
  background-color: var(--accent-glow);
  font-weight: 600;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-color);
}

.github-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.github-link:hover {
  color: var(--accent-color);
}

/* Content Area */
.content-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  padding: 48px 40px;
  display: flex;
  justify-content: center;
}

.content-container {
  max-width: 860px;
  width: 100%;
}

/* Hero Section */
.hero-header {
  padding-bottom: 32px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border-color);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.badge {
  font-size: 11.5px;
  font-weight: 600;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.badge-accent {
  background-color: var(--accent-glow);
  color: var(--accent-color);
  border-color: rgba(9, 105, 218, 0.3);
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.3;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Sections */
.doc-section {
  padding-top: 28px;
  margin-bottom: 44px;
  scroll-margin-top: 30px;
}

h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

h3 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 22px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

p {
  margin-bottom: 15px;
  color: #333a41;
  font-size: 14px;
}


ul, ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
  color: #333a41;
}

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

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

a:hover {
  text-decoration: underline;
}

/* Code Blocks & Inline Code */
code,
pre,
pre[class*="language-"],
code[class*="language-"],
.token {
  font-family: 'Google Sans Code', ui-monospace, monospace !important;
}

code:not([class*="language-"]) {
  font-size: 13.5px;
  background-color: var(--bg-secondary);
  color: #0969da;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

pre[class*="language-"] {
  font-size: 13.5px !important;
  background-color: #f6f8fa !important;
  border: 1px solid #d0d7de !important;
  border-radius: 8px !important;
  padding: 16px !important;
  margin-bottom: 20px !important;
  overflow-x: auto;
  color: #1f2328 !important;
}

/* High-Contrast Syntax Colors */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #57606a !important;
  font-style: italic;
}

.token.keyword,
.token.operator {
  color: #cf222e !important;
  font-weight: 600;
}

.token.string,
.token.char,
.token.attr-value {
  color: #0a3069 !important;
}

.token.function,
.token.class-name {
  color: #8250df !important;
  font-weight: 600;
}

.token.number,
.token.boolean {
  color: #0550ae !important;
  font-weight: 600;
}

.token.punctuation {
  color: #24292f !important;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
  color: #0550ae !important;
}

.token.variable,
.token.parameter {
  color: #953800 !important;
}



.architecture-diagram pre {
  background-color: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.4;
  color: #0969da;
  margin-bottom: 24px;
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

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

th {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: #333a41;
}

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

tr:nth-child(even) td {
  background-color: rgba(246, 248, 250, 0.6);
}

/* Callout Banners */
.callout {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.callout-info {
  background-color: rgba(9, 105, 218, 0.06);
  border-left: 4px solid var(--accent-color);
  color: #1f2328;
}

.callout-success {
  background-color: rgba(26, 127, 55, 0.08);
  border-left: 4px solid var(--success-color);
  color: #1f2328;
}

/* FAQ Items */
.faq-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 14px;
}

.faq-item h3 {
  margin-top: 0;
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.faq-item p {
  margin-bottom: 0;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 900px) {
  .mobile-header {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }

  .content-wrapper {
    margin-left: 0;
    padding: 30px 20px;
  }

  .hero-title {
    font-size: 26px;
  }
}
