/* ==========================================================================
   WHelp.RU — дизайн-система v1
   Токены → база → каркас → компоненты → страницы → адаптив.
   Без внешних шрифтов и библиотек: системные шрифты, SVG-значки, CSS-градиенты.
   ========================================================================== */

:root {
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;

    --bg: #f2f4fb;
    --bg-soft: #e9edf9;
    --surface: #ffffff;
    --surface-2: #f7f8fe;
    --ink: #0d1430;
    --ink-2: #2a3458;
    --muted: #626c8e;
    --line: #e2e6f3;
    --line-2: #cfd6ec;

    --brand-1: #3b6df6;
    --brand-2: #7c3aed;
    --brand: linear-gradient(135deg, #3b82f6 0%, #6a4cf3 55%, #8b3df0 100%);
    --brand-soft: linear-gradient(135deg, rgba(59, 130, 246, .09), rgba(124, 58, 237, .09));
    --cyan: linear-gradient(135deg, #06b6d4, #14b8a6);
    --link: #2f55e0;

    --r-sm: 10px;
    --r: 14px;
    --r-lg: 20px;
    --r-xl: 30px;

    --sh-sm: 0 1px 2px rgba(18, 26, 70, .05), 0 2px 8px rgba(18, 26, 70, .04);
    --sh: 0 2px 4px rgba(18, 26, 70, .04), 0 14px 32px -10px rgba(48, 60, 140, .16);
    --sh-lg: 0 4px 10px rgba(18, 26, 70, .05), 0 32px 64px -18px rgba(54, 66, 170, .32);

    --topbar-h: 68px;
    --side-w: 300px;
    --content-max: 1200px;

    --t1: #3b82f6;
    --t2: #6366f1;

    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #070b1a;
    --bg-soft: #0b1124;
    --surface: #101836;
    --surface-2: #141e42;
    --ink: #e8ecff;
    --ink-2: #c2cae8;
    --muted: #8f9ac2;
    --line: #1e2955;
    --line-2: #2c3a6c;
    --link: #8fa8ff;
    --brand-soft: linear-gradient(135deg, rgba(59, 130, 246, .14), rgba(124, 58, 237, .16));
    --sh-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --sh: 0 2px 4px rgba(0, 0, 0, .3), 0 16px 34px -12px rgba(0, 0, 0, .6);
    --sh-lg: 0 4px 10px rgba(0, 0, 0, .35), 0 32px 64px -18px rgba(0, 0, 0, .75);
    color-scheme: dark;
}

/* Тона разделов: пара цветов для значков, шапок и акцентов */
.tone-blue   { --t1: #3b82f6; --t2: #6366f1; }
.tone-green  { --t1: #22c55e; --t2: #0ea5a4; }
.tone-violet { --t1: #8b5cf6; --t2: #d946ef; }
.tone-cyan   { --t1: #06b6d4; --t2: #3b82f6; }
.tone-orange { --t1: #f97316; --t2: #f43f5e; }
.tone-rose   { --t1: #f43f5e; --t2: #a855f7; }
.tone-amber  { --t1: #f59e0b; --t2: #ef4444; }
.tone-indigo { --t1: #6366f1; --t2: #8b5cf6; }
.tone-teal   { --t1: #14b8a6; --t2: #22c55e; }
.tone-sky    { --t1: #0ea5e9; --t2: #6366f1; }
.tone-pink   { --t1: #ec4899; --t2: #8b5cf6; }

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 24px); }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(99, 102, 241, .10), transparent 60%),
        radial-gradient(900px 500px at 0% 0%, rgba(14, 165, 233, .07), transparent 55%),
        var(--bg);
    background-attachment: fixed;
    text-rendering: optimizeLegibility;
}
[data-theme="dark"] body {
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(99, 102, 241, .18), transparent 60%),
        radial-gradient(900px 500px at 0% 0%, rgba(14, 165, 233, .10), transparent 55%),
        var(--bg);
    background-attachment: fixed;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -.015em; margin: 0; color: var(--ink); }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); }
button { font: inherit; color: inherit; }
ul, ol { padding: 0; margin: 0; }
mark { background: linear-gradient(transparent 55%, rgba(250, 204, 21, .45) 55%); color: inherit; padding: 0 1px; border-radius: 2px; }
:focus-visible { outline: 3px solid rgba(91, 110, 255, .55); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 10px; box-shadow: var(--sh); transition: top .2s; }
.skip:focus { top: 10px; }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- шапка ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 18px;
    min-height: var(--topbar-h); padding: 10px 24px;
    background: color-mix(in srgb, var(--surface) 80%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(16px);
    backdrop-filter: saturate(1.6) blur(16px);
    border-bottom: 1px solid var(--line);
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(99, 102, 241, .45), transparent); opacity: .6; }
.logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); flex: none; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 38px; height: 38px; filter: drop-shadow(0 6px 12px rgba(91, 77, 242, .45)); }
.logo-mark svg { width: 100%; height: 100%; }
.logo-text { font-size: 22px; font-weight: 800; letter-spacing: -.03em; display: inline-flex; align-items: baseline; }
.logo-text b { display: none; }
.logo-text i { font-style: normal; font-weight: 700; margin-left: 1px; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar .search { flex: 1; max-width: 680px; }
.topnav { display: none; gap: 4px; margin-left: auto; }
.topnav a { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; transition: background .2s, color .2s; }
.topnav a:hover { background: var(--bg-soft); color: var(--ink); }
.topnav a.is-active { background: var(--brand-soft); color: var(--link); }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: all .2s; flex: none; box-shadow: var(--sh-sm); }
.icon-btn:hover { color: var(--link); border-color: var(--line-2); transform: translateY(-1px); }
.icon-btn .ico { width: 20px; height: 20px; }
.theme-toggle { margin-left: auto; }
.topnav + .theme-toggle { margin-left: 4px; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.nav-toggle, .nav-close { display: none; }

/* ---------- каркас ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); align-items: start; }
.page { min-width: 0; display: flex; flex-direction: column; min-height: calc(100vh - var(--topbar-h)); }
.main { flex: 1; width: 100%; max-width: calc(var(--content-max) + 64px); margin-inline: auto; padding: 22px 32px 56px; }

/* ---------- боковое меню ---------- */
.sidebar {
    position: sticky; top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h));
    background: linear-gradient(180deg, #0a1030 0%, #0c1646 52%, #121a58 100%);
    color: #c9d1f2; overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, .05);
}
.sidebar::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(420px 260px at 0% 0%, rgba(99, 102, 241, .35), transparent 70%), radial-gradient(360px 300px at 100% 100%, rgba(139, 61, 240, .30), transparent 70%); }
.sidebar-inner { position: relative; height: 100%; overflow-y: auto; padding: 18px 14px 22px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; overscroll-behavior: contain; }
.sidebar-inner::-webkit-scrollbar { width: 6px; }
.sidebar-inner::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 6px; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 10px 12px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #7f8bc0; }
.snav { display: flex; flex-direction: column; gap: 3px; }
.snav-sec summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; cursor: pointer; color: #d4dbf7; font-weight: 600; font-size: 14.5px; transition: background .2s, color .2s; user-select: none; }
.snav-sec summary::-webkit-details-marker { display: none; }
.snav-sec summary:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.snav-sec.is-active > summary { background: rgba(255, 255, 255, .09); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.chip { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; flex: none; color: #fff;
    background: linear-gradient(135deg, var(--t1), var(--t2));
    box-shadow: 0 8px 16px -6px color-mix(in srgb, var(--t1) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
.chip .ico { width: 18px; height: 18px; }
.snav-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snav-count { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #b9c3ee; }
.snav-chev { width: 16px; height: 16px; color: #7f8bc0; transition: transform .25s; }
details[open] > summary > .snav-chev { transform: rotate(90deg); }
.snav-sec ul { list-style: none; margin: 4px 0 8px 27px; padding: 2px 0 2px 16px; border-left: 1px solid rgba(255, 255, 255, .10); display: grid; gap: 1px; }
.snav-sec li a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.3; color: #9ca8d8; text-decoration: none; transition: all .18s; }
.snav-sec li a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.snav-sec li a em { font-style: normal; font-size: 11px; color: #7f8bc0; }
.snav-sec li a.is-current { color: #fff; background: linear-gradient(90deg, rgba(99, 102, 241, .55), rgba(139, 61, 240, .25)); box-shadow: inset 2px 0 0 #8ea2ff; }
.snav-all { font-weight: 600; color: #b9c3ee !important; }
.sidebar-card { margin: 18px 4px 0; padding: 16px; border-radius: 18px; background: linear-gradient(145deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .10); }
.sidebar-card strong { display: block; color: #fff; font-size: 14.5px; margin-bottom: 4px; }
.sidebar-card p { font-size: 13px; line-height: 1.5; color: #a4afdc; margin: 0 0 12px; }
.backdrop { display: none; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: .78em 1.35em; border-radius: 13px; border: 0; font-weight: 650; font-size: 15px; line-height: 1.1; cursor: pointer; text-decoration: none; transition: transform .18s, box-shadow .18s, filter .18s; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-brand { color: #fff; background: var(--brand); box-shadow: 0 10px 22px -8px rgba(98, 76, 243, .75), inset 0 1px 0 rgba(255, 255, 255, .28); }
.btn-brand:hover { filter: brightness(1.07); box-shadow: 0 14px 28px -8px rgba(98, 76, 243, .85), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-light { color: #1c2760; background: #fff; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .45); }
.btn-light:hover { box-shadow: 0 12px 24px -8px rgba(0, 0, 0, .5); }
.btn-sm { padding: .6em 1.05em; font-size: 14px; border-radius: 11px; }

/* ---------- поиск ---------- */
.search { position: relative; display: flex; align-items: center; background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 999px; box-shadow: var(--sh-sm); transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: #6a7cf7; box-shadow: 0 0 0 4px rgba(98, 112, 247, .20), var(--sh); }
.search-ico { position: absolute; left: 17px; color: var(--muted); display: grid; pointer-events: none; }
.search-ico .ico { width: 20px; height: 20px; }
.search-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; padding: 0 12px 0 48px; border-radius: 999px; -webkit-appearance: none; appearance: none; }
.search-input::placeholder { color: var(--muted); opacity: .85; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-kbd { margin-right: 8px; padding: 2px 8px; font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 7px; background: var(--surface-2); }
.search:focus-within .search-kbd { display: none; }
.search-btn { padding: 0 1.4em; border-radius: 999px; margin: 4px; height: calc(100% - 8px); }
.search-top { height: 46px; }
.search-top .search-btn { font-size: 14px; }
.search-inline { height: 50px; }
.search-hero { height: 66px; box-shadow: var(--sh-lg); border-color: transparent; }
.search-hero .search-input { font-size: 17px; padding-left: 54px; }
.search-hero .search-ico { left: 22px; }
.search-hero .search-ico .ico { width: 22px; height: 22px; }
.search-hero .search-btn { font-size: 16px; padding: 0 1.9em; margin: 6px; height: calc(100% - 12px); }
.suggest { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 10px); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh-lg); padding: 8px; overflow: hidden; }
.suggest[hidden] { display: none; }
.sg-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 13px; text-decoration: none; color: var(--ink); }
.sg-item:hover, .sg-item.is-on { background: var(--brand-soft); text-decoration: none; }
.sg-main { flex: 1; min-width: 0; }
.sg-main strong { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-main span { display: block; font-size: 12.5px; color: var(--muted); }
.sg-code { font-family: var(--mono); font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: var(--bg-soft); color: var(--link); flex: none; }
.sg-all { display: block; text-align: center; padding: 10px; font-size: 13.5px; font-weight: 600; border-top: 1px solid var(--line); margin-top: 6px; text-decoration: none; }
.sg-empty { padding: 14px; color: var(--muted); font-size: 14px; }

/* ---------- общие блоки ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .01em; color: #dfe5ff; background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .22); }
.eyebrow-light { margin-bottom: 14px; }
.kicker { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 8px; }
.kicker-light { background: linear-gradient(90deg, #a5b4ff, #e0b8ff); -webkit-background-clip: text; background-clip: text; }
.block { margin-top: 56px; }
.block.tight { margin-top: 32px; }
.block-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.block-head h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; }
.block-head p { margin: 8px 0 0; color: var(--muted); max-width: 60ch; }
.block-head.compact { margin-bottom: 16px; }
.block-head.compact h2 { font-size: 22px; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .7; pointer-events: none; }

/* ---------- хлебные крошки ---------- */
.crumbs { margin-bottom: 18px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-size: 13.5px; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; gap: 4px; }
.crumbs a { color: var(--muted); text-decoration: none; padding: 2px 4px; border-radius: 6px; }
.crumbs a:hover { color: var(--link); background: var(--bg-soft); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; padding: 2px 4px; }
.crumb-sep { width: 14px; height: 14px; opacity: .6; }

/* ---------- главная: hero ---------- */
.hero { position: relative; border-radius: var(--r-xl); overflow: hidden; color: #fff; isolation: isolate; box-shadow: var(--sh-lg);
    background: linear-gradient(125deg, #0a1030 0%, #14216f 42%, #3a2aa0 78%, #6a2fc4 100%); }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero .o1 { width: 520px; height: 520px; left: -140px; top: -200px; background: #3b82f6; opacity: .55; }
.hero .o2 { width: 460px; height: 460px; right: -120px; top: -80px; background: #a855f7; opacity: .5; }
.hero .o3 { width: 420px; height: 300px; right: 18%; bottom: -220px; background: #06b6d4; opacity: .38; }
.grid-lines { position: absolute; inset: 0; opacity: .55;
    background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 72%); mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 72%); }
.hero-inner { padding: clamp(36px, 5.5vw, 76px) clamp(22px, 5vw, 72px) clamp(28px, 4vw, 48px); max-width: 960px; margin-inline: auto; text-align: center; }
.hero-title { font-size: clamp(36px, 5.6vw, 66px); font-weight: 850; letter-spacing: -.035em; line-height: 1.04; margin: 22px 0 18px; color: #fff; text-wrap: balance; }
.grad-text { background: linear-gradient(90deg, #7dd3fc 0%, #a5b4ff 45%, #f0abfc 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: clamp(16px, 1.5vw, 19px); color: #c5cdf2; max-width: 640px; margin: 0 auto 30px; line-height: 1.6; text-wrap: pretty; }
.hero .search-hero { max-width: 760px; margin-inline: auto; }
.quick { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 22px; }
.quick-label { font-size: 13px; color: #98a4d8; margin-right: 4px; }
.chip-link { padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; font-family: var(--mono); color: #e6eaff; text-decoration: none; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .14); transition: all .2s; }
.chip-link:hover { background: rgba(255, 255, 255, .2); transform: translateY(-1px); text-decoration: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 38px 0 0; }
.stats > div { padding: 16px 12px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .11); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.stats dt { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.03em; background: linear-gradient(180deg, #fff, #b9c6ff); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.stats dd { margin: 4px 0 0; font-size: 12.5px; color: #a7b2e4; line-height: 1.35; }

/* ---------- карточки разделов ---------- */
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.sec-card { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); text-decoration: none; color: var(--ink); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.sec-card::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none;
    background: radial-gradient(420px 200px at 100% 0%, color-mix(in srgb, var(--t1) 16%, transparent), transparent 70%); }
.sec-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--t1), var(--t2)); opacity: 0; transition: opacity .25s; }
.sec-card:hover { transform: translateY(-4px); box-shadow: var(--sh); border-color: color-mix(in srgb, var(--t1) 40%, var(--line)); text-decoration: none; }
.sec-card:hover::before, .sec-card:hover::after { opacity: 1; }
.sec-ico { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; color: #fff; position: relative;
    background: linear-gradient(135deg, var(--t1), var(--t2));
    box-shadow: 0 14px 24px -10px color-mix(in srgb, var(--t1) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .4); }
.sec-ico .ico { width: 26px; height: 26px; }
.sec-body { display: flex; flex-direction: column; gap: 4px; position: relative; }
.sec-body strong { font-size: 18.5px; font-weight: 750; letter-spacing: -.01em; }
.sec-body span { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.sec-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; position: relative; }
.sec-meta { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sec-go { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--bg-soft); color: var(--muted); transition: all .25s; }
.sec-card:hover .sec-go { background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; transform: translateX(3px); }

/* ---------- как это работает ---------- */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: how; }
.how-card { position: relative; padding: 26px 24px 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); overflow: hidden; }
.how-card::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: var(--brand-soft); }
.how-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #fff; font-weight: 800; font-size: 18px; background: var(--brand); box-shadow: 0 10px 20px -8px rgba(98, 76, 243, .7); margin-bottom: 16px; }
.how-card h3 { font-size: 18px; font-weight: 750; margin-bottom: 8px; position: relative; }
.how-card p { margin: 0; color: var(--muted); font-size: 15px; position: relative; }
.how-card .ic { white-space: nowrap; }

/* ---------- строки-статьи ---------- */
.rows { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s; }
.row:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: color-mix(in srgb, var(--t1) 45%, var(--line)); text-decoration: none; }
.row-badge { display: grid; place-items: center; min-width: 58px; max-width: 132px; height: 48px; padding: 0 12px; border-radius: 13px; font-size: 12px; font-weight: 800;
    background: linear-gradient(135deg, color-mix(in srgb, var(--t1) 16%, var(--surface)), color-mix(in srgb, var(--t2) 14%, var(--surface)));
    color: color-mix(in srgb, var(--t2) 80%, var(--ink)); border: 1px solid color-mix(in srgb, var(--t1) 22%, var(--line)); }
.row-badge code { font-family: var(--mono); font-size: 12px; word-break: break-all; line-height: 1.2; text-align: center; }
.row-badge.is-icon { width: 48px; min-width: 48px; padding: 0; color: #fff; background: linear-gradient(135deg, var(--t1), var(--t2)); border: 0; box-shadow: 0 10px 18px -8px color-mix(in srgb, var(--t1) 80%, transparent); }
.row-badge .ico { width: 22px; height: 22px; }
.row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row-title { font-size: 16.5px; font-weight: 700; line-height: 1.3; letter-spacing: -.005em; }
.row:hover .row-title { color: var(--link); }
.row-sum { font-size: 14px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.meta-where { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.meta-chev { width: 12px; height: 12px; opacity: .6; }
.pill { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--bg-soft); color: var(--ink-2); }
.row-go { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--bg-soft); color: var(--muted); transition: all .25s; }
.row:hover .row-go { background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; transform: translateX(3px); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }

/* ---------- принципы ---------- */
.principles { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(28px, 4vw, 52px); color: #fff; isolation: isolate;
    background: linear-gradient(135deg, #0a1030, #1a2380 55%, #4a2aa8); box-shadow: var(--sh-lg); }
.principles-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(500px 260px at 90% 0%, rgba(168, 85, 247, .45), transparent 70%), radial-gradient(420px 260px at 0% 100%, rgba(6, 182, 212, .35), transparent 70%); }
.principles h2 { color: #fff; font-size: clamp(24px, 3vw, 34px); font-weight: 800; margin-bottom: 28px; }
.pr-grid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pr-grid li { display: flex; gap: 16px; padding: 20px; border-radius: 20px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pr-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; flex: none; background: linear-gradient(135deg, #60a5fa, #a78bfa); box-shadow: 0 10px 20px -8px rgba(124, 58, 237, .8); }
.pr-ico .ico { width: 22px; height: 22px; }
.pr-grid strong { display: block; font-size: 16.5px; margin-bottom: 4px; }
.pr-grid p { margin: 0; font-size: 14.5px; color: #b9c3ee; line-height: 1.55; }

/* ---------- шапка раздела / подраздела ---------- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-xl); color: #fff; padding: clamp(24px, 3.5vw, 40px); margin-bottom: 8px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--t1) 58%, #0a1030), color-mix(in srgb, var(--t2) 62%, #0a1030)); box-shadow: var(--sh-lg); }
.ph-bg { position: absolute; inset: 0; z-index: -1; }
.page-hero .o1 { width: 380px; height: 380px; right: -80px; top: -160px; background: var(--t1); opacity: .5; }
.page-hero .o2 { width: 320px; height: 320px; left: 30%; bottom: -230px; background: var(--t2); opacity: .45; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 40px 40px;
    -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000 100%); mask-image: linear-gradient(120deg, transparent 30%, #000 100%); }
.ph-main { display: flex; gap: 22px; align-items: flex-start; }
.ph-ico { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; flex: none; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 16px 30px -12px rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ph-ico .ico { width: 34px; height: 34px; }
.page-hero h1 { color: #fff; font-size: clamp(28px, 3.6vw, 44px); font-weight: 850; letter-spacing: -.03em; }
.ph-lead { margin: 12px 0 0; max-width: 70ch; color: rgba(255, 255, 255, .86); font-size: 16.5px; line-height: 1.65; }
.ph-foot { display: flex; align-items: center; gap: 20px; margin-top: 26px; flex-wrap: wrap; }
.ph-foot .search { flex: 1; min-width: 260px; max-width: 520px; border-color: transparent; }
.ph-stats { list-style: none; display: flex; gap: 10px; }
.ph-stats li { padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2); font-size: 14px; color: rgba(255, 255, 255, .88); }
.ph-stats b { color: #fff; font-size: 16px; margin-right: 2px; }
.page-hero-sm { padding: clamp(22px, 3vw, 32px); }
.page-hero-sm .ph-ico { width: 60px; height: 60px; border-radius: 19px; }
.page-hero-sm .ph-ico .ico { width: 28px; height: 28px; }
.page-hero-sm .ph-lead { font-size: 15.5px; }

.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.layout-2 .block:first-child { margin-top: 28px; }
.layout-2 > .col-main > .rows:first-child, .layout-2 > .col-main > .empty:first-child { margin-top: 28px; }
.col-side { position: sticky; top: calc(var(--topbar-h) + 22px); display: grid; gap: 16px; margin-top: 28px; }
.side-card { padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.side-card h3 { display: flex; align-items: center; gap: 9px; font-size: 15.5px; font-weight: 750; margin-bottom: 12px; }
.side-card h3 .ico { color: var(--t1); width: 19px; height: 19px; }
.side-card p { font-size: 14px; color: var(--muted); }
.side-accent { color: #fff; border: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--t1) 60%, #0a1030), color-mix(in srgb, var(--t2) 66%, #0a1030)); box-shadow: var(--sh); }
.side-accent h3 { color: #fff; }
.side-accent p { color: rgba(255, 255, 255, .82); }
.start-list { list-style: none; counter-reset: st; display: grid; gap: 12px; }
.start-list li { counter-increment: st; position: relative; padding-left: 36px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.start-list li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--t1), var(--t2)); }
.mini-list { list-style: none; display: grid; gap: 12px; }
.mini-list a { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--ink); text-decoration: none; }
.mini-list a:hover { color: var(--link); }
.mini-list time { font-size: 12.5px; color: var(--muted); }
.side-nav { list-style: none; display: grid; gap: 2px; }
.side-nav a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.side-nav a:hover { background: var(--bg-soft); }
.side-nav a.is-current { color: #fff; background: linear-gradient(135deg, var(--t1), var(--t2)); font-weight: 650; }
.side-nav em { font-style: normal; font-size: 12px; opacity: .75; }

.sub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sub-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden; }
.sub-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--t1), var(--t2)); }
.sub-card:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: color-mix(in srgb, var(--t1) 40%, var(--line)); text-decoration: none; }
.sub-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sub-top strong { font-size: 16px; font-weight: 700; line-height: 1.3; }
.count-pill, .soon-pill { flex: none; font-size: 12px; font-weight: 750; padding: 3px 10px; border-radius: 999px; }
.count-pill { color: #fff; background: linear-gradient(135deg, var(--t1), var(--t2)); }
.soon-pill { color: var(--muted); background: var(--bg-soft); }
.sub-ex { font-size: 13px; color: var(--muted); line-height: 1.5; padding-right: 30px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sub-go { position: absolute; right: 16px; bottom: 14px; color: var(--muted); transition: all .25s; }
.sub-card:hover .sub-go { color: var(--t1); transform: translateX(3px); }

.empty { text-align: center; padding: 44px 28px; border-radius: var(--r-xl); background: var(--surface); border: 1.5px dashed var(--line-2); }
.empty-ico { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 22px; background: var(--brand-soft); color: var(--link); margin-bottom: 16px; }
.empty-ico .ico { width: 32px; height: 32px; }
.empty h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 56ch; margin: 0 auto 18px; }
.topic-chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 24px; }
.topic-chips li { padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: var(--bg-soft); color: var(--ink-2); }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 32px 0 0; }
.pg { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 14px; border-radius: 12px; font-weight: 650; font-size: 14.5px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; box-shadow: var(--sh-sm); }
.pg:hover { border-color: var(--line-2); color: var(--link); text-decoration: none; }
.pg.is-current { color: #fff; border: 0; background: var(--brand); box-shadow: 0 10px 18px -8px rgba(98, 76, 243, .7); }
.pg-gap { color: var(--muted); }

/* ---------- статья ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 40px; align-items: start; }
.article { min-width: 0; }
.art-head { position: relative; overflow: hidden; isolation: isolate; padding: clamp(22px, 3.2vw, 38px); border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh); }
.art-head::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--t1), var(--t2)); }
.art-bg { position: absolute; inset: 0; z-index: -1; }
.art-head .o1 { width: 320px; height: 320px; right: -90px; top: -150px; background: var(--t1); opacity: .16; }
.art-head .o2 { width: 260px; height: 260px; right: 18%; top: -180px; background: var(--t2); opacity: .14; }
.art-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; background: var(--bg-soft); color: var(--ink-2); text-decoration: none; }
.tag .ico { width: 15px; height: 15px; }
.tag-sec { color: #fff; background: linear-gradient(135deg, var(--t1), var(--t2)); box-shadow: 0 8px 16px -8px color-mix(in srgb, var(--t1) 80%, transparent); }
.tag-sec:hover { text-decoration: none; filter: brightness(1.08); }
.tag-code { font-family: var(--mono); font-weight: 800; color: color-mix(in srgb, var(--t2) 75%, var(--ink)); background: color-mix(in srgb, var(--t1) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--t1) 28%, var(--line)); }
.article h1 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 850; letter-spacing: -.03em; line-height: 1.12; text-wrap: balance; }
.art-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.art-meta li { display: inline-flex; align-items: center; gap: 7px; }
.art-meta .ico { width: 17px; height: 17px; }
.meta-warn { color: #b45309; font-weight: 600; }
[data-theme="dark"] .meta-warn { color: #fbbf24; }

.answer { position: relative; margin-top: 22px; padding: 22px 26px 8px; border-radius: var(--r-lg); border: 1.5px solid transparent;
    background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand) border-box; box-shadow: var(--sh); overflow: hidden; }
.answer::before { content: ""; position: absolute; inset: 0; background: var(--brand-soft); pointer-events: none; }
.answer > * { position: relative; }
.answer-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.answer-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #fff; background: var(--brand); box-shadow: 0 8px 16px -6px rgba(98, 76, 243, .7); }
.answer-ico .ico { width: 18px; height: 18px; }
.answer h2 { font-size: 16px; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.answer p { font-size: 17.5px; line-height: 1.7; color: var(--ink); }

.toc-mobile { display: none; margin-top: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.toc-mobile summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 700; cursor: pointer; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary .snav-chev { margin-left: auto; color: var(--muted); }
.toc-mobile[open] summary .snav-chev { transform: rotate(90deg); }
.toc-mobile ol { list-style: none; padding: 0 16px 14px; display: grid; gap: 2px; }
.toc-mobile a { display: block; padding: 7px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: 14.5px; }
.toc-mobile a:hover { background: var(--bg-soft); }
.toc-mobile .lv3 a { padding-left: 24px; font-size: 14px; color: var(--muted); }

.prose { margin-top: 12px; font-size: 17px; line-height: 1.78; color: var(--ink-2); max-width: 78ch; }
.prose > * { margin-block: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { position: relative; margin-top: 2.2em; padding-left: 18px; font-size: clamp(22px, 2.3vw, 28px); font-weight: 800; color: var(--ink); line-height: 1.22; }
.prose h2::before { content: ""; position: absolute; left: 0; top: .14em; bottom: .14em; width: 5px; border-radius: 5px; background: linear-gradient(180deg, var(--t1), var(--t2)); }
.prose h3 { margin-top: 1.8em; font-size: 20px; font-weight: 750; color: var(--ink); }
.prose h4 { margin-top: 1.5em; font-size: 17px; font-weight: 750; color: var(--ink); }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose .anchor { position: absolute; left: -24px; top: 0; width: 22px; text-align: center; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 600; transition: opacity .15s; }
.prose h2 .anchor { left: -6px; transform: translateX(-100%); }
.prose h2:hover .anchor, .prose h3:hover .anchor, .anchor:focus { opacity: .8; }
.prose strong { color: var(--ink); font-weight: 700; }
.ic { font-family: var(--mono); font-size: .86em; padding: .12em .45em; border-radius: 7px; background: color-mix(in srgb, var(--t1, #6366f1) 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--t1, #6366f1) 20%, var(--line)); color: color-mix(in srgb, var(--t2, #6366f1) 70%, var(--ink)); word-break: break-word; }
.list { list-style: none; display: grid; gap: .55em; }
ul.list > li { position: relative; padding-left: 26px; }
ul.list > li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(135deg, var(--t1), var(--t2)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--t1) 16%, transparent); }
ol.list { counter-reset: li; }
ol.list > li { position: relative; padding-left: 38px; counter-increment: li; }
ol.list > li::before { content: counter(li); position: absolute; left: 0; top: .2em; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--t1), var(--t2)); }

.steps { list-style: none; counter-reset: stp; display: grid; gap: 14px; }
.step { position: relative; counter-increment: stp; padding: 16px 18px 16px 70px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); display: flex; flex-direction: column; gap: 4px; }
.step::before { content: counter(stp); position: absolute; left: 16px; top: 16px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; font-size: 17px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--t1), var(--t2)); box-shadow: 0 10px 18px -8px color-mix(in srgb, var(--t1) 80%, transparent); }
.step:not(:last-child)::after { content: ""; position: absolute; left: 34px; top: 58px; bottom: -16px; width: 2px; background: linear-gradient(var(--t1), transparent); opacity: .35; }
.step-title { color: var(--ink); font-size: 16.5px; }
.step-text { font-size: 15.5px; line-height: 1.65; }

/* Команды и фрагменты кода: единый спокойный стиль, отдельные безопасные кнопки */
.cmd { margin: 1.4em 0; border-radius: var(--r-lg); overflow: hidden; color: #dbe4ff;
    background: linear-gradient(180deg, #0e1530 0%, #0a1026 100%); border: 1px solid rgba(120, 140, 255, .22);
    box-shadow: 0 2px 4px rgba(10, 16, 48, .18), 0 22px 38px -22px rgba(30, 40, 120, .5); }
.cmd-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 11px; padding: 10px 13px 10px 16px;
    background: rgba(255, 255, 255, .045); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.cmd-dots { display: inline-flex; gap: 5px; flex: none; }
.cmd-dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.cmd-dots i:nth-child(2) { background: #febc2e; }
.cmd-dots i:nth-child(3) { background: #28c840; }
.cmd-env { font-size: 12.5px; font-weight: 700; color: #bbc7ec; font-family: var(--font); letter-spacing: .005em; }
.cmd-badges { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cmd .badge { font-family: var(--font); display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; line-height: 1.25; white-space: nowrap; }
.cmd .badge .ico { width: 13px; height: 13px; }
.risk-low { color: #bec9e9; background: rgba(145, 160, 196, .16); }
.risk-safe { color: #6ee7b7; background: rgba(16, 185, 129, .14); }
.risk-medium { color: #fcd34d; background: rgba(245, 158, 11, .14); }
.risk-high { color: #fecdd3; background: rgba(244, 63, 94, .19); }
.badge-admin { color: #d8b4fe; background: rgba(139, 92, 246, .19); }
.cmd-actions { margin-left: auto; display: none; align-items: center; gap: 6px; }
.js .cmd-actions { display: inline-flex; }
.btn-mini { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border-radius: 9px; font-size: 12px; font-weight: 650; cursor: pointer; color: #e3e9ff; background: rgba(255, 255, 255, .085); border: 1px solid rgba(255, 255, 255, .14); transition: background .17s, border-color .17s; }
.btn-mini:hover, .cmd-copy-line:hover { background: rgba(255, 255, 255, .19); border-color: rgba(255, 255, 255, .26); }
.btn-mini:focus-visible, .cmd-copy-line:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.btn-mini .ico { width: 15px; height: 15px; }
.btn-mini.is-done, .cmd-copy-line.is-done { color: #6ee7b7; border-color: rgba(52, 211, 153, .55); background: rgba(16, 185, 129, .16); }
.cmd-body { margin: 0; padding: 15px 18px; overflow-x: auto; font-size: 14.5px; line-height: 1.62; tab-size: 4; white-space: pre; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.cmd-body code { font-family: var(--mono); display: block; min-width: max-content; -webkit-user-select: text; user-select: text; }
.cmd-body::-webkit-scrollbar { height: 8px; }
.cmd-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 8px; }
.cmd-lines { position: relative; padding: 13px 15px 13px 18px; }
.cmd-line { display: flex; position: relative; align-items: center; width: max-content; min-width: 100%; min-height: 25px; gap: 12px; padding: 1px 0; border-radius: 6px; }
.cmd-line:hover, .cmd-line:focus-within { background: rgba(148, 163, 220, .07); }
.cmd-line .cmd-line-text { display: block; flex: 1 0 auto; min-width: 0; font: inherit; font-family: var(--mono); line-height: inherit; white-space: pre; }
.cmd-copy-line { display: none; position: sticky; right: 0; flex: none; width: 30px; height: 27px; align-items: center; justify-content: center;
    color: #aebde7; cursor: pointer; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; background: #27304d; opacity: 0; transition: opacity .15s, background .15s; }
.js .cmd-copy-line { display: inline-flex; }
.cmd-copy-line .ico { width: 14px; height: 14px; }
.cmd-line:hover .cmd-copy-line, .cmd-copy-line:focus-visible { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cmd-copy-line { opacity: 1; min-width: 34px; min-height: 32px; } }
.cmd-warning { padding: 10px 17px; background: rgba(245, 158, 11, .095); border-top: 1px solid rgba(251, 191, 36, .18); }
.cmd-warning p { display: flex; gap: 9px; align-items: flex-start; margin: 0; color: #fcdba4; font: 500 13px/1.55 var(--font); }
.cmd-warning p + p { margin-top: 7px; }
.cmd-warning .ico { width: 16px; height: 16px; flex: none; margin-top: 2px; color: #fbbf24; }
.cmd-note { padding: 11px 17px 12px; font-size: 13.5px; line-height: 1.55; color: #bfcaeb; border-top: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .035); font-family: var(--font); }
.cmd-note .ic { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .15); color: #dfe6ff; }
.cmd-lang-bash, .cmd-lang-sh { border-top: 2px solid #34d399; }
.cmd-lang-powershell { border-top: 2px solid #38bdf8; }
.cmd-lang-sql { border-top: 2px solid #a78bfa; }
.cmd-lang-php, .cmd-lang-js, .cmd-lang-javascript, .cmd-lang-python { border-top: 2px solid #f59e0b; }
.t-cmd { color: #7dd3fc; font-weight: 650; }
.t-kw { color: #c4b5fd; }
.t-flag { color: #fcd34d; }
.t-str { color: #86efac; }
.t-num { color: #fda4af; }
.t-com { color: #9aa9cb; font-style: italic; }
.t-var { color: #67e8f9; }
.t-op { color: #9aa9c7; }
.t-attr { color: #93c5fd; }

/* сообщение об ошибке */
.msg { margin: 1.4em 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid color-mix(in srgb, #f43f5e 30%, var(--line)); background: color-mix(in srgb, #f43f5e 6%, var(--surface)); box-shadow: var(--sh-sm); }
.msg-bar { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #be123c; background: color-mix(in srgb, #f43f5e 11%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, #f43f5e 20%, var(--line)); }
[data-theme="dark"] .msg-bar { color: #fda4af; }
.msg-dot { width: 9px; height: 9px; border-radius: 50%; background: #f43f5e; box-shadow: 0 0 0 4px rgba(244, 63, 94, .22); }
.msg-code { font-family: var(--mono); }
.msg-text { margin: 0; padding: 16px 20px; font-family: var(--mono); font-size: 15px; line-height: 1.6; color: var(--ink); font-weight: 600; word-break: break-word; }
.msg-tr { padding: 0 20px 16px; font-size: 15.5px; color: var(--ink-2); }
.msg-tr span { display: inline-block; margin-right: 8px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg-soft); }

/* выноски */
.callout { --c: #3b82f6; display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); background: color-mix(in srgb, var(--c) 8%, var(--surface)); }
.callout-tip { --c: #10b981; }
.callout-warning { --c: #f59e0b; }
.callout-danger { --c: #f43f5e; }
.callout-success { --c: #22c55e; }
.callout-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; flex: none; color: #fff; background: var(--c); box-shadow: 0 8px 16px -8px var(--c); }
.callout-ico .ico { width: 18px; height: 18px; }
.callout-title { display: block; font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 2px; }
.callout p { margin: 0; font-size: 15.5px; line-height: 1.65; }

.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--sh-sm); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; padding: 12px 16px; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); background: var(--brand-soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:nth-child(even) td { background: var(--surface-2); }

.mini-h { font-size: 15px; font-weight: 750; margin: 0 0 10px; color: var(--ink); }
.aliases { margin-top: 40px; padding: 20px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.alias-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.alias-chips a { display: inline-block; padding: 6px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--bg-soft); color: var(--ink-2); text-decoration: none; transition: all .18s; }
.alias-chips a:hover { background: var(--brand); color: #fff; }
.related, .sources { margin-top: 44px; }
.related h2, .sources h2 { font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.src-list { list-style: none; display: grid; gap: 8px; margin-bottom: 14px; }
.src-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; }
.src-list .ico { color: var(--t1); width: 18px; height: 18px; }
.src-list a { font-weight: 650; }
.src-list span { font-size: 12.5px; color: var(--muted); margin-left: auto; font-family: var(--mono); }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.pn { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--sh-sm); transition: all .2s; }
.pn:hover { border-color: var(--t1); transform: translateY(-2px); box-shadow: var(--sh); text-decoration: none; }
.pn span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pn strong { font-size: 15px; line-height: 1.35; }
.pn-next { text-align: right; grid-column: 2; }

.rail { position: sticky; top: calc(var(--topbar-h) + 22px); display: grid; gap: 16px; max-height: calc(100vh - var(--topbar-h) - 44px); }
.rail-card { padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.rail-card h2 { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 800; margin-bottom: 12px; }
.rail-card h2 .ico { color: var(--t1); width: 18px; height: 18px; }
.toc ol { list-style: none; display: grid; gap: 1px; position: relative; border-left: 2px solid var(--line); max-height: 52vh; overflow-y: auto; scrollbar-width: thin; }
.toc a { display: block; padding: 6px 12px; margin-left: -2px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.4; color: var(--muted); text-decoration: none; transition: all .15s; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--link); font-weight: 650; border-left-color: var(--t1); background: linear-gradient(90deg, color-mix(in srgb, var(--t1) 10%, transparent), transparent); }
.toc .lv3 a { padding-left: 24px; font-size: 13px; }
.rail-search .search { height: 46px; }
.rail-search .search-btn { display: none; }
.rail-search .search-input { padding-right: 14px; }
.progress { position: fixed; z-index: 55; left: 0; top: var(--topbar-h); height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #38bdf8, #6366f1, #d946ef); pointer-events: none; }

/* ---------- поиск: страница ---------- */
.search-head h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 850; letter-spacing: -.03em; margin-bottom: 20px; }
.search-head .search-hero { max-width: 820px; }
.search-sum { margin: 18px 0 0; color: var(--ink-2); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.filter { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; font-size: 14px; font-weight: 650; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; box-shadow: var(--sh-sm); transition: all .18s; }
.filter em { font-style: normal; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--bg-soft); }
.filter:hover { border-color: var(--line-2); text-decoration: none; transform: translateY(-1px); }
.filter.is-on { color: #fff; border-color: transparent; background: var(--brand); box-shadow: 0 10px 18px -8px rgba(98, 76, 243, .7); }
.filter.is-on em { background: rgba(255, 255, 255, .22); }
.results { margin-top: 24px; }
.result { position: relative; }
.why { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px 6px; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 750; color: #047857; background: color-mix(in srgb, #10b981 14%, var(--surface)); border: 1px solid color-mix(in srgb, #10b981 30%, var(--line)); }
[data-theme="dark"] .why { color: #6ee7b7; }
.why .ico { width: 13px; height: 13px; }
.why-alias { color: #1d4ed8; background: color-mix(in srgb, #3b82f6 12%, var(--surface)); border-color: color-mix(in srgb, #3b82f6 30%, var(--line)); }
[data-theme="dark"] .why-alias { color: #93c5fd; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.mode, .doc-card { padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.mode-ico { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: #fff; background: var(--brand); box-shadow: 0 12px 22px -10px rgba(98, 76, 243, .8); margin-bottom: 14px; }
.mode-ico .ico { width: 23px; height: 23px; }
.mode h3, .doc-card h2 { font-size: 18px; font-weight: 750; margin-bottom: 8px; }
.mode p, .doc-card p { margin: 0; color: var(--muted); font-size: 15px; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.search-head ~ .block .chip-cloud { justify-content: flex-start; }
.cloud-chip { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 8px; border-radius: 999px; font-size: 14.5px; font-weight: 650; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--sh-sm); transition: all .2s; }
.cloud-chip .chip { width: 30px; height: 30px; border-radius: 10px; }
.cloud-chip .chip .ico { width: 16px; height: 16px; }
.cloud-chip:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: color-mix(in srgb, var(--t1) 45%, var(--line)); text-decoration: none; }

/* ---------- 404 и служебные ---------- */
.notfound { text-align: center; max-width: 760px; margin: 28px auto 0; }
.nf-code { font-size: clamp(96px, 16vw, 168px); font-weight: 900; letter-spacing: -.06em; line-height: 1; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 22px 28px rgba(98, 76, 243, .3)); }
.notfound h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 850; margin: 8px 0 12px; }
.notfound p { color: var(--muted); max-width: 52ch; margin: 0 auto 28px; }
.notfound .chip-cloud { margin-top: 34px; }
.doc-head { max-width: 780px; margin-bottom: 30px; }
.doc-head h1 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 850; letter-spacing: -.03em; margin: 4px 0 14px; }
.doc-head .lead { font-size: 18px; color: var(--muted); }
.doc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.doc-note { margin-top: 22px; padding: 18px 22px; border-radius: var(--r); font-size: 15px; background: color-mix(in srgb, #f59e0b 9%, var(--surface)); border: 1px solid color-mix(in srgb, #f59e0b 32%, var(--line)); }
.doc-prose { max-width: 820px; }
.doc-prose h2 { margin-top: 1.4em; }
.doc-prose h2:first-child { margin-top: 0; }
.doc-prose h2::before { display: none; }
.doc-prose h2 { padding-left: 0; font-size: 22px; }

/* ---------- подвал ---------- */
.footer { margin-top: auto; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, var(--bg-soft)); padding: 40px 32px 28px; }
.footer-grid { max-width: calc(var(--content-max)); margin-inline: auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer h2 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer li a { color: var(--ink-2); text-decoration: none; font-size: 14.5px; }
.footer li a:hover { color: var(--link); text-decoration: underline; }
.footer-brand p { margin: 14px 0 0; max-width: 34ch; font-size: 14.5px; color: var(--muted); }
.footer-bottom { max-width: var(--content-max); margin: 32px auto 0; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ---------- адаптив ---------- */
@media (min-width: 1180px) {
    .topnav { display: flex; }
}
@media (max-width: 1260px) {
    .article-layout { grid-template-columns: minmax(0, 1fr); }
    .rail { display: none; }
    .toc-mobile { display: block; }
    .layout-2 { grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; }
}
@media (max-width: 1100px) {
    .layout-2 { grid-template-columns: minmax(0, 1fr); }
    .col-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .side-accent { grid-column: 1 / -1; }
    .how-grid { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; gap: 40px; }
    .modes { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
    :root { --topbar-h: 64px; }
    .shell { grid-template-columns: minmax(0, 1fr); }
    .nav-toggle { display: inline-grid; }
    .nav-close { display: inline-grid; width: 36px; height: 36px; color: #c9d1f2; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); box-shadow: none; }
    .sidebar { position: fixed; z-index: 70; left: 0; top: 0; height: 100vh; height: 100dvh; width: min(88vw, 340px); transform: translateX(-102%); transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; }
    .nav-open .sidebar { transform: none; box-shadow: 30px 0 60px -20px rgba(0, 0, 0, .55); }
    .backdrop { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(6, 9, 28, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; }
    .nav-open .backdrop { opacity: 1; pointer-events: auto; }
    .nav-open { overflow: hidden; }
    .topbar { flex-wrap: wrap; padding: 10px 16px; gap: 10px 12px; }
    .topbar .search { order: 5; flex: 1 0 100%; max-width: none; transition: opacity .2s; }
    .theme-toggle { margin-left: auto; }
    .topbar-compact .search { display: none; }
    .main { padding: 18px 20px 44px; }
    .footer { padding: 32px 20px 24px; }
}
@media (max-width: 820px) {
    .sub-grid { grid-template-columns: 1fr; }
    .pr-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .doc-grid { grid-template-columns: 1fr; }
    .col-side { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    body { font-size: 15.5px; }
    .main { padding: 14px 16px 40px; }
    .hero { border-radius: 24px; }
    .hero-inner { padding: 28px 16px 22px; }
    .search-hero { height: 58px; }
    .search-hero .search-input { font-size: 15.5px; padding-left: 46px; }
    .search-hero .search-ico { left: 17px; }
    .search-hero .search-btn { padding: 0 1.2em; }
    .search-kbd { display: none; }
    .block { margin-top: 40px; }
    .block-head h2 { font-size: 24px; }
    .page-hero { border-radius: 24px; padding: 22px 18px; }
    .ph-main { flex-direction: column; gap: 14px; }
    .ph-ico, .page-hero-sm .ph-ico { width: 52px; height: 52px; border-radius: 16px; }
    .ph-foot { gap: 12px; }
    .ph-foot .search { min-width: 0; flex-basis: 100%; }
    .row { grid-template-columns: auto minmax(0, 1fr); padding: 14px; gap: 12px; }
    .row-go { display: none; }
    .row-badge { min-width: 48px; height: 44px; max-width: 96px; }
    .art-head { border-radius: 24px; padding: 20px 18px 22px; }
    .answer { padding: 18px 18px 4px; }
    .answer p { font-size: 16.5px; }
    .prose { font-size: 16.5px; line-height: 1.72; }
    .prose .anchor { display: none; }
    .step { padding: 14px 14px 14px 60px; }
    .step::before { left: 12px; top: 14px; width: 34px; height: 34px; }
    .step:not(:last-child)::after { left: 28px; top: 52px; }
    .cmd { margin-inline: -4px; border-radius: 16px; }
    .cmd-body { padding: 14px 16px; font-size: 13.5px; }
    .cmd-lines { padding: 10px 12px 11px 14px; }
    .cmd-copy-line { opacity: 1; }
    .cmd-warning { padding: 11px 14px; }
    .cmd-head { padding: 9px 10px 9px 12px; }
    .cmd-dots { display: none; }
    .cmd-actions { margin-left: 0; width: 100%; }
    .cmd-actions .btn-mini { flex: 1; justify-content: center; padding: 9px 10px; }
    .cmd-head { gap: 8px 10px; }
    .cmd-badges { flex: 1 1 auto; }
    .prevnext { grid-template-columns: 1fr; }
    .pn-next { grid-column: 1; text-align: left; }
    .src-list span { margin-left: 0; width: 100%; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; }
    .sec-grid { grid-template-columns: 1fr; }
    .msg-text { font-size: 14px; padding: 14px 16px; }
}
@media (max-width: 380px) {
    .stats { gap: 8px; }
    .stats > div { padding: 12px 8px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
    .topbar, .sidebar, .backdrop, .rail, .progress, .footer, .cmd-actions, .search { display: none !important; }
    .shell { display: block; }
    body { background: #fff; }
    .cmd { background: #fff; color: #000; border: 1px solid #999; box-shadow: none; }
    .cmd-body, .cmd-body span { color: #000 !important; }
}

/* исправления сетки */
.rail { grid-template-columns: minmax(0, 1fr); }
.topbar .search { min-width: 0; }

html { overflow-x: clip; }
.hero-bg, .ph-bg, .art-bg { overflow: hidden; border-radius: inherit; }

/* ---------- v3: меню без прокрутки (десктоп) ---------- */
@media (min-width: 1024px) {
    .shell { align-items: stretch; }
    .sidebar { position: relative; top: auto; height: auto; min-height: calc(100vh - var(--topbar-h)); overflow: visible; }
    .sidebar::before { overflow: hidden; }
    .sidebar-inner { height: auto; overflow: visible; }
}

/* ---------- v3: большие цифры шагов в градиентных кружках ---------- */
.steps { gap: 18px; }
.step { padding: 20px 22px 20px 104px; min-height: 96px; justify-content: center; }
.step::before { left: 20px; top: 18px; width: 64px; height: 64px; border-radius: 50%; font-size: 30px; font-weight: 800; letter-spacing: -.02em;
    background: linear-gradient(135deg, var(--t1), var(--t2));
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--t1) 16%, transparent), 0 14px 24px -10px color-mix(in srgb, var(--t1) 85%, transparent), inset 0 2px 0 rgba(255, 255, 255, .35);
    text-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.step:not(:last-child)::after { left: 51px; top: 88px; bottom: -20px; width: 3px; border-radius: 3px; background: linear-gradient(var(--t1), transparent); opacity: .4; }
.step-title { font-size: 17.5px; }

/* ---------- v34: единая таблица причин вместо повторяющихся карточек ---------- */
.why-wrap { margin-top: .85em; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--sh-sm); }
.why-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 14.5px; line-height: 1.52; }
.why-table thead th { padding: 13px 15px; background: color-mix(in srgb, var(--t1) 8%, var(--surface)); color: var(--ink); font-size: 12px; letter-spacing: .035em; white-space: normal; }
.why-table thead th:nth-child(1) { width: 36%; }
.why-table thead th:nth-child(2) { width: 32%; }
.why-table thead th:nth-child(3) { width: 32%; }
.why-table tbody th, .why-table tbody td { vertical-align: middle; text-align: left; padding: 14px 15px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; font-weight: 400; }
.why-table tbody th { color: var(--ink); text-transform: none; letter-spacing: normal; white-space: normal; font-size: 14.5px; background: transparent; }
.why-table tbody tr:last-child > * { border-bottom: 0; }
.why-table tbody tr:nth-child(even) > th, .why-table tbody tr:nth-child(even) > td { background: color-mix(in srgb, var(--t1) 2.3%, var(--surface)); }
.why-table tbody tr:hover > * { background: color-mix(in srgb, var(--t1) 5%, var(--surface)); }
.why-cause { display: flex; align-items: flex-start; gap: 10px; }
.why-number { display: grid; place-items: center; flex: 0 0 27px; height: 27px; border-radius: 9px; font-size: 12px; font-weight: 800; color: var(--t1); background: color-mix(in srgb, var(--t1) 12%, var(--surface)); }
.why-title-wrap { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.why-title { color: var(--ink); font-size: 14.5px; font-weight: 750; line-height: 1.4; }
.why-description { color: var(--muted); font-size: 13px; line-height: 1.45; }
.why-signs { color: var(--ink-2); }
.why-action { color: var(--ink-2); display: inline-block; padding-left: 10px; border-left: 3px solid color-mix(in srgb, #10b981 78%, var(--surface)); }
@media (max-width: 760px) {
    .why-wrap { overflow: visible; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
    .why-table, .why-table tbody { display: block; width: 100%; }
    .why-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .why-table tbody tr { display: block; margin: 0 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-sm); overflow: hidden; }
    .why-table tbody tr:nth-child(even) > th, .why-table tbody tr:nth-child(even) > td { background: transparent; }
    .why-table tbody tr:hover > * { background: transparent; }
    .why-table tbody th, .why-table tbody td { display: block; width: 100%; padding: 10px 14px; border-bottom: 0; }
    .why-table tbody th { padding-top: 13px; padding-bottom: 9px; background: color-mix(in srgb, var(--t1) 4%, var(--surface)); }
    .why-table tbody td { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; }
    .why-table tbody td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; line-height: 1.6; padding-top: 2px; }
    .why-table tbody td:last-child { padding-bottom: 14px; }
    .why-table tbody td .why-action { border-left-width: 2px; padding-left: 8px; }
}
@media (max-width: 365px) { .why-table tbody td { grid-template-columns: 75px minmax(0, 1fr); gap: 7px; padding-left: 11px; padding-right: 11px; } }
@media print { .why-wrap { overflow: visible; } .why-table { break-inside: auto; } .why-table tr { break-inside: avoid; } }

/* ---------- v3: компактный подвал ---------- */
.footer { padding: 30px 32px 20px; }
.footer-grid { grid-template-columns: 1.3fr 3fr 1fr; gap: 28px 36px; }
.footer-secs ul { display: block; columns: 3; column-gap: 28px; }
.footer-secs li { break-inside: avoid; padding-bottom: 8px; }
.footer ul { gap: 7px; }
.footer-brand p { margin-top: 10px; }
.footer-bottom { margin-top: 22px; padding-top: 16px; }
.footer .logo-text b { color: var(--ink); }
@media (max-width: 1100px) { .footer-grid { grid-template-columns: 1fr 2fr; } .footer-brand { grid-column: 1 / -1; } .footer-secs ul { columns: 2; } }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-secs { grid-column: 1 / -1; } }
@media (max-width: 640px) { .footer-secs ul { columns: 2; } }
.ym-pixel { position: absolute; left: -9999px; }
noindex { display: contents; }

/* v10: сортировка таблиц */
th.is-sortable { cursor: pointer; user-select: none; position: relative; padding-right: 26px !important; }
th.is-sortable::after { content: "↕"; position: absolute; right: 9px; top: 50%; transform: translateY(-50%); opacity: .35; font-size: 12px; }
th.is-sortable[aria-sort="ascending"]::after { content: "▲"; opacity: .9; }
th.is-sortable[aria-sort="descending"]::after { content: "▼"; opacity: .9; }
th.is-sortable:hover, th.is-sortable:focus-visible { color: var(--brand, #6d5dfc); outline: none; }

/* v37 — спокойные номера шагов: внимание на инструкции, а не на декоре */
.steps { gap: 14px; }
.step { min-height: 78px; padding: 15px 18px 15px 69px; }
.step::before {
    left: 18px; top: 19px; width: 38px; height: 38px;
    border-radius: 50%; font-size: 16px; font-weight: 700;
    color: color-mix(in srgb, var(--t1) 78%, var(--ink));
    background: color-mix(in srgb, var(--t1) 11%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--t1) 16%, var(--line));
    box-shadow: none; text-shadow: none;
    letter-spacing: 0;
}
.step:not(:last-child)::after {
    left: 36px; top: 60px; bottom: -16px; width: 1px;
    background: var(--line); opacity: .85;
}
@media (max-width: 760px) {
    .step { min-height: 70px; padding: 13px 13px 13px 57px; }
    .step::before { left: 13px; top: 16px; width: 32px; height: 32px; font-size: 14px; }
    .step:not(:last-child)::after { left: 29px; top: 53px; bottom: -15px; }
}

/* v40: команды непосредственно в соответствующих шагах */
.prose .step > .cmd { margin: 11px 0 3px; max-width: 100%; box-shadow: 0 8px 18px -14px rgba(30,40,100,.32); }
.prose .step > .cmd:last-child { margin-bottom: 0; }
.step-code-hint { margin: 9px 0 3px; color: var(--ink-2); font-size: 13px; line-height: 1.6; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-soft); }
.cmd-context { padding: 10px 16px; font: 500 13.5px/1.55 var(--font); color: #dce4fa; background: rgba(255,255,255,.055); border-bottom: 1px solid rgba(255,255,255,.1); }
.prose .step .cmd-context .ic { color: #dce4fa; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); }
@media (max-width: 620px) { .prose .step > .cmd { margin-right: -8px; margin-left: -36px; } .step-code-hint { margin-left: -36px; } }

.step-options { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 13px; }
.step-options-title { color: var(--ink-2); font-weight: 650; font-size: 13.5px; line-height: 1.5; }
.step-option { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); min-width: 0; }
.step-option-heading { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; line-height: 1.48; color: var(--ink); }
.step-option-tag { flex: none; white-space: nowrap; background: color-mix(in srgb, var(--t1) 10%, var(--surface)); color: var(--ink-2); border: 1px solid var(--line); border-radius: 7px; padding: 2px 7px; font-size: 12px; font-weight: 700; }
.prose .step-option .cmd { margin: 10px 0 0; box-shadow: none; }
@media (max-width: 620px) { .step-option { margin-left: -20px; margin-right: -8px; padding: 9px; } .step-option-heading { flex-wrap: wrap; gap: 5px; } }
