/* ==========================================================================
   FoodFeast Documentation — Modern Developer Portal Stylesheet
   Crafted for CodeCanyon Commercial Release
   ========================================================================== */

/* --- Modern Design Tokens & Variables --- */
:root {
  /* Brand Palette */
  --brand: #ea580c;             /* Vibrant FoodFeast Sunset Orange */
  --brand-hover: #c2410c;       /* Darker orange on hover */
  --brand-deep: #9a3412;        /* Deep accent */
  --brand-soft: #fff7ed;        /* Soft warm wash (Orange 50) */
  --brand-subtle: #ffedd5;      /* Border wash (Orange 100) */
  --brand-glow: rgba(234, 88, 12, 0.15);

  /* Neutrals & Dark Slate Surface Tokens */
  --slate-900: #0f172a;         /* Deep midnight slate for dark elements/code */
  --slate-800: #1e293b;         /* Dark surfaces & code headers */
  --slate-700: #334155;         /* Primary text on light background */
  --slate-600: #475569;         /* Secondary / prose text */
  --slate-500: #64748b;         /* Muted text & icons */
  --slate-400: #94a3b8;         /* Subtle borders & placeholders */
  --slate-300: #cbd5e1;         /* Card borders */
  --slate-200: #e2e8f0;         /* Dividers & lines */
  --slate-100: #f1f5f9;         /* Soft panel background */
  --slate-50:  #f8fafc;         /* Page background */
  --white:     #ffffff;

  /* Semantic Callout Accents */
  --info:      #0284c7;
  --info-soft: #f0f9ff;
  --info-border: #bae6fd;

  --success:   #059669;
  --success-soft: #ecfdf5;
  --success-border: #a7f3d0;

  --warning:   #d97706;
  --warning-soft: #fffbeb;
  --warning-border: #fde68a;

  --danger:    #dc2626;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Fluid Responsive Gutters & Frame — Edge-to-Edge Layout */
  --docs-gutter: clamp(16px, 2vw, 36px);
  --docs-frame: calc(100% - (2 * var(--docs-gutter)));
  --docs-sidebar-w: clamp(260px, 18vw, 300px);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.04);
  --shadow-card: 0 2px 8px -2px rgba(15, 23, 42, 0.06), 0 1px 3px 0 rgba(15, 23, 42, 0.04);
}

/* --- Global Reset & Base Typography --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: var(--docs-text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--slate-700);
  background-color: var(--slate-50);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Accessibility Skip Link */
.skip-link {
  position: fixed;
  top: -60px;
  left: 20px;
  background: var(--brand);
  color: var(--white);
  padding: var(--docs-space-8) var(--docs-space-16);
  font-weight: 600;
  font-size: var(--docs-text-sm);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--slate-900);
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), #f97316);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 999;
  pointer-events: none;
  transition: transform 0.05s linear;
}

/* ==========================================================================
   Site Header & Top Navigation Bar — Modern, Sleek & Innovative Developer Portal
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  border-bottom-color: rgba(203, 213, 225, 0.8);
}

/* Glowing Top Border Line with Animated Continuous Gradient Sweep */
.site-header-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #ea580c 0%, #fb923c 20%, #f59e0b 40%, #fbbf24 50%, #f59e0b 60%, #fb923c 80%, #ea580c 100%);
  background-size: 200% 100%;
  animation: headerGlowSweep 6s linear infinite;
  opacity: 0.95;
}

@keyframes headerGlowSweep {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.site-header-wrap {
  width: var(--docs-frame);
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--docs-space-20);
  transition: min-height 0.2s ease;
}

.site-header.is-scrolled .site-header-wrap {
  min-height: 62px;
}

/* Brand Group: Logo Mark + App Title + Pulsing Status Pill */
.site-header-brand-group {
  display: flex;
  align-items: center;
  gap: var(--docs-space-12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--docs-space-12);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.brand:hover {
  text-decoration: none;
  transform: translateY(-0.5px);
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 60%, #c2410c 100%);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  color: var(--white);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.06) rotate(-2deg);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.38), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.brand-mark img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.brand-mark-sheen {
  position: absolute;
  top: -50%;
  left: -100%;
  width: 60%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: rotate(25deg);
  pointer-events: none;
  transition: transform 0.6s ease;
}

.brand:hover .brand-mark-sheen {
  transform: translateX(350%) rotate(25deg);
}

.brand-title {
  font-size: var(--docs-text-h3);
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.6px;
  line-height: 1;
}

.brand-feast {
  color: var(--brand);
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Pulsing Status Pill (v1.0 Stable) */
.header-status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--docs-space-8);
  padding: var(--docs-space-4) var(--docs-space-8) var(--docs-space-4) var(--docs-space-8);
  background: rgba(240, 253, 244, 0.9);
  border: 1px solid rgba(187, 247, 208, 0.9);
  border-radius: 99px;
  font-size: var(--docs-text-xs);
  font-weight: 600;
  color: #15803d;
  letter-spacing: 0.1px;
  cursor: default;
  box-shadow: 0 1px 2px rgba(22, 163, 74, 0.06);
  transition: all 0.2s ease;
}

.header-status-badge:hover {
  background: #ecfdf5;
  border-color: #86efac;
  transform: translateY(-1px);
}

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  display: inline-flex;
}

.status-dot-ping {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #22c55e;
  opacity: 0.75;
  animation: radarPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.status-dot-core {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #16a34a;
}

@keyframes radarPing {
  75%, 100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* Navigation Links with Micro-Interactions */
.site-header-nav {
  display: flex;
  align-items: center;
  gap: var(--docs-space-4);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--docs-space-8);
  padding: var(--docs-space-8) var(--docs-space-12);
  font-size: var(--docs-text-sm);
  font-weight: 500;
  color: var(--slate-600);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.nav-icon {
  width: 16px;
  height: 16px;
  color: var(--slate-400);
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.nav-link:hover {
  color: var(--brand);
  background: rgba(234, 88, 12, 0.07);
  text-decoration: none;
  transform: translateY(-1px);
}

.nav-link:hover .nav-icon {
  color: var(--brand);
  transform: scale(1.12);
}

.nav-link.selected {
  color: var(--brand);
  font-weight: 600;
  background: rgba(234, 88, 12, 0.09);
  border: 1px solid rgba(234, 88, 12, 0.18);
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.08);
}

.nav-link.selected .nav-icon {
  color: var(--brand);
}

.nav-link.selected::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.4);
}

/* Header Action Group: Quick Search Pill & Gradient Support CTA */
.site-header-actions {
  display: flex;
  align-items: center;
  gap: var(--docs-space-12);
}

.header-search-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--docs-space-8);
  padding: var(--docs-space-8) var(--docs-space-12) var(--docs-space-8) var(--docs-space-12);
  background: rgba(241, 245, 249, 0.75);
  border: 1px solid var(--slate-200);
  border-radius: 99px;
  color: var(--slate-500);
  font-size: var(--docs-text-sm);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-search-btn:hover {
  background: var(--white);
  border-color: rgba(234, 88, 12, 0.4);
  color: var(--slate-800);
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.12), 0 0 0 3px rgba(234, 88, 12, 0.08);
  transform: translateY(-0.5px);
}

.header-search-btn .search-svg {
  width: 15px;
  height: 15px;
  color: var(--slate-400);
  transition: color 0.15s ease;
}

.header-search-btn:hover .search-svg {
  color: var(--brand);
}

.header-search-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 var(--docs-space-4);
  font-size: var(--docs-text-xs);
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--slate-500);
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

/* Header Support CTA Button */
.header-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--docs-space-8);
  padding: var(--docs-space-8) var(--docs-space-16);
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  color: var(--white) !important;
  font-size: var(--docs-text-sm);
  font-weight: 600;
  letter-spacing: -0.1px;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  overflow: hidden;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.header-cta:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  text-decoration: none;
}

.header-cta .cta-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

.header-cta .cta-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-cta:hover .cta-arrow {
  transform: translateX(3px);
}

.cta-sheen {
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: rotate(25deg);
  pointer-events: none;
  transition: transform 0.65s ease;
}

.header-cta:hover .cta-sheen {
  transform: translateX(400%) rotate(25deg);
}

/* Mobile Hamburger Toggle */
.header-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  gap: var(--docs-space-4);
  transition: all 0.18s ease;
}

.header-menu-toggle:hover {
  background: var(--slate-100);
  border-color: var(--slate-300);
}

.header-menu-toggle .menu-bar {
  width: 18px;
  height: 2px;
  background-color: var(--slate-700);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.header-menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header-menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) {
  opacity: 0;
}

.header-menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.site-header-mobile-drawer {
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  padding: var(--docs-space-16) var(--docs-gutter) var(--docs-space-24);
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.08);
  animation: slideDrawerDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDrawerDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--docs-space-4);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: var(--docs-space-12);
  padding: var(--docs-space-12) var(--docs-space-12);
  border-radius: 10px;
  font-size: var(--docs-text-body);
  font-weight: 500;
  color: var(--slate-700);
  text-decoration: none;
  transition: all 0.15s ease;
}

.mobile-nav-link svg {
  width: 18px;
  height: 18px;
  color: var(--slate-400);
}

.mobile-nav-link:hover,
.mobile-nav-link.selected {
  background: rgba(234, 88, 12, 0.08);
  color: var(--brand);
}

.mobile-nav-link:hover svg,
.mobile-nav-link.selected svg {
  color: var(--brand);
}

.mobile-nav-cta {
  margin-top: var(--docs-space-8);
  background: var(--brand-soft);
  border: 1px solid var(--brand-subtle);
  color: var(--brand) !important;
  font-weight: 600;
}

/* ==========================================================================
   Article Search Bar (Top Sub-header on Documentation Articles)
   ========================================================================== */
.docs-banner.article-search-bar {
  width: var(--docs-frame);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--docs-space-20);
  padding: var(--docs-space-12) 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--slate-200);
  border-radius: 0;
}

.toolbar-home {
  display: inline-flex;
  align-items: center;
  gap: var(--docs-space-8);
  font-size: var(--docs-text-sm);
  font-weight: 600;
  color: var(--slate-600);
}

.toolbar-home:hover {
  color: var(--brand);
}

/* Search Input Component */
.search-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
}

.docs-search {
  display: flex;
  align-items: center;
  gap: var(--docs-space-12);
  height: 42px;
  padding: 0 var(--docs-space-12);
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.docs-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.docs-search svg {
  width: 18px;
  height: 18px;
  stroke: var(--slate-400);
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.docs-search input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--docs-text-sm);
  color: var(--slate-800);
}

.docs-search input::placeholder {
  color: var(--slate-400);
}

.docs-search kbd {
  font-family: var(--font-mono);
  font-size: var(--docs-text-xs);
  font-weight: 600;
  color: var(--slate-400);
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  padding: 2px var(--docs-space-4);
  border-radius: 4px;
  line-height: 1;
}

/* Search Results Popup */
.search-results {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  max-height: 420px;
  overflow-y: auto;
  padding: var(--docs-space-8);
  z-index: 100;
}

.search-results a {
  display: block;
  padding: var(--docs-space-8) var(--docs-space-12);
  border-radius: var(--radius-sm);
  color: var(--slate-800);
}

.search-results a:hover,
.search-results a:focus {
  background: var(--brand-soft);
  text-decoration: none;
}

.search-results strong {
  display: block;
  font-size: var(--docs-text-sm);
  color: var(--slate-900);
}

.search-results small {
  display: block;
  font-size: var(--docs-text-xs);
  color: var(--slate-500);
  margin-top: 2px;
}

.search-results p {
  padding: var(--docs-space-12);
  font-size: var(--docs-text-sm);
  color: var(--slate-500);
  text-align: center;
}

/* ==========================================================================
   Documentation Home Page Layout (`index.html`)
   ========================================================================== */
.docs-home main {
  width: var(--docs-frame) !important;
  max-width: none !important;
  margin-inline: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: var(--docs-space-24) 0 var(--docs-space-80);
}

.docs-home section,
.docs-home footer {
  width: 100% !important;
  max-width: 100% !important;
}

/* Hero Welcome Card — Edge-to-Edge Fluid Grid */
.docs-home .docs-welcome {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: clamp(28px, 3.5vw, 64px);
  padding: clamp(32px, 3.5vw, 56px);
  background: linear-gradient(135deg, #ffffff 0%, #fffbf6 100%);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--docs-space-32);
  position: relative;
  overflow: hidden;
}

.docs-home .docs-welcome::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), #fb923c);
}

.docs-eyebrow {
  display: inline-block;
  font-size: var(--docs-text-xs);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: var(--docs-space-4) var(--docs-space-8);
  border-radius: 99px;
  margin-bottom: var(--docs-space-16);
  border: 1px solid var(--brand-subtle);
}

.docs-welcome h1 {
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.18;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -1px;
  margin-bottom: var(--docs-space-16);
}

.welcome-description {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.65;
  color: var(--slate-600);
  max-width: 52ch;
  margin-bottom: var(--docs-space-24);
}

.welcome-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--docs-space-12);
  margin-bottom: var(--docs-space-24);
}

.welcome-actions .primary-link {
  display: inline-flex;
  align-items: center;
  gap: var(--docs-space-8);
  padding: var(--docs-space-12) var(--docs-space-24);
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: var(--white);
  font-weight: 600;
  font-size: var(--docs-text-body);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
  transition: all 0.2s ease;
}

.welcome-actions .primary-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.4);
  text-decoration: none;
}

.welcome-actions a:not(.primary-link) {
  display: inline-flex;
  align-items: center;
  gap: var(--docs-space-8);
  padding: var(--docs-space-12) var(--docs-space-20);
  background: var(--white);
  color: var(--slate-700);
  font-weight: 600;
  font-size: var(--docs-text-body);
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-300);
  transition: all 0.15s ease;
}

.welcome-actions a:not(.primary-link):hover {
  border-color: var(--slate-400);
  background: var(--slate-50);
  text-decoration: none;
}

.welcome-preview {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: var(--docs-space-12);
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease;
}

.welcome-preview:hover {
  transform: translateY(-3px);
}

.welcome-preview img {
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
}

.welcome-preview figcaption {
  margin-top: var(--docs-space-8);
  font-size: var(--docs-text-sm);
  font-weight: 600;
  text-align: center;
  color: var(--slate-600);
}

/* System Requirements Metric Cards Bar */
.system-specs-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--docs-space-16);
  margin: 0 0 var(--docs-space-40);
}

.spec-badge-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: var(--docs-space-16) var(--docs-space-20);
  display: flex;
  align-items: center;
  gap: var(--docs-space-12);
  box-shadow: var(--shadow-sm);
}

.spec-badge-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: var(--docs-text-lead);
  flex-shrink: 0;
}

.spec-badge-info small {
  display: block;
  font-size: var(--docs-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--slate-400);
}

.spec-badge-info strong {
  display: block;
  font-size: var(--docs-text-sm);
  font-weight: 700;
  color: var(--slate-800);
  margin-top: 2px;
}

/* Setup Route / Roadmap Cards */
.setup-route {
  margin-bottom: var(--docs-space-48);
}

.section-intro {
  margin-bottom: var(--docs-space-24);
}

.section-intro h2 {
  font-size: var(--docs-text-h2);
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.5px;
}

.section-intro p {
  font-size: var(--docs-text-body);
  color: var(--slate-500);
  margin-top: var(--docs-space-4);
}

.setup-route ol {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--docs-space-16);
  margin: 0;
  padding: 0;
}

.setup-route li {
  margin: 0;
}

.setup-route a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--docs-space-20);
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.setup-route a:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.setup-route a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--slate-200);
  transition: background 0.2s ease;
}

.setup-route a:hover::before {
  background: var(--brand);
}

.setup-route strong {
  display: block;
  font-size: var(--docs-text-body);
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: var(--docs-space-4);
}

.setup-route span {
  display: block;
  font-size: var(--docs-text-sm);
  color: var(--slate-500);
  line-height: 1.5;
}

/* Category Grid on Home */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--docs-space-24);
  margin-top: var(--docs-space-16);
}

.category-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: var(--docs-space-24);
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.category-card h3 {
  font-size: var(--docs-text-lead);
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 var(--docs-space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-card > p {
  font-size: var(--docs-text-sm);
  color: var(--slate-500);
  margin: 0 0 var(--docs-space-16);
  line-height: 1.5;
}

.category-card div {
  display: flex;
  flex-direction: column;
  gap: var(--docs-space-4);
  margin-top: auto;
  border-top: 1px solid var(--slate-100);
  padding-top: var(--docs-space-12);
}

.doc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--docs-space-8) var(--docs-space-8);
  border-radius: var(--radius-sm);
  font-size: var(--docs-text-sm);
  color: var(--slate-700);
  font-weight: 500;
}

.doc-link:hover {
  background: var(--brand-soft);
  color: var(--brand);
  text-decoration: none;
}

.doc-link::after {
  content: "→";
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.15s ease;
  color: var(--brand);
}

.doc-link:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* Reference Links Box */
.reference-links {
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-800) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--docs-space-32) var(--docs-space-40);
  margin-top: var(--docs-space-48);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--docs-space-24);
  box-shadow: var(--shadow-lg);
}

.reference-links h2 {
  font-size: var(--docs-text-h3);
  color: var(--white);
  margin-bottom: var(--docs-space-4);
}

.reference-links p {
  color: var(--slate-300);
  font-size: var(--docs-text-sm);
  margin: 0;
}

.reference-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--docs-space-4);
  padding: var(--docs-space-8) var(--docs-space-16);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: var(--docs-text-sm);
  font-weight: 600;
  transition: all 0.15s ease;
}

.reference-links a:hover {
  background: var(--brand);
  border-color: var(--brand);
  text-decoration: none;
}

.docs-home footer,
.docs-article footer {
  text-align: center;
  padding: var(--docs-space-32) 0 var(--docs-space-40);
  margin-top: var(--docs-space-64);
  border-top: 1px solid var(--slate-200);
  font-size: var(--docs-text-sm);
  color: var(--slate-500);
}

/* ==========================================================================
   Documentation Article Shell (`docs-article`)
   Two-column Grid with Sticky Sidebar
   ========================================================================== */
.docs-article {
  background: var(--slate-50);
}

.docs-article .wrap {
  width: var(--docs-frame);
  max-width: none;
  margin-inline: auto;
  display: grid;
  grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr);
  gap: clamp(20px, 2vw, 36px);
  padding: var(--docs-space-24) 0 var(--docs-space-80);
  min-height: calc(100vh - 160px);
  align-items: start;
}

/* Category Sidebar Navigation */
.category-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: var(--docs-space-16) var(--docs-space-12);
  box-shadow: var(--shadow-sm);
}

/* Custom Scrollbar for Sidebar */
.category-sidebar::-webkit-scrollbar {
  width: 5px;
}
.category-sidebar::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: 4px;
}

.category-sidebar .sidebar-home {
  display: flex;
  align-items: center;
  gap: var(--docs-space-8);
  font-size: var(--docs-text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--brand);
  padding: var(--docs-space-8) var(--docs-space-12) var(--docs-space-12);
  border-bottom: 1px solid var(--slate-100);
  margin-bottom: var(--docs-space-8);
}

.category-sidebar .sidebar-home:hover {
  text-decoration: none;
  color: var(--brand-hover);
}

.nav-group {
  margin-bottom: var(--docs-space-4);
}

.nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--docs-space-8) var(--docs-space-12);
  font-size: var(--docs-text-sm);
  font-weight: 700;
  color: var(--slate-700);
  cursor: pointer;
  border-radius: var(--radius-sm);
  list-style: none;
  user-select: none;
  transition: background 0.15s ease;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "▾";
  font-size: var(--docs-text-xs);
  color: var(--slate-400);
  transition: transform 0.2s ease;
}

.nav-group:not([open]) summary::after {
  transform: rotate(-90deg);
}

.nav-group summary:hover {
  background: var(--slate-100);
}

.nav-group[open] summary {
  color: var(--slate-900);
}

.nav-group > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--docs-space-4) 0 var(--docs-space-8) var(--docs-space-8);
  border-left: 1px solid var(--slate-200);
  margin-left: var(--docs-space-16);
}

.category-sidebar .doc-link {
  font-size: var(--docs-text-sm);
  color: var(--slate-600);
  padding: var(--docs-space-4) var(--docs-space-8);
  border-radius: var(--radius-sm);
  line-height: 1.45;
}

.category-sidebar .doc-link:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.category-sidebar .doc-link.active,
.category-sidebar .doc-link[aria-current="page"] {
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-weight: 700;
  border-left: 2px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.category-toggle {
  display: none;
}

/* ==========================================================================
   Article Content Styling (`main#main-content`)
   ========================================================================== */
/* Override legacy style.css aside/main fixed offsets */
aside, .docs-article aside.category-sidebar {
  position: sticky !important;
  width: var(--docs-sidebar-w) !important;
  max-width: var(--docs-sidebar-w) !important;
  margin: 0 !important;
}
main, .docs-article main {
  margin-left: 0 !important;
}

.docs-home main {
  margin-left: auto !important;
  margin-right: auto !important;
  margin-inline: auto !important;
}

.docs-article main {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3.5vw, 44px);
  box-shadow: var(--shadow-sm);
}

.docs-article .container,
main .container {
  max-width: 100% !important;
  padding: 0 !important;
  min-width: 0 !important;
}

.docs-article section,
.docs-article footer,
.docs-home section,
.docs-home footer,
main section,
main footer {
  max-width: 100% !important;
  width: 100%;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--docs-space-8);
  font-size: var(--docs-text-sm);
  color: var(--slate-500);
  margin-bottom: var(--docs-space-16);
}

.breadcrumbs a {
  color: var(--slate-500);
}

.breadcrumbs a:hover {
  color: var(--brand);
}

.breadcrumbs span[aria-current="page"] {
  color: var(--slate-800);
  font-weight: 600;
}

/* Article Heading Area */
.article-heading h1 {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.8px;
  line-height: 1.25;
  margin-bottom: var(--docs-space-12);
}

.article-description {
  font-size: clamp(15.5px, 1.2vw, 17px);
  color: var(--slate-600);
  line-height: 1.65;
  margin-bottom: var(--docs-space-24);
  max-width: 76ch;
}

/* Article Toolbar Actions (Copy / Print) */
.article-actions {
  display: flex;
  align-items: center;
  gap: var(--docs-space-8);
  margin-bottom: var(--docs-space-24);
}

.article-actions button {
  display: inline-flex;
  align-items: center;
  gap: var(--docs-space-4);
  padding: var(--docs-space-4) var(--docs-space-12);
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  color: var(--slate-600);
  font-size: var(--docs-text-sm);
  font-weight: 600;
  transition: all 0.15s ease;
}

.article-actions button:hover {
  background: var(--white);
  border-color: var(--brand);
  color: var(--brand);
}

.action-status {
  font-size: var(--docs-text-xs);
  font-weight: 600;
  color: var(--success);
}

/* Table of Contents */
.article-toc {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
  padding: var(--docs-space-16) var(--docs-space-24);
  margin: 0 0 var(--docs-space-32);
}

.article-toc summary {
  font-size: var(--docs-text-body);
  font-weight: 700;
  color: var(--slate-800);
  cursor: pointer;
  user-select: none;
}

.article-toc ol {
  margin: var(--docs-space-12) 0 0 var(--docs-space-16);
  padding: 0;
  font-size: var(--docs-text-sm);
}

.article-toc li {
  margin: var(--docs-space-4) 0;
}

.article-toc a {
  color: var(--slate-600);
}

.article-toc a:hover {
  color: var(--brand);
}

.article-toc a[aria-current="location"] {
  color: var(--brand-deep);
  font-weight: 700;
}

/* Typography Inside Articles */
.docs-article section {
  padding-top: var(--docs-space-32);
  margin-top: var(--docs-space-12);
  scroll-margin-top: 96px;
}

.docs-article section:first-of-type {
  padding-top: var(--docs-space-12);
}

.docs-article h2 {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.5px;
  margin: 0 0 var(--docs-space-12);
  display: flex;
  align-items: center;
  scroll-margin-top: 96px;
}

.docs-article h3 {
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 700;
  color: var(--slate-800);
  margin: var(--docs-space-24) 0 var(--docs-space-8);
  scroll-margin-top: 96px;
}

.docs-article h4 {
  font-size: var(--docs-text-body);
  font-weight: 700;
  color: var(--slate-800);
  margin: var(--docs-space-20) 0 var(--docs-space-8);
}

.docs-article p {
  margin: var(--docs-space-8) 0 var(--docs-space-16);
  font-size: var(--docs-text-body);
  line-height: 1.7;
  color: var(--slate-600);
}

.docs-article p.lead {
  font-size: var(--docs-text-lead);
  color: var(--slate-700);
  font-weight: 400;
  line-height: 1.7;
}

.docs-article ul,
.docs-article ol {
  margin: var(--docs-space-12) 0 var(--docs-space-16) var(--docs-space-24);
  font-size: var(--docs-text-body);
  color: var(--slate-600);
}

.docs-article li {
  margin: var(--docs-space-4) 0;
  line-height: 1.65;
}

.docs-article hr.sep {
  border: none;
  border-top: 1px solid var(--slate-200);
  margin: var(--docs-space-40) 0;
}

/* Heading Anchor link */
.heading-anchor {
  font-size: 0.75em;
  font-weight: 400;
  color: var(--slate-400);
  margin-left: var(--docs-space-8);
  opacity: 0;
  transition: opacity 0.15s ease;
}

h2:hover .heading-anchor,
h3:hover .heading-anchor,
.heading-anchor:focus {
  opacity: 1;
  color: var(--brand);
}

/* Section Chip / Badge */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--docs-space-8);
  font-size: var(--docs-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: var(--docs-space-4) var(--docs-space-8);
  border-radius: 99px;
  margin-bottom: var(--docs-space-8);
}

.chip i {
  font-style: normal;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  background: var(--brand);
  color: var(--white);
  border-radius: 50%;
  font-size: var(--docs-text-xs);
}

/* ==========================================================================
   Numbered Step Cards (ReadyRestaurant Style)
   ========================================================================== */
.step {
  display: flex;
  gap: var(--docs-space-16);
  padding: var(--docs-space-20);
  margin: var(--docs-space-16) 0;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.step:hover {
  border-color: var(--slate-300);
  box-shadow: var(--shadow-sm);
}

.step .n {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: var(--white);
  border-radius: 50%;
  font-size: var(--docs-text-sm);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
}

.step .body {
  flex: 1;
  min-width: 0;
}

.step h4 {
  margin: var(--docs-space-4) 0 var(--docs-space-4);
  font-size: var(--docs-text-body);
  font-weight: 700;
  color: var(--slate-900);
}

.step p {
  margin: var(--docs-space-4) 0 var(--docs-space-8);
  font-size: var(--docs-text-sm);
}

/* ==========================================================================
   Callout Alert Boxes (Note, Warn, Danger, Done)
   ========================================================================== */
.note, .warn, .danger, .done {
  padding: var(--docs-space-16) var(--docs-space-20) var(--docs-space-16) var(--docs-space-48);
  margin: var(--docs-space-20) 0;
  border-radius: var(--radius-md);
  position: relative;
  font-size: var(--docs-text-body);
  line-height: 1.65;
  border: 1px solid transparent;
}

.note {
  background: var(--info-soft);
  color: #0369a1;
  border-color: var(--info-border);
  border-left: 4px solid var(--info);
}

.note::before {
  content: "ℹ";
  position: absolute;
  left: 18px;
  top: 14px;
  font-weight: 800;
  font-size: var(--docs-text-lead);
  color: var(--info);
}

.warn {
  background: var(--warning-soft);
  color: #b45309;
  border-color: var(--warning-border);
  border-left: 4px solid var(--warning);
}

.warn::before {
  content: "⚠";
  position: absolute;
  left: 18px;
  top: 14px;
  font-weight: 800;
  font-size: var(--docs-text-lead);
  color: var(--warning);
}

.danger {
  background: var(--danger-soft);
  color: #b91c1c;
  border-color: var(--danger-border);
  border-left: 4px solid var(--danger);
}

.danger::before {
  content: "✕";
  position: absolute;
  left: 18px;
  top: 14px;
  font-weight: 800;
  font-size: var(--docs-text-lead);
  color: var(--danger);
}

.done {
  background: var(--success-soft);
  color: #047857;
  border-color: var(--success-border);
  border-left: 4px solid var(--success);
}

.done::before {
  content: "✓";
  position: absolute;
  left: 18px;
  top: 14px;
  font-weight: 800;
  font-size: var(--docs-text-lead);
  color: var(--success);
}

.note a, .warn a, .danger a, .done a {
  font-weight: 600;
  text-decoration: underline;
}

/* ==========================================================================
   Code Blocks & Terminal Snippets
   ========================================================================== */
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: #ea580c;
  background: var(--brand-soft);
  padding: 2px var(--docs-space-4);
  border-radius: 4px;
  border: 1px solid var(--brand-subtle);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.filetag {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
  background: var(--slate-800);
  color: var(--slate-300);
  border: 1px solid var(--slate-700);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: var(--docs-space-4) var(--docs-space-12);
  font-family: var(--font-mono);
  font-size: var(--docs-text-xs);
  font-weight: 600;
  margin-bottom: -1px;
}

pre {
  position: relative;
  margin: var(--docs-space-16) 0 var(--docs-space-24);
  background: var(--slate-900);
  border: 1px solid var(--slate-800);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
  padding: var(--docs-space-16) var(--docs-space-20);
}

pre code {
  color: #e2e8f0;
  background: transparent;
  border: none;
  padding: 0;
  font-size: var(--docs-text-sm);
  line-height: 1.65;
  display: block;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

/* Interactive Copy Button on Code Blocks */
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--slate-800);
  padding: var(--docs-space-8) var(--docs-space-16);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--docs-text-xs);
  color: var(--slate-400);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-header .dots {
  display: flex;
  gap: var(--docs-space-4);
}

.code-header .dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #475569;
}

.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: var(--docs-space-4);
  padding: var(--docs-space-4) var(--docs-space-8);
  background: rgba(255, 255, 255, 0.1);
  color: var(--slate-300);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-size: var(--docs-text-xs);
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 5;
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
}

.code-copy-btn.copied {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}

/* ==========================================================================
   Modern Data Tables & Responsive Table Wrapper
   ========================================================================== */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--docs-space-20) 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.table-wrap > table {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: table !important;
  width: 100%;
  min-width: 560px;
}

table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: var(--docs-space-20) 0;
  font-size: var(--docs-text-sm);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

th {
  background: var(--slate-100);
  color: var(--slate-700);
  font-size: var(--docs-text-xs);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: var(--docs-space-12) var(--docs-space-16);
  text-align: left;
  border-bottom: 1px solid var(--slate-200);
}

td {
  padding: var(--docs-space-12) var(--docs-space-16);
  border-bottom: 1px solid var(--slate-200);
  color: var(--slate-700);
  vertical-align: top;
  line-height: 1.6;
}

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

tr:nth-child(even) td {
  background: var(--slate-50);
}

/* ==========================================================================
   Screenshots, Images & Mockups
   ========================================================================== */
.doc-real-image,
.guide-screenshot {
  margin: var(--docs-space-24) 0;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: var(--docs-space-12);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.doc-real-image img,
.guide-screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  margin-inline: auto;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.doc-real-image img:hover,
.guide-screenshot img:hover {
  transform: scale(1.005);
}

.doc-real-image figcaption,
.guide-screenshot figcaption {
  margin-top: var(--docs-space-8);
  font-size: var(--docs-text-sm);
  font-weight: 500;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--docs-space-4);
}

.doc-real-image figcaption::before,
.guide-screenshot figcaption::before {
  content: "📷";
  font-size: var(--docs-text-sm);
}

/* Image Galleries & Phone Mockups */
.doc-image-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--docs-space-16);
  margin: var(--docs-space-24) 0;
}

.doc-phone-image {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: var(--docs-space-12);
  text-align: center;
}

.doc-phone-image img {
  max-height: 520px;
  width: auto;
  margin-inline: auto;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--docs-space-16);
  margin: var(--docs-space-24) 0;
}

.screenshot-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  text-align: center;
}

.screenshot-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}

.screenshot-card img {
  width: 100%;
  height: clamp(240px, 26vw, 340px);
  object-fit: contain;
  padding: var(--docs-space-12);
  background: var(--slate-50);
}

.screenshot-card span {
  display: block;
  padding: var(--docs-space-8) var(--docs-space-8);
  font-size: var(--docs-text-sm);
  font-weight: 600;
  color: var(--slate-700);
  border-top: 1px solid var(--slate-200);
  background: var(--white);
}

/* ==========================================================================
   Page Navigation Footer (Prev / Next Buttons)
   ========================================================================== */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: var(--docs-space-16);
  margin-top: var(--docs-space-48);
  padding-top: var(--docs-space-32);
  border-top: 1px solid var(--slate-200);
}

.page-nav-btn {
  display: flex;
  align-items: center;
  gap: var(--docs-space-16);
  padding: var(--docs-space-16) var(--docs-space-20);
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  color: var(--slate-800);
  transition: all 0.15s ease;
  max-width: 48%;
  flex: 1;
}

.page-nav-btn:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
  transform: translateY(-2px);
  text-decoration: none;
}

.page-nav-next {
  margin-left: auto;
  text-align: right;
  flex-direction: row-reverse;
}

.page-nav-arrow {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--slate-200);
  color: var(--brand);
  border-radius: 50%;
  font-size: var(--docs-text-body);
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.page-nav-btn:hover .page-nav-arrow {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

.page-nav-info small {
  display: block;
  font-size: var(--docs-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--slate-400);
}

.page-nav-info strong {
  display: block;
  font-size: var(--docs-text-body);
  font-weight: 700;
  color: var(--slate-800);
  margin-top: 2px;
}

/* ==========================================================================
   Full Screen Lightbox Modal for Screenshots
   ========================================================================== */
.docs-lightbox { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; overflow: hidden; 
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--docs-space-24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.docs-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.docs-lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.docs-lightbox-img {
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.docs-lightbox-caption {
  margin-top: var(--docs-space-12);
  font-size: var(--docs-text-sm);
  color: var(--white);
  text-align: center;
  font-weight: 500;
}

.docs-lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: var(--docs-text-lead);
  cursor: pointer;
  transition: background 0.15s ease;
}

.docs-lightbox-close:hover {
  background: var(--brand);
  border-color: var(--brand);
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */
@media (max-width: 1080px) {
  .docs-home .docs-welcome {
    grid-template-columns: 1fr;
    padding: var(--docs-space-32);
  }
  .welcome-preview {
    max-width: 580px;
    margin-inline: auto;
  }
  .setup-route ol {
    grid-template-columns: repeat(2, 1fr);
  }
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .docs-article .wrap {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: var(--docs-space-24);
  }
}

@media (max-width: 820px) {
  /* On tablets and mobile, sidebar becomes an off-canvas drawer */
  .category-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--docs-space-8);
    width: 100%;
    padding: var(--docs-space-12) var(--docs-space-16);
    background: var(--white);
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    color: var(--slate-800);
    font-size: var(--docs-text-sm);
    font-weight: 600;
    margin-bottom: var(--docs-space-20);
    box-shadow: var(--shadow-sm);
  }

  .category-toggle:hover {
    border-color: var(--brand);
    color: var(--brand);
  }

  .docs-article .wrap {
    display: block;
    padding: var(--docs-space-16) 0 var(--docs-space-64);
  }

  .category-sidebar {
    display: none;
    position: static;
    max-height: none;
    margin-bottom: var(--docs-space-24);
  }

  .category-sidebar.is-open {
    display: block;
    animation: fadeIn 0.2s ease;
  }

  .docs-article main {
    padding: var(--docs-space-24) var(--docs-space-20);
  }

  .doc-image-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .site-header-nav {
    display: none !important;
  }
  .header-menu-toggle {
    display: flex !important;
  }
  .header-search-btn .search-placeholder {
    display: none;
  }
  .header-search-btn {
    padding: var(--docs-space-8) var(--docs-space-8);
  }
}

@media (max-width: 680px) {
  .header-status-badge {
    display: none;
  }
}

@media (max-width: 520px) {
  .header-search-btn {
    display: none;
  }
  .brand-title {
    font-size: var(--docs-text-lead);
  }
  .header-cta span {
    display: none;
  }
  .header-cta {
    padding: var(--docs-space-8) var(--docs-space-12);
  }
}

@media (max-width: 640px) {
  :root {
    --docs-gutter: 16px;
  }

  .site-header-wrap,
  .site-header .header-inner {
    min-height: 60px;
    padding-inline: 0;
  }

  .brand-label {
    display: none;
  }

  .contact-button {
    padding: var(--docs-space-4) var(--docs-space-12);
    font-size: var(--docs-text-xs);
  }

  .docs-welcome h1 {
    font-size: 26px;
  }

  .setup-route ol {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .page-nav {
    flex-direction: column;
  }

  .page-nav-btn {
    max-width: 100%;
  }

  .page-nav-next {
    flex-direction: row;
    text-align: left;
  }

  .article-search-bar .search-wrap {
    max-width: 100%;
  }

  .toolbar-home {
    display: none;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Theme Toggle Micro-Component & Icons
   ========================================================================== */
.header-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: rgba(241, 245, 249, 0.75);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.header-theme-toggle:hover {
  background: var(--white);
  border-color: rgba(234, 88, 12, 0.4);
  color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.15);
}

.theme-icon-sun,
.theme-icon-moon {
  width: 18px;
  height: 18px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Mode: Moon visible, Sun hidden */
html:not(.dark) .theme-icon-sun {
  display: none !important;
}
html:not(.dark) .theme-icon-moon {
  display: block !important;
}

/* Dark Mode: Sun visible, Moon hidden */
html.dark .theme-icon-moon {
  display: none !important;
}
html.dark .theme-icon-sun {
  display: block !important;
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.5));
}

html.dark .header-theme-toggle {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fbbf24;
}

html.dark .header-theme-toggle:hover {
  background: #1e293b;
  border-color: #fb923c;
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.3);
  transform: translateY(-1px) rotate(15deg);
}

/* ==========================================================================
   Dark Mode Theme Overrides — High-Fidelity Midnight Slate Palette
   ========================================================================== */
html.dark {
  color-scheme: dark;

  /* Theme tokens remapped for Dark Mode */
  --slate-900: #f8fafc;         /* Inverted headings / pure text */
  --slate-800: #f1f5f9;         /* High-contrast subheadings */
  --slate-700: #e2e8f0;         /* Primary readable body copy */
  --slate-600: #cbd5e1;         /* Secondary copy */
  --slate-500: #94a3b8;         /* Muted icons / labels */
  --slate-400: #64748b;         /* Subtle borders */
  --slate-300: #475569;         /* Dark dividers */
  --slate-200: #334155;         /* Borders on dark cards */
  --slate-100: #1e293b;         /* Dark panels / pills */
  --slate-50:  #0b0f19;         /* Deepest midnight page background */
  --white:     #111827;         /* Surface elevation 1 (slate 900) */
  --brand-soft: rgba(234, 88, 12, 0.14);
  --brand-subtle: rgba(234, 88, 12, 0.28);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 2px 8px -2px rgba(0, 0, 0, 0.5), 0 1px 3px 0 rgba(0, 0, 0, 0.3);

  /* Legacy style.css tokens */
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.08);
  --side: #0f172a;
  --side-ink: #cbd5e1;
  --side-active: #fb923c;
}

html.dark body {
  background-color: #0b0f19 !important;
  color: #e2e8f0 !important;
}

/* Dark Header Glassmorphism */
html.dark .site-header {
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

html.dark .site-header.is-scrolled {
  background: rgba(11, 15, 25, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

html.dark .brand-title {
  color: #ffffff;
}

html.dark .header-status-badge {
  background: rgba(22, 101, 52, 0.25);
  border-color: rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

html.dark .nav-link {
  color: #94a3b8;
}

html.dark .nav-link:hover {
  color: #fb923c;
  background: rgba(234, 88, 12, 0.12);
}

html.dark .nav-link.selected {
  color: #fb923c;
  background: rgba(234, 88, 12, 0.16);
  border-color: rgba(234, 88, 12, 0.35);
}

html.dark .header-search-btn {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

html.dark .header-search-btn:hover {
  background: #1e293b;
  border-color: rgba(251, 146, 60, 0.4);
  color: #f1f5f9;
}

html.dark .header-search-kbd {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

html.dark .site-header-mobile-drawer {
  background: #0f172a;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

html.dark .mobile-nav-link {
  color: #cbd5e1;
}

html.dark .mobile-nav-link:hover,
html.dark .mobile-nav-link.selected {
  background: rgba(234, 88, 12, 0.14);
  color: #fb923c;
}

/* Home Page Elements in Dark Mode */
html.dark .docs-home .docs-welcome {
  background: linear-gradient(135deg, #111827 0%, #1e1b18 100%) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5) !important;
}

html.dark .docs-welcome h1 {
  color: #ffffff !important;
}

html.dark .welcome-description {
  color: #94a3b8 !important;
}

html.dark .welcome-actions a:not(.primary-link) {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f1f5f9 !important;
}

html.dark .welcome-actions a:not(.primary-link):hover {
  background: #334155 !important;
  border-color: #fb923c !important;
  color: #fb923c !important;
}

html.dark .welcome-preview {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .welcome-preview figcaption {
  color: #cbd5e1 !important;
}

html.dark .spec-badge-card {
  background: #111827 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .spec-badge-info small {
  color: #94a3b8 !important;
}

html.dark .spec-badge-info strong {
  color: #f8fafc !important;
}

html.dark .section-intro h2 {
  color: #ffffff !important;
}

html.dark .section-intro p {
  color: #94a3b8 !important;
}

html.dark .setup-route a {
  background: #111827 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .setup-route a:hover {
  border-color: #fb923c !important;
  background: #161e2e !important;
}

html.dark .setup-route strong {
  color: #f8fafc !important;
}

html.dark .setup-route span {
  color: #94a3b8 !important;
}

html.dark .category-card {
  background: #111827 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .category-card:hover {
  border-color: #fb923c !important;
  background: #161e2e !important;
}

html.dark .category-card h3 {
  color: #ffffff !important;
}

html.dark .category-card p {
  color: #94a3b8 !important;
}

html.dark .category-badge {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #fb923c !important;
}

html.dark .category-card ol li {
  border-top-color: rgba(255, 255, 255, 0.06) !important;
}

html.dark .category-card ol li a {
  color: #cbd5e1 !important;
}

html.dark .category-card ol li a:hover {
  color: #fb923c !important;
}

html.dark .docs-cta-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1e24 100%) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .reference-links {
  background: linear-gradient(135deg, #090d16 0%, #151c2c 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

html.dark .reference-links h2 {
  color: #ffffff !important;
}

html.dark .reference-links p {
  color: #cbd5e1 !important;
}

html.dark .reference-links a {
  background: #111827 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
}

html.dark .reference-links a:hover {
  background: #1e293b !important;
  border-color: #fb923c !important;
  color: #fb923c !important;
}

/* Article Shell, Sidebar & Main Content in Dark Mode */
html.dark .docs-article {
  background: #0b0f19 !important;
}

html.dark .docs-banner.article-search-bar {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .toolbar-home {
  color: #94a3b8 !important;
}

html.dark .toolbar-home:hover {
  color: #fb923c !important;
}

html.dark .docs-search {
  background: #111827 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark #docs-search {
  color: #f8fafc !important;
}

html.dark .search-results {
  background: #111827 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

html.dark .search-results a {
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

html.dark .search-results a:hover,
html.dark .search-results a.selected {
  background: rgba(234, 88, 12, 0.14) !important;
}

html.dark .search-results strong {
  color: #ffffff !important;
}

html.dark .search-results small {
  color: #94a3b8 !important;
}

html.dark aside.category-sidebar {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html.dark .sidebar-home {
  color: #94a3b8 !important;
}

html.dark .sidebar-home:hover {
  color: #fb923c !important;
}

html.dark .category-sidebar details.nav-group,
html.dark .category-sidebar details.nav-group[open],
html.dark .nav-group,
html.dark .nav-group[open] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin-bottom: var(--docs-space-4) !important;
}

html.dark .nav-group summary {
  background: transparent !important;
  color: #cbd5e1 !important;
  border-radius: 6px !important;
}

html.dark .nav-group summary:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
}

html.dark .nav-group[open] summary {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

html.dark .nav-group summary::after {
  color: #64748b !important;
}

html.dark .nav-group > div {
  border-left-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .doc-link {
  color: #94a3b8 !important;
}

html.dark .doc-link:hover {
  color: #fb923c !important;
  background: rgba(234, 88, 12, 0.1) !important;
}

html.dark .doc-link.active {
  color: #fb923c !important;
  background: rgba(234, 88, 12, 0.16) !important;
  font-weight: 600 !important;
}

html.dark .docs-article main {
  background: #111827 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

html.dark .breadcrumbs a {
  color: #94a3b8 !important;
}

html.dark .breadcrumbs span {
  color: #64748b !important;
}

html.dark .breadcrumbs span[aria-current="page"] {
  color: #f1f5f9 !important;
}

html.dark .article-heading h1 {
  color: #ffffff !important;
}

html.dark .article-description {
  color: #94a3b8 !important;
}

html.dark .article-actions button {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}

html.dark .article-actions button:hover {
  background: #334155 !important;
  color: #ffffff !important;
  border-color: #fb923c !important;
}

html.dark .article-toc {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .article-toc summary {
  color: #f1f5f9 !important;
}

html.dark .article-toc ol li a {
  color: #94a3b8 !important;
}

html.dark .article-toc ol li a:hover,
html.dark .article-toc ol li a[aria-current="location"] {
  color: #fb923c !important;
}

html.dark main section h2 {
  color: #ffffff !important;
}

html.dark main section h3 {
  color: #f1f5f9 !important;
}

html.dark main section h4 {
  color: #e2e8f0 !important;
}

html.dark main p,
html.dark main li {
  color: #cbd5e1 !important;
}

html.dark main strong,
html.dark main b {
  color: #ffffff !important;
}

html.dark pre {
  background: #0d1117 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
}

html.dark pre code {
  color: #e6edf3 !important;
}

html.dark :not(pre) > code {
  background: rgba(30, 41, 59, 0.8) !important;
  color: #fb923c !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html.dark .filetag {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Callouts in Dark Mode */
html.dark .callout,
html.dark .info {
  background: rgba(2, 132, 199, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  color: #e0f2fe !important;
}

html.dark .tip,
html.dark .done {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(52, 211, 153, 0.35) !important;
  color: #d1fae5 !important;
}

html.dark .warn {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  color: #fef3c7 !important;
}

html.dark .danger {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(248, 113, 113, 0.35) !important;
  color: #fee2e2 !important;
}

/* Tables in Dark Mode */
html.dark table {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark th {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark td {
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #cbd5e1 !important;
}

html.dark tr:hover td {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* Steps, Cards & Content Blocks in Dark Mode */
html.dark .step,
html.dark .feat,
html.dark .flow-step-block,
html.dark .operator-card,
html.dark .trouble-card,
html.dark .legend-box,
html.dark .checklist-container {
  background: #111827 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
  color: #cbd5e1 !important;
}

html.dark .step h4,
html.dark .step h3,
html.dark .feat b,
html.dark .flow-step-block h3,
html.dark .operator-card h3,
html.dark .trouble-card h3,
html.dark .legend-box h4,
html.dark .checklist-container h3 {
  color: #ffffff !important;
}

html.dark .step p,
html.dark .feat span,
html.dark .flow-step-block p,
html.dark .operator-card p,
html.dark .trouble-card p,
html.dark .trouble-field {
  color: #cbd5e1 !important;
}

html.dark .trouble-field strong {
  color: #f1f5f9 !important;
}

html.dark .step .n {
  background: #1e293b !important;
  border-color: #fb923c !important;
  color: #fb923c !important;
}

/* Informational & Highlight Callout Boxes */
/* Blue Info Callouts */
html.dark .box-info,
html.dark .box-action,
html.dark .diagram-callout,
html.dark .trouble-check,
html.dark .callout,
html.dark .info,
html.dark .note {
  background: rgba(14, 165, 233, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  color: #e0f2fe !important;
}

html.dark .box-info b,
html.dark .box-action b,
html.dark .trouble-check strong,
html.dark .note:before,
html.dark .info:before {
  color: #38bdf8 !important;
}

/* Green Success / Backend / Verification Callouts */
html.dark .box-backend,
html.dark .box-sync,
html.dark .verify-box,
html.dark .trouble-fix,
html.dark .tip,
html.dark .done,
html.dark .err .fix {
  background: rgba(34, 197, 94, 0.12) !important;
  border: 1px solid rgba(74, 222, 128, 0.3) !important;
  color: #dcfce7 !important;
}

html.dark .box-backend b,
html.dark .box-sync b,
html.dark .verify-box b,
html.dark .trouble-fix strong,
html.dark .done:before,
html.dark .tip:before {
  color: #4ade80 !important;
}

/* Amber Edge Cases / Warnings / Alerts */
html.dark .box-edge,
html.dark .box-alert,
html.dark .trouble-confirm,
html.dark .warn {
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  color: #fef3c7 !important;
}

html.dark .box-edge b,
html.dark .box-alert b,
html.dark .trouble-confirm strong,
html.dark .warn:before {
  color: #fbbf24 !important;
}

/* Red Danger / Error Callouts */
html.dark .danger,
html.dark .err {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(248, 113, 113, 0.3) !important;
  color: #fee2e2 !important;
}

html.dark .danger:before,
html.dark .err b.t {
  color: #f87171 !important;
}

/* Screenshot Holders & Comparison Cards */
html.dark .shot-solo,
html.dark .comp-card {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

html.dark .caption,
html.dark .diagram-caption,
html.dark .comp-card b {
  color: #94a3b8 !important;
}

html.dark .caption code,
html.dark .code-inline {
  background: #1e293b !important;
  color: #fb923c !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Tables, Checklist Grids & Timelines */
html.dark .checklist-table th,
html.dark .timeline-table th {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .checklist-table td,
html.dark .timeline-table td {
  background: #111827 !important;
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

html.dark hr.sep {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* General Collapsible Details (TOC, FAQs) */
html.dark details:not(.nav-group) {
  background: #111827 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  border-radius: 10px !important;
}

html.dark details:not(.nav-group)[open] {
  background: #111827 !important;
  border-color: rgba(234, 88, 12, 0.35) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

html.dark details:not(.nav-group) summary {
  color: #ffffff !important;
}

html.dark details:not(.nav-group) .a {
  color: #cbd5e1 !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .doc-real-image {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .doc-real-image figcaption {
  color: #94a3b8 !important;
}

/* Page Navigation Buttons in Dark Mode */
html.dark .page-nav-btn {
  background: #111827 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .page-nav-btn:hover {
  background: #1e293b !important;
  border-color: #fb923c !important;
}

html.dark .page-nav-title {
  color: #ffffff !important;
}

html.dark .page-nav-label {
  color: #94a3b8 !important;
}

html.dark .site-footer {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
  color: #64748b !important;
}

@media print {
  .site-header,
  .docs-banner,
  .category-sidebar,
  .category-toggle,
  .article-actions,
  .page-nav,
  .skip-link,
  .reading-progress {
    display: none !important;
  }

  body, .docs-article main {
    background: #fff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .docs-article .wrap {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}
