:root {
  --bg: #080b12;
  --surface: #101520;
  --surface-2: #151b28;
  --border: rgba(148, 163, 184, .14);
  --border-strong: rgba(148, 163, 184, .24);
  --text: #f7f8fb;
  --muted: #94a3b8;
  --subtle: #667085;
  --orange: #ff7113;
  --orange-soft: rgba(255, 113, 19, .14);
  --purple: #8b5cf6;
  --green: #2ee59d;
  --red: #ff5d68;
  --radius: 14px;
  --sidebar: 292px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 82% -10%, rgba(139, 92, 246, .12), transparent 32rem),
    radial-gradient(circle at 30% 105%, rgba(255, 113, 19, .08), transparent 34rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
::selection { color: white; background: rgba(255, 113, 19, .4); }

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  background: rgba(8, 11, 18, .78);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.brand {
  min-width: calc(var(--sidebar) - 24px);
  display: flex;
  align-items: center;
  gap: 11px;
  color: white;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.035em;
  font-size: 20px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #ff7a11, #f31256);
  box-shadow: 0 10px 30px rgba(243, 18, 86, .22);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand span span { color: var(--orange); }

.search-wrap { position: relative; width: min(560px, 48vw); }
.search-icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: #77849a; }
.search {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: rgba(17, 22, 33, .84);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.search::placeholder { color: #667085; }
.search:focus { border-color: rgba(255, 113, 19, .55); box-shadow: 0 0 0 4px rgba(255, 113, 19, .08); background: var(--surface); outline: none; }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(46, 229, 157, .7); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: white;
  background: var(--surface-2);
  font-weight: 700;
  font-size: 14px;
  transition: transform .2s, border-color .2s, background .2s;
}
.button:hover { transform: translateY(-1px); border-color: var(--border-strong); background: #1a2130; }
.button-primary { border-color: transparent; background: linear-gradient(135deg, #ff7a11, #f45b0b); box-shadow: 0 10px 28px rgba(255, 113, 19, .18); }
.button-primary:hover { background: linear-gradient(135deg, #ff8a28, #ff6711); }

.menu-button { display: none; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; color: white; background: var(--surface); cursor: pointer; }
.layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); padding-top: 68px; min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 68px auto 0 0;
  width: var(--sidebar);
  overflow-y: auto;
  padding: 25px 18px 28px;
  background: linear-gradient(180deg, rgba(15, 20, 30, .96), rgba(9, 12, 19, .96));
  border-right: 1px solid var(--border);
}
.nav-label { margin: 22px 12px 8px; color: #59667a; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-label:first-child { margin-top: 0; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  margin: 3px 0;
  padding: 0 12px;
  border-radius: 10px;
  color: #9aa8bd;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  transition: color .18s, background .18s;
}
.nav-link::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #536075; transition: background .18s, box-shadow .18s; }
.nav-link:hover { color: #dce3ee; background: rgba(255,255,255,.035); }
.nav-link.active { color: white; background: var(--orange-soft); }
.nav-link.active::before { background: var(--orange); box-shadow: 0 0 12px rgba(255, 113, 19, .65); }
.sidebar-card { margin: 28px 5px 0; padding: 16px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.025); }
.sidebar-card strong { display: block; font-size: 13px; }
.sidebar-card p { margin: 5px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.sidebar-card .button { width: 100%; }

.main { grid-column: 2; min-width: 0; padding: 58px clamp(28px, 6vw, 96px) 80px; }
.doc-page { display: none; width: min(980px, 100%); margin: 0 auto; animation: rise .32s ease both; }
.doc-page.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #f8a261; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--orange); }
h1 { max-width: 800px; margin: 12px 0 18px; font-size: clamp(38px, 6vw, 68px); line-height: 1.03; letter-spacing: -.055em; }
.doc-heading { font-size: clamp(34px, 5vw, 50px); }
.lead { max-width: 750px; margin: 0; color: #aeb9ca; font-size: clamp(17px, 2vw, 20px); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.hero-card {
  position: relative;
  overflow: hidden;
  margin-top: 48px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(20, 26, 39, .96), rgba(12, 16, 25, .96));
  box-shadow: 0 28px 90px rgba(0,0,0,.22);
}
.hero-card::after { content: ""; position: absolute; width: 250px; height: 250px; right: -90px; top: -110px; border-radius: 50%; background: rgba(139, 92, 246, .14); filter: blur(8px); }
.terminal-top { display: flex; gap: 6px; margin-bottom: 22px; }
.terminal-top i { width: 8px; height: 8px; border-radius: 50%; background: #3d4758; }
.terminal-top i:first-child { background: var(--red); }
.terminal-top i:nth-child(2) { background: #ffba3d; }
.terminal-top i:nth-child(3) { background: var(--green); }
.terminal { margin: 0; overflow-x: auto; color: #bdc8d9; font: 13px/1.8 "SFMono-Regular", Consolas, monospace; white-space: pre; }
.terminal .orange { color: #ff9854; }
.terminal .green { color: var(--green); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 42px; }
.card { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(17, 22, 33, .72); }
.card-index { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 16px; border-radius: 9px; color: #ff9a58; background: var(--orange-soft); font-weight: 800; font-size: 13px; }
.card h3 { margin: 0 0 8px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card a { display: inline-block; margin-top: 14px; color: #ff9a58; font-size: 13px; font-weight: 750; text-decoration: none; }

.content { margin-top: 40px; color: #c4ccda; }
.content h2 { margin: 42px 0 12px; padding-top: 8px; color: white; font-size: 24px; letter-spacing: -.025em; }
.content h3 { margin: 28px 0 10px; color: white; font-size: 17px; }
.content p { max-width: 830px; }
.content a { color: #ff9854; text-underline-offset: 3px; }
.content ul, .content ol { padding-left: 23px; }
.content li { margin: 7px 0; }
.content code { padding: 2px 6px; border: 1px solid var(--border); border-radius: 6px; color: #ffad78; background: rgba(255,255,255,.04); font: .9em "SFMono-Regular", Consolas, monospace; }
pre { overflow-x: auto; margin: 18px 0; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: #0b0f17; }
pre code { padding: 0; border: 0; color: #c7d1df; background: transparent; line-height: 1.75; }
.callout { margin: 22px 0; padding: 17px 18px; border: 1px solid rgba(255, 113, 19, .23); border-left: 3px solid var(--orange); border-radius: 10px; color: #d3dae5; background: rgba(255, 113, 19, .07); }
.callout strong { color: white; }
.callout-danger { border-color: rgba(255, 93, 104, .25); border-left-color: var(--red); background: rgba(255, 93, 104, .07); }
.steps { counter-reset: steps; list-style: none; padding: 0 !important; }
.steps > li { position: relative; min-height: 44px; margin: 18px 0; padding-left: 54px; }
.steps > li::before { counter-increment: steps; content: counter(steps); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255, 113, 19, .35); border-radius: 10px; color: #ff9a58; background: var(--orange-soft); font-weight: 800; }
table { width: 100%; margin: 20px 0; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; font-size: 14px; }
th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: white; background: rgba(255,255,255,.035); }
td { color: #b8c2d1; }
tr:last-child td { border-bottom: 0; }
.footer { margin-top: 60px; padding-top: 22px; display: flex; justify-content: space-between; gap: 20px; color: #68758a; border-top: 1px solid var(--border); font-size: 12px; }
.empty-search { display: none; padding: 22px; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
  :root { --sidebar: 270px; }
  .menu-button { display: grid; place-items: center; }
  .brand { min-width: 0; }
  .brand span { display: none; }
  .status { display: none; }
  .sidebar { translate: -100% 0; z-index: 45; transition: translate .24s ease; box-shadow: 24px 0 70px rgba(0,0,0,.45); }
  body.nav-open .sidebar { translate: 0 0; }
  .layout { display: block; }
  .main { padding: 42px 24px 70px; }
  .grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .topbar { padding: 0 14px; gap: 10px; }
  .search-wrap { flex: 1; width: auto; }
  .top-actions .button { display: none; }
  .main { padding: 34px 18px 60px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  h1 { font-size: 39px; }
  .footer { flex-direction: column; }
  table { display: block; overflow-x: auto; }
}

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

