@font-face { font-family: 'Onest'; src: url('../fonts/Onest.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Unbounded'; src: url('../fonts/Unbounded.ttf') format('truetype'); font-weight: 200 900; font-display: swap; }

/* WW Soft docs: dark, quiet, one red accent (GitBook-like layout: menu · article · «На этой странице») */
:root {
  --bg: #0a0809; --bg2: #110d0e; --panel: #141011; --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .14);
  --text: #f2eff0; --body: #cfc9cb; --muted: #9a9396; --dim: #6c6568;
  --red: #e5212b; --red2: #ff4a52; --amber: #f0a530;
  --top: 64px; --side: 280px; --toc: 220px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 20px); }
body { margin: 0; background: var(--bg); color: var(--body); font: 16px/1.65 'Onest', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--text); }
b { color: var(--text); font-weight: 650; }
img { display: block; }
code, kbd { font: 600 14px/1 ui-monospace, 'Cascadia Mono', Consolas, monospace; color: var(--text); padding: 3px 7px; border-radius: 6px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line2); white-space: nowrap; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--red2); outline-offset: 3px; border-radius: 6px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 30; height: var(--top); background: rgba(10, 8, 9, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 16px; height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 28px; }
.brand img { height: 24px; width: auto; }
.lang { display: flex; margin-left: auto; padding: 3px; border: 1px solid var(--line2); border-radius: 8px; }
.lang a { padding: 5px 11px; border-radius: 5px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-decoration: none; transition: color .15s, background .15s; }
.lang a:hover { color: var(--text); }
.lang a.on { background: var(--red); color: #fff; }
.lang + .top-link { margin-left: 0; }
.top-link { margin-left: auto; font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line2); color: var(--text); transition: border-color .2s, background .2s; }
.top-link:hover { border-color: rgba(229, 33, 43, .6); background: rgba(229, 33, 43, .08); }
.menu-btn { display: none; width: 40px; height: 40px; padding: 10px 9px; border: 1px solid var(--line2); border-radius: 8px; background: transparent; cursor: pointer; }
.menu-btn span { display: block; height: 2px; margin: 4px 0; background: var(--text); border-radius: 2px; }

/* three columns */
.layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr) var(--toc); gap: 48px; max-width: 1440px; margin: 0 auto; padding: 0 28px; }

/* left menu */
.side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); display: flex; flex-direction: column; padding: 28px 0 20px; }
.side-box { padding: 9px 14px; border: 1px solid var(--line2); border-radius: 6px; color: var(--text); font-size: 15px; margin-bottom: 26px; }
.side-nav { flex: 1; overflow-y: auto; border-left: 1px solid var(--line); }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 15px; transition: color .15s, border-color .15s; }
.side-nav a:hover { color: var(--text); }
.side-nav a.on { color: var(--red2); border-left-color: var(--red); font-weight: 600; }
.side-nav svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-nav img { flex: none; width: 17px; height: auto; opacity: .85; }
.side-nav a.on img { opacity: 1; }
.side-group { margin: 22px 0 6px 16px; color: var(--dim); font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.side-foot { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line2); border-radius: 6px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; transition: border-color .2s; }
.side-foot:hover { border-color: rgba(229, 33, 43, .6); }

/* article */
.doc { padding: 36px 0 40px; max-width: 780px; width: 100%; justify-self: center; }
.crumb { margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
h1, h2, h3 { color: var(--text); }
h1 { display: flex; align-items: center; gap: 16px; margin: 0 0 26px; font-size: clamp(30px, 4vw, 40px); line-height: 1.15; font-weight: 750; letter-spacing: -.01em; }
.h1-ico { width: 40px; height: 40px; flex: none; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h2 { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; font-size: 28px; line-height: 1.2; font-weight: 750; }
h2 img { border-radius: 8px; }
.h2-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: rgba(229, 33, 43, .12); border: 1px solid rgba(229, 33, 43, .3); }
.h2-ico svg { width: 18px; height: 18px; fill: none; stroke: var(--red2); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
h3 { margin: 0 0 10px; font-size: 21px; line-height: 1.3; font-weight: 700; }
.doc p { margin: 0 0 16px; }
.doc ol ol, .steps ol { margin: 0 0 16px; padding-left: 22px; }
.steps ol li { margin: 6px 0; padding-left: 4px; }
.steps ol li::marker { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.small { font-size: 13px; color: var(--muted); margin-top: 12px !important; }
.small a { color: var(--text); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }

/* banner (red frame like the reference) */
.banner { position: relative; overflow: hidden; margin: 0 0 28px; padding: 34px 24px; text-align: center; border: 2px solid var(--red); border-radius: 4px;
  background: radial-gradient(ellipse 70% 120% at 50% 120%, rgba(229, 33, 43, .35), transparent 70%), linear-gradient(135deg, #1c1012, #0d0a0b 55%, #1a0f11); }
.banner::before { content: ''; position: absolute; inset: 0; opacity: .35; background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); }
.banner p { position: relative; margin: 0 !important; font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: clamp(20px, 3vw, 30px); line-height: 1.2; color: #fff; text-transform: uppercase; letter-spacing: -.01em; }
.banner em { font-style: normal; color: var(--red2); }
.banner span { position: relative; display: block; margin-top: 8px; color: var(--muted); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }

/* product cards */
.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.pcard { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line2); border-radius: 8px; text-decoration: none; background: var(--panel); transition: border-color .2s, transform .2s; }
.pcard:hover { border-color: rgba(229, 33, 43, .6); transform: translateY(-2px); }
.pcard img { border-radius: 12px; }
.pcard span { color: var(--muted); font-size: 14px; line-height: 1.4; }
.pcard b { display: block; font-size: 17px; margin-bottom: 2px; }

/* callouts */
.callout { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0; padding: 14px 18px; border-radius: 6px; background: #17141a; border: 1px solid var(--line); }
.callout p { margin: 0 !important; font-size: 15px; }
.callout svg { width: 20px; height: 20px; flex: none; margin-top: 2px; fill: none; stroke: var(--muted); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.callout.warn { background: #2a241c; border-color: rgba(240, 165, 48, .18); }
.callout.warn svg { stroke: var(--amber); }
.callout.ok { background: #16211a; border-color: rgba(58, 208, 122, .2); }
.callout.ok svg { stroke: #3ad07a; }

/* facts table */
.facts { width: 100%; margin: 6px 0 30px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; font-size: 15px; }
.facts th, .facts td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { width: 130px; color: var(--muted); font-weight: 600; background: rgba(255, 255, 255, .02); }
.facts td { color: var(--text); }

/* numbered steps with a line */
.steps { list-style: none; counter-reset: st; margin: 0; padding: 0; }
.steps > li { position: relative; counter-increment: st; padding: 0 0 34px 60px; }
.steps > li::before { content: counter(st); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: #1a1517; border: 1px solid var(--line2); color: var(--text); font-weight: 700; font-size: 15px; }
.steps > li::after { content: ''; position: absolute; left: 17px; top: 42px; bottom: 6px; width: 1px; background: var(--line2); }
.steps > li:last-child { padding-bottom: 8px; }
.steps > li:last-child::after { display: none; }
.steps > li > h3 { padding-top: 2px; }

/* download button */
.dl { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 4px; background: var(--red); color: #fff; font-weight: 600; font-size: 17px; text-decoration: none; transition: background .2s, transform .2s, box-shadow .2s; box-shadow: 0 8px 26px rgba(229, 33, 43, .25); }
.dl:hover { background: #f02d37; transform: translateY(-1px); box-shadow: 0 12px 32px rgba(229, 33, 43, .38); }
.dl:active { transform: none; }
.dl svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dl.ghost { background: transparent; border: 1px solid var(--line2); box-shadow: none; }
.dl.ghost:hover { border-color: rgba(229, 33, 43, .6); background: rgba(229, 33, 43, .08); }

/* faq */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; position: relative; padding: 16px 36px 16px 0; color: var(--text); font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: -4px 0 18px !important; color: var(--muted); }

/* pager + footer */
.pager { margin-top: 56px; }
.pager a { display: flex; flex-direction: column; align-items: flex-end; position: relative; padding: 16px 48px 16px 20px; border: 1px solid var(--line2); border-radius: 4px; text-decoration: none; color: var(--text); font-size: 18px; font-weight: 600; transition: border-color .2s; }
.pager a:hover { border-color: rgba(229, 33, 43, .6); }
.pager small { color: var(--muted); font-size: 13px; font-weight: 500; }
.pager svg { position: absolute; right: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px; fill: none; stroke: var(--muted); stroke-width: 2; }
.doc-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 36px; color: var(--dim); font-size: 14px; }
.doc-foot a { color: var(--muted); text-decoration: none; }
.doc-foot a:hover { color: var(--text); }
.doc-foot span { margin-left: auto; }

/* right: on this page */
.toc { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 36px 0 20px; }
.toc-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.toc-title svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.toc a { display: block; padding: 5px 0 5px 26px; margin-left: 0; border-left: 1px solid var(--line); color: var(--dim); text-decoration: none; font-size: 14px; line-height: 1.35; transition: color .15s, border-color .15s; }
.toc a.lvl1 { padding-left: 14px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--red2); border-left-color: var(--red); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .dl, .pcard { transition: none; } }

@media (max-width: 1180px) {
  .layout { grid-template-columns: var(--side) minmax(0, 1fr); gap: 40px; }
  .toc { display: none; }
}
@media (max-width: 860px) {
  :root { --top: 58px; }
  .top-in { padding: 0 16px; }
  .menu-btn { display: block; }
  .lang + .top-link { display: none; }
  .layout { grid-template-columns: 1fr; padding: 0 16px; gap: 0; }
  .side { position: fixed; z-index: 25; left: 0; top: var(--top); width: min(300px, 86vw); height: calc(100vh - var(--top)); padding: 20px 16px; background: var(--bg2);
    border-right: 1px solid var(--line2); transform: translateX(-102%); transition: transform .25s ease; }
  .side.open { transform: none; box-shadow: 30px 0 80px rgba(0, 0, 0, .6); }
  .doc { padding-top: 24px; }
  .cards2 { grid-template-columns: 1fr; }
  .steps > li { padding-left: 50px; }
  .dl { width: 100%; justify-content: center; }
  .facts th { width: 96px; }
  .doc-foot span { margin-left: 0; }
}
