/* ══════════════════════════════════════════════════════════════════
   No.JS Design System — 100% from design.pen
   Fonts: Space Grotesk (headings), Inter (body), JetBrains Mono (code)
   ══════════════════════════════════════════════════════════════════ */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ── Variables ── */
:root {
  --white: #FFFFFF;
  --surface: #F8FAFC;
  --surface-alt: #F1F5F9;
  --text: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-dim: #94A3B8;
  --primary: #0EA5E9;
  --primary-dark: #0284C7;
  --primary-light: #38BDF8;
  --primary-surface: #F0F9FF;
  --border: #E2E8F0;
  --code-bg: #0F172A;
  --code-surface: #1E293B;
  --error: #EF4444;
  --success: #22C55E;
  --warning: #F59E0B;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --header-h: 70px;
  --sidebar-w: 240px;

  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }

/* ══════════════════════════════════════════════════════════════════
   LAYOUT — PageHeader / Sidebar / Content / Footer
   ══════════════════════════════════════════════════════════════════ */

/* ── PageHeader: 70px, white, border-bottom #E2E8F0, padding 0 80px ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 80px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-img {
  height: 32px;
  width: auto;
}
.logo-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.logo-dot {
  color: var(--primary);
}
.header-version {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-bg, #F0F9FF);
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: 0.3px;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.header-nav a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.header-nav a:hover,
.header-nav a.active {
  color: var(--primary);
}
.header-nav .nav-cta {
  background: var(--primary);
  color: var(--white) !important;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.header-nav .nav-cta:hover {
  background: var(--primary-dark);
}
.github-link {
  display: flex;
  align-items: center;
}
.github-link svg {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.github-link:hover svg {
  color: var(--text);
}
.discord-link {
  display: flex;
  align-items: center;
  margin-left: 4px;
}
.discord-link svg {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.discord-link:hover svg {
  color: #5865F2;
}
/* ── Language Dropdown (Popover API) ── */
.lang-dropdown {
  position: relative;
  margin-left: 8px;
  anchor-name: --lang-anchor;
}
.lang-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.lang-dropdown-btn:hover {
  border-color: var(--primary);
  background: var(--primary-surface);
}
.lang-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
  color: var(--text-muted);
}
.lang-dropdown-menu {
  /* Popover resets */
  margin: 0;
  padding: 4px;
  border: 1px solid var(--border);
  /* Positioning */
  position: fixed;
  position-anchor: --lang-anchor;
  inset: unset;
  top: anchor(bottom);
  right: anchor(right);
  margin-top: 6px;
  /* Appearance */
  min-width: 160px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 100;
}
.lang-dropdown-menu:popover-open {
  animation: langFadeIn 0.15s ease;
}
@keyframes langFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lang-dropdown-menu::backdrop {
  background: transparent;
}
.lang-dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  background: none;
  border: none;
  width: 100%;
  font-family: inherit;
}
.lang-dropdown-menu button:hover {
  background: var(--primary-surface);
}
.lang-dropdown-menu button.active {
  color: var(--primary);
  background: var(--primary-surface);
  font-weight: 600;
}
/* ── Tools Dropdown (Popover API) ── */
.tools-dropdown {
  position: relative;
  anchor-name: --tools-anchor;
}
.tools-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: var(--text-muted);
  transition: color 0.2s;
}
.tools-dropdown-btn:hover {
  color: var(--primary);
}
.tools-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
  color: var(--text-muted);
}
.tools-dropdown-menu {
  /* Popover resets */
  margin: 0;
  padding: 4px;
  border: 1px solid var(--border);
  /* Positioning */
  position: fixed;
  position-anchor: --tools-anchor;
  inset: unset;
  top: anchor(bottom);
  right: anchor(right);
  margin-top: 6px;
  /* Appearance */
  min-width: 200px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 100;
}
.tools-dropdown-menu:popover-open {
  animation: toolsFadeIn 0.15s ease;
}
@keyframes toolsFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tools-dropdown-menu::backdrop {
  background: transparent;
}
.tools-option {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
}
.tools-option:hover {
  background: var(--primary-surface);
}
.tools-option-name {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.tools-option-desc {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}
/* ── Mobile Nav Group Label ── */
.mobile-nav-group-label {
  display: block;
  padding: 8px 12px 4px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}
/* ── Mobile Menu Button ── */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.mobile-menu-btn:hover {
  border-color: var(--primary);
  background: var(--primary-surface);
}
.mobile-menu-btn svg {
  width: 20px;
  height: 20px;
}
/* ── Mobile Nav Popover ── */
.mobile-nav {
  margin: 0;
  padding: 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  width: 100%;
  background: var(--bg, #fff);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav:popover-open {
  display: flex;
  animation: mobileNavIn 0.2s ease;
}
@keyframes mobileNavIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-nav::backdrop {
  background: rgba(0,0,0,.3);
}
.mobile-nav > a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.mobile-nav > a:hover,
.mobile-nav > a.active {
  background: var(--primary-surface);
  color: var(--primary);
}
.mobile-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.mobile-nav-row {
  display: flex;
  gap: 8px;
}
.mobile-nav-icon-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}
.mobile-nav-icon-link:hover {
  background: var(--primary-surface);
}
.mobile-nav-icon-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.mobile-nav-cta {
  display: block;
  text-align: center;
  background: var(--primary);
  color: var(--white) !important;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s;
}
.mobile-nav-cta:hover {
  background: var(--primary-dark);
}
.mobile-nav-lang {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.mobile-nav-lang button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  background: none;
  border: none;
  font-family: inherit;
}
.mobile-nav-lang button:hover {
  background: var(--primary-surface);
}
.mobile-nav-lang button.active {
  color: var(--primary);
  background: var(--primary-surface);
  font-weight: 600;
}

/* ── Content area ── */
.content {
  padding-top: var(--header-h);
  min-height: 100vh;
}

/* ── Footer (PageFooter: #0F172A bg) ── */
.footer {
  background: var(--code-bg);
  border-top: 1px solid var(--code-surface);
}
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 80px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}
.footer-brand {}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.footer-logo-img {
  height: 28px;
  filter: brightness(0) invert(1);
}
.footer-logo .logo-title {
  color: #F1F5F9;
}
.footer-desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dim);
  max-width: 300px;
  line-height: 1.6;
}
.footer-cols {
  display: flex;
  gap: 64px;
}
.footer-col {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}
.footer-col a {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.2s;
}
.footer-col a:hover {
  color: var(--white);
}
.footer-divider {
  height: 1px;
  background: var(--code-surface);
  margin: 32px 0;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════
   REUSABLE COMPONENTS (from design.pen Component Library)
   ══════════════════════════════════════════════════════════════════ */

/* ── Badge: rounded 100, #F0F9FF bg, Inter 13px 500, #0EA5E9 text ── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--primary-surface);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
}

/* ── HeroSection: #F8FAFC bg, center-aligned, padding 60/80, gap 20 ── */
.hero-section {
  background: var(--surface);
  padding: 60px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: bold;
  color: var(--text);
  text-align: center;
}
.hero-subtitle {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--text-muted);
  text-align: center;
  max-width: 600px;
}

/* ── SectionHeader: center-aligned, gap 16 ── */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: center;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: bold;
  color: var(--text);
  text-align: center;
}
.section-subtitle {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--text-muted);
  text-align: center;
}

/* ── FeatureCard: #F8FAFC bg, gap 16, padding 32, border #E2E8F0 ── */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.feature-card-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-surface);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 24px;
}
.feature-card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}
.feature-card-desc {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── CodeBlock: #0F172A bg, padding 24/28, JetBrains Mono 14px ── */
.code-block {
  background: var(--code-bg);
  border-radius: var(--radius);
  padding: 24px 28px;
  overflow: auto;
}
.code-block code,
.code-block pre {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  color: #E2E8F0;
  background: none;
  margin: 0;
  padding: 0;
}
.code-block .code-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
  display: block;
}
.code-block .code-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  margin-top: 16px;
}

/* Code inline */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--primary-dark);
}

/* ── HighlightItem: gap 10, center-aligned, icon + text ── */
.highlight-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.highlight-dot {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}
.highlight-text {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-secondary);
}

/* ── CTASection: #0F172A bg, padding 80, center, gap 20 ── */
.cta-section {
  background: var(--code-bg);
  padding: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.cta-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: bold;
  color: var(--white);
  text-align: center;
}
.cta-subtitle {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--text-dim);
  text-align: center;
}
.cta-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── InfoCallout: #F0F9FF bg, left border 3px #0EA5E9 ── */
.callout {
  background: var(--primary-surface);
  border-left: 3px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.callout p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── DocConceptCard: gap 8, padding 20/24, border #E2E8F0 ── */
.concept-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.concept-card-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.concept-card-desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  padding: 14px 32px;
  font-size: 16px;
}
.btn-primary:hover {
  background: var(--primary-dark);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--text-dim);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid #334155;
}
.btn-ghost:hover {
  border-color: var(--text-dim);
}
.btn-cta-primary {
  background: var(--primary);
  color: var(--white);
  padding: 16px 36px;
  font-size: 16px;
}
.btn-cta-primary:hover {
  background: var(--primary-dark);
}
.btn-cta-secondary {
  background: transparent;
  color: var(--white);
  padding: 16px 36px;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid #334155;
}
.btn-cta-secondary:hover {
  border-color: var(--text-dim);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Default button (unstyled <button> elements in docs) ── */
button:not([class]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
button:not([class]):hover {
  background: var(--primary-dark);
}
button:not([class]):active {
  transform: scale(0.97);
}
button:not([class]):disabled {
  background: var(--text-dim);
  color: var(--surface-alt);
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

/* ── Disabled state for .btn variants ── */
.btn:disabled,
.btn[disabled] {
  background: var(--text-dim);
  color: var(--surface-alt);
  border-color: transparent;
  cursor: not-allowed;
  opacity: 0.7;
  pointer-events: none;
}


/* ══════════════════════════════════════════════════════════════════
   SYNTAX HIGHLIGHTING (inside code blocks)
   ══════════════════════════════════════════════════════════════════ */
.hl-tag { color: #7DD3FC; }
.hl-attr { color: #FDE68A; }
.hl-str { color: #86EFAC; }
.hl-cmt { color: #64748B; font-style: italic; }
.hl-kw { color: #C4B5FD; }
.hl-fn { color: #FCA5A5; }
.hl-num { color: #FDE68A; }
.hl-op { color: #94A3B8; }
.hl-line-highlight { color: var(--primary); }


/* ══════════════════════════════════════════════════════════════════
   FORMS (used in live demos)
   ══════════════════════════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.form-error {
  font-size: 12px;
  color: var(--error);
}
.input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.input:focus {
  border-color: var(--primary);
}
.select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  outline: none;
  width: 100%;
}
.textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  resize: vertical;
  min-height: 80px;
  width: 100%;
}


/* ══════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════════════════════ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.text-center { text-align: center; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 18px; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.font-bold { font-weight: bold; }
.font-mono { font-family: var(--font-mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounded { border-radius: var(--radius); }
.border-t { border-top: 1px solid var(--border); }
.w-full { width: 100%; }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Scroll to Top Button (mobile) ── */
.scroll-top {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.scroll-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}
.scroll-top svg {
  width: 20px;
  height: 20px;
}

/* ══════════════════════════════════════════════════════════════════
   SIDEBAR NAVIGATION (used in docs, faq)
   ══════════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 24px 0;
  align-self: flex-start;
  position: sticky;
  top: var(--header-h);
  max-height: calc(100vh - var(--header-h));
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px;
}
.sidebar-group {
  margin-bottom: 16px;
}
.sidebar-group-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: bold;
  color: var(--text);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px 12px;
}
.sidebar-link {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: normal;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.sidebar-link:hover {
  color: var(--primary);
  background: var(--primary-surface);
}
.sidebar-link.active {
  color: var(--primary);
  font-weight: 500;
}
.sidebar-overlay {
  display: none;
}

/* ── Docs sub-route layout (sidebar + named outlet) ── */
.docs-layout-wrapper {
  display: none;
  padding-top: var(--header-h);
}
body:has(.docs-layout-wrapper .sidebar-link.active) .docs-layout-wrapper {
  display: block;
}
body:has(.docs-layout-wrapper .sidebar-link.active) > .content {
  display: none;
}
.docs-layout-wrapper .sidebar-skeleton {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  align-self: flex-start;
  position: sticky;
  top: var(--header-h);
  max-height: calc(100vh - var(--header-h));
  overflow: hidden;
}
.docs-layout-wrapper .sidebar-skeleton-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px;
}
.docs-layout-wrapper .skl-sidebar-group { margin-bottom: 16px; }
.docs-layout-wrapper .skl-sidebar-title {
  width: 55%; height: 11px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--border) 25%, #f1f5f9 50%, var(--border) 75%);
  background-size: 600px 100%;
  animation: skl-shimmer 1.5s infinite linear;
  border-radius: 4px;
}
.docs-layout-wrapper .skl-sidebar-link {
  width: 100%; height: 12px; margin-bottom: 6px;
  background: linear-gradient(90deg, var(--border) 25%, #f1f5f9 50%, var(--border) 75%);
  background-size: 600px 100%;
  animation: skl-shimmer 1.5s infinite linear;
  border-radius: 4px;
}
.docs-layout-wrapper .skl-sidebar-link.w85 { width: 85%; }
.docs-layout-wrapper .skl-sidebar-link.w75 { width: 75%; }
.docs-layout-wrapper .skl-sidebar-link.w65 { width: 65%; }
.docs-layout-wrapper:has(.sidebar) .sidebar-skeleton { display: none; }

/* ── Page TOC (sticky right column inside doc-main, below hero) ── */
.doc-main {
  display: grid;
  grid-template-columns: 1fr 30%;
  grid-template-rows: auto 1fr;
}
.doc-main .hero-section {
  grid-column: 1 / -1;
}
.page-toc {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: var(--header-h);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 24px 0;
  align-self: flex-start;
}
.page-toc-title {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0 16px 12px;
}
.page-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 16px;
}
.page-toc-link {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: normal;
  color: var(--text-dim);
  padding: 4px 12px;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-toc-link:hover {
  color: var(--text-muted);
}
.page-toc-link.active {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 500;
}
.page-toc-link.toc-indent {
  padding-left: 24px;
  font-size: 12px;
}

/* ── Doc with Sidebar Layout (used in docs, faq) ── */
.doc-with-sidebar {
  display: flex;
  min-height: calc(100vh - var(--header-h));
}
.doc-with-sidebar .doc-main {
  flex: 1;
  min-width: 0;
}
.doc-with-sidebar .doc-main > [id],
.doc-with-sidebar .doc-main [id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ── Doc Content Area ── */
.doc-content {
  padding: 40px 80px 60px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 900px;
}


/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .doc-main { grid-template-columns: 1fr; }
  .page-toc { display: none; }
}

@media (max-width: 1024px) {
  .header { padding: 0 24px; }
  .hero-section { padding: 40px 24px; }
  .hero-title { font-size: 36px; }
  .section-title { font-size: 36px; }
  .cta-section { padding: 40px 24px; }
  .cta-title { font-size: 28px; }
  .footer-inner { padding: 32px 24px; }
  .footer-row { flex-direction: column; gap: 32px; }
  .footer-cols { gap: 32px; }
  .doc-content { padding: 24px; }
}

@media (max-width: 768px) {
  .content { margin-left: 0; }
  .footer { margin-left: 0; }
  .header-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .cta-buttons { flex-direction: column; }
  .doc-with-sidebar { flex-direction: column; }
  .sidebar { width: 100%; min-width: 100%; position: static; max-height: none; border-right: none; border-bottom: 1px solid var(--border); padding: 16px 0; }
  .scroll-top { display: flex; }
}

/* ══════════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════════ */
/* ── Route transition ── */
.slide-enter-active { transition: transform 400ms ease, opacity 400ms ease; }
.slide-enter { transform: translateY(-20px); opacity: 0; }
.slide-enter-to { transform: translateY(0); opacity: 1; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
  animation: fadeInUp 0.4s ease forwards;
}
