/* MGRAM Knowledge Base (/docs) — shell like the MGRAM WebApps: left menu with sections and articles,
   header transparent at the top and solid once the page scrolls, content swapped in place. */
@font-face{font-family:"Montserrat";font-style:normal;font-weight:400 800;font-display:swap;src:url("/assets/fonts/montserrat-cyrillic-ext.woff2?v=31") format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;}
@font-face{font-family:"Montserrat";font-style:normal;font-weight:400 800;font-display:swap;src:url("/assets/fonts/montserrat-cyrillic.woff2?v=31") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}
@font-face{font-family:"Montserrat";font-style:normal;font-weight:400 800;font-display:swap;src:url("/assets/fonts/montserrat-latin-ext.woff2?v=31") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:"Montserrat";font-style:normal;font-weight:400 800;font-display:swap;src:url("/assets/fonts/montserrat-latin.woff2?v=31") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}

:root{--bg:#090909;--s1:#111;--s2:#151515;--s3:#1b1b1b;--line:rgba(255,255,255,.065);--line2:rgba(255,255,255,.11);--t1:#f3f3f5;--t2:#a3a3a8;--t3:#6f6f75;--accent:#f2c94c;--blue:#66aef0;--green:#4fd07d;--red:#ef6275;--side:288px;--top:60px;--ease:cubic-bezier(.22,1,.36,1);--font:"Montserrat",Arial,sans-serif}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{background:var(--bg);color-scheme:dark;scroll-behavior:smooth;scrollbar-gutter:stable;scroll-padding-top:calc(var(--top) + 16px)}
body.kd{margin:0;min-width:320px;background:var(--bg);color:var(--t1);font:15px/1.6 var(--font);-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%}
::selection{background:rgba(242,201,76,.28);color:#fff}
a{color:inherit;text-decoration:none}
button{font-family:inherit}
img{display:block}
svg{display:block;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
a:focus,button:focus,input:focus{outline:none}
a:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.kd kbd{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:6px;background:#1d1d1d;box-shadow:inset 0 -1px 0 rgba(255,255,255,.06);color:var(--t3);font:650 11.5px var(--font)}
.kd-sprite{position:absolute;width:0;height:0;overflow:hidden}
.kd-skip{position:fixed;z-index:200;left:12px;top:-60px;padding:8px 12px;border-radius:8px;background:var(--accent);color:#111;font-size:13px;font-weight:700;transition:top .15s}
.kd-skip:focus{top:12px}
html.kd-lock,html.kd-lock body{overflow:hidden;overscroll-behavior:none}

/* ───────── MGRAM AI orb (one look everywhere) ───────── */
.kd-orb{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#f2c94c;color:#1d1600;box-shadow:none}
.kd-orb svg{width:16px;height:16px;stroke-width:2.1}
.kd-orb--xs{width:20px;height:20px}.kd-orb--xs svg{width:11px;height:11px;stroke-width:2.3}
.kd-orb--lg{width:44px;height:44px}.kd-orb--lg svg{width:22px;height:22px}

/* ───────── sidebar (like the expanded WebApp menu) ───────── */
.kd-side{position:fixed;z-index:50;top:0;bottom:0;left:0;width:var(--side);display:flex;flex-direction:column;background:#0d0d0d;border-right:1px solid rgba(255,255,255,.05)}
.kd-side-top{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;height:var(--top);padding:0 12px 0 18px}
.kd-brand{display:flex;align-items:center;gap:11px;min-width:0}
.kd-brand img{width:32px;height:32px;border-radius:10px}
.kd-brand span{display:flex;flex-direction:column;line-height:1.1}
.kd-brand b{font-size:15px;font-weight:700;letter-spacing:.03em}
.kd-brand small{margin-top:3px;color:var(--t3);font-size:11.5px;font-weight:600}
.kd-side-x{display:none;place-items:center;width:36px;height:36px;border:0;border-radius:10px;background:none;color:var(--t2);cursor:pointer}
.kd-side-x:hover{background:#171717;color:var(--t1)}
.kd-side-x svg{width:19px;height:19px}
.kd-side-search{flex:none;display:flex;align-items:center;gap:10px;margin:2px 14px 10px;height:40px;padding:0 9px 0 12px;border:0;border-radius:11px;background:#151515;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);color:var(--t3);font:600 13px var(--font);text-align:left;cursor:pointer;transition:box-shadow .15s,color .15s}
.kd-side-search:hover{color:var(--t2);box-shadow:inset 0 0 0 1px rgba(255,255,255,.13)}
.kd-side-search svg{width:16px;height:16px}
.kd-side-search span{flex:1}
.kd-nav{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:2px 10px 18px;scrollbar-width:thin;scrollbar-color:#2a2a2a transparent}
.kd-nav::-webkit-scrollbar{width:6px}.kd-nav::-webkit-scrollbar-thumb{background:#262626;border-radius:3px}
.kd-nav-row{position:relative;display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;min-height:40px;border-radius:10px;color:#8a8a8f;font-size:13.5px;font-weight:600;letter-spacing:-.005em;transition:background .15s,color .15s}
.kd-nav-row:hover{background:#151515;color:#dcdce0}
.kd-nav-ic{display:grid;place-items:center;width:38px;height:40px}
.kd-nav-ic svg{width:18px;height:18px}
.kd-nav-tx{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:6px}
.kd-group .kd-nav-tx{padding-right:36px}
.kd-nav-row.is-active{color:var(--t1)}
.kd-nav-row.is-active::before{content:"";position:absolute;left:0;top:11px;bottom:11px;width:2px;border-radius:0 2px 2px 0;background:var(--accent)}
.kd-nav-row.is-active .kd-nav-ic,.kd-group.is-current .kd-group-head .kd-nav-ic{color:var(--accent)}
.kd-group.is-current .kd-group-head .kd-nav-row{color:#ececef}
.kd-group{margin-top:2px}
.kd-group-head{position:relative}
.kd-group-tg{position:absolute;right:5px;top:6px;width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:8px;background:none;color:#5d5d63;cursor:pointer;transition:color .15s,background .15s}
.kd-group-tg:hover{background:#1d1d1d;color:#dcdce0}
.kd-group-tg svg{width:15px;height:15px;transition:transform .25s var(--ease)}
.kd-group.is-open .kd-group-tg svg{transform:rotate(90deg)}
.kd-sub{display:grid;grid-template-rows:0fr;transition:grid-template-rows .28s var(--ease)}
.kd-group.is-open .kd-sub{grid-template-rows:1fr}
.kd-sub-in{min-height:0;overflow:hidden}
.kd-sub-list{display:flex;flex-direction:column;gap:1px;margin:2px 0 8px 18px;padding-left:10px;border-left:1px solid rgba(255,255,255,.075);visibility:hidden;transition:visibility 0s .28s}
.kd-group.is-open .kd-sub-list{visibility:visible;transition-delay:0s}
.kd-sub-row{position:relative;display:block;padding:7px 10px;border-radius:8px;color:#7f7f85;font-size:13px;font-weight:500;line-height:1.38;transition:color .15s,background .15s}
.kd-sub-row:hover{color:#dcdce0;background:#141414}
.kd-sub-row.is-active{color:var(--t1);font-weight:600;background:#171717}
.kd-sub-row.is-active::before{content:"";position:absolute;left:-11px;top:8px;bottom:8px;width:2px;border-radius:2px;background:var(--accent)}
.kd-side-foot{flex:none;padding:10px 12px calc(12px + env(safe-area-inset-bottom,0px));border-top:1px solid rgba(255,255,255,.05)}
.kd-side-ai{display:flex;align-items:center;gap:11px;width:100%;padding:9px 12px 9px 9px;border:0;border-radius:13px;background:#141414;box-shadow:inset 0 0 0 1px rgba(242,201,76,.18);color:var(--t1);text-align:left;cursor:pointer;transition:background .15s,box-shadow .15s}
.kd-side-ai:hover{background:#181818;box-shadow:inset 0 0 0 1px rgba(242,201,76,.38)}
.kd-side-ai-tx{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.2}
.kd-side-ai b{font-size:13px;font-weight:650}
.kd-side-ai small{margin-top:3px;color:var(--t3);font-size:11.5px;font-weight:600}
.kd-side-ai>svg{width:16px;height:16px;color:var(--t3);transition:transform .2s var(--ease),color .2s}
.kd-side-ai:hover>svg{color:var(--accent);transform:translateX(2px)}
.kd-side-meta{display:flex;align-items:center;gap:14px;margin-top:11px;padding:0 3px;color:var(--t3);font-size:12px;font-weight:600}
.kd-side-meta>a:hover{color:var(--t1)}
.kd-lang{display:inline-flex;padding:2px;border-radius:8px;background:#151515;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
.kd-lang a{padding:3px 8px;border-radius:6px;color:var(--t3);font-size:11.5px;font-weight:700}
.kd-lang a:hover{color:var(--t1)}
.kd-lang a.is-on{background:#262626;color:var(--t1)}
.kd-scrim{display:none}

/* ───────── header: transparent at the top, solid when the page is scrolled ───────── */
.kd-top{position:fixed;z-index:40;top:0;left:0;right:0;height:calc(var(--top) + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 16px 0;display:flex;align-items:center;gap:10px;background:transparent;border-bottom:1px solid transparent;transition:background-color .25s,border-color .25s}
.kd-top::before{content:"";position:absolute;inset:0;z-index:-1;opacity:0;background:rgba(9,9,9,.84);-webkit-backdrop-filter:blur(16px) saturate(140%);backdrop-filter:blur(16px) saturate(140%);transition:opacity .25s}
.kd-top.is-scrolled{border-bottom-color:rgba(255,255,255,.06)}
.kd-top.is-scrolled::before{opacity:1}
.kd-menu{flex:none;display:grid;place-items:center;width:40px;height:40px;margin-left:-8px;border:0;border-radius:10px;background:none;color:var(--accent);cursor:pointer;transition:opacity .15s,transform .15s}
.kd-menu:hover{opacity:.85}.kd-menu:active{transform:scale(.95)}
.kd-menu svg{width:24px;height:24px;stroke-width:2.15}
.kd-top-brand{flex:none;display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;letter-spacing:-.01em}
.kd-top-brand img{width:28px;height:28px;border-radius:8px}
.kd-top-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#dadade;font-size:14px;font-weight:650;opacity:0;transform:translateY(4px);transition:opacity .2s,transform .25s var(--ease)}
.kd-top.is-titled .kd-top-title{opacity:1;transform:none}
.kd-top-actions{flex:none;margin-left:auto;display:flex;align-items:center;gap:6px}
.kd-top-link{padding:8px 11px;border-radius:9px;color:var(--t2);font-size:13px;font-weight:600;transition:color .15s,background .15s}
.kd-top-link:hover{color:var(--t1);background:rgba(255,255,255,.05)}
.kd-icon-btn{display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:11px;background:none;color:var(--t2);cursor:pointer;transition:color .15s,background .15s}
.kd-icon-btn:hover{background:rgba(255,255,255,.06);color:var(--t1)}
.kd-icon-btn svg{width:19px;height:19px}
.kd-ai-btn{display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 15px 0 5px;border:0;border-radius:999px;background:#151515;box-shadow:inset 0 0 0 1px rgba(255,255,255,.09);color:var(--t1);font:650 13px var(--font);white-space:nowrap;cursor:pointer;transition:box-shadow .2s,background .2s}
.kd-ai-btn .kd-orb{width:28px;height:28px}
.kd-ai-btn .kd-orb svg{width:15px;height:15px;transition:transform .35s var(--ease)}
.kd-ai-btn:hover{background:#1a1a1a;box-shadow:inset 0 0 0 1px rgba(242,201,76,.5)}
.kd-ai-btn:hover .kd-orb svg{transform:rotate(18deg) scale(1.08)}
.kd-ai-btn-s{display:none}
.kd-login{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 15px;border-radius:999px;background:var(--t1);color:#0b0b0b;font-size:13px;font-weight:700;white-space:nowrap}
.kd-login:hover{background:#fff}
.kd-login svg{width:15px;height:15px;stroke-width:2.2}
.kd-progress{position:fixed;z-index:100;top:0;left:0;height:2px;width:0;background:var(--accent);opacity:0;transition:width .35s ease,opacity .3s;pointer-events:none}
.kd-progress.is-on{opacity:1}

/* ───────── content ───────── */
.kd-main{min-height:100vh;display:flex;flex-direction:column}
.kd-main:focus{outline:none}
.kd-content{flex:1}
.kd-content.is-enter{animation:kdIn .3s var(--ease)}
@keyframes kdIn{from{opacity:0;transform:translateY(6px)}}
.kd-wrap{width:min(calc(100% - 64px),1120px);margin-inline:auto}
.kd-page{padding:calc(var(--top) + 26px) 0 72px}
.kd-eyebrow{display:inline-flex;align-items:center;gap:8px;color:var(--t3);font-size:12px;font-weight:650;letter-spacing:.08em;text-transform:uppercase}
.kd-eyebrow::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--accent)}

/* home */
.kd-hero{position:relative;isolation:isolate;overflow:hidden;padding:calc(var(--top) + 64px) 0 52px}
.kd-hero::before{content:"";position:absolute;inset:0;z-index:-2;background:radial-gradient(55% 95% at 88% -12%,rgba(242,201,76,.11),transparent 62%),radial-gradient(45% 70% at 4% -6%,rgba(102,174,240,.07),transparent 62%),linear-gradient(180deg,#101011 0%,#090909 100%)}
.kd-hero::after{content:"";position:absolute;inset:0;z-index:-1;background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:44px 44px;-webkit-mask-image:radial-gradient(75% 90% at 55% 0%,#000 25%,transparent 75%);mask-image:radial-gradient(75% 90% at 55% 0%,#000 25%,transparent 75%)}
.kd-hero h1{margin:16px 0 0;font-size:clamp(38px,5.4vw,60px);line-height:1.02;letter-spacing:-.035em;font-weight:700}
.kd-hero p{margin:16px 0 0;max-width:620px;color:var(--t2);font-size:16.5px;line-height:1.55}
.kd-hero-search{margin-top:30px;display:flex;align-items:center;gap:12px;width:100%;max-width:640px;height:58px;padding:0 14px 0 18px;border:0;border-radius:16px;background:#121212;box-shadow:inset 0 0 0 1px rgba(255,255,255,.09),0 14px 44px rgba(0,0,0,.35);color:var(--t3);font:500 15px var(--font);text-align:left;cursor:text;transition:box-shadow .2s}
.kd-hero-search:hover{box-shadow:inset 0 0 0 1px rgba(242,201,76,.4),0 14px 44px rgba(0,0,0,.35)}
.kd-hero-search svg{width:20px;height:20px;flex:none}
.kd-hero-search span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kd-hero-chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:16px;color:var(--t3);font-size:13px;font-weight:600}
.kd-hero-chips a,.kd-hero-chips button{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 13px;border:0;border-radius:999px;background:rgba(255,255,255,.05);box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);color:var(--t2);font:600 12.5px var(--font);cursor:pointer;transition:color .15s,background .15s,box-shadow .15s}
.kd-hero-chips a:hover{color:var(--t1);background:rgba(255,255,255,.08)}
.kd-hero-chips button{padding-left:6px;color:var(--t1);box-shadow:inset 0 0 0 1px rgba(242,201,76,.3)}
.kd-hero-chips button:hover{box-shadow:inset 0 0 0 1px rgba(242,201,76,.55)}
.kd-hero-docs{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.kd-hero-doc{display:flex;align-items:center;gap:12px;min-width:0;padding:9px 18px 9px 9px;border-radius:14px;background:rgba(255,255,255,.04);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);transition:background .15s,box-shadow .15s}
.kd-hero-doc:hover{background:rgba(255,255,255,.07);box-shadow:inset 0 0 0 1px rgba(242,201,76,.38)}
.kd-hero-doc-ic{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:10px;background:#1b1b1b;color:var(--accent)}
.kd-hero-doc-ic svg{width:18px;height:18px}
.kd-hero-doc b{display:block;font-size:13.5px;font-weight:650;line-height:1.25}
.kd-hero-doc small{display:block;margin-top:2px;color:var(--t3);font-size:11.5px;font-weight:600}
.kd-hero-stats{display:block;margin-top:22px;color:var(--t3);font-size:12.5px;font-weight:600}
.kd-sec{padding:44px 0 8px}
.kd-sec-head h2{margin:0;font-size:24px;line-height:1.15;letter-spacing:-.022em;font-weight:700}
.kd-sec-head p{margin:6px 0 0;color:var(--t3);font-size:14px}
.kd-cats{margin-top:20px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.kd-cat{display:flex;flex-direction:column;padding:18px 18px 16px;border-radius:16px;background:var(--s1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.045);transition:background .18s,box-shadow .18s,transform .25s var(--ease)}
.kd-cat:hover{background:#141414;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1);transform:translateY(-2px)}
.kd-cat-head{display:flex;align-items:center;gap:12px}
.kd-cat-ic{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:12px;background:#1a1a1a;color:#e9e9ec;transition:color .18s}
.kd-cat:hover .kd-cat-ic{color:var(--accent)}
.kd-cat-ic svg{width:20px;height:20px}
.kd-cat-head b{font-size:15.5px;font-weight:650;letter-spacing:-.01em;line-height:1.25}
.kd-cat-sum{margin-top:12px;color:var(--t2);font-size:13.5px;line-height:1.5}
.kd-cat ul{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:5px}
.kd-cat li{position:relative;padding-left:14px;color:#8d8d92;font-size:12.5px;font-weight:500;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kd-cat li::before{content:"";position:absolute;left:2px;top:.62em;width:4px;height:4px;border-radius:50%;background:#4b4b50}
.kd-cat-foot{margin-top:auto;padding-top:14px;display:flex;align-items:center;justify-content:space-between;color:var(--t3);font-size:12px;font-weight:650}
.kd-cat-foot svg{width:16px;height:16px;transition:transform .2s var(--ease),color .2s}
.kd-cat:hover .kd-cat-foot svg{transform:translateX(3px);color:var(--accent)}
.kd-home-2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,360px);gap:28px;padding-bottom:72px}
.kd-pops{margin-top:18px;border-radius:16px;background:var(--s1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.045);overflow:hidden}
.kd-pop{position:relative;display:flex;align-items:center;gap:14px;padding:13px 16px;transition:background .15s}
.kd-pop+.kd-pop::before{content:"";position:absolute;top:0;left:64px;right:0;border-top:1px solid rgba(255,255,255,.05)}
.kd-pop:hover{background:#151515}
.kd-pop-ic{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:10px;background:#1a1a1a;color:var(--t2)}
.kd-pop:hover .kd-pop-ic{color:var(--accent)}
.kd-pop-ic svg{width:17px;height:17px}
.kd-pop-tx{flex:1;min-width:0}
.kd-pop-tx b{display:block;font-size:14.5px;font-weight:600;line-height:1.35}
.kd-pop-tx small{display:block;margin-top:2px;color:var(--t3);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kd-pop>svg{width:16px;height:16px;flex:none;color:var(--t3)}
.kd-home-side{display:grid;gap:12px;align-content:start;margin-top:52px}
.kd-card{padding:20px;border-radius:16px;background:var(--s1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.045)}
.kd-card h3{margin:12px 0 0;font-size:18px;line-height:1.25;font-weight:700;letter-spacing:-.015em}
.kd-card p{margin:6px 0 0;color:var(--t2);font-size:13.5px;line-height:1.5}
.kd-card a{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;margin-top:8px;padding:0 14px;border-radius:11px;background:#181818;font-size:13.5px;font-weight:600;transition:background .15s}
.kd-card a:first-of-type{margin-top:16px}
.kd-card a:hover{background:#1f1f1f}
.kd-card a svg{width:16px;height:16px;flex:none;color:var(--t3)}

/* AI card */
.kd-ai-card{display:flex;align-items:center;gap:14px;width:100%;margin-top:28px;padding:16px 18px 16px 16px;border:0;border-radius:16px;background:linear-gradient(120deg,#19150a 0%,#131313 58%);box-shadow:inset 0 0 0 1px rgba(242,201,76,.2);color:var(--t1);text-align:left;cursor:pointer;transition:box-shadow .2s,transform .25s var(--ease)}
.kd-ai-card:hover{box-shadow:inset 0 0 0 1px rgba(242,201,76,.45);transform:translateY(-1px)}
.kd-ai-card-tx{flex:1;min-width:0}
.kd-ai-card-tx b{display:block;font-size:15px;font-weight:650;line-height:1.35}
.kd-ai-card-tx small{display:block;margin-top:3px;color:var(--t2);font-size:13px;line-height:1.45}
.kd-ai-card-go{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;background:rgba(242,201,76,.12);color:var(--accent);transition:transform .2s var(--ease)}
.kd-ai-card:hover .kd-ai-card-go{transform:translateX(2px)}
.kd-ai-card-go svg{width:17px;height:17px}
.kd-home-side .kd-ai-card{margin-top:0}

/* crumbs, category */
.kd-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;color:var(--t3);font-size:13px;font-weight:600}
.kd-crumbs a{transition:color .15s}.kd-crumbs a:hover{color:var(--t1)}
.kd-crumbs i{display:inline-grid;opacity:.55}.kd-crumbs i svg{width:13px;height:13px}
.kd-crumbs span{color:var(--t2)}
.kd-cat-hero{display:flex;gap:18px;align-items:flex-start;margin:20px 0 28px;max-width:860px}
.kd-cat-ic--lg{width:56px;height:56px;border-radius:16px;background:#151515;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);color:var(--accent)}
.kd-cat-ic--lg svg{width:26px;height:26px}
.kd-cat-hero h1{margin:2px 0 0;font-size:clamp(30px,4vw,42px);line-height:1.08;letter-spacing:-.03em;font-weight:700}
.kd-cat-hero p{margin:10px 0 0;color:var(--t2);font-size:16px;line-height:1.55}
.kd-cat-hero small{display:block;margin-top:10px;color:var(--t3);font-size:13px;font-weight:600}
.kd-rows{display:grid;gap:10px;max-width:860px}
.kd-row{display:flex;align-items:center;gap:16px;padding:18px 18px 18px 16px;border-radius:16px;background:var(--s1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.045);transition:background .15s,box-shadow .15s,transform .25s var(--ease)}
.kd-row:hover{background:#141414;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1);transform:translateY(-1px)}
.kd-row-n{flex:none;align-self:flex-start;display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#1a1a1a;color:var(--t3);font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;transition:color .15s}
.kd-row:hover .kd-row-n{color:var(--accent)}
.kd-row-tx{flex:1;min-width:0}
.kd-row-tx b{display:block;font-size:16px;line-height:1.35;font-weight:650;letter-spacing:-.01em}
.kd-row-tx>span{display:block;margin-top:4px;color:var(--t2);font-size:14px;line-height:1.5}
.kd-row-tx small{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:10px;color:var(--t3);font-size:12.5px;font-weight:600}
.kd-row-tx small span{display:inline-flex;align-items:center;gap:6px}
.kd-row-tx small svg{width:14px;height:14px}
.kd-row-go{flex:none;color:var(--t3);transition:transform .2s var(--ease),color .2s}
.kd-row-go svg{width:18px;height:18px}
.kd-row:hover .kd-row-go{transform:translateX(3px);color:var(--accent)}
.kd-page>.kd-ai-card{max-width:860px}
.kd-others{margin-top:40px;max-width:860px}
.kd-others h2{margin:0 0 12px;color:var(--t2);font-size:14px;font-weight:650}
.kd-others div{display:flex;flex-wrap:wrap;gap:8px}
.kd-others a{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 14px 0 11px;border-radius:999px;background:#121212;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);color:var(--t2);font-size:13px;font-weight:600;transition:color .15s,box-shadow .15s}
.kd-others a svg{width:16px;height:16px}
.kd-others a:hover{color:var(--t1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.14)}

/* article */
.kd-art-grid{display:grid;grid-template-columns:minmax(0,760px);gap:56px;justify-content:start}
.kd-art{min-width:0}
.kd-art-h1{margin:16px 0 0;font-size:clamp(30px,4.2vw,44px);line-height:1.08;letter-spacing:-.03em;font-weight:700;text-wrap:balance}
.kd-lead{margin:14px 0 0;color:var(--t2);font-size:17.5px;line-height:1.55}
.kd-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;margin-top:22px;padding:13px 0;border-top:1px solid rgba(255,255,255,.06);border-bottom:1px solid rgba(255,255,255,.06)}
.kd-chip{display:inline-flex;align-items:center;gap:7px;color:var(--t3);font-size:13px;font-weight:600;white-space:nowrap}
.kd-chip svg{width:15px;height:15px;flex:none}
.kd-copy{margin-left:auto;display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 14px 0 12px;border:0;border-radius:10px;background:#151515;box-shadow:inset 0 0 0 1px rgba(255,255,255,.09);color:var(--t1);font:650 12.5px var(--font);white-space:nowrap;cursor:pointer;transition:background .15s,box-shadow .15s,color .15s}
.kd-copy:hover{background:#1a1a1a;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.kd-copy svg{width:15px;height:15px}
.kd-copy .kd-copy-b{display:none}
.kd-copy.is-done{color:var(--green);box-shadow:inset 0 0 0 1px rgba(79,208,125,.4)}
.kd-copy.is-done .kd-copy-a{display:none}.kd-copy.is-done .kd-copy-b{display:block}
.kd-body{margin-top:30px;color:#d6d6da;font-size:16px;line-height:1.75}
.kd-body>:first-child{margin-top:0}
.kd-body p{margin:0 0 16px}
.kd-body h2{margin:44px 0 14px;padding-top:28px;border-top:1px solid rgba(255,255,255,.06);color:var(--t1);font-size:23px;line-height:1.25;letter-spacing:-.02em;font-weight:700}
.kd-body>h2:first-child{padding-top:0;border-top:0}
.kd-body h3{margin:28px 0 10px;color:var(--t1);font-size:17.5px;line-height:1.35;font-weight:650;letter-spacing:-.01em}
.kd-body h2+h3{margin-top:6px}
.kd-body a{color:var(--accent);text-decoration:underline;text-decoration-color:rgba(242,201,76,.35);text-underline-offset:3px;transition:text-decoration-color .15s}
.kd-body a:hover{text-decoration-color:var(--accent)}
.kd-body b{color:var(--t1);font-weight:650}
.kd-body code{padding:1px 6px;border-radius:6px;background:#1a1a1a;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);color:#f1e3b2;font:600 .86em ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;word-break:break-word}
.kd-body ul{margin:0 0 18px;padding:0;list-style:none;display:grid;gap:9px}
.kd-body ul li{position:relative;padding-left:20px}
.kd-body ul li::before{content:"";position:absolute;left:4px;top:.74em;width:6px;height:6px;border-radius:50%;background:var(--accent);opacity:.75}
.kd-steps{margin:4px 0 20px;padding:0;list-style:none;counter-reset:st;border-radius:14px;background:var(--s1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.05);overflow:hidden}
.kd-steps li{position:relative;counter-increment:st;padding:15px 18px 15px 58px;color:#e2e2e6;font-size:15.5px;line-height:1.6}
.kd-steps li+li{border-top:1px solid rgba(255,255,255,.05)}
.kd-steps li::before{content:counter(st);position:absolute;left:16px;top:14px;display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#222;color:var(--t1);font-size:12.5px;font-weight:700}
.kd-steps li:last-child::before{background:var(--accent);color:#111}
.kd-note{display:flex;gap:12px;align-items:flex-start;margin:6px 0 20px;padding:14px 16px;border-radius:14px;background:rgba(102,174,240,.07);box-shadow:inset 0 0 0 1px rgba(102,174,240,.15)}
.kd-note svg{flex:none;width:19px;height:19px;margin-top:3px;color:var(--blue)}
.kd-note p{margin:0;color:#d9e6f5;font-size:15px;line-height:1.62}
.kd-note--warn{background:rgba(242,201,76,.07);box-shadow:inset 0 0 0 1px rgba(242,201,76,.17)}
.kd-note--warn svg{color:var(--accent)}
.kd-note--warn p{color:#f0e6c4}
.kd-table{margin:6px 0 22px;overflow-x:auto;border-radius:14px;background:var(--s1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.05);-webkit-overflow-scrolling:touch}
.kd-table table{width:100%;border-collapse:collapse;font-size:14.5px;line-height:1.5}
.kd-table th{padding:12px 16px;background:#151515;color:var(--t3);font-size:12px;font-weight:700;letter-spacing:.04em;text-align:left;text-transform:uppercase;white-space:nowrap}
.kd-table td{padding:12px 16px;border-top:1px solid rgba(255,255,255,.05);color:#dcdce0;vertical-align:top}
.kd-table td:first-child{color:var(--t1);font-weight:600}
.kd-table tbody tr:hover td{background:rgba(255,255,255,.015)}
.kd-toc{display:none}
.kd-toc nav{display:grid;gap:2px;padding-left:14px;border-left:1px solid rgba(255,255,255,.075)}
.kd-toc b{margin-bottom:8px;color:var(--t3);font-size:11.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase}
.kd-toc a{position:relative;padding:5px 0;color:var(--t3);font-size:13px;font-weight:500;line-height:1.4;transition:color .15s}
.kd-toc a:hover,.kd-toc a.is-cur{color:var(--t1)}
.kd-toc a.is-cur::before{content:"";position:absolute;left:-15px;top:6px;bottom:6px;width:2px;border-radius:2px;background:var(--accent)}
.kd-pager{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
.kd-pager a{display:block;min-width:0;padding:15px 18px;border-radius:14px;background:var(--s1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.045);transition:background .15s,box-shadow .15s}
.kd-pager a:hover{background:#141414;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}
.kd-pager small{display:block;color:var(--t3);font-size:12px;font-weight:650}
.kd-pager b{display:block;margin-top:5px;font-size:14.5px;line-height:1.35;font-weight:650}
.kd-pager span{display:block;margin-top:3px;color:var(--t3);font-size:12px;font-weight:500}
.kd-pager-next{text-align:right}

/* 404 */
.kd-404{padding-top:calc(var(--top) + 90px);padding-bottom:110px}
.kd-404 h1{margin:14px 0 0;font-size:clamp(32px,5vw,48px);line-height:1.05;letter-spacing:-.03em}
.kd-404 p{max-width:560px;margin:14px 0 0;color:var(--t2);font-size:16px}
.kd-404-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:26px}
.kd-btn{display:inline-flex;align-items:center;gap:8px;height:46px;padding:0 18px;border:0;border-radius:13px;background:#171717;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);color:var(--t1);font:650 14px var(--font);cursor:pointer}
.kd-btn svg{width:17px;height:17px}
.kd-btn--primary{background:var(--accent);color:#111;box-shadow:none}

/* footer */
.kd-foot{border-top:1px solid rgba(255,255,255,.05)}
.kd-foot-in{width:min(calc(100% - 64px),1120px);margin:0 auto;padding:26px 0 calc(28px + env(safe-area-inset-bottom,0px));display:flex;flex-wrap:wrap;align-items:center;gap:16px 28px}
.kd-foot-brand{display:flex;align-items:center;gap:10px}
.kd-foot-brand img{width:28px;height:28px;border-radius:8px}
.kd-foot-brand b{display:block;font-size:14px}
.kd-foot-brand span{display:block;color:var(--t3);font-size:12px}
.kd-foot nav{display:flex;flex-wrap:wrap;gap:6px 18px;margin-left:auto}
.kd-foot nav a{color:var(--t2);font-size:12.5px;font-weight:600}
.kd-foot nav a:hover{color:var(--t1)}
.kd-foot small{width:100%;color:var(--t3);font-size:12px}

/* ───────── search ───────── */
.kd-search{position:fixed;inset:0;z-index:90}
.kd-search[hidden]{display:none}
.kd-search-bg{position:absolute;inset:0;background:rgba(0,0,0,.62);animation:kdFade .18s}
@keyframes kdFade{from{opacity:0}}
@keyframes kdPop{from{opacity:0;transform:translateY(10px) scale(.985)}}
.kd-search-box{position:relative;display:flex;flex-direction:column;width:min(640px,calc(100vw - 32px));max-height:min(72vh,640px);margin:min(12vh,120px) auto 0;border-radius:18px;background:#121212;box-shadow:0 0 0 1px rgba(255,255,255,.08),0 30px 80px rgba(0,0,0,.6);overflow:hidden;animation:kdPop .22s var(--ease)}
.kd-search-field{flex:none;display:flex;align-items:center;gap:12px;height:60px;padding:0 10px 0 18px;border-bottom:1px solid rgba(255,255,255,.07)}
.kd-search-field>svg{flex:none;width:20px;height:20px;color:var(--t3)}
.kd-search-field input{flex:1;min-width:0;height:100%;border:0;outline:0;background:none;color:var(--t1);font:500 16px var(--font);-webkit-appearance:none;appearance:none}
.kd-search-field input::placeholder{color:var(--t3)}
.kd-search-field input::-webkit-search-cancel-button{display:none}
.kd-search-x{display:flex;align-items:center;padding:6px;border:0;border-radius:9px;background:none;color:var(--t3);cursor:pointer}
.kd-search-x:hover kbd{color:var(--t1)}
.kd-search-x svg{display:none;width:20px;height:20px}
.kd-search-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px}
.kd-search-group{padding:10px 10px 6px;color:var(--t3);font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.kd-sr{display:flex;align-items:flex-start;gap:12px;width:100%;padding:11px 12px;border:0;border-radius:12px;background:none;color:var(--t1);text-align:left;cursor:pointer}
.kd-sr.is-active{background:#1c1c1c}
.kd-sr-ic{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:#1c1c1c;color:var(--t2)}
.kd-sr.is-active .kd-sr-ic{background:#252525;color:var(--accent)}
.kd-sr-ic svg{width:16px;height:16px}
.kd-sr--ai .kd-sr-ic{background:none}
.kd-sr--ai .kd-sr-ic .kd-orb{width:30px;height:30px}
.kd-sr-tx{flex:1;min-width:0}
.kd-sr-tx small{display:block;color:var(--t3);font-size:11.5px;font-weight:650}
.kd-sr-tx b{display:block;margin-top:1px;font-size:14.5px;line-height:1.35;font-weight:650}
.kd-sr-tx span{display:-webkit-box;margin-top:3px;color:var(--t2);font-size:13px;line-height:1.45;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.kd-sr mark{padding:0 1px;border-radius:3px;background:rgba(242,201,76,.24);color:var(--t1)}
.kd-search-empty{padding:26px 16px 14px;color:var(--t3);font-size:14px;text-align:center}
.kd-search-foot{flex:none;display:flex;gap:16px;padding:10px 16px;border-top:1px solid rgba(255,255,255,.06);color:var(--t3);font-size:12px;font-weight:600}
.kd-search-foot kbd{margin-right:3px}

/* ───────── MGRAM AI chat ───────── */
.kb-ai{position:fixed;inset:0;z-index:95}
.kb-ai[hidden]{display:none}
.kb-ai__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.5);opacity:0;transition:opacity .22s}
.kb-ai.is-open .kb-ai__backdrop{opacity:1}
.kb-ai__panel{position:absolute;right:20px;bottom:20px;width:min(420px,calc(100vw - 40px));height:min(660px,calc(100dvh - 40px));display:flex;flex-direction:column;overflow:hidden;border-radius:22px;background:#0b0b0b;box-shadow:0 0 0 1px rgba(255,255,255,.09),0 30px 70px rgba(0,0,0,.6);opacity:0;transform:translateY(16px) scale(.98);transform-origin:bottom right;transition:opacity .22s var(--ease),transform .3s var(--ease)}
.kb-ai.is-open .kb-ai__panel{opacity:1;transform:none}
body.kb-ai-fixed{position:fixed;left:0;right:0;width:100%}
.kb-ai__head{flex:none;display:flex;align-items:center;gap:10px;padding:12px 10px 12px 14px;background:#151517;border-bottom:1px solid rgba(255,255,255,.06)}
.kb-ai__ava{position:relative;flex:none}
.kb-ai__ava img{width:38px;height:38px;border-radius:50%}
.kb-ai__ava .kd-orb{position:absolute;right:-3px;bottom:-3px;box-shadow:0 0 0 2px #151517}
.kb-ai__who{flex:1;min-width:0;line-height:1.2}
.kb-ai__who b{display:block;font-size:15.5px;font-weight:650}
.kb-ai__who small{color:var(--t3);font-size:12.5px;font-weight:500}
.kb-ai__who small.is-typing{color:var(--accent)}
.kb-ai__x{display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:10px;background:none;color:var(--t2);cursor:pointer}
.kb-ai__x:hover{background:#202022;color:var(--t1)}
.kb-ai__x svg{width:18px;height:18px}
.kb-ai__log{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:14px 10px 10px;display:flex;flex-direction:column;gap:8px;scrollbar-width:thin;scrollbar-color:#333 transparent}
.kb-ai__msg{max-width:88%;padding:9px 13px;border-radius:18px;background:#1b1b1d;color:#ececf0;font-size:14.5px;line-height:1.48;animation:kdIn .3s var(--ease)}
.kb-ai__msg p{margin:0}.kb-ai__msg p+p,.kb-ai__msg p+ul,.kb-ai__msg p+ol,.kb-ai__msg ul+p,.kb-ai__msg ol+p{margin-top:6px}
.kb-ai__msg ul,.kb-ai__msg ol{margin:4px 0 0;padding-left:18px}
.kb-ai__msg li+li{margin-top:3px}
.kb-ai__msg b{color:#fff;font-weight:650}
.kb-ai__msg a{color:var(--accent);text-decoration:underline;text-decoration-color:rgba(242,201,76,.35);text-underline-offset:2px}
.kb-ai__msg--bot{align-self:flex-start;border-bottom-left-radius:6px}
.kb-ai__msg--user{align-self:flex-end;background:#f2c94c;color:#16120a;border-bottom-right-radius:6px;white-space:pre-wrap;font-weight:500}
.kb-ai__msg.is-error{background:rgba(239,98,117,.12);color:#f5c6cd}
.kb-ai__msg.is-typing{padding:12px 14px}
.kb-ai__dots{display:flex;gap:4px}
.kb-ai__dots i{width:6px;height:6px;border-radius:50%;background:var(--t3);animation:kbDot 1.1s infinite}
.kb-ai__dots i:nth-child(2){animation-delay:.15s}.kb-ai__dots i:nth-child(3){animation-delay:.3s}
@keyframes kbDot{0%,60%,100%{opacity:.35}30%{opacity:1}}
.kb-ai__src{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;padding-top:9px;border-top:1px solid rgba(255,255,255,.07)}
.kb-ai__src small{width:100%;color:var(--t3);font-size:11.5px;font-weight:650;letter-spacing:.04em;text-transform:uppercase}
.kb-ai__src a{display:inline-flex;align-items:center;max-width:100%;padding:5px 10px;border-radius:8px;background:#262628;color:var(--t1);font-size:12.5px;font-weight:600;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kb-ai__src a:hover{background:#303033}
.kb-ai__chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.kb-ai__chips button{height:34px;padding:0 13px;border:0;border-radius:17px;background:#121212;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);color:var(--t1);font:600 13px var(--font);cursor:pointer}
.kb-ai__chips button:hover{background:#1a1a1a}
.kb-ai__chips--follow{margin:0 0 2px}
.kb-ai__chips--follow button{background:transparent;box-shadow:inset 0 0 0 1px rgba(242,201,76,.3);color:#f3dc8f}
.kb-ai__form{flex:none;display:flex;align-items:flex-end;gap:8px;padding:8px 10px 6px;background:#151517;border-top:1px solid rgba(255,255,255,.06)}
.kb-ai__form textarea{flex:1;min-height:40px;max-height:120px;padding:10px 14px;border:1px solid rgba(255,255,255,.1);border-radius:20px;background:#0b0b0b;color:var(--t1);font:500 14.5px/1.35 var(--font);resize:none;outline:none}
.kb-ai__form textarea:focus{border-color:rgba(242,201,76,.5)}
.kb-ai__form textarea::placeholder{color:var(--t3)}
.kb-ai__form button{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border:0;border-radius:50%;background:var(--accent);color:#16120a;cursor:pointer;transition:opacity .15s,transform .15s}
.kb-ai__form button:disabled{opacity:.3;cursor:default}
.kb-ai__form button:not(:disabled):active{transform:scale(.92)}
.kb-ai__form button svg{width:18px;height:18px;stroke-width:2.4}
.kb-ai__note{margin:0;padding:0 14px 10px;background:#151517;color:var(--t3);font-size:11.5px;text-align:center}

/* ───────── layouts ───────── */
@media(min-width:1100px){
  body.kd{padding-left:var(--side)}
  .kd-top{left:var(--side);padding-left:32px;padding-right:24px}
  .kd-menu,.kd-top-brand,.kd-top-search{display:none}
}
@media(min-width:1320px){
  .kd-art-grid.has-toc{grid-template-columns:minmax(0,760px) 220px}
  .kd-toc{display:block;position:sticky;top:calc(var(--top) + 26px);align-self:start;max-height:calc(100vh - var(--top) - 52px);overflow:auto;scrollbar-width:none}
}
@media(max-width:1099px){
  .kd-side{z-index:80;width:min(86vw,320px);padding-top:env(safe-area-inset-top,0px);transform:translateX(-102%);visibility:hidden;transition:transform .3s var(--ease),visibility 0s .3s,box-shadow .3s}
  body.kd-menu-open .kd-side{transform:none;visibility:visible;box-shadow:24px 0 60px rgba(0,0,0,.5);transition:transform .3s var(--ease),visibility 0s,box-shadow .3s}
  .kd-scrim{display:block;position:fixed;inset:0;z-index:75;background:rgba(0,0,0,.55);opacity:0;visibility:hidden;transition:opacity .25s,visibility 0s .25s}
  body.kd-menu-open .kd-scrim{opacity:1;visibility:visible;transition:opacity .25s,visibility 0s}
  .kd-side-x{display:grid}
  .kd-side-search kbd{display:none}
  .kd-top-title{display:none}
}
@media(max-width:1180px){
  .kd-cats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kd-home-2{grid-template-columns:minmax(0,1fr)}
  .kd-home-side{margin-top:6px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
}
@media(max-width:760px){
  .kd-top-link{display:none}
}
@media(max-width:640px){
  :root{--top:56px}
  .kd-top{padding-left:12px;padding-right:10px;gap:6px}
  .kd-top-actions{gap:4px}
  .kd-ai-btn{height:36px;padding-right:12px;gap:6px}
  .kd-ai-btn .kd-orb{width:26px;height:26px}
  .kd-ai-btn-l{display:none}.kd-ai-btn-s{display:inline}
  .kd-login{width:36px;height:36px;padding:0;justify-content:center}
  .kd-login span{display:none}
  .kd-icon-btn{width:36px;height:36px}
  .kd-wrap,.kd-foot-in{width:calc(100% - 32px)}
  .kd-hero{padding:calc(var(--top) + 38px) 0 38px}
  .kd-hero p{font-size:15.5px}
  .kd-hero-search{height:52px;margin-top:24px}
  .kd-hero-search kbd{display:none}
  .kd-hero-docs{display:grid;grid-template-columns:minmax(0,1fr)}
  .kd-sec{padding-top:34px}
  .kd-cats{grid-template-columns:minmax(0,1fr);gap:10px}
  .kd-home-2{padding-bottom:52px}
  .kd-page{padding:calc(var(--top) + 16px) 0 52px}
  .kd-cat-hero{gap:14px;margin:16px 0 22px}
  .kd-cat-ic--lg{width:46px;height:46px;border-radius:14px}
  .kd-cat-ic--lg svg{width:22px;height:22px}
  .kd-row{padding:15px 14px;gap:12px}
  .kd-row-n{display:none}
  .kd-lead{font-size:16px}
  .kd-meta{gap:8px 14px}
  .kd-copy{margin-left:0}
  .kd-body{font-size:15.5px;line-height:1.72}
  .kd-body h2{font-size:21px;margin-top:36px;padding-top:24px}
  .kd-steps li{padding:13px 14px 13px 52px;font-size:15px}
  .kd-steps li::before{left:13px;top:12px}
  .kd-table{overflow:visible;background:none;box-shadow:none;border-radius:0}
  .kd-table thead{display:none}
  .kd-table table,.kd-table tbody,.kd-table tr,.kd-table td{display:block;width:100%}
  .kd-table tr{margin-bottom:8px;padding:12px 14px;border-radius:14px;background:var(--s1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)}
  .kd-table tbody tr:hover td{background:none}
  .kd-table td{padding:4px 0;border:0;font-size:14.5px}
  .kd-table td:first-child{padding-bottom:6px;font-size:15px}
  .kd-table td:empty{display:none}
  .kd-table td+td[data-label]:not([data-label=""])::before{content:attr(data-label);display:block;margin-bottom:1px;color:var(--t3);font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase}
  .kd-pager{grid-template-columns:minmax(0,1fr)}
  .kd-pager-next{text-align:left}
  .kd-ai-card{padding:14px}
  .kd-foot nav{margin-left:0}
  .kd-search-box{width:100%;height:100%;max-height:none;margin:0;border-radius:0;padding-top:env(safe-area-inset-top,0px);animation:kdFade .18s}
  .kd-search-x kbd{display:none}.kd-search-x svg{display:block}
  .kd-search-foot{display:none}
  .kb-ai__panel{top:var(--kb-vvt,0px);right:0;left:0;bottom:auto;width:100%;height:var(--kb-vvh,100dvh);border-radius:0;transform:translateY(24px);transform-origin:bottom center}
  .kb-ai__head{padding-top:calc(10px + env(safe-area-inset-top,0px))}
  .kb-ai__form textarea{font-size:16px}
  .kb-ai__backdrop{background:#000}
  .kb-ai__note{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:370px){
  .kd-top-brand span{display:none}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}

/* ── graphic guides: screens of the bot drawn in HTML (modules/kb_guides.py) ── */
.kg-step{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:26px;align-items:center;margin:0 0 16px;padding:22px;border-radius:18px;background:var(--s1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)}
.kg-step__text{min-width:0}
.kg-step__n{display:grid;place-items:center;width:32px;height:32px;margin-bottom:14px;border-radius:50%;background:var(--accent);color:#111;font-size:14.5px;font-weight:800}
.kg-step h3{margin:0 0 8px;color:var(--t1);font-size:19px;line-height:1.3;font-weight:700;letter-spacing:-.01em}
.kg-step p{margin:0;color:#cfcfd4;font-size:15px;line-height:1.65}
.kg-step__screen{min-width:0;display:flex;justify-content:center}
.kg-screen{margin:6px 0 24px;display:flex;flex-direction:column;align-items:center}
.kg-screen figcaption{max-width:560px;margin-top:14px;color:var(--t2);font-size:14.5px;line-height:1.6;text-align:center}
.kg-phone{width:100%;max-width:340px;border-radius:22px;overflow:hidden;background:#0d0d10;box-shadow:0 0 0 1px rgba(255,255,255,.09),0 24px 48px rgba(0,0,0,.5);color:#fff;text-align:left;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Arial,sans-serif;-webkit-font-smoothing:antialiased}
.kg-top{display:grid;grid-template-columns:30px 1fr 34px;align-items:center;gap:6px;padding:9px 12px;background:#1c1c1f;border-bottom:.5px solid rgba(255,255,255,.08)}
.kg-back svg{display:block;width:22px;height:22px;fill:none;stroke:#62b0f5;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.kg-title{text-align:center;line-height:1.2;min-width:0}
.kg-title b{display:block;font-size:15px;font-weight:600}
.kg-title small{color:#8e8e93;font-size:12px}
.kg-ava{width:34px;height:34px;border-radius:50%;justify-self:end}
.kg-ava--user{display:grid;place-items:center;background:linear-gradient(160deg,#7cc4ff,#3a7bd5);color:#fff;font-size:15px;font-weight:700}
.kg-chat{display:flex;flex-direction:column;gap:6px;padding:10px 9px 12px;background:radial-gradient(120% 80% at 80% 0%,rgba(242,201,76,.05),transparent 60%),#0a0a0c}
.kg-day{align-self:center;padding:3px 10px;border-radius:11px;background:rgba(255,255,255,.08);color:#b4b4ba;font-size:12px;font-weight:500}
.kg-out{align-self:flex-end;display:flex;align-items:flex-end;gap:8px;max-width:80%;padding:6px 10px;border-radius:16px 16px 5px 16px;background:#2b5278;font-size:14px;line-height:1.35}
.kg-out .kg-time{float:none;margin:0 0 -2px;color:rgba(255,255,255,.6)}
.kg-in{display:flex;flex-direction:column;gap:3px;width:100%}
.kg-msg{padding:7px 10px 6px;border-radius:16px 16px 16px 5px;background:#1f1f23;font-size:13.5px;line-height:1.4;overflow-wrap:anywhere}
.kg-msg:has(+.kg-kb){border-radius:16px 16px 6px 6px}
.kg-msg p{margin:0}
.kg-msg p+p,.kg-msg p+blockquote,.kg-msg blockquote+p{margin-top:7px}
.kg-msg b{font-weight:600}
.kg-msg a{color:#62b0f5;font-weight:600;text-decoration:none}
.kg-msg code{padding:0 3px;border-radius:4px;background:rgba(255,255,255,.08);color:#e6e6ea;font-size:12.5px}
.kg-msg blockquote{margin:4px 0 0;padding:4px 8px 5px 9px;border-left:3px solid #62b0f5;border-radius:5px;background:rgba(98,176,245,.09);color:#e8e8ec;font-size:13px;line-height:1.42}
.kg-spoiler{display:inline-block;padding:0 2px;border-radius:4px;color:transparent;background:repeating-radial-gradient(circle at 30% 40%,rgba(255,255,255,.35) 0 .6px,transparent .8px 3px),rgba(255,255,255,.06);font-family:ui-monospace,monospace;font-size:12px;user-select:none}
.kg-media{height:118px;margin:-4px -7px 8px;border-radius:12px 12px 4px 4px;background:radial-gradient(60% 90% at 30% 30%,rgba(242,201,76,.55),transparent 70%),radial-gradient(70% 90% at 80% 80%,rgba(98,176,245,.5),transparent 70%),#2a2a30}
.kg-e{display:inline-block;width:18px;height:18px;vertical-align:-3.5px}
.kg-time{float:right;margin:5px 0 -3px 10px;color:#8e8e93;font-size:10.5px;line-height:1}
.kg-kb{display:flex;flex-direction:column;gap:3px}
.kg-r{display:flex;gap:3px}
.kg-b{position:relative;flex:1 1 0;min-width:0;display:flex;align-items:center;justify-content:center;gap:5px;min-height:35px;padding:0 7px;border-radius:7px;background:rgba(255,255,255,.1);color:#fff;font-size:12.5px;font-weight:500;line-height:1.15;text-align:center}
.kg-b>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kg-b .kg-e{flex:none;width:17px;height:17px}
.kg-kb .kg-r:last-child .kg-b:first-child{border-bottom-left-radius:15px}
.kg-kb .kg-r:last-child .kg-b:last-child{border-bottom-right-radius:15px}
.kg-b.is-primary{background:#3d8af0}
.kg-b.is-tap{z-index:1;background:rgba(242,201,76,.2);box-shadow:inset 0 0 0 2px var(--accent),0 0 22px rgba(242,201,76,.35)}
.kg-tap{position:absolute;right:6px;bottom:-9px;width:26px;height:26px;pointer-events:none;filter:drop-shadow(0 3px 6px rgba(0,0,0,.6))}
.kg-tap svg{width:100%;height:100%;fill:#fff;stroke:#111;stroke-width:1.2;stroke-linejoin:round}
.kg-tap::before{content:"";position:absolute;left:3px;top:-4px;width:14px;height:14px;border-radius:50%;background:rgba(242,201,76,.55);animation:kgPulse 1.8s ease-out infinite}
.kg-b[data-n]::after{content:attr(data-n);position:absolute;top:-7px;right:-4px;z-index:2;display:grid;place-items:center;min-width:19px;height:19px;padding:0 4px;border-radius:10px;background:var(--accent);color:#111;font:800 11px/1 var(--font);box-shadow:0 0 0 2px #0a0a0c}
.kg-step .kg-phone,.kg-screen .kg-phone{transform:translateZ(0)}
@keyframes kgPulse{0%{transform:scale(.6);opacity:.9}100%{transform:scale(2.2);opacity:0}}
@media(max-width:900px){
  .kg-step{grid-template-columns:minmax(0,1fr);gap:18px;padding:18px 16px}
  .kg-step__n{margin-bottom:10px}
}
@media(max-width:380px){
  .kg-b{font-size:11.5px;padding:0 5px}
  .kg-msg{font-size:13px}
}
.kg-r:has(>:nth-child(3)) .kg-b{gap:4px;padding:0 4px;font-size:11.5px}
.kg-note{display:flex;align-items:center;gap:6px;margin:4px 0 -2px 4px;color:var(--accent);font:700 10.5px/1 var(--font);letter-spacing:.06em;text-transform:uppercase}
.kg-note::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px rgba(242,201,76,.2)}

/* ───────── v2 2026-10-23: the unified site shell (site.css, /root/design-kit/DESIGN-SYSTEM.md) ─────────
   body.kd.sv2: the bar is the site header (.sh.sh--app, fixed, full width); the left menu sits under it from 1100px
   (like the panel); on phones the burger opens the same menu as before (docs.js), the site's sections are at its end. */
:root:has(body.kd.sv2){--top:64px}
@media(max-width:640px){:root:has(body.kd.sv2){--top:58px}}
.kd.sv2 .sh{z-index:60}
.kd.sv2 .sh .kd-orb{width:28px;height:28px}
@media(min-width:1100px){
  .kd.sv2 .kd-side{top:var(--top);border-right-color:rgba(255,255,255,.05)}
  .kd.sv2 .kd-side-top{display:none}
  .kd.sv2 .kd-side-search{margin-top:14px}
}
.kd.sv2 .kd-hero{padding-top:calc(var(--top) + 56px)}
.kd.sv2 .kd-main>.sf{margin-top:auto}
.kd-site{margin-top:10px;padding-top:6px;border-top:1px solid rgba(255,255,255,.06)}
.kd-site-label{display:block;padding:12px 12px 6px;color:var(--t3);font-size:11.5px;font-weight:700;letter-spacing:.07em}
@media(min-width:1360px){.kd.sv2 .kd-site{display:none}}
@media(max-width:640px){.kd.sv2 .kd-hero{padding-top:calc(var(--top) + 32px)}}
