/* NXClient site — shared by every page: tokens, the top bar, the phone
   drawer and the buttons. Generated by docs/guide/gen_manual.py (SITE_CSS);
   edit it there, not here. */
:root {
  --bg: #0c0b0d;
  --bg2: #141216;
  --bg3: #1a171c;
  --card: #131114;
  --line: rgba(255,255,255,0.08);
  --line2: rgba(255,255,255,0.14);
  --crimson: #e0303f;
  --crimson-soft: #ff5663;
  --text: #f3eff1;
  --muted: #8c8690;
  --silver: #cbc6d0;
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --topbar-h: 64px;
  /* Side margin of the top bar and of every root page's content. */
  --gutter: 40px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg); color: var(--text); font-family: var(--body);
  -webkit-font-smoothing: antialiased; position: relative; min-height: 100%;
}
.bg-lines { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 96px 100%; opacity: .35; }

/* ---- top bar ---- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 var(--gutter); background: rgba(20,18,22,0.86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.topbar-brand:hover { color: var(--text); }
.topbar-brand img { width: 28px; height: 28px; filter: drop-shadow(0 2px 8px rgba(224,48,63,0.4)); }
.topbar-brand span { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .5px; }
.topbar-brand span b { color: var(--crimson); }
.topbar-nav { display: flex; align-items: center; gap: 24px; font-family: var(--mono); font-size: 13px; letter-spacing: .3px; }
.topbar-nav a { display: inline-flex; align-items: center; gap: 7px; color: var(--silver); text-decoration: none; white-space: nowrap; transition: color .15s; }
.topbar-nav a:hover { color: var(--text); }
.topbar-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-color: var(--crimson); text-decoration-thickness: 1px; text-underline-offset: 7px; }
.topbar-nav a.topbar-dl { color: var(--crimson-soft); }
.topbar-nav a.topbar-dl:hover, .topbar-nav a.topbar-dl[aria-current="page"] { color: var(--text); }
.topbar-nav svg { width: 16px; height: 16px; flex: none; }
/* The manual chapter's name, set apart so it doesn't read as a link. */
.topbar-section { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; padding-right: 24px; border-right: 1px solid var(--line2); }
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1px solid var(--line2); border-radius: 9px;
  background: rgba(255,255,255,0.02); color: var(--text); cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }

/* ---- phone drawer links (root pages' .site-drawer, manual's .sidebar-site) ---- */
.drawer-links { display: flex; flex-direction: column; gap: 2px; font-family: var(--mono); font-size: 14px; }
.drawer-links a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 9px; color: var(--silver); text-decoration: none; border: 1px solid transparent; }
.drawer-links a:hover { background: rgba(255,255,255,0.03); color: var(--text); }
.drawer-links a[aria-current="page"] { background: rgba(224,48,63,0.12); border-color: rgba(224,48,63,0.3); color: #fff; }
.drawer-links a.topbar-dl { color: var(--crimson-soft); }
.drawer-links svg { width: 16px; height: 16px; flex: none; }
.site-drawer { display: none; }
.scrim { display: none; position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,0.6); }
body.nav-open .scrim { display: block; }

/* ---- root pages: content starts under the fixed bar ---- */
.site-main { position: relative; z-index: 5; padding-top: var(--topbar-h); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 26px; border-radius: 12px; border: none; cursor: pointer; text-decoration: none; font-family: var(--body); font-weight: 700; font-size: 15px; color: #fff; white-space: nowrap;
  background: linear-gradient(180deg, var(--crimson-soft), var(--crimson)); box-shadow: 0 6px 20px rgba(224,48,63,0.35), inset 0 1px 0 rgba(255,255,255,0.25); transition: transform .15s, box-shadow .2s, border-color .2s, color .2s; }
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 28px rgba(224,48,63,0.45), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-ghost { background: rgba(255,255,255,0.03); border: 1px solid var(--line2); color: var(--silver); box-shadow: none; padding: 0 20px; }
.btn-ghost:hover { border-color: rgba(224,48,63,0.5); color: var(--text); box-shadow: none; }

/* The chapter name needs room beside all five links («Статистика торговли»,
   the longest, fits from ~950 px). */
@media (max-width: 1000px) {
  .topbar-section { display: none; }
}
@media (max-width: 900px) {
  :root { --gutter: 24px; }
}
/* The links fold into ☰ where they stop fitting: the manual's bar, with its
   ☰ beside the logo, needs ~750 px for all of them. manual.css shows the
   drawer's copy of them (.sidebar-site) at this same width. */
@media (max-width: 800px) {
  .topbar-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-drawer {
    display: flex; position: fixed; top: var(--topbar-h); bottom: 0; left: 0; z-index: 25;
    width: 280px; padding: 20px 16px; background: var(--bg2); border-right: 1px solid var(--line);
    transform: translateX(-100%); transition: transform .25s ease;
  }
  body.nav-open .site-drawer { transform: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
}
