/* ==========================================================================
   SolStack Documentation — Stylesheet (docs.solstack.space)
   Theme: Precision Dark Teal / Solana Bundler Terminal Aesthetic
   ========================================================================== */

:root {
  /* Color Palette matching SolStack */
  --bg-base: #070B0D;
  --bg-surface: #0A0F12;
  --bg-elevated: #0E1619;
  --bg-overlay: #131E22;
  --bg-glass: rgba(10, 15, 18, 0.85);

  --border-subtle: rgba(0, 229, 195, 0.12);
  --border-medium: rgba(0, 229, 195, 0.24);
  --border-bright: rgba(0, 229, 195, 0.45);
  --border-dim: rgba(242, 250, 249, 0.08);

  --teal-primary: #00E5C3;
  --teal-secondary: #35FFE1;
  --teal-dark: #008f7a;
  --teal-glow: rgba(0, 229, 195, 0.16);
  --teal-glow-strong: rgba(0, 229, 195, 0.32);

  --text-primary: #F2FAF9;
  --text-secondary: #ADC1BE;
  --text-muted: #78918E;
  --text-dim: #4B6360;

  --accent-cyan: #35FFE1;
  --accent-gold: #F5C542;
  --accent-rose: #FF5A76;
  --accent-purple: #B288FF;
  --accent-blue: #3E92CC;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, Monaco, "SF Mono", monospace;

  /* Layout */
  --topbar-height: 64px;
  --sidebar-width: 280px;
  --content-max-width: 900px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms ease;
  --transition-med: 250ms var(--ease-out);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-base);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 24px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, rgba(0, 229, 195, 0.05) 0%, transparent 65%),
              radial-gradient(circle at 100% 40%, rgba(53, 255, 225, 0.03) 0%, transparent 50%),
              var(--bg-base);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Global Selection */
::selection {
  background: rgba(0, 229, 195, 0.28);
  color: var(--teal-secondary);
}

a {
  color: var(--teal-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--teal-secondary);
}

img, svg {
  vertical-align: middle;
}

/* ==========================================================================
   Header / Top Navigation
   ========================================================================== */

.docs-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-height);
  background: rgba(7, 11, 13, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  background: rgba(0, 229, 195, 0.12);
  color: var(--teal-primary);
  border: 1px solid rgba(0, 229, 195, 0.3);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Header Search */
.header-search {
  position: relative;
  flex: 1;
  max-width: 360px;
}

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

.search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 38px;
  padding: 0 38px 0 36px;
  background: rgba(14, 22, 25, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  border-color: var(--teal-primary);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

.search-input::placeholder {
  color: var(--text-muted);
}

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

/* Header Links */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.header-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.header-btn-launch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  background: var(--teal-primary);
  color: #04100E;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 10px rgba(0, 229, 195, 0.2);
}

.header-btn-launch:hover {
  background: var(--teal-secondary);
  color: #04100E;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 229, 195, 0.35);
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  color: var(--text-primary);
  cursor: pointer;
}

/* ==========================================================================
   Documentation Main Layout (Sidebar + Content)
   ========================================================================== */

.docs-shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex: 1;
  position: relative;
}

/* Sticky Sidebar */
.docs-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: calc(100vh - var(--topbar-height));
  position: sticky;
  top: var(--topbar-height);
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-base);
  overflow-y: auto;
  padding: 24px 16px 40px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
}

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

.sidebar-nav-group {
  margin-bottom: 24px;
}

.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 10px;
}

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

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: rgba(0, 229, 195, 0.05);
}

.sidebar-link.active {
  color: var(--teal-primary);
  font-weight: 600;
  background: rgba(0, 229, 195, 0.1);
  border-left: 3px solid var(--teal-primary);
  padding-left: 9px;
}

.sidebar-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.sidebar-link.active .sidebar-pill {
  background: rgba(0, 229, 195, 0.2);
  color: var(--teal-primary);
}

/* ==========================================================================
   Documentation Main Content Area
   ========================================================================== */

.docs-content {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 80px 48px;
}

.content-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* Hero Section */
.docs-hero {
  padding: 32px 0 44px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 48px;
}

.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 16px;
}

.docs-breadcrumb span {
  color: var(--teal-primary);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
  background: linear-gradient(135deg, #FFFFFF 0%, #D4F4ED 60%, var(--teal-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 780px;
}

.hero-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-primary);
  box-shadow: 0 0 8px var(--teal-primary);
}

/* Documentation Sections */
.docs-section {
  margin-bottom: 64px;
  scroll-margin-top: calc(var(--topbar-height) + 24px);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-primary);
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title a.header-anchor {
  color: var(--text-muted);
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.section-title:hover a.header-anchor {
  opacity: 0.6;
}

.section-title a.header-anchor:hover {
  opacity: 1;
  color: var(--teal-primary);
}

.section-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

h3.subheading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 14px;
  letter-spacing: -0.01em;
}

h4.subsubheading {
  font-size: 1.05rem;
  font-weight: 650;
  color: #D4F4ED;
  margin: 24px 0 10px;
}

p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

ul, ol {
  color: var(--text-secondary);
  margin: 0 0 20px 24px;
  line-height: 1.75;
}

li {
  margin-bottom: 6px;
}

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

/* ==========================================================================
   Cards & Content Modules
   ========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.docs-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-med), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.docs-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 12px var(--teal-glow);
}

.card-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 195, 0.1);
  border: 1px solid rgba(0, 229, 195, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-primary);
  margin-bottom: 14px;
  font-size: 1.2rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.6;
}

/* ==========================================================================
   Callout Alert Boxes (Note, Tip, Important, Warning, Caution)
   ========================================================================== */

.callout {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 24px 0;
  border-left: 4px solid;
  background: var(--bg-elevated);
  position: relative;
}

.callout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

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

/* Callout Variants */
.callout-tip {
  border-left-color: var(--teal-primary);
  background: rgba(0, 229, 195, 0.04);
  border: 1px solid rgba(0, 229, 195, 0.15);
  border-left-width: 4px;
}
.callout-tip .callout-header {
  color: var(--teal-primary);
}

.callout-note {
  border-left-color: var(--accent-blue);
  background: rgba(62, 146, 204, 0.04);
  border: 1px solid rgba(62, 146, 204, 0.15);
  border-left-width: 4px;
}
.callout-note .callout-header {
  color: var(--accent-blue);
}

.callout-important {
  border-left-color: var(--accent-purple);
  background: rgba(178, 136, 255, 0.04);
  border: 1px solid rgba(178, 136, 255, 0.15);
  border-left-width: 4px;
}
.callout-important .callout-header {
  color: var(--accent-purple);
}

.callout-warning {
  border-left-color: var(--accent-gold);
  background: rgba(245, 197, 66, 0.05);
  border: 1px solid rgba(245, 197, 66, 0.2);
  border-left-width: 4px;
}
.callout-warning .callout-header {
  color: var(--accent-gold);
}

.callout-caution {
  border-left-color: var(--accent-rose);
  background: rgba(255, 90, 118, 0.06);
  border: 1px solid rgba(255, 90, 118, 0.25);
  border-left-width: 4px;
}
.callout-caution .callout-header {
  color: var(--accent-rose);
}

/* ==========================================================================
   Visual Flowcharts & Architecture Diagram (CSS-only)
   ========================================================================== */

.diagram-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 28px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-dim);
}

.diagram-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.diagram-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 229, 195, 0.12);
  color: var(--teal-primary);
  border: 1px solid rgba(0, 229, 195, 0.2);
}

.flow-nodes-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  padding: 10px 0;
}

.flow-node {
  flex: 1;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  position: relative;
  transition: all var(--transition-fast);
}

.flow-node:hover {
  border-color: var(--teal-primary);
  box-shadow: 0 0 16px var(--teal-glow);
}

.flow-node.highlight {
  border-color: var(--teal-primary);
  background: linear-gradient(180deg, rgba(0, 229, 195, 0.08) 0%, var(--bg-elevated) 100%);
}

.node-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
  background: rgba(0, 229, 195, 0.15);
  color: var(--teal-primary);
}

.node-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.node-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0;
}

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-primary);
  font-weight: 700;
  font-size: 1.2rem;
  opacity: 0.7;
}

/* ==========================================================================
   Step-by-Step Interactive Process Modules
   ========================================================================== */

.step-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 28px 0;
}

.step-card {
  display: flex;
  gap: 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color var(--transition-fast);
}

.step-card:hover {
  border-color: var(--border-medium);
}

.step-number {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: rgba(0, 229, 195, 0.12);
  border: 1px solid var(--teal-primary);
  color: var(--teal-primary);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.step-body {
  flex: 1;
}

.step-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.step-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
}

.step-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

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

table.docs-table th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-medium);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table.docs-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-secondary);
  vertical-align: top;
  line-height: 1.6;
}

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

table.docs-table tr:hover td {
  background: rgba(0, 229, 195, 0.02);
}

table.docs-table code {
  font-size: 0.82rem;
}

/* ==========================================================================
   Code Blocks, Inline Code & Copy Buttons
   ========================================================================== */

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 229, 195, 0.08);
  color: var(--teal-secondary);
  border: 1px solid rgba(0, 229, 195, 0.15);
}

.code-snippet-wrap {
  position: relative;
  margin: 20px 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-dim);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.copy-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  color: var(--teal-primary);
  border-color: var(--teal-primary);
  background: rgba(0, 229, 195, 0.1);
}

.copy-btn.copied {
  color: #04100E;
  background: var(--teal-primary);
  border-color: var(--teal-primary);
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #D4F4ED;
}

/* ==========================================================================
   Interactive Comparative Tabs (e.g. Bundle vs Dev Buy Only)
   ========================================================================== */

.tabs-container {
  margin: 24px 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
}

.tabs-nav {
  display: flex;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.tab-btn {
  flex: 1;
  padding: 12px 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: var(--teal-primary);
  background: var(--bg-surface);
  border-bottom-color: var(--teal-primary);
}

.tab-panel {
  padding: 24px;
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ==========================================================================
   Collapsible Details / Accordion
   ========================================================================== */

details.docs-accordion {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin: 14px 0;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

details.docs-accordion[open] {
  border-color: var(--border-medium);
}

details.docs-accordion summary {
  padding: 14px 18px;
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
  background: var(--bg-surface);
  transition: background var(--transition-fast);
}

details.docs-accordion summary::-webkit-details-marker {
  display: none;
}

details.docs-accordion summary:hover {
  background: rgba(0, 229, 195, 0.03);
}

details.docs-accordion summary::after {
  content: '›';
  font-size: 1.2rem;
  color: var(--teal-primary);
  transition: transform var(--transition-fast);
}

details.docs-accordion[open] summary::after {
  transform: rotate(90deg);
}

.accordion-content {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border-dim);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.docs-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 11, 13, 0.95);
  padding: 40px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand-strip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--teal-primary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1080px) {
  :root {
    --sidebar-width: 240px;
  }
  .docs-content {
    padding: 32px 32px 64px;
  }
}

@media (max-width: 860px) {
  .mobile-nav-toggle {
    display: inline-flex;
  }

  .header-search {
    display: none;
  }

  .docs-sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: -100%;
    width: 300px;
    height: calc(100vh - var(--topbar-height));
    z-index: 99;
    transition: left var(--transition-med);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
  }

  .docs-sidebar.mobile-open {
    left: 0;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 98;
  }

  .sidebar-backdrop.active {
    display: block;
  }

  .docs-content {
    padding: 24px 20px 60px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .flow-nodes-container {
    flex-direction: column;
  }

  .flow-arrow {
    transform: rotate(90deg);
    margin: 4px 0;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.65rem;
  }
  .section-title {
    font-size: 1.45rem;
  }
  .header-inner {
    padding: 0 16px;
  }
  .docs-card {
    padding: 16px;
  }
}
