/* Вариант 1 «Классика»: горизонтальная строка разделов + мега-панели. Стиль админки plan7 (tokens.css kb-proto). */
@font-face{font-family:Roboto;font-weight:400;src:url(fonts/roboto-cyrillic-400.woff2) format("woff2");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Roboto;font-weight:400;src:url(fonts/roboto-latin-400.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2122,U+2190-21FF}
@font-face{font-family:Roboto;font-weight:500;src:url(fonts/roboto-cyrillic-500.woff2) format("woff2");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Roboto;font-weight:500;src:url(fonts/roboto-latin-500.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2122,U+2190-21FF}
@font-face{font-family:Roboto;font-weight:700;src:url(fonts/roboto-cyrillic-700.woff2) format("woff2");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Roboto;font-weight:700;src:url(fonts/roboto-latin-700.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2122,U+2190-21FF}

:root{
  --font:Roboto,Arial,sans-serif;
  --text:#000;--text2:#222;--muted:#999;--muted2:#888;
  --link:#5577BB;--primary:#6699CC;--line:#DDD;--soft:#F4F4F4;--menu:#EBECEC;--menu-act:#D3D3D3;
  --act-bg:#EEF3FA;--ok:#61A375;--danger:#CC0000;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font:14px/1.43 var(--font);color:var(--text);background:#fff;-webkit-text-size-adjust:100%}
a{color:var(--link);text-decoration:none}
a:hover{text-decoration:underline}
button,input{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0;padding:0}
.ico{width:16px;height:16px;flex:none;display:inline-block;vertical-align:middle}

/* ---- оболочка админки (для контекста, как в kb-proto) ---- */
.app{display:flex;min-height:100vh}
.adm{width:180px;flex:none;background:var(--menu);padding:30px 0 20px}
.adm-logo{display:flex;align-items:center;gap:6px;justify-content:center;font:700 19px var(--font);margin-bottom:34px}
.adm-logo i{display:grid;place-items:center;width:17px;height:17px;border-radius:3px;background:var(--primary);color:#fff;font:700 10px var(--font);font-style:normal}
.adm a{display:flex;align-items:center;gap:10px;padding:13px 16px;color:#000;font-weight:500;font-size:13.5px;text-decoration:none;line-height:1.2}
.adm a .ico{color:var(--primary);width:20px;height:20px}
.adm a.open{background:var(--menu-act)}
.adm .sub a{padding:13px 16px 13px 47px;font-weight:400}
.adm .sub a.cur{background:var(--menu-act);font-weight:500}
.adm-top{display:none}

.work{flex:1;min-width:0;padding:28px 40px 60px}

/* ---- крошки ---- */
.crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:12px;margin:0 0 14px;color:#000}
.crumbs a{color:#000}
.crumbs b{font-weight:500}
.crumbs .sep{color:var(--muted)}

/* ---- МЕНЮ РАЗДЕЛОВ (строка) ---- */
.kbnav{position:relative;z-index:20;display:flex;align-items:stretch;gap:12px;height:58px;border:1px solid var(--line);border-radius:5px;background:#fff;padding:0 8px 0 4px}
.kbnav-list{flex:1;min-width:0;display:flex;align-items:stretch;list-style:none;margin:0;padding:0;overflow:hidden}
.kbnav-list>li{flex:none;display:flex}
.kbnav-list>li[hidden]{display:none}
.tab{position:relative;display:flex;align-items:center;gap:5px;padding:0 10px;height:100%;white-space:nowrap;text-align:left;font-weight:500;font-size:13px;line-height:1.2;color:#000;border-radius:4px 4px 0 0}
.tab.more{white-space:nowrap;max-width:none}
.tab .caret{width:10px;height:10px;color:var(--muted);transition:transform .15s}
.tab:hover{color:var(--link)}
.tab:hover .caret{color:var(--link)}
.tab::after{content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:3px;border-radius:2px;background:transparent}
.tab.cur::after{background:var(--primary)}
.tab.cur{color:var(--link)}
.tab[aria-expanded="true"]{background:var(--soft);color:var(--link)}
.tab[aria-expanded="true"] .caret{transform:rotate(180deg);color:var(--link)}
.tab .n{font-weight:400;font-size:12px;color:var(--muted)}
.tab.more{color:var(--text2)}
.tab.more .dots{width:16px;height:16px;color:var(--muted)}

.kbnav-tools{display:flex;align-items:center;gap:8px;flex:none}
.search{display:flex;align-items:center;gap:8px;height:32px;width:200px;padding:0 10px 0 12px;background:#fff;border-radius:3px;box-shadow:#DDD 0 0 0 1px;color:#BBB}
.search:focus-within{box-shadow:var(--link) 0 0 0 1px}
.search input{flex:1;min-width:0;height:100%;border:0;outline:0;background:none;padding:0;font:13px Arial,sans-serif;color:#222}
.search input::placeholder{color:#757575}
.search .ico{order:2;width:15px;height:15px}
.sbtn{display:none;width:34px;height:34px;border-radius:3px;place-items:center;color:#555}
.sbtn:hover{background:var(--soft)}
.burger{display:none}

/* ---- мега-панель ---- */
.mega{position:absolute;left:-1px;right:-1px;top:calc(100% + 6px);background:#fff;border:1px solid var(--line);border-radius:6px;box-shadow:0 12px 32px rgba(0,0,0,.12);display:none;overflow:hidden}
.mega.show{display:flex;animation:drop .14s ease-out}
@keyframes drop{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.mega-side{width:270px;flex:none;background:var(--soft);padding:22px 22px 20px;display:flex;flex-direction:column;gap:10px}
.mega-ico{display:grid;place-items:center;width:44px;height:44px;border-radius:8px;background:#fff;color:var(--primary);box-shadow:0 0 0 1px var(--line)}
.mega-ico .ico{width:24px;height:24px}
.mega-side h3{margin:4px 0 0;font-size:18px;font-weight:500;line-height:1.25}
.mega-side p{margin:0;color:var(--muted2);font-size:13px}
.mega-side .cnt{font-size:12px;color:var(--muted)}
.mega-side .all{margin-top:auto;display:inline-flex;align-items:center;gap:6px;font-weight:500}
.mega-body{flex:1;min-width:0;padding:18px 18px 20px;max-height:min(460px,calc(100vh - 160px));overflow:auto}
.mega-cap{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;margin:2px 8px 10px}
.arts{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:2px 10px}
.art{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border-radius:4px;color:var(--text2);line-height:1.35;text-decoration:none!important}
.art .ico{color:#AAB8CC;margin-top:1px}
.art:hover{background:var(--soft);color:var(--link)}
.art:hover .ico{color:var(--link)}
.art.cur{background:var(--act-bg);color:var(--link);font-weight:500;box-shadow:inset 3px 0 0 var(--primary)}
.art.cur .ico{color:var(--link)}
.tag{display:inline-block;font-size:11px;line-height:16px;padding:0 5px;border-radius:3px;margin-left:4px;vertical-align:1px;font-weight:400}
.tag.v{color:var(--link);background:#EEF3FA}
.tag.d{color:#993300;background:#FFF1E0}

/* «Ещё»: слева список разделов, справа статьи выбранного */
.mega.more-panel .mega-side{padding:12px;gap:2px;width:300px}
.mrow{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:9px 10px;border-radius:5px;color:#000;font-weight:500;line-height:1.25}
.mrow .ico{color:var(--primary);width:20px;height:20px}
.mrow .n{margin-left:auto;font-weight:400;font-size:12px;color:var(--muted)}
.mrow:hover,.mrow.on{background:#fff;color:var(--link);box-shadow:0 0 0 1px var(--line)}
.mrow.cur{color:var(--link)}
.mrow .chev{width:10px;height:10px;color:var(--muted)}
.more-head{display:flex;align-items:baseline;gap:10px;margin:2px 8px 12px}
.more-head h3{margin:0;font-size:16px;font-weight:500}
.more-head p{margin:0;color:var(--muted2);font-size:13px}

/* результаты поиска */
.sres{position:absolute;right:8px;top:calc(100% + 6px);width:380px;background:#fff;border:1px solid var(--line);border-radius:6px;box-shadow:0 12px 32px rgba(0,0,0,.12);padding:8px;display:none;max-height:420px;overflow:auto}
.sres.show{display:block}
.sres a{display:block;padding:8px 10px;border-radius:4px;color:var(--text2);text-decoration:none}
.sres a:hover{background:var(--soft);color:var(--link)}
.sres small{display:block;color:var(--muted);font-size:12px}
.sres mark{background:#FFF3B0;color:inherit}
.sres .empty{padding:10px;color:var(--muted)}

/* ---- содержимое статьи (заглушка) ---- */
.page{padding-top:26px;max-width:860px}
.page h1{font-size:28px;font-weight:500;margin:0 0 8px;line-height:1.2}
.meta{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:12px;color:var(--muted);margin-bottom:18px}
.lead{line-height:1.7;margin:0 0 18px}
.ph{background:var(--soft);border-radius:6px;height:14px;margin:10px 0}
.ph.w8{width:80%}.ph.w6{width:60%}.ph.img{height:240px;margin:22px 0}

.scrim{display:none}
.drawer{display:none}

/* ---- планшет 768–1099: оболочка админки свёрнута в строку ---- */
@media (max-width:1099px){
  .adm{display:none}
  .app{flex-direction:column}
  .adm-top{display:flex;align-items:center;gap:12px;height:52px;padding:0 24px;background:var(--menu)}
  .adm-top .adm-logo{margin:0}
  .adm-top .m{display:flex;align-items:center;gap:6px;font-weight:500;font-size:13px}
  .adm-top .m .ico{width:20px;height:20px}
  .adm-top .u{margin-left:auto;color:var(--muted2);font-size:12px}
  .work{padding:22px 24px 50px}
}
@media (max-width:1023px){
  .search{display:none}
  .sbtn{display:grid}
  .kbnav.searching .kbnav-list{display:none}
  .kbnav.searching .search{display:flex;width:auto;flex:1}
  .kbnav.searching .kbnav-tools{flex:1}
  .mega-side{width:220px}
  .mega.more-panel .mega-side{width:260px}
  .arts{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
  .sres{left:8px;right:8px;width:auto}
}

/* ---- телефон ≤767: бургер + шторка-аккордеон ---- */
@media (max-width:767px){
  .adm-top{padding:0 16px;height:48px}
  .adm-top .u{display:none}
  .work{padding:14px 16px 40px}
  .crumbs{margin-bottom:12px}
  .kbnav{height:46px;padding:0 4px;gap:4px}
  .kbnav-list{display:none}
  .burger{display:flex;align-items:center;gap:8px;flex:1;min-width:0;padding:0 10px;font-weight:500;color:#000;text-align:left}
  .burger .ico{width:20px;height:20px;color:var(--primary)}
  .burger .bt>span,.burger small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
  .burger small{color:var(--muted);font-weight:400;font-size:12px;display:block}
  .burger .bt{display:flex;flex-direction:column;min-width:0;line-height:1.25}
  .kbnav.searching .burger{display:none}
  .mega{display:none!important}
  .page h1{font-size:22px}
  .ph.img{height:160px}

  .scrim{display:block;position:fixed;inset:0;background:rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity .2s;z-index:50}
  .drawer{display:flex;flex-direction:column;position:fixed;top:0;bottom:0;left:0;width:min(88vw,360px);background:#fff;z-index:51;transform:translateX(-102%);transition:transform .22s ease-out;box-shadow:4px 0 24px rgba(0,0,0,.15)}
  body.dopen .scrim{opacity:1;pointer-events:auto}
  body.dopen .drawer{transform:none}
  body.dopen{overflow:hidden}
}
.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:14px 12px 10px 16px;border-bottom:1px solid var(--line)}
.drawer-head b{font-size:16px;font-weight:500}
.drawer-head button{width:36px;height:36px;display:grid;place-items:center;border-radius:4px}
.drawer-head button:hover{background:var(--soft)}
.drawer .search{display:flex;width:auto;margin:12px 16px 6px;height:36px}
.acc{flex:1;overflow:auto;padding:4px 8px 24px}
.acc-sec{border-bottom:1px solid #EEE}
.acc-h{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:12px 8px;font-weight:500;color:#000;line-height:1.25}
.acc-h .ico{color:var(--primary);width:20px;height:20px}
.acc-h .n{margin-left:auto;font-size:12px;font-weight:400;color:var(--muted)}
.acc-h .chev{width:12px;height:12px;color:var(--muted);transition:transform .15s}
.acc-sec.open .acc-h .chev{transform:rotate(180deg)}
.acc-sec.cur .acc-h{color:var(--link)}
.acc-b{display:none;padding:0 0 10px 30px}
.acc-sec.open .acc-b{display:block}
.acc-b a{display:block;padding:8px 10px;border-radius:4px;color:var(--text2);line-height:1.35}
.acc-b a:hover{background:var(--soft);text-decoration:none}
.acc-b a.cur{background:var(--act-bg);color:var(--link);font-weight:500;box-shadow:inset 3px 0 0 var(--primary)}
.acc-b .all{color:var(--link);font-weight:500}
