/* Шапка и подвал сайта на ВСЕХ страницах (layouts/application). Значения — из editorial.css,
   но каждое правило привязано к .editorial-header / .editorial-footer / .skip: на старых
   страницах (каталоги, лендинги, 404) editorial.css не подключён, а его глобальные body/h2/
   section/table ломали бы их. Токены объявлены на самих элементах, тема — через [data-theme]. */
.skip,.editorial-header,.editorial-footer{--mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;--bg:#f8f6f1;--surface:#eeece5;--ink:#252622;--muted:#5b605a;--line:#d2d3cb;--accent:#9e3d22;color:var(--ink);font:17px/1.65 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;box-sizing:border-box}
[data-theme="dark"] .skip,[data-theme="dark"] .editorial-header,[data-theme="dark"] .editorial-footer{--bg:#101112;--surface:#191b1d;--ink:#f3f1ec;--muted:#b2b3b1;--line:#34383b;--accent:#f6a284}
.editorial-header *,.editorial-footer *{box-sizing:border-box}
.editorial-header a,.editorial-footer a,.skip{color:inherit;text-decoration:none;text-underline-offset:5px}
.editorial-header a:hover,.editorial-footer a:hover{color:var(--accent)}
.editorial-header a:focus-visible,.editorial-header button:focus-visible,.editorial-footer a:focus-visible,.skip:focus-visible{outline:3px solid var(--accent);outline-offset:5px}
.editorial-header button{font:inherit;cursor:pointer;touch-action:manipulation}
.skip{position:fixed;top:-100px;left:0;padding:12px;background:var(--bg);z-index:20}
.skip:focus{top:10px}

.editorial-header .wrap,.editorial-footer .wrap{max-width:1200px;margin:auto;padding:0 36px}
.editorial-header{border-bottom:1px solid var(--line)}
.editorial-header .nav{display:flex;align-items:center;gap:25px;min-height:88px}
.editorial-header .brand-group{margin-right:auto}
.editorial-header .brand{display:flex;align-items:center;gap:10px;font-weight:760;font-size:22px;line-height:1.65;letter-spacing:-1px}
.editorial-header .brand-logo{display:block;flex-shrink:0;width:26px;height:26px}
.editorial-header .brand-caption{display:block;font:10px/1.5 var(--mono);letter-spacing:1.6px;margin:5px 0 0 36px;color:var(--muted)}
.editorial-header nav{display:flex;align-items:center;gap:24px;font-size:13px}
.editorial-header nav a{display:inline-flex;align-items:center;min-height:44px}
.editorial-header .lang{color:var(--accent)}
.editorial-header .nav-tools{order:3;display:flex;gap:8px}
.editorial-header .theme-toggle,.editorial-header .menu-toggle{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;padding:0;border:1px solid var(--line);background:transparent;color:var(--ink);border-radius:5px}
.editorial-header .theme-toggle{font-size:22px}
.editorial-header .menu-toggle{display:none}
.editorial-header .nav-telegram{color:var(--ink)}
.editorial-header .nav-telegram:hover{color:var(--accent)}
.editorial-header .nav-telegram-link{display:none!important}
.editorial-header .editorial-auth{border:0;background:transparent;color:var(--muted);padding:12px;font-size:13px}
.editorial-header form{margin:0}

.editorial-footer{border-top:1px solid var(--line);padding:27px 0;color:var(--muted);font-size:13px}
.editorial-footer .wrap{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}
.editorial-footer .links{display:flex;gap:22px;flex-wrap:wrap}
.editorial-footer .links a{padding:12px 0}
.editorial-footer .links-more{flex-basis:100%;gap:6px 22px;border-top:1px solid var(--line);padding-top:6px}

@media(max-width:1000px){.editorial-header nav{gap:16px}.editorial-header .nav{gap:14px}}
@media(max-width:760px){
  .editorial-header .wrap,.editorial-footer .wrap{padding-left:22px;padding-right:22px}
  .editorial-header .nav{min-height:76px;flex-wrap:wrap;gap:0}
  .editorial-header .brand{font-size:20px}
  .editorial-header .brand-caption{font-size:9px;margin-left:34px}
  .editorial-header .nav-tools{order:0;gap:6px}
  .editorial-header .menu-toggle{display:inline-flex;font-size:12px;padding:0 12px}
  .editorial-header nav{display:none;width:100%;flex-wrap:wrap;padding:12px 0;border-top:1px solid var(--line);margin-top:12px}
  .editorial-header nav.open{display:flex}
  .editorial-header .theme-toggle{min-width:40px}
  .editorial-header .brand-logo{width:24px;height:24px}
  .editorial-header .nav-telegram{display:none}
  .editorial-header .nav-telegram-link{display:inline-flex!important}
  .editorial-footer .wrap{display:block}
}
@media(max-width:360px){
  .editorial-header .wrap,.editorial-footer .wrap{padding-left:18px;padding-right:18px}
  .editorial-header .brand-caption{display:none}
  .editorial-header .brand{font-size:18px}
  .editorial-header .brand-logo{display:none}
}
