:root { --nav-width:260px; }
:root:not([data-theme="dark"]) {
  --bg:#f6f8f8; --card:#fff; --ink:#182326; --muted:#56666b; --line:#dce4e3;
  --accent:#087f71; --accent-dark:#075f55; --accent-soft:#e5f5f1; --surface-subtle:#f2f7f6;
  --on-accent:#fff;
}
:root[data-theme="dark"] {
  --bg:#090d0f; --card:#11171a; --ink:#edf3f1; --muted:#abbab9; --line:#303b3e;
  --line-strong:#52605f; --accent:#45dfc1; --accent-dark:#7debd5; --accent-soft:#10332e;
  --surface-subtle:#172124; --on-accent:#09241e;
}
.docs-shell [hidden] { display:none !important; }
.docs-shell :focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.docs-shell .site-header { background:var(--card); }
.docs-shell .site-nav { display:grid; align-items:center; gap:0; grid-template-columns:max(calc(var(--nav-width) + 24px),calc((100% + var(--nav-width) - 1092px) / 2)) minmax(0,1fr) auto; width:100%; max-width:none; min-height:60px; }
.docs-shell .brand-link { justify-self:start; margin-left:24px; }
.docs-shell .brand-mark { background:var(--accent); color:var(--on-accent); }
.docs-shell .site-nav .theme-toggle { grid-column:3; margin-right:24px; min-height:44px; }
.docs-shell .site-links { display:none; }
.docs-search-link { display:block; grid-column:2; width:min(380px,36vw); padding:8px 14px; border:1px solid var(--line); border-radius:8px; color:var(--muted); background:var(--bg); font-size:13px; text-decoration:none; }
.docs-search-link::before { content:'⌕'; margin-right:8px; }
.docs-search-link:hover { border-color:var(--accent); color:var(--accent-dark); }
.docs-nav { position:fixed; z-index:10; inset:61px auto 0 0; width:var(--nav-width); overflow:auto; padding:28px 18px; border-right:1px solid var(--line); background:var(--bg); }
.docs-nav > div + div { margin-top:26px; }
.docs-nav-title { margin:0 10px 8px; color:var(--muted); font-size:12px; font-weight:700; }
.docs-nav-title::before { content:'▪'; color:var(--accent); margin-right:8px; }
.docs-nav a { display:block; padding:9px 12px; border-radius:7px; color:var(--muted); font-size:13px; line-height:1.45; text-decoration:none; }
.docs-nav a:hover { color:var(--ink); background:var(--surface-subtle); }
.docs-shell a[aria-current="page"]:is(.docs-nav a,.site-links a) { color:var(--accent-dark); background:var(--accent-soft); font-weight:700; }
.docs-nav a[aria-current="page"] { box-shadow:inset 3px 0 var(--accent); }
.docs-nav .docs-support { margin-top:26px; border-top:1px solid var(--line); border-radius:0; padding-top:18px; }
.docs-content { display:grid; grid-template-columns:minmax(0,860px) 200px; align-items:start; gap:32px; width:min(1092px,calc(100% - var(--nav-width) - 48px)); margin:26px auto 60px max(calc(var(--nav-width) + 24px), calc((100% + var(--nav-width) - 1092px) / 2)); }
.docs-content.no-toc { display:block; }
.docs-shell .docs-content .page { width:100%; min-width:0; max-width:none; margin:0; padding:clamp(24px,3.05vw,44px); border:1px solid var(--line); border-radius:20px; background:var(--card); box-shadow:none; }
.docs-content.no-toc .page { max-width:860px; }
.docs-on-page { position:sticky; top:87px; max-height:calc(100dvh - 105px); overflow:auto; }
.docs-on-page p { margin:0 0 10px 12px; color:var(--muted); font-size:12px; font-weight:700; }
.docs-on-page a { display:block; padding:7px 12px; border-left:2px solid var(--line); color:var(--muted); font-size:12px; line-height:1.4; text-decoration:none; }
.docs-on-page a:hover,.docs-on-page a[aria-current="location"] { border-color:var(--accent); color:var(--accent-dark); }
.docs-shell .hero { display:block; padding:0 0 28px; }
.docs-shell .hero h1,.docs-shell h1 { max-width:none; font-size:clamp(30px,3.15vw,42px); line-height:1.13; letter-spacing:-.035em; text-wrap:balance; }
.docs-shell .lead { font-size:16px; line-height:1.6; }
.docs-shell .eyebrow,.docs-shell .section-label { color:var(--accent-dark); letter-spacing:.02em; text-transform:none; }
.docs-shell .back-link { background:none; }
.docs-shell .button:is(.primary,.telegram),.docs-shell .button:is(.primary,.telegram):hover { color:var(--on-accent); }
.docs-shell[data-page="home"] .hero { display:block; }
.docs-shell .start-card { margin-top:24px; }
.docs-shell .platform-caption { margin-left:0; }
.docs-shell .document-layout { display:block; margin:0; }
.docs-shell .legal-document,.docs-shell .legal-section { min-width:0; }
.docs-shell .legal-section { padding:30px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; box-shadow:none; }
.docs-shell .legal-section h2 { font-size:26px; }
.docs-shell .table-scroll { max-width:100%; }
.docs-shell .mobile-toc { display:none; }
.docs-shell .summary { margin:26px 0; padding:26px; box-shadow:none; }
.docs-shell .summary-heading { margin:0 0 16px; }
.docs-shell .summary-heading h2 { font-size:clamp(24px,3vw,30px); }
.docs-shell .summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; }
.docs-shell .summary-card { display:grid; grid-template-columns:36px minmax(0,1fr); column-gap:10px; align-content:start; padding:16px 0; border:0; border-top:1px solid var(--line); }
.docs-shell .summary-number { grid-row:1 / span 2; }
.docs-shell .summary-card h3,.docs-shell .summary-card p { margin:0; }
.docs-shell .summary-card p { margin-top:6px; }
.docs-shell .summary-note { margin:14px 0 0; }
.docs-shell .footer { margin-bottom:0; }
.docs-shell .step { gap:20px; padding:24px; box-shadow:none; }
.docs-shell .step-copy { padding:0; justify-content:flex-start; }
.docs-shell .step .media { min-height:0; }
.docs-shell .source-note { margin-top:12px; }
.docs-shell .search-wrap { max-width:none; }
.docs-shell .quick-links { grid-template-columns:repeat(2,minmax(0,1fr)); }
.docs-shell .document-action,.docs-shell .filter-chip { min-height:44px; }
.docs-shell .copy-status { width:100%; color:var(--muted); font-size:13px; }
.docs-shell :is(.copy-status,.search-status):empty { position:absolute; width:1px; height:1px; margin:0; padding:0; overflow:hidden; clip-path:inset(50%); }
.docs-shell .copy-status input { display:block; width:min(100%,400px); border:1px solid var(--line); border-radius:6px; padding:8px; background:var(--surface-subtle); color:var(--ink); font:inherit; }
[data-theme="dark"] .docs-shell .callout.warning strong { color:#f3cf83; }
@media (max-width:1200px) {
  :root { --nav-width:218px; }
  .docs-shell .site-nav { grid-template-columns:max(calc(var(--nav-width) + 20px),calc((100% + var(--nav-width) - 860px) / 2)) minmax(0,1fr) auto; }
  .docs-content { display:block; width:min(860px,calc(100% - var(--nav-width) - 40px)); margin-inline:max(calc(var(--nav-width) + 20px), calc((100% + var(--nav-width) - 860px) / 2)) auto; }
  .docs-on-page { display:none; }
  .docs-shell .mobile-toc { display:block; margin:22px 0; padding:0 14px; }
  .docs-shell .mobile-toc summary { cursor:pointer; padding:10px 0; }
  .docs-shell .mobile-toc nav { padding-bottom:10px; }
  .docs-shell .mobile-toc a[aria-current="location"] { color:var(--accent-dark); }
  .docs-shell .step { grid-template-columns:minmax(0,1fr); }
  .docs-shell .benefit-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:800px) {
  .docs-nav,.docs-search-link { display:none; }
  .docs-content { width:calc(100% - 24px); margin:14px auto 36px; }
  .docs-shell .docs-content .page { padding:22px clamp(14px,4.6vw,30px); border-radius:14px; }
  .docs-shell .site-nav { display:grid; width:calc(100% - 28px); grid-template-columns:minmax(0,1fr) auto auto !important; gap:6px !important; }
  .docs-shell .site-nav .brand-link { grid-column:1; grid-row:1; margin:0; }
  .docs-shell .site-nav .menu-toggle,.docs-shell .site-nav .theme-toggle { display:inline-flex; width:44px; min-width:44px; height:44px; padding:0; justify-content:center; grid-row:1; }
  .docs-shell .site-nav .menu-toggle { grid-column:2; }
  .docs-shell .site-nav .theme-toggle { grid-column:3; margin:0; }
  .docs-shell .theme-toggle [data-theme-label] { display:none; }
  .docs-shell .site-nav .site-links { grid-column:1 / -1; grid-row:2; width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; margin:0; padding:0 0 8px; }
  .docs-shell .site-nav:not([data-nav-open]) .site-links,.docs-shell .site-nav[data-nav-open="true"] .site-links { display:grid !important; }
  .docs-shell .site-nav .site-links a { display:grid; place-items:center; min-height:44px; text-align:center; }
  .docs-shell .site-nav .site-links a:last-child { grid-column:1 / -1; }
  .docs-shell .summary { padding:18px; }
  .docs-shell .step { padding:18px; }
  .docs-shell .step .media { padding:10px; }
  .docs-shell[data-page="home"] .hero h1 { font-size:clamp(29px,8.2vw,36px); text-wrap:wrap; }
  .docs-shell[data-page="privacy"] h1 { font-size:clamp(23px,6.45vw,34px); hyphens:none; overflow-wrap:normal; }
}
@media (max-width:540px) {
  .docs-shell .summary-grid,.docs-shell .quick-links,.docs-shell .benefit-grid { grid-template-columns:1fr; }
  .docs-shell .filter-label { width:100%; }
}
@media (prefers-reduced-motion:reduce) { html:root { scroll-behavior:auto; } }
@media print {
  .docs-shell,.docs-shell * { transition:none !important; animation:none !important; }
  .docs-nav,.docs-on-page,.docs-search-link,.docs-shell .mobile-toc,.reading-progress,.to-top { display:none !important; }
  .docs-content,.docs-shell .docs-content .page,.docs-shell .legal-document,.docs-shell .legal-section { display:block; width:100%; max-width:none; margin:0; border:0; }
  .docs-shell .docs-content .page { padding:0; }
  .docs-shell { background:#fff !important; }
  .docs-shell main,.docs-shell main * { color:#111 !important; background:transparent !important; box-shadow:none !important; }
  .docs-shell main a { text-decoration:underline; }
  .docs-shell .legal-section { break-inside:auto; }
  .docs-shell .legal-section h2 { break-after:avoid; }
}
