:root {
  --bg: #05050a;
  --bg-2: #08080f;
  --bg-elev: #0d0d16;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f0f0f5;
  --text-dim: #b0b0c0;
  --text-muted: #6b6b80;
  --accent: #00d4ff;
  --accent-2: #a855f7;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --max-content: 780px;
  --sidebar-w: 280px;
  --toc-w: 220px;
  --nav-h: 60px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(0, 212, 255, 0.3); color: var(--text); }

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: 400;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  user-select: none;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--accent);
  color: #05050a;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0 0 8px 0;
  transition: left 0.15s;
}
.skip-link:focus { left: 0; }

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 100;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
  transition: width 0.05s linear;
}

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 90;
  display: flex;
  align-items: center;
  background: rgba(5, 5, 10, 0.78);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  height: 100%;
  padding: 0 20px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.35);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-mark .material-symbols-outlined {
  color: #05050a;
  font-size: 17px;
  font-variation-settings: 'FILL' 1, 'wght' 600;
}
.brand-sep {
  color: var(--text-muted);
  font-weight: 300;
  font-size: 1.1rem;
}
.brand-section {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.2s;
}
.brand-section:hover { color: var(--text); border-color: var(--border-strong); }

.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
}
.search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.2s;
  text-align: left;
}
.search-trigger:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  color: var(--text-dim);
}
.search-trigger .material-symbols-outlined { font-size: 18px; }
.search-trigger-kbd {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.search-trigger-kbd kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: all 0.2s;
}
.topbar-link:hover { color: var(--text); background: var(--surface); }
.topbar-version {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 4px 9px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 5px;
  color: var(--accent);
  letter-spacing: 0.03em;
}
.sidebar-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: 7px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.2s;
}
.sidebar-toggle:hover { background: var(--surface); }

.sidebar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px 14px 32px;
  z-index: 80;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.sidebar-group { margin-bottom: 16px; }
.sidebar-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
  margin-bottom: 4px;
}
.sidebar-group-label:hover {
  color: var(--text-dim);
  background: var(--surface);
}
.sidebar-group-label .material-symbols-outlined {
  font-size: 16px;
  transition: transform 0.2s var(--ease-out);
}
.sidebar-group.collapsed .sidebar-group-label .material-symbols-outlined {
  transform: rotate(-90deg);
}
.sidebar-group.collapsed .sidebar-list { display: none; }

.sidebar-list { display: flex; flex-direction: column; gap: 1px; }
.sidebar-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.86rem;
  color: var(--text-dim);
  transition: all 0.15s;
  position: relative;
  line-height: 1.4;
}
.sidebar-list a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px;
  height: 60%;
  background: var(--accent);
  border-radius: 1px;
  transition: transform 0.2s var(--ease-out);
}
.sidebar-list a:hover {
  color: var(--text);
  background: var(--surface);
}
.sidebar-list a.active {
  color: var(--accent);
  background: rgba(0, 212, 255, 0.06);
}
.sidebar-list a.active::before { transform: translateY(-50%) scaleY(1); }
.sidebar-list a .material-symbols-outlined {
  font-size: 16px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.sidebar-list a:hover .material-symbols-outlined,
.sidebar-list a.active .material-symbols-outlined { color: var(--accent); }

.sidebar-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: all 0.15s;
}
.sidebar-footer a:hover { color: var(--text); background: var(--surface); }
.sidebar-footer .material-symbols-outlined { font-size: 15px; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 79;
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--toc-w);
  min-height: 100vh;
  padding-top: var(--nav-h);
  max-width: 1600px;
  margin: 0 auto;
}

.content-wrap {
  padding: 32px clamp(24px, 5vw, 64px) 120px;
  min-width: 0;
}
.article {
  max-width: var(--max-content);
  margin: 0 auto;
}

.doc-page { display: none; }
.doc-page.active {
  display: block;
  animation: docPageIn 0.2s var(--ease-out);
}
@keyframes docPageIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 16px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-wrap: wrap;
}
.breadcrumb-group { color: var(--text-muted); }
.breadcrumb-sep { color: var(--text-muted); opacity: 0.5; }
.breadcrumb-current { color: var(--accent); font-weight: 600; }
.breadcrumb-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.page-read {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.copy-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  transition: all 0.2s;
}
.copy-page-btn:hover {
  color: var(--accent);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}
.copy-page-btn.copied {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}
.copy-page-btn .material-symbols-outlined { font-size: 14px; }

.article h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.article h1 + .lead {
  font-size: 1.08rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.article h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-top: 56px;
  margin-bottom: 16px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.article h2 a.anchor {
  color: var(--text-muted);
  font-size: 0.8em;
  opacity: 0;
  transition: opacity 0.2s;
  margin-left: auto;
  cursor: pointer;
}
.article h2:hover a.anchor { opacity: 1; }
.article h2 a.anchor:hover { color: var(--accent); }
.article h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin-top: 32px;
  margin-bottom: 10px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.article h4 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.article p {
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.75;
}
.article p strong { color: var(--text); font-weight: 500; }
.article p a {
  color: var(--accent);
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  transition: all 0.15s;
}
.article p a:hover {
  border-bottom-color: var(--accent);
  background: rgba(0, 212, 255, 0.08);
}
.article ul.bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.article ul.bullets li {
  position: relative;
  padding-left: 22px;
  color: var(--text-dim);
  line-height: 1.7;
}
.article ul.bullets li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 11px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}
.article ol.steps {
  padding-left: 0;
  counter-reset: step;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
}
.article ol.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  color: var(--text-dim);
  line-height: 1.7;
}
.article ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.article ol.steps > li strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.article code:not(pre code) {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84em;
  padding: 2px 6px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 5px;
  color: var(--accent);
  font-weight: 500;
  word-break: break-word;
}
.article a code:not(pre code) {
  text-decoration: underline;
  text-decoration-color: rgba(0, 212, 255, 0.4);
}

.code-block {
  background: #030308;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0;
  position: relative;
}
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.code-block-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.code-block-lang .material-symbols-outlined { font-size: 14px; }
.code-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  transition: all 0.15s;
}
.code-copy:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}
.code-copy .material-symbols-outlined { font-size: 13px; }
.code-block pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--text-dim);
  scrollbar-width: thin;
}
.code-block pre::-webkit-scrollbar { height: 6px; }
.code-block pre::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.code-block code {
  padding: 0 !important;
  background: none !important;
  border: none !important;
  color: inherit !important;
}
.code-kw { color: var(--accent); }
.code-str { color: #86efac; }
.code-cmt { color: var(--text-muted); font-style: italic; }
.code-fn { color: #c4b5fd; }
.code-var { color: #fbbf24; }

.code-tabs {
  background: #030308;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0;
}
.code-tabs-header {
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.code-tabs-header::-webkit-scrollbar { display: none; }
.code-tab {
  padding: 11px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  position: relative;
}
.code-tab:hover { color: var(--text-dim); }
.code-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.code-tabs-copy {
  margin-left: auto;
  padding: 5px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  transition: all 0.15s;
}
.code-tabs-copy:hover { color: var(--text); border-color: var(--border-strong); }
.code-tab-panel { display: none; }
.code-tab-panel.active { display: block; }
.code-tab-panel pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--text-dim);
}

.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin: 20px 0;
  border: 1px solid;
  font-size: 0.9rem;
  line-height: 1.65;
}
.callout .material-symbols-outlined {
  flex-shrink: 0;
  font-size: 20px;
  margin-top: 1px;
  font-variation-settings: 'FILL' 1, 'wght' 500;
}
.callout-body { flex: 1; }
.callout-body strong { color: var(--text); font-weight: 600; }
.callout-body p { margin-bottom: 0; color: inherit; }
.callout-body p + p { margin-top: 8px; }
.callout.info { background: rgba(0, 212, 255, 0.06); border-color: rgba(0, 212, 255, 0.2); color: var(--text-dim); }
.callout.info .material-symbols-outlined { color: var(--accent); }
.callout.warning { background: rgba(245, 158, 11, 0.06); border-color: rgba(245, 158, 11, 0.2); color: var(--text-dim); }
.callout.warning .material-symbols-outlined { color: var(--warning); }
.callout.success { background: rgba(16, 185, 129, 0.06); border-color: rgba(16, 185, 129, 0.2); color: var(--text-dim); }
.callout.success .material-symbols-outlined { color: var(--success); }
.callout.danger { background: rgba(239, 68, 68, 0.06); border-color: rgba(239, 68, 68, 0.2); color: var(--text-dim); }
.callout.danger .material-symbols-outlined { color: var(--danger); }

.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 500px;
}
table.data-table th,
table.data-table td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data-table th {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}
table.data-table td { color: var(--text-dim); }
table.data-table td strong { color: var(--text); font-weight: 500; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: rgba(255, 255, 255, 0.015); }
table.data-table code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78em;
  padding: 1px 5px;
  background: rgba(0, 212, 255, 0.08);
  border-radius: 4px;
  color: var(--accent);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.feature-tile {
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}
.feature-tile:hover {
  border-color: rgba(0, 212, 255, 0.3);
  background: var(--bg-elev);
  transform: translateY(-2px);
}
.feature-tile .material-symbols-outlined {
  color: var(--accent);
  font-size: 22px;
  margin-bottom: 8px;
  display: block;
}
.feature-tile h4 {
  font-size: 0.92rem;
  margin: 0 0 4px;
  color: var(--text);
}
.feature-tile p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

details.faq {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
details.faq[open] {
  border-color: rgba(0, 212, 255, 0.25);
  background: var(--bg-elev);
}
details.faq summary {
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary:hover { color: var(--accent); }
details.faq summary .material-symbols-outlined {
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.25s var(--ease-out);
  flex-shrink: 0;
}
details.faq[open] summary .material-symbols-outlined {
  transform: rotate(45deg);
  color: var(--accent);
}
details.faq .faq-body {
  padding: 0 18px 18px;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.feedback-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  margin: 40px 0 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.feedback-label {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-right: auto;
}
.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: all 0.2s;
}
.feedback-btn:hover { border-color: var(--border-strong); color: var(--text); }
.feedback-btn.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 212, 255, 0.08);
}
.feedback-btn .material-symbols-outlined { font-size: 16px; }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.pager-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}
.pager-link:hover {
  border-color: rgba(0, 212, 255, 0.3);
  background: var(--bg-elev);
  transform: translateY(-2px);
}
.pager-link.next { text-align: right; align-items: flex-end; }
.pager-link.empty { visibility: hidden; pointer-events: none; }
.pager-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.pager-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pager-link.next .pager-title { flex-direction: row-reverse; }
.pager-link:hover .pager-title { color: var(--accent); }

.toc {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  max-height: calc(100vh - var(--nav-h) - 64px);
  overflow-y: auto;
  padding: 32px 20px 32px 0;
  font-size: 0.8rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.toc::-webkit-scrollbar { width: 4px; }
.toc::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
.toc-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-left: 12px;
}
.toc ul {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-left: 1px solid var(--border);
}
.toc ul li a {
  display: block;
  padding: 5px 0 5px 14px;
  color: var(--text-muted);
  line-height: 1.5;
  transition: color 0.15s;
  position: relative;
  margin-left: -1px;
  border-left: 2px solid transparent;
}
.toc ul li a:hover { color: var(--text-dim); }
.toc ul li a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}
.toc ul li a.toc-h3 { padding-left: 26px; font-size: 0.75rem; }
.toc-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toc-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all 0.15s;
}
.toc-footer a:hover { color: var(--accent); background: var(--surface); }
.toc-footer .material-symbols-outlined { font-size: 14px; }

.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 80px 16px 16px;
  align-items: flex-start;
  justify-content: center;
}
.search-modal.open { display: flex; animation: fadeIn 0.15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.search-panel {
  width: 100%;
  max-width: 680px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(0, 212, 255, 0.08);
  overflow: hidden;
  animation: slideUp 0.2s var(--ease-out);
  display: flex;
  flex-direction: column;
  max-height: 75vh;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.search-input-wrap .material-symbols-outlined {
  color: var(--text-muted);
  font-size: 22px;
  flex-shrink: 0;
}
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
.search-input::placeholder { color: var(--text-muted); }
.search-esc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  padding: 3px 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-results {
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
}
.search-results::-webkit-scrollbar { width: 5px; }
.search-results::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.search-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
  width: 100%;
}
.search-result:hover,
.search-result.focused {
  background: rgba(0, 212, 255, 0.08);
}
.search-result .material-symbols-outlined {
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}
.search-result.focused .material-symbols-outlined { color: var(--accent); }
.search-result-body { flex: 1; min-width: 0; }
.search-result-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
}
.search-result.focused .search-result-title { color: var(--accent); }
.search-result-snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.search-result-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result mark {
  background: rgba(0, 212, 255, 0.25);
  color: var(--text);
  padding: 0 2px;
  border-radius: 2px;
}
.search-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.search-empty .material-symbols-outlined {
  font-size: 32px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
  margin: 0 auto 12px;
}
.search-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.search-footer-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.search-footer kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  padding: 2px 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-dim);
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s var(--ease-out);
  z-index: 70;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.08);
  transform: translateY(-2px);
}

.ui-hero-banner {
  position: relative;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(168, 85, 247, 0.06));
  border: 1px solid rgba(0, 212, 255, 0.15);
  margin: 24px 0 40px;
  overflow: hidden;
}
.ui-hero-banner::before {
  content: '';
  position: absolute;
  top: -50%; left: 50%;
  width: 600px; height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0,212,255,0.15), transparent 60%);
  pointer-events: none;
  animation: heroGlow 6s ease-in-out infinite;
}
@keyframes heroGlow {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}
.ui-hero-banner .badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.ui-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ui-hero-badge .material-symbols-outlined { font-size: 13px; color: var(--accent); }
.ui-hero-badge.live .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.ui-hero-banner h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}
.ui-hero-banner p {
  position: relative;
  z-index: 1;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 0;
  max-width: 700px;
}

.ui-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 24px 0 32px;
}
.ui-feature-card {
  padding: 20px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-elev));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-out);
}
.ui-feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.ui-feature-card:hover {
  border-color: rgba(0, 212, 255, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}
.ui-feature-card:hover::before { opacity: 1; }
.ui-feature-card .icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(0, 212, 255, 0.25);
  display: grid;
  place-items: center;
  color: var(--accent);
  margin-bottom: 14px;
  transition: transform 0.3s var(--ease-out);
}
.ui-feature-card:hover .icon-wrap { transform: scale(1.08) rotate(-6deg); }
.ui-feature-card .icon-wrap .material-symbols-outlined { font-size: 22px; }
.ui-feature-card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.ui-feature-card p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.screenshot-frame {
  position: relative;
  background: linear-gradient(135deg, var(--bg-elev), var(--bg));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
  transition: border-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.screenshot-frame:hover {
  border-color: rgba(0, 212, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  cursor: zoom-in;
  transition: opacity 0.2s;
}
.screenshot-frame img:hover { opacity: 0.92; }
.screenshot-frame figcaption {
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.screenshot-frame .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.gallery-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.gallery-row .screenshot-frame { margin: 0; }

.shot-annotated {
  position: relative;
  background: linear-gradient(135deg, var(--bg-elev), var(--bg));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
}
.shot-annotated img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
  transition: opacity 0.2s;
}
.shot-annotated img:hover { opacity: 0.92; }
.shot-annotated .pin {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #05050a;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px rgba(5,5,10,0.7), 0 4px 12px rgba(0, 212, 255, 0.5);
  z-index: 2;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.anatomy-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 24px;
  margin: 16px 0 32px;
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  list-style: none;
}
.anatomy-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.5;
}
.anatomy-legend .num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 0.7rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.storyboard {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 16px 0;
  margin: 20px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.storyboard::-webkit-scrollbar { height: 4px; }
.storyboard::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
.storyboard .frame {
  flex-shrink: 0;
  min-width: 160px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  transition: all 0.2s;
}
.storyboard .frame:hover {
  border-color: rgba(0, 212, 255, 0.3);
  background: var(--bg-elev);
}
.storyboard .frame-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: 500;
}
.storyboard .frame-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.storyboard .arrow {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.ui-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.ui-mode-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  transition: all 0.2s;
  cursor: help;
}
.ui-mode-item:hover {
  border-color: rgba(0, 212, 255, 0.4);
  background: var(--bg-elev);
  transform: translateY(-2px);
}
.ui-mode-item .icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(0, 212, 255, 0.25);
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  color: var(--accent);
}
.ui-mode-item .icon-circle .material-symbols-outlined { font-size: 18px; }
.ui-mode-item .label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text);
  margin-bottom: 2px;
}
.ui-mode-item .trigger {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.color-swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.color-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  transition: all 0.2s;
  cursor: help;
}
.color-swatch:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.color-swatch .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2), 0 0 8px currentColor;
  flex-shrink: 0;
}

.kbd-chord {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.kbd-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  box-shadow: 0 3px 0 rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04) inset;
  transition: all 0.15s;
}
.kbd-key:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 0 rgba(0,0,0,0.4), 0 0 16px rgba(0, 212, 255, 0.2);
}
.kbd-plus {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  font-size: 1rem;
}

.arch-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}
.arch-flow::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.arch-flow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.arch-flow-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  min-width: 80px;
}
.arch-flow-node {
  padding: 10px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: var(--text-dim);
  transition: all 0.2s;
}
.arch-flow-node:hover {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.15);
}
.arch-flow-node.accent {
  border-color: rgba(0, 212, 255, 0.4);
  color: var(--accent);
  background: rgba(0, 212, 255, 0.05);
}
.arch-flow-node.purple {
  border-color: rgba(168, 85, 247, 0.4);
  color: var(--accent-2);
  background: rgba(168, 85, 247, 0.05);
}
.arch-flow-node.green {
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}
.arch-flow-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 32px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; animation: lbIn 0.2s ease; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: 95vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-strong);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 1;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.15); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s var(--ease-out);
  z-index: 250;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast .material-symbols-outlined { font-size: 18px; color: var(--success); }

.toc-fab {
  display: none;
  position: fixed;
  bottom: 76px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  color: var(--text);
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 85;
  transition: all 0.2s;
}
.toc-fab:hover { color: var(--accent); border-color: var(--accent); }
.toc-fab .material-symbols-outlined { font-size: 22px; }

.toc-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  background: var(--bg-elev);
  border-top: 1px solid var(--border-strong);
  border-radius: 20px 20px 0 0;
  padding: 20px 24px 32px;
  overflow-y: auto;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s var(--ease-out);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
}
.toc-sheet.open { transform: translateY(0); }
.toc-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.toc-sheet-header span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.toc-sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}
.toc-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc-sheet-list a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: all 0.15s;
}
.toc-sheet-list a:hover,
.toc-sheet-list a.active {
  background: rgba(0, 212, 255, 0.08);
  color: var(--accent);
}
.toc-sheet-list a.toc-h3 {
  padding-left: 28px;
  font-size: 0.82rem;
}

@media (max-width: 1200px) {
  .layout { grid-template-columns: var(--sidebar-w) 1fr; }
  .toc { display: none; }
  .toc-fab { display: flex; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 260px; }
  .topbar-center { display: none; }
  .sidebar-toggle { display: flex; }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-out);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; animation: fadeIn 0.2s ease; }
  .content-wrap { padding: 28px 20px 100px; }
  .topbar-left .brand-sep,
  .topbar-left .brand-section { display: none; }
  .topbar-version { display: none; }
  .copy-page-btn .copy-page-label { display: none; }
  .copy-page-btn { padding: 6px 8px; }
}

@media (max-width: 640px) {
  :root { --nav-h: 56px; }
  .topbar-inner { padding: 0 14px; }
  .topbar-link span:not(.material-symbols-outlined) { display: none; }
  .topbar-link { padding: 8px 8px; }
  .article h1 { font-size: 1.75rem; }
  .article h2 { font-size: 1.35rem; margin-top: 40px; }
  .article h3 { font-size: 1.05rem; margin-top: 24px; }
  .article h1 + .lead { font-size: 1rem; }
  .content-wrap { padding: 24px 16px 80px; }
  .code-block pre,
  .code-tab-panel pre { font-size: 0.76rem; padding: 14px; }
  .pager { grid-template-columns: 1fr; gap: 10px; }
  .pager-link.next { text-align: left; align-items: flex-start; }
  .pager-link.next .pager-title { flex-direction: row; }
  .search-panel { max-height: 80vh; }
  .back-to-top { bottom: 16px; right: 16px; width: 36px; height: 36px; }
  .toc-fab { bottom: 68px; right: 16px; width: 44px; height: 44px; }
  table.data-table { font-size: 0.8rem; }
  table.data-table th,
  table.data-table td { padding: 9px 12px; }
  .ui-hero-banner { padding: 20px; }
  .ui-hero-banner h1 { font-size: 1.6rem; }
  .gallery-row { grid-template-columns: 1fr; }
  .anatomy-legend { grid-template-columns: 1fr; }
  .ui-mode-grid { grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); }
  .shot-annotated .pin {
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    box-shadow: 0 0 0 2px rgba(5,5,10,0.7), 0 3px 8px rgba(0, 212, 255, 0.5);
  }
  .color-swatch-row { gap: 8px; padding: 12px; }
  .color-swatch { padding: 5px 10px 5px 5px; font-size: 0.68rem; }
  .color-swatch .dot { width: 14px; height: 14px; }
  .arch-flow { padding: 16px; }
  .arch-flow-node { font-size: 0.7rem; padding: 8px 12px; }
  .arch-flow-label { min-width: 60px; font-size: 0.6rem; }
  .storyboard .frame { min-width: 130px; }
  .page-breadcrumb { gap: 8px; }
  .feedback-bar { padding: 12px 14px; }
  .feedback-label { font-size: 0.82rem; }
  .toast { bottom: 16px; padding: 8px 14px; font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .doc-page.active { animation: none; }
}
.page-updated {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 3px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.breadcrumb-home {
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.15s;
  cursor: pointer;
}

.breadcrumb-home:hover {
  color: var(--accent);
}

.code-block.code-pulse,
.code-tabs.code-pulse {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.3), 0 0 24px rgba(0, 212, 255, 0.2);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.glossary-letter {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.02em;
}

.limitation-row td:first-child {
  font-weight: 600;
  color: var(--text);
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.theme-toggle .material-symbols-outlined {
  font-size: 18px;
}

.prereq-box {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  margin: 20px 0 28px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.04), rgba(168, 85, 247, 0.04));
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.prereq-box .material-symbols-outlined {
  color: var(--accent);
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  font-variation-settings: 'FILL' 1, 'wght' 500;
}

.prereq-body {
  flex: 1;
}

.prereq-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.prereq-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.prereq-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.prereq-list li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
  flex-shrink: 0;
}

.prereq-list li strong {
  color: var(--text);
  font-weight: 500;
}

.decision-tree {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.decision-node {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.decision-node[open] {
  border-color: rgba(0, 212, 255, 0.3);
  background: var(--bg-elev);
}

.decision-node > summary {
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 0.94rem;
  color: var(--text);
  transition: color 0.15s;
}

.decision-node > summary::-webkit-details-marker { display: none; }
.decision-node > summary:hover { color: var(--accent); }

.decision-node > summary .material-symbols-outlined:first-child {
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
  font-variation-settings: 'FILL' 1, 'wght' 500;
}

.decision-node > summary .material-symbols-outlined:last-child {
  font-size: 18px;
  color: var(--text-muted);
  margin-left: auto;
  transition: transform 0.2s var(--ease-out);
  flex-shrink: 0;
}

.decision-node[open] > summary .material-symbols-outlined:last-child {
  transform: rotate(180deg);
  color: var(--accent);
}

.decision-body {
  padding: 0 18px 16px 50px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.decision-symptom {
  padding: 10px 14px;
  background: var(--surface);
  border-left: 2px solid var(--warning);
  border-radius: 6px;
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.decision-symptom strong {
  color: var(--text);
  font-weight: 600;
}

.decision-fix {
  padding: 10px 14px;
  background: rgba(16, 185, 129, 0.06);
  border-left: 2px solid var(--success);
  border-radius: 6px;
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.decision-fix strong {
  color: var(--success);
  font-weight: 600;
}

.decision-fix code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  padding: 1px 5px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 4px;
  color: var(--accent);
}

[data-jarvis-theme="light"] {
  --bg: #fafaf8;
  --bg-2: #f2f2ef;
  --bg-elev: #ffffff;
  --surface: rgba(0, 0, 0, 0.025);
  --surface-hover: rgba(0, 0, 0, 0.05);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --text: #1a1a1f;
  --text-dim: #4a4a55;
  --text-muted: #757580;
  --accent: #0088b3;
  --accent-2: #7c3aed;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
}

[data-jarvis-theme="light"] body {
  background: var(--bg);
  color: var(--text);
}

[data-jarvis-theme="light"] .topbar {
  background: rgba(250, 250, 248, 0.78);
}

[data-jarvis-theme="light"] .sidebar {
  background: var(--bg-2);
}

[data-jarvis-theme="light"] .code-block,
[data-jarvis-theme="light"] .code-tabs {
  background: #1a1a1f;
  border-color: rgba(0, 0, 0, 0.2);
}

[data-jarvis-theme="light"] .code-block pre,
[data-jarvis-theme="light"] .code-tab-panel pre {
  color: #e0e0e0;
}

[data-jarvis-theme="light"] .code-kw { color: #00d4ff; }
[data-jarvis-theme="light"] .code-cmt { color: #8b8b9a; }
[data-jarvis-theme="light"] .code-str { color: #86efac; }
[data-jarvis-theme="light"] .code-fn { color: #c4b5fd; }
[data-jarvis-theme="light"] .code-var { color: #fbbf24; }

[data-jarvis-theme="light"] .code-block-lang,
[data-jarvis-theme="light"] .code-tab {
  color: #999;
}

[data-jarvis-theme="light"] .code-tab.active {
  color: #00d4ff;
}

[data-jarvis-theme="light"] .code-copy,
[data-jarvis-theme="light"] .code-tabs-copy {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ccc;
}

[data-jarvis-theme="light"] .search-panel {
  background: #fff;
}

[data-jarvis-theme="light"] .lightbox {
  background: rgba(0, 0, 0, 0.9);
}

[data-jarvis-theme="light"] .ui-hero-banner {
  background: linear-gradient(135deg, rgba(0, 136, 179, 0.06), rgba(124, 58, 237, 0.06));
  border-color: rgba(0, 136, 179, 0.2);
}

[data-jarvis-theme="light"] .ui-hero-banner::before {
  opacity: 0.3;
}

[data-jarvis-theme="light"] .prereq-box {
  background: linear-gradient(135deg, rgba(0, 136, 179, 0.05), rgba(124, 58, 237, 0.05));
}

[data-jarvis-theme="light"] .toast {
  background: #fff;
  color: #1a1a1f;
}

[data-jarvis-theme="light"] .back-to-top,
[data-jarvis-theme="light"] .toc-fab,
[data-jarvis-theme="light"] .toc-sheet {
  background: #fff;
}

[data-jarvis-theme="light"] .ui-feature-card {
  background: var(--bg-elev);
}

[data-jarvis-theme="light"] .arch-flow::before {
  opacity: 0.4;
}

@media print {
  @page {
    margin: 1.5cm;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.5;
  }

  .scroll-progress,
  .topbar,
  .sidebar,
  .sidebar-backdrop,
  .toc,
  .toc-fab,
  .toc-sheet,
  .back-to-top,
  .search-modal,
  .lightbox,
  .toast,
  .copy-page-btn,
  .feedback-bar,
  .pager,
  .theme-toggle,
  .skip-link,
  .page-breadcrumb .breadcrumb-actions {
    display: none !important;
  }

  .layout {
    display: block !important;
    padding-top: 0 !important;
    max-width: 100% !important;
  }

  .content-wrap {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .article {
    max-width: 100% !important;
  }

  .doc-page:not(.active) {
    display: none !important;
  }

  .page-breadcrumb {
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
    margin-bottom: 20px;
  }

  .page-breadcrumb .breadcrumb-trail {
    color: #666;
  }

  .page-breadcrumb .breadcrumb-current {
    color: #000;
  }

  h1, h2, h3, h4 {
    color: #000 !important;
    page-break-after: avoid;
  }

  h1 {
    font-size: 20pt;
    margin-top: 0;
  }

  h2 {
    font-size: 14pt;
    margin-top: 24pt;
    color: #000 !important;
  }

  h3 {
    font-size: 12pt;
    color: #000 !important;
  }

  p, li, td, th {
    color: #333 !important;
  }

  strong {
    color: #000 !important;
  }

  a {
    color: #0088b3 !important;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #666;
    font-weight: normal;
  }

  .code-block,
  .code-tabs {
    border: 1px solid #ccc !important;
    background: #f5f5f5 !important;
    page-break-inside: avoid;
    margin: 12pt 0;
  }

  .code-block-header,
  .code-tabs-header {
    background: #eaeaea !important;
    border-bottom: 1px solid #ccc !important;
  }

  .code-block pre,
  .code-tab-panel pre {
    background: #f5f5f5 !important;
    color: #000 !important;
    padding: 10pt !important;
    font-size: 9pt !important;
  }

  .code-block code,
  .code-tab-panel code {
    color: #000 !important;
  }

  .code-kw,
  .code-cmt,
  .code-str,
  .code-fn,
  .code-var {
    color: #000 !important;
    font-style: normal !important;
  }

  .code-copy,
  .code-tabs-copy {
    display: none !important;
  }

  .code-tab:not(.active) {
    display: none;
  }

  .code-tab-panel:not(.active) {
    display: none !important;
  }

  .callout {
    background: #f9f9f9 !important;
    border: 1px solid #ddd !important;
    border-left: 3px solid #666 !important;
    page-break-inside: avoid;
    margin: 12pt 0;
  }

  .callout .material-symbols-outlined {
    color: #666 !important;
  }

  .callout-body,
  .callout-body p {
    color: #333 !important;
  }

  .callout-body strong {
    color: #000 !important;
  }

  table.data-table {
    border: 1px solid #ccc !important;
    page-break-inside: auto;
    font-size: 10pt;
  }

  table.data-table th,
  table.data-table td {
    border-bottom: 1px solid #ddd !important;
    padding: 6pt 8pt !important;
    color: #333 !important;
  }

  table.data-table th {
    background: #eaeaea !important;
    color: #000 !important;
  }

  table.data-table tr {
    page-break-inside: avoid;
  }

  table.data-table code {
    background: #f0f0f0 !important;
    border: 1px solid #ddd !important;
    color: #000 !important;
  }

  .article code:not(pre code) {
    background: #f0f0f0 !important;
    border: 1px solid #ddd !important;
    color: #000 !important;
  }

  details {
    border: 1px solid #ccc !important;
    background: #fff !important;
    page-break-inside: avoid;
    margin-bottom: 8pt;
  }

  details summary {
    color: #000 !important;
    padding: 8pt 12pt !important;
  }

  details summary .material-symbols-outlined {
    display: none !important;
  }

  details[open] .faq-body,
  details[open] .decision-body {
    padding: 0 12pt 10pt !important;
    color: #333 !important;
  }

  details[open] summary {
    border-bottom: 1px solid #eee;
    margin-bottom: 8pt;
  }

  .screenshot-frame,
  .shot-annotated {
    page-break-inside: avoid;
    border: 1px solid #ccc !important;
    margin: 12pt 0;
  }

  .screenshot-frame figcaption {
    background: #f5f5f5 !important;
    color: #333 !important;
    border-top: 1px solid #ccc !important;
  }

  .screenshot-frame .badge {
    background: #eaeaea !important;
    border-color: #ccc !important;
    color: #000 !important;
  }

  .shot-annotated .pin {
    display: none !important;
  }

  .arch-flow {
    background: #f5f5f5 !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }

  .arch-flow::before {
    display: none !important;
  }

  .arch-flow-node {
    background: #fff !important;
    border-color: #999 !important;
    color: #000 !important;
  }

  .feature-tile,
  .ui-feature-card,
  .storyboard .frame {
    background: #f9f9f9 !important;
    border-color: #ccc !important;
  }

  .feature-tile h4,
  .ui-feature-card h4 {
    color: #000 !important;
  }

  .feature-tile p,
  .ui-feature-card p {
    color: #333 !important;
  }

  .article ul.bullets li {
    color: #333 !important;
  }

  .article ul.bullets li::before {
    background: #666 !important;
    box-shadow: none !important;
  }

  .article ol.steps > li::before {
    background: #eaeaea !important;
    border-color: #999 !important;
    color: #000 !important;
  }

  .prereq-box {
    background: #f9f9f9 !important;
    border: 1px solid #ccc !important;
    border-left: 3px solid #0088b3 !important;
    page-break-inside: avoid;
  }

  .prereq-label {
    color: #0088b3 !important;
  }

  .prereq-list li {
    color: #333 !important;
  }

  .decision-node {
    border: 1px solid #ccc !important;
    background: #fff !important;
  }

  .decision-node > summary {
    color: #000 !important;
  }

  .decision-node > summary .material-symbols-outlined:first-child {
    color: #666 !important;
  }

  .decision-node > summary .material-symbols-outlined:last-child {
    display: none !important;
  }

  .decision-symptom {
    background: #f5f5f5 !important;
    border-left: 2px solid #d97706 !important;
    color: #333 !important;
  }

  .decision-fix {
    background: #f0fdf4 !important;
    border-left: 2px solid #059669 !important;
    color: #333 !important;
  }

  .decision-fix code {
    background: #f0f0f0 !important;
    border: 1px solid #ccc !important;
    color: #000 !important;
  }

  .kbd-key {
    background: #f0f0f0 !important;
    border-color: #999 !important;
    color: #000 !important;
    box-shadow: none !important;
  }

  .color-swatch-row,
  .ui-mode-grid {
    page-break-inside: avoid;
  }

  .ui-mode-item,
  .color-swatch {
    background: #f9f9f9 !important;
    border-color: #ccc !important;
  }

  .article hr {
    border-top: 1px solid #ddd;
    margin: 16pt 0;
  }
}