/* ==========================================================================
   ODCS Documentation Portal & Specification Reader Stylesheet
   Full Cybernetic Theme, Ambient Glows, High-Tech Terminal Code Blocks,
   Dynamic Mouse Spotlights, and Seamless Index-Matched Visuals.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Ambient Atmospheric Orbs for Docs
   -------------------------------------------------------------------------- */
.aurora-orb-3 {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.45;
  width: 580px;
  height: 480px;
  top: 800px;
  left: -120px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16) 0%, rgba(0, 240, 255, 0.12) 50%, transparent 80%);
  animation: floatAurora1 16s ease-in-out infinite alternate-reverse;
}

/* --------------------------------------------------------------------------
   Top Reading Progress Bar
   -------------------------------------------------------------------------- */
.docs-reading-progress {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #00f0ff 0%, #00ffaa 60%, #38bdf8 100%);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.75), 0 0 20px rgba(0, 255, 170, 0.45);
  z-index: 1001;
  transition: width 0.1s ease-out;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Mobile Responsive Navigation Bar (Below Header on <960px)
   -------------------------------------------------------------------------- */
.docs-mobile-bar {
  display: none;
  position: sticky;
  top: var(--header-height);
  z-index: 900;
  background: rgba(6, 11, 24, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  padding: 10px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.docs-sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-sm);
  color: var(--cyan-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.docs-sidebar-toggle-btn:hover {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--cyan-primary);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
  color: #fff;
}

.docs-mobile-current {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

/* --------------------------------------------------------------------------
   Primary Docs Layout: Sticky Sidebar + Main Specification Surface
   -------------------------------------------------------------------------- */
.docs-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: calc(100vh - var(--header-height));
  position: relative;
  max-width: 1540px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Glassmorphic Sticky Sidebar
   -------------------------------------------------------------------------- */
.docs-sidebar {
  background: rgba(6, 11, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(0, 240, 255, 0.14);
  box-shadow: 6px 0 30px rgba(0, 0, 0, 0.45);
  padding: 32px 20px 48px;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.docs-sidebar::-webkit-scrollbar {
  width: 5px;
}
.docs-sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.docs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.2);
  border-radius: 4px;
}
.docs-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-primary);
  box-shadow: 0 0 8px var(--cyan-glow);
}

/* Search Box with Cyber SVG & Shortcut Pill */
.docs-search-box {
  position: relative;
  margin-bottom: 6px;
}

.docs-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.docs-search-icon {
  position: absolute;
  left: 14px;
  color: var(--cyan-primary);
  pointer-events: none;
  opacity: 0.85;
}

.docs-search-input {
  width: 100%;
  background: rgba(13, 20, 36, 0.65);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-sm);
  color: #f1f5f9;
  padding: 10px 42px 10px 38px;
  font-size: 0.84rem;
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.25s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

.docs-search-input:focus {
  border-color: var(--cyan-primary);
  background: rgba(0, 240, 255, 0.06);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.2), 0 0 20px rgba(0, 240, 255, 0.25), inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.docs-search-input::placeholder {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.docs-search-clear {
  position: absolute;
  right: 36px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 6px;
  border-radius: 3px;
  display: none;
  transition: color 0.2s ease;
}

.docs-search-clear:hover {
  color: var(--rose-alert);
}

.docs-search-kbd {
  position: absolute;
  right: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 6px;
  pointer-events: none;
}

/* Nav Groups */
.docs-nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--cyan-primary);
  padding-left: 6px;
  margin-bottom: 4px;
}

.docs-group-title::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan-primary);
  box-shadow: 0 0 8px var(--cyan-glow);
}

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

.docs-nav-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: #94a3b8;
  font-weight: 500;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  position: relative;
}

.docs-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.badge-cyan {
  background: rgba(0, 240, 255, 0.1);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.badge-purple {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-emerald {
  background: rgba(0, 255, 170, 0.1);
  color: #00ffaa;
  border: 1px solid rgba(0, 255, 170, 0.3);
}

.docs-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.docs-nav-item a:hover {
  color: #ffffff;
  background: rgba(0, 240, 255, 0.05);
  border-color: rgba(0, 240, 255, 0.15);
  transform: translateX(5px);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.docs-nav-item.active a {
  color: #00f0ff;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.14) 0%, rgba(0, 240, 255, 0.03) 100%);
  border-left: 3px solid var(--cyan-primary);
  border-color: rgba(0, 240, 255, 0.28);
  border-left-color: var(--cyan-primary);
  box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.12);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.45);
}

.docs-nav-item.active a .docs-nav-badge {
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* Sidebar Bottom Telemetry Box */
.docs-sidebar-telemetry {
  margin-top: auto;
  background: linear-gradient(135deg, rgba(0, 255, 170, 0.06), rgba(0, 240, 255, 0.03));
  border: 1px solid rgba(0, 255, 170, 0.22);
  border-radius: var(--radius-sm);
  padding: 14px 14px;
}

.sidebar-telemetry-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--emerald-resilience);
  margin-bottom: 6px;
}

.telemetry-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-resilience);
  box-shadow: 0 0 8px var(--emerald-glow);
  animation: telemetryPulse 2s infinite ease-in-out;
}

@keyframes telemetryPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 8px var(--emerald-glow);
  }
  50% {
    transform: scale(1.35);
    opacity: 0.75;
    box-shadow: 0 0 16px var(--emerald-glow);
  }
}

.sidebar-telemetry-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Main Content Area
   -------------------------------------------------------------------------- */
.docs-main-content {
  padding: 44px 56px 100px;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

/* Breadcrumb Navigation */
.docs-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-bottom: 24px;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.breadcrumb-item:hover {
  color: var(--cyan-primary);
  text-shadow: 0 0 8px var(--cyan-glow);
}

.breadcrumb-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
}

.breadcrumb-active {
  color: var(--text-headline);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Upgraded High-Tech Spec Hero Metadata Card (Matches Index.html)
   -------------------------------------------------------------------------- */
.spec-meta-card {
  position: relative;
  background: linear-gradient(135deg, rgba(13, 22, 40, 0.8), rgba(7, 12, 22, 0.9));
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  margin-bottom: 44px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Cursor Mouse Spotlight on Hero Card */
.spec-meta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(450px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 240, 255, 0.12), transparent 50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 1;
}

.spec-meta-card:hover::before {
  opacity: 1;
}

.spec-meta-card:hover {
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), 0 0 24px rgba(0, 240, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Cyber Corner Accents */
.spec-meta-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-top: 2px solid var(--cyan-primary);
  border-right: 2px solid var(--cyan-primary);
  pointer-events: none;
  opacity: 0.8;
}

.spec-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.spec-meta-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.spec-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 255, 170, 0.1);
  border: 1px solid rgba(0, 255, 170, 0.35);
  border-radius: var(--radius-full);
  color: var(--emerald-resilience);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 12px;
  letter-spacing: 0.4px;
}

.pill-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald-resilience);
  box-shadow: 0 0 8px var(--emerald-glow);
  animation: telemetryPulse 2s infinite ease-in-out;
}

.spec-id-pill {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-full);
  color: var(--cyan-primary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 11px;
}

.spec-license-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 4px 10px;
}

.spec-meta-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spec-meta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 20, 36, 0.7);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.spec-meta-btn:hover {
  background: rgba(0, 240, 255, 0.14);
  border-color: var(--cyan-primary);
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.3);
  transform: translateY(-2px);
}

.spec-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
  position: relative;
  z-index: 2;
}

.telemetry-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.telemetry-lbl {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.telemetry-val {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
  color: #f1f5f9;
}

.text-emerald {
  color: var(--emerald-resilience);
}

.text-cyan {
  color: var(--cyan-primary);
}

/* --------------------------------------------------------------------------
   Rendered Markdown Content Typography & Cyber Polish
   -------------------------------------------------------------------------- */
.docs-rendered-body {
  position: relative;
}

/* Animated Gradient H1 */
.docs-rendered-body h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 15%, #7dd3fc 65%, #00f0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 22px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-shadow: 0 0 35px rgba(0, 240, 255, 0.22);
}

.docs-rendered-body h1::after {
  content: '';
  display: block;
  width: 90px;
  height: 3px;
  margin-top: 16px;
  background: linear-gradient(90deg, var(--cyan-primary) 0%, var(--emerald-resilience) 70%, transparent 100%);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--cyan-glow);
}

/* Section Headings H2 with Anchor Link */
.docs-rendered-body h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 52px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.16);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.docs-rendered-body h2 .heading-anchor {
  color: rgba(0, 240, 255, 0.4);
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-weight: 400;
  opacity: 0;
  transition: all 0.2s ease;
  text-decoration: none;
}

.docs-rendered-body h2:hover .heading-anchor {
  opacity: 1;
  color: var(--cyan-primary);
  text-shadow: 0 0 8px var(--cyan-glow);
}

/* H3 Subheadings */
.docs-rendered-body h3 {
  font-family: var(--font-display);
  font-size: 1.26rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 36px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.docs-rendered-body h3::before {
  content: '▸';
  color: var(--cyan-primary);
  font-size: 0.9rem;
}

/* Body Paragraphs */
.docs-rendered-body p {
  font-size: 1.02rem;
  line-height: 1.82;
  color: #cbd5e1;
  margin-bottom: 22px;
}

.docs-rendered-body strong {
  color: #ffffff;
  font-weight: 700;
}

/* Cyber Neon Horizontal Rule */
.docs-rendered-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 240, 255, 0.3) 30%, rgba(0, 255, 170, 0.3) 70%, transparent 100%);
  margin: 42px 0;
  position: relative;
}

.docs-rendered-body hr::after {
  content: '◈';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-deep);
  padding: 0 10px;
  color: var(--cyan-primary);
  font-size: 0.75rem;
  box-shadow: 0 0 10px var(--cyan-glow);
}

/* Lists with Neon Diamond Bullets */
.docs-rendered-body ul {
  list-style: none;
  margin: 0 0 26px 4px;
}

.docs-rendered-body ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  line-height: 1.7;
  color: #cbd5e1;
  transition: transform 0.2s ease;
}

.docs-rendered-body ul li::before {
  content: '◈';
  position: absolute;
  left: 4px;
  top: 0px;
  color: var(--cyan-primary);
  font-size: 0.72rem;
  transition: all 0.2s ease;
}

.docs-rendered-body ul li:hover::before {
  color: var(--emerald-resilience);
  text-shadow: 0 0 8px var(--emerald-glow);
  transform: scale(1.2);
}

.docs-rendered-body ol {
  margin: 0 0 26px 28px;
  color: #cbd5e1;
}

.docs-rendered-body ol li {
  margin-bottom: 10px;
  line-height: 1.7;
}

/* Inline Code Pill */
.docs-rendered-body code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(0, 240, 255, 0.07);
  border: 1px solid rgba(0, 240, 255, 0.25);
  padding: 2px 7px;
  border-radius: 5px;
  color: #7dd3fc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* --------------------------------------------------------------------------
   Futuristic Terminal Code Blocks (.docs-code-card)
   -------------------------------------------------------------------------- */
.docs-code-card {
  position: relative;
  background: #050813;
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: var(--radius-sm);
  margin: 30px 0;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.docs-code-card:hover {
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65), 0 0 22px rgba(0, 240, 255, 0.16);
}

/* Terminal Window Header Bar */
.code-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  background: rgba(13, 20, 36, 0.95);
  border-bottom: 1px solid rgba(0, 240, 255, 0.12);
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red {
  background: #ff5f56;
  box-shadow: 0 0 6px rgba(255, 95, 86, 0.4);
}

.dot-yellow {
  background: #ffbd2e;
  box-shadow: 0 0 6px rgba(255, 189, 46, 0.4);
}

.dot-green {
  background: #27c93f;
  box-shadow: 0 0 6px rgba(39, 201, 63, 0.4);
}

.code-lang-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--cyan-primary);
  background: rgba(0, 240, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.copy-code-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-code-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--cyan-primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.copy-code-btn.copied {
  background: rgba(0, 255, 170, 0.15);
  border-color: var(--emerald-resilience);
  color: var(--emerald-resilience);
  box-shadow: 0 0 12px var(--emerald-glow);
}

/* Pre & Code Block Inner */
.docs-code-card pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.65;
  color: #f1f5f9;
}

.docs-code-card pre::-webkit-scrollbar {
  height: 6px;
}
.docs-code-card pre::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.25);
  border-radius: 4px;
}

/* Syntax Highlighting Tokens */
.token-kw {
  color: #38bdf8;
  font-weight: 600;
}

.token-fn {
  color: #facc15;
}

.token-str {
  color: #34d399;
}

.token-num {
  color: #c084fc;
}

.token-builtin {
  color: #2dd4bf;
  font-weight: 600;
}

.token-comment {
  color: #64748b;
  font-style: italic;
}

.token-type {
  color: #60a5fa;
}

/* --------------------------------------------------------------------------
   Upgraded Callouts / Invariant Banners (.docs-callout)
   -------------------------------------------------------------------------- */
.docs-callout {
  position: relative;
  background: linear-gradient(135deg, rgba(13, 22, 40, 0.75), rgba(7, 12, 22, 0.85));
  border-left: 4px solid var(--cyan-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 32px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.docs-callout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.callout-invariant {
  border-left-color: var(--emerald-resilience);
  background: linear-gradient(135deg, rgba(0, 255, 170, 0.08) 0%, rgba(7, 12, 22, 0.85) 100%);
  border-top: 1px solid rgba(0, 255, 170, 0.2);
  border-right: 1px solid rgba(0, 255, 170, 0.2);
  border-bottom: 1px solid rgba(0, 255, 170, 0.2);
}

.callout-invariant .docs-callout-header {
  color: var(--emerald-resilience);
}

.callout-warning {
  border-left-color: var(--amber-warning);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(7, 12, 22, 0.85) 100%);
  border-top: 1px solid rgba(245, 158, 11, 0.2);
  border-right: 1px solid rgba(245, 158, 11, 0.2);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.callout-warning .docs-callout-header {
  color: var(--amber-warning);
}

.callout-info {
  border-left-color: var(--cyan-primary);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08) 0%, rgba(7, 12, 22, 0.85) 100%);
  border-top: 1px solid rgba(0, 240, 255, 0.2);
  border-right: 1px solid rgba(0, 240, 255, 0.2);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.callout-info .docs-callout-header {
  color: var(--cyan-primary);
}

.docs-callout p:last-child {
  margin-bottom: 0;
}

/* Fallback for native blockquote */
.docs-rendered-body blockquote {
  background: rgba(0, 240, 255, 0.05);
  border-left: 3px solid var(--cyan-primary);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 28px 0;
  color: #f1f5f9;
}

/* --------------------------------------------------------------------------
   Futuristic Cyber Tables
   -------------------------------------------------------------------------- */
.docs-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 32px 0;
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(7, 12, 22, 0.8);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.docs-rendered-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0;
}

.docs-rendered-body th,
.docs-rendered-body td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.docs-rendered-body th {
  background: rgba(0, 240, 255, 0.09);
  color: var(--cyan-primary);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1.2px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.25);
}

.docs-rendered-body tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.018);
}

.docs-rendered-body tr:hover td {
  background: rgba(0, 240, 255, 0.05);
  box-shadow: inset 3px 0 0 var(--cyan-primary);
}

/* --------------------------------------------------------------------------
   Bottom Specification Pagination Navigation
   -------------------------------------------------------------------------- */
.docs-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 60px;
  padding-top: 36px;
  border-top: 1px solid rgba(0, 240, 255, 0.16);
}

.docs-pagination-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(13, 22, 40, 0.7), rgba(7, 12, 22, 0.85));
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.docs-pagination-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 240, 255, 0.12), transparent 50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.docs-pagination-card:hover::before {
  opacity: 1;
}

.docs-pagination-card:hover {
  border-color: var(--cyan-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 18px rgba(0, 240, 255, 0.25);
  transform: translateY(-3px);
}

.pagination-dir {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cyan-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.docs-pagination-card.next {
  text-align: right;
  grid-column: 2;
}

.docs-pagination-card.next .pagination-dir {
  justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   Floating Back-to-Top Cyber Button
   -------------------------------------------------------------------------- */
.docs-back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(6, 11, 24, 0.88);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--cyan-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 990;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 14px rgba(0, 240, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.docs-back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.docs-back-to-top:hover {
  background: var(--cyan-primary);
  color: #03060c;
  box-shadow: 0 0 24px var(--cyan-glow), 0 0 36px rgba(0, 240, 255, 0.6);
  transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .docs-mobile-bar {
    display: flex;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: fixed;
    top: calc(var(--header-height) + 52px);
    left: 0;
    width: 100%;
    max-width: 380px;
    height: calc(100vh - var(--header-height) - 52px);
    background: rgba(6, 11, 24, 0.98);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.7);
    z-index: 950;
  }

  .docs-sidebar.mobile-open {
    transform: translateX(0);
  }

  .docs-main-content {
    padding: 32px 24px 80px;
  }

  .spec-meta-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .spec-telemetry-grid {
    grid-template-columns: 1fr 1fr;
  }

  .docs-rendered-body h1 {
    font-size: 2rem;
  }

  .docs-rendered-body h2 {
    font-size: 1.45rem;
  }
}

@media (max-width: 640px) {
  .docs-main-content {
    padding: 24px 16px 70px;
  }

  .spec-telemetry-grid {
    grid-template-columns: 1fr;
  }

  .docs-pagination {
    grid-template-columns: 1fr;
  }

  .docs-pagination-card.next {
    grid-column: 1;
    text-align: left;
  }

  .docs-pagination-card.next .pagination-dir {
    justify-content: flex-start;
  }

  .spec-meta-actions {
    width: 100%;
  }

  .spec-meta-btn {
    flex: 1;
    justify-content: center;
  }
}
