*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --sidebar-bg: #0d0d0d;
  --surface: #131313;
  --surface-2: #171717;
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.18);
  --text: #a0a0a8;
  --text-heading: #fafafa;
  --text-muted: #6c6c76;
  --accent: #fff;
  --sidebar-w: 268px;
  --topbar-h: 64px;
}

html { scroll-behavior: smooth; }

[id] { scroll-margin-top: calc(var(--topbar-h) + 20px); }

h2[id] { scroll-margin-top: var(--topbar-h); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

:focus-visible {
  outline: 2px solid rgba(255,255,255,0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  padding: 9px 14px;
  background: #fff;
  color: #0a0a0b;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  transform: translateY(-64px);
  opacity: 0;
}

.skip-link:focus {
  transform: none;
  opacity: 1;
  text-decoration: none;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

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

/* Topbar */

.docs-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 220;
  min-height: var(--topbar-h);
  background: rgba(10,10,11,0.9);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 44px rgba(0,0,0,0.24);
}

.docs-topbar-inner {
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
}

.docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
  color: var(--text-heading);
}

.docs-brand:hover { text-decoration: none; }

.docs-brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 8px 22px rgba(0,0,0,0.35);
}

.docs-brand span {
  font-size: 15px;
  font-weight: 700;
}

.docs-pill {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
}

.docs-top-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}

.docs-top-link,
.docs-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  transition: color 0.14s, border-color 0.14s, background 0.14s, opacity 0.14s;
}

.docs-top-link {
  color: var(--text-muted);
  padding: 7px 12px;
  border: 1px solid transparent;
}

.docs-top-link:hover,
.docs-top-link.active {
  color: var(--text-heading);
  background: rgba(255,255,255,0.065);
  border-color: var(--border);
  text-decoration: none;
}

.docs-top-btn {
  color: #0a0a0b;
  background: #fff;
  padding: 7px 15px;
  margin-left: 4px;
}

.docs-top-btn:hover { opacity: 0.86; text-decoration: none; }

.docs-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 9px;
  background: rgba(255,255,255,0.055);
  border: 1px solid var(--border);
  color: var(--text-heading);
  cursor: pointer;
  margin-left: auto;
}

.docs-nav-toggle:hover {
  background: rgba(255,255,255,0.09);
  border-color: var(--border-strong);
}

/* Layout */

.layout { display: flex; min-height: 100vh; padding-top: var(--topbar-h); }

/* Sidebar */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  position: fixed;
  top: var(--topbar-h); left: 0;
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.2s;
}

.sidebar-logo {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  flex-shrink: 0;
}

.sidebar-logo:hover { text-decoration: none; }

.sidebar-logo img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.sidebar-logo span {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-heading);
  letter-spacing: -0.01em;
}

.sidebar-logo small {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

/* Search */

.search-wrap {
  position: relative;
  padding: 14px 12px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.search-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  pointer-events: none;
}

#search-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  color: var(--text);
  font-size: 12.5px;
  padding: 7px 42px 7px 30px;
  outline: none;
  font-family: inherit;
}

.search-kbd {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1;
  padding: 3px 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  pointer-events: none;
}

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

#search-input:focus {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}

.search-results {
  position: fixed;
  z-index: 300;
  background: #18181d;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.6);
  max-height: 360px;
  overflow-y: auto;
  display: none;
}

.search-results.visible { display: block; }

.search-result {
  display: block;
  padding: 10px 13px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.1s;
}

.search-result:last-child { border-bottom: none; }
.search-result:hover,
.search-result.selected { background: rgba(255,255,255,0.05); text-decoration: none; }

.search-result.selected { box-shadow: inset 2px 0 0 rgba(255,255,255,0.5); }

.search-result-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-heading);
  margin-bottom: 1px;
}

.search-result-page {
  font-size: 11.5px;
  color: var(--text-muted);
}

.search-result-snippet {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255,255,255,0.45);
}

.search-result mark {
  background: rgba(255,255,255,0.14);
  color: var(--text-heading);
  border-radius: 3px;
  padding: 0 2px;
}

.search-no-results,
.search-empty {
  padding: 14px 13px;
  font-size: 13px;
  color: var(--text-muted);
}

.search-empty-title {
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 2px;
}

.search-empty-sub {
  font-size: 12px;
  line-height: 1.45;
}

/* Nav */

nav { padding: 10px 0 32px; flex: 1; }

.nav-group {
  padding: 16px 18px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.1s;
}

.nav-group-toggle:hover { color: rgba(255,255,255,0.8); }

.nav-group-chevron {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: transform 0.15s;
}

.nav-group-toggle[aria-expanded="true"] .nav-group-chevron { transform: rotate(180deg); }

.nav-group-links { display: none; }
.nav-group-links.open { display: block; }

nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.5);
  border-left: 2px solid transparent;
  transition: color 0.1s;
}

nav a:hover { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.03); text-decoration: none; }

nav a.active {
  color: #fff;
  border-left-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.05);
}

.nav-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.7;
}

nav a.active .nav-icon { opacity: 1; }

/* Mobile */

.menu-btn {
  display: none;
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.docs-topbar .menu-btn {
  position: static;
  inset: auto;
  z-index: auto;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* Main */

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  padding: 48px 56px 120px;
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.content { max-width: 740px; min-width: 0; flex: 1 1 auto; }
.content.docs-home { max-width: 1080px; }

/* Right-rail table of contents */

.toc-rail {
  position: sticky;
  top: calc(var(--topbar-h) + 40px);
  width: 200px;
  flex-shrink: 0;
  max-height: calc(100vh - var(--topbar-h) - 80px);
  overflow-y: auto;
}

.toc-rail-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.toc-rail a {
  display: block;
  padding: 5px 0 5px 12px;
  border-left: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  transition: color 0.12s, border-color 0.12s;
}

.toc-rail a:hover { color: var(--text-heading); text-decoration: none; }

.toc-rail a.active {
  color: var(--text-heading);
  border-left-color: rgba(255,255,255,0.6);
}

@media (max-width: 1240px) {
  .toc-rail { display: none; }
}

/* Typography */

h1 {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-heading);
  letter-spacing: -0.015em;
  margin: 44px 0 12px;
  padding-top: 44px;
  border-top: 1px solid var(--border);
}

h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }

.heading-anchor {
  margin-left: 8px;
  color: rgba(255,255,255,0.25);
  font-size: 0.78em;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.12s, color 0.12s;
}

h2:hover .heading-anchor,
h3:hover .heading-anchor {
  opacity: 1;
}

.heading-anchor:hover {
  color: var(--text-heading);
  text-decoration: none;
}

.jump-highlight { animation: jump-highlight-flash 1.6s ease-out; }

@keyframes jump-highlight-flash {
  0% { background: rgba(255,255,255,0.1); }
  100% { background: transparent; }
}

h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  margin: 24px 0 6px;
  letter-spacing: -0.01em;
}

p { margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 18px; margin-bottom: 14px; }
li { margin-bottom: 4px; }

strong { color: var(--text-heading); font-weight: 600; }

.glossary-link {
  color: rgba(255,255,255,0.72);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgba(255,255,255,0.28);
  text-underline-offset: 3px;
  transition: color 0.12s, text-decoration-color 0.12s;
}

.glossary-link:hover {
  color: #fff;
  text-decoration-style: solid;
  text-decoration-color: rgba(255,255,255,0.6);
}

code {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 12.5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 1px 5px;
  color: #b4c6ff;
}

pre {
  position: relative;
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  margin-bottom: 20px;
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 13px;
  color: #c2d2ff;
  line-height: 1.6;
}

pre code { background: none; border: none; padding: 0; }

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(10,10,11,0.84);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 7px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s;
}

pre:hover .copy-btn,
pre:focus-within .copy-btn,
.copy-btn:focus-visible { opacity: 1; }

@media (hover: none) {
  .copy-btn { opacity: 0.7; }
}

.copy-btn:hover { color: var(--text-heading); border-color: var(--border-strong); }

/* Page intro */

.intro {
  padding-bottom: 32px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--border);
}

.intro h1 { margin-bottom: 10px; }

.intro p {
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin: 0;
}

.doc-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.doc-meta > span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
}

.doc-meta .platform-badge {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.11);
}

.on-this-page {
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin: -20px 0 28px;
}

.on-this-page-title {
  color: var(--text-heading);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.on-this-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.on-this-page-links a {
  color: var(--text-muted);
  font-size: 12.5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
}

.on-this-page-links a:hover {
  color: var(--text-heading);
  text-decoration: none;
  background: rgba(255,255,255,0.07);
}

.on-this-page-more {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  padding: 4px 8px;
  color: var(--text-muted);
}

/* Note box */

.note,
.callout {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 20px;
  line-height: 1.6;
}

.note strong,
.callout strong { color: rgba(255,255,255,0.78); }

.callout {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
}

.callout i {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: var(--text-heading);
}

.callout-tip { background: rgba(105, 185, 135, 0.08); border-color: rgba(105, 185, 135, 0.2); }
.callout-warning { background: rgba(219, 171, 90, 0.08); border-color: rgba(219, 171, 90, 0.22); }
.callout-info { background: rgba(119, 160, 255, 0.08); border-color: rgba(119, 160, 255, 0.2); }

/* Table */

.table-scroll {
  overflow-x: auto;
  margin-bottom: 20px;
}

.table-scroll table { margin-bottom: 0; min-width: 480px; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 14px;
}

thead { background: rgba(255,255,255,0.03); }

th {
  text-align: left;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-strong);
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
  vertical-align: top;
  transition: background 0.12s;
}

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

tbody tr:hover td { background: rgba(255,255,255,0.03); }

td:first-child { color: var(--text-heading); font-weight: 500; }

/* Homepage hero */

.home-hero {
  padding-bottom: 40px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--border);
}

.home-hero .logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.home-hero img { width: 52px; height: 52px; border-radius: 14px; }

.home-hero h1 {
  font-size: 32px;
  margin: 0;
}

.home-hero .sub {
  font-size: 17px;
  color: rgba(255,255,255,0.45);
  max-width: 580px;
  margin-bottom: 24px;
  line-height: 1.55;
}

.docs-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: 44px;
  align-items: center;
  padding-bottom: 44px;
  margin-bottom: 46px;
  border-bottom: 1px solid var(--border);
}

.docs-hero-grid .home-hero {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.doc-card-grid,
.task-grid,
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 32px;
}

.doc-card,
.task-card,
.quick-card {
  display: block;
  padding: 18px;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  min-width: 0;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.doc-card:hover,
.task-card:hover,
.quick-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  text-decoration: none;
}

.doc-card strong,
.task-card strong,
.quick-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.doc-card span,
.task-card span,
.quick-card span {
  display: block;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.ui-shot {
  min-height: 300px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #0e0e11;
  box-shadow: 0 22px 70px rgba(0,0,0,0.38);
}

.ui-shot-bar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: rgba(255,255,255,0.045);
  border-bottom: 1px solid var(--border);
}

.ui-shot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
}

.ui-shot-title {
  margin-left: 6px;
  color: var(--text-muted);
  font-size: 11px;
}

.ui-shot-body {
  padding: 18px;
}

.ui-shot-hero {
  height: 108px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 14px;
}

.ui-shot-row-title {
  width: 130px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  margin-bottom: 10px;
}

.ui-shot-posters {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.ui-shot-poster {
  aspect-ratio: 2 / 3;
  border-radius: 7px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.05);
}

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.12s;
}

.btn:hover { opacity: 0.8; text-decoration: none; }
.btn-primary { background: #fff; color: #0a0a0b; }
.btn-ghost { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.8); border: 1px solid var(--border); }

.doc-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.pager-card {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.035);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.pager-card:hover {
  text-decoration: none;
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
}

.pager-card span {
  display: block;
  color: var(--text-muted);
  font-size: 11.5px;
  margin-bottom: 3px;
}

.pager-card strong {
  display: block;
  color: var(--text-heading);
  font-size: 14px;
}

.pager-card.next { text-align: right; }

.doc-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.035);
}

.doc-feedback p {
  color: var(--text-muted);
  font-size: 12.5px;
  margin: 2px 0 0;
}

/* Platform list */

.platform-list { list-style: none; padding: 0; margin-bottom: 20px; }
.platform-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  margin: 0;
  font-size: 14px;
}
.platform-list li:last-child { border-bottom: none; }
.platform-list .os { color: var(--text-heading); font-weight: 500; }
.platform-list .pkg { color: var(--text-muted); font-family: monospace; font-size: 12.5px; }

/* FAQ */

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }

.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 15px 0;
  color: var(--text-heading);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-q:hover { color: #fff; }

.faq-q .ch {
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.15s;
  flex-shrink: 0;
}

.faq-item.open .faq-q .ch { transform: rotate(180deg); }

.faq-a {
  display: none;
  padding: 0 0 16px;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
}

.faq-item.open .faq-a { display: block; }

/* Error list */

.error-list { list-style: none; padding: 0; }

.error-list li {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin: 0;
}

.error-list li:first-child { border-top: 1px solid rgba(255,255,255,0.05); }
.error-list li:last-child { border-bottom: none; }

.error-list .err-msg {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 13px;
  color: rgba(255,120,120,0.9);
  margin-bottom: 5px;
  font-weight: 500;
}

.error-list .err-fix {
  font-size: 13.5px;
  color: rgba(255,255,255,0.5);
  line-height: 1.65;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20,20,24,0.92);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top:hover { color: var(--text-heading); border-color: rgba(255,255,255,0.25); }

body.sidebar-locked { overflow: hidden; }

/* Responsive */

@media (max-width: 840px) {
  .docs-nav-toggle { display: inline-flex; }
  .docs-topbar .menu-btn { display: flex; }
  .docs-top-links {
    position: absolute;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    margin-left: 0;
    padding: 10px 16px 16px;
    background: rgba(10,10,11,0.97);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 22px 46px rgba(0,0,0,0.52);
  }
  .docs-top-links.open { display: flex; }
  .docs-top-link { min-height: 42px; padding: 10px 12px; font-size: 14px; }
  .docs-top-btn { min-height: 42px; justify-content: center; margin: 6px 0 0; }
  .sidebar { transform: translateX(-100%); z-index: 210; }
  .sidebar.open { transform: translateX(0); }
  .overlay.open { display: block; }
  .main { margin-left: 0; padding: 32px 20px 80px; }
  .docs-hero-grid,
  .doc-card-grid,
  .task-grid,
  .quick-grid,
  .doc-pager {
    grid-template-columns: 1fr;
  }
  .doc-feedback {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .docs-topbar-inner { padding: 0 14px; gap: 8px; }
  .docs-pill { display: none; }
  .docs-brand span:not(.docs-pill) { font-size: 14px; }
  .content { max-width: none; }
  .content.docs-home { max-width: none; }
  .platform-list li { align-items: flex-start; flex-direction: column; gap: 2px; }
}

.lang-picker {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
}

.lang-btn:hover {
  color: var(--text-heading);
  border-color: var(--border-strong);
}

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  z-index: 60;
}

.lang-menu.open {
  display: block;
}

.lang-menu a {
  display: block;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
}

.lang-menu a:hover {
  background: rgba(255,255,255,0.06);
}

.lang-menu a.active {
  color: var(--text-heading);
  background: rgba(255,255,255,0.06);
}

.nav-untranslated {
  margin-left: auto;
  padding: 1px 5px;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
}

@media (max-width: 900px) {
  .lang-menu {
    right: auto;
    left: 0;
  }
}
