:root {
  --bg: #090a0d;
  --bg-elev: #101218;
  --bg-soft: #161922;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f4f6;
  --text-2: #a9b0be;
  --muted: #6f7787;
  --accent: #ff2d2d;
  --accent-soft: rgba(255, 45, 45, 0.13);
  --ok: #22c55e;
  --radius: 12px;
  --sidebar-w: 268px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: #ff5a5a; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top Navigation Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 60px;
  background: rgba(9, 10, 13, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  gap: 16px;
}

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

.menu-toggle {
  display: none;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 17px;
  cursor: pointer;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.brand:hover { text-decoration: none; }
.brand-badge {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: #ff6b6b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search-wrap {
  flex: 1;
  max-width: 380px;
  position: relative;
}
.search-input {
  width: 100%;
  height: 36px;
  padding: 0 42px 0 13px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 1px 6px;
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  max-height: 340px;
  overflow-y: auto;
  display: none;
  z-index: 60;
}
.search-results.open { display: block; }
.search-hit {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.search-hit:last-child { border-bottom: none; }
.search-hit:hover { background: var(--bg-soft); text-decoration: none; }
.search-hit strong { display: block; font-size: 13px; }
.search-hit span { display: block; font-size: 12px; color: var(--muted); }

.top-links {
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-links a {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}
.top-links a:hover { color: var(--text); text-decoration: none; }
.top-links .top-cta {
  padding: 7px 13px;
  border-radius: 8px;
  background: #ffffff;
  color: #0b0b0d;
}
.top-links .top-cta:hover { background: #e8e8ec; color: #0b0b0d; }

/* 2-Column Docs Shell */
.docs-shell {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: calc(100dvh - 60px);
}

.sidebar {
  position: sticky;
  top: 60px;
  height: calc(100dvh - 60px);
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding: 24px 16px 36px;
  background: var(--bg);
}

.nav-group {
  margin-bottom: 22px;
}
.nav-group-title {
  padding: 0 10px 7px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-list a:hover {
  background: var(--bg-soft);
  color: var(--text);
  text-decoration: none;
}
.nav-list a.active {
  background: var(--accent-soft);
  color: #ff6b6b;
  font-weight: 700;
}

/* Main Content Article */
.doc-main {
  min-width: 0;
  padding: 36px 48px 72px;
  max-width: 880px;
}

.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff5a5a;
  margin-bottom: 8px;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.lead {
  margin: 0 0 28px;
  font-size: 16px;
  color: var(--text-2);
}

h2 {
  margin: 34px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

h3 {
  margin: 22px 0 8px;
  font-size: 15.5px;
  font-weight: 700;
}

p { color: var(--text-2); font-size: 14.5px; margin: 0 0 14px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin: 18px 0 26px;
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.doc-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}
.doc-card strong { font-size: 15px; color: var(--text); }
.doc-card span { font-size: 13px; color: var(--text-2); }
.doc-card .tag {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 24px;
}
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
}
.btn-primary { background: #ffffff; color: #0b0b0d; }
.btn-primary:hover { background: #e8e8ec; text-decoration: none; color: #0b0b0d; }
.btn-secondary { background: var(--bg-elev); border: 1px solid var(--line-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); text-decoration: none; }

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.specs-table th, .specs-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.specs-table th { color: var(--muted); width: 34%; font-weight: 600; }
.specs-table tr:last-child th, .specs-table tr:last-child td { border-bottom: none; }

.steps {
  list-style: none;
  margin: 16px 0 24px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.step-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: #ff6b6b;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li strong { display: block; color: var(--text); font-size: 14.5px; margin-bottom: 3px; }
.steps li p { margin: 0; font-size: 13.5px; }

.callout {
  margin: 22px 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  font-size: 13.5px;
  color: var(--text-2);
}
.callout strong { display: block; color: var(--text); margin-bottom: 4px; }

.faq-list { display: grid; gap: 10px; margin-top: 16px; }
.faq-item {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: #ff5a5a; font-size: 18px; line-height: 1; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin: 10px 0 0; font-size: 13.5px; }

.doc-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 920px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .top-links { display: none; }
  .docs-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 280px;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.7);
  }
  .sidebar.open { transform: translateX(0); }
  .doc-main { padding: 26px 20px 56px; }
}
