/* Общая оболочка 4.47.1. Только именованные компоненты: статьи не переоформляются.
   Этот файл подключается последним на всех 157 страницах. */
body.ui-refined { min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; }
body.ui-refined > main { flex:1 0 auto; min-height:0; }
body.ui-refined > .site-shell-header,
body.ui-refined > .site-shell-footer {
  box-sizing:border-box; display:block; width:100%; max-width:none; margin:0;
  font:400 17px/1.7 var(--sans); letter-spacing:normal; color:var(--ink);
  text-align:left; flex:none;
}
body.ui-refined > .site-shell-header {
  position:sticky; top:0; z-index:100; padding:0; border:0; border-bottom:1px solid var(--line);
  background:var(--bg); background:color-mix(in srgb,var(--bg) 96%,transparent);
  backdrop-filter:blur(18px);
}
body.ui-refined > .site-shell-header .nav-shell {
  display:flex; flex-wrap:nowrap; align-items:center; justify-content:flex-start;
  width:min(calc(100% - var(--ui-gutter)*2),1380px); max-width:none;
  min-height:78px; margin:0 auto; padding:0; gap:18px; row-gap:0;
}
body.ui-refined > .site-shell-header .brand {
  display:inline-flex; align-items:center; gap:10px; flex:0 0 auto;
  padding:0; margin:17px 0; min-height:44px; color:var(--ink); text-decoration:none;
}
body.ui-refined > .site-shell-header .brand img { display:block; width:42px; height:42px; max-width:none; margin:0; }
body.ui-refined > .site-shell-header .brand-word {
  display:inline-flex; align-items:baseline; font:900 20px/1 var(--display);
  letter-spacing:-.055em; color:var(--ink);
}
body.ui-refined > .site-shell-header .brand-word em { font:700 .72em/1 var(--mono); letter-spacing:.015em; color:var(--red); }
body.ui-refined > .site-shell-header .site-nav {
  position:static; display:flex; flex:0 1 auto; flex-wrap:nowrap; align-items:center;
  gap:2px; width:auto; min-width:0; max-height:none; padding:0; margin:0 0 0 auto;
  border:0; background:none; box-shadow:none; transform:none; opacity:1;
  visibility:visible; pointer-events:auto; overflow:visible; inset:auto;
}
body.ui-refined > .site-shell-header .site-nav a {
  position:relative; display:inline-flex; align-items:center; justify-content:flex-start;
  min-height:44px; padding:10px 8px; margin:0; border:0; color:var(--muted);
  font:700 12.48px/1.4 var(--mono); letter-spacing:.025em; text-transform:uppercase;
  text-decoration:none; white-space:nowrap; overflow-wrap:normal; border-radius:0;
}
body.ui-refined > .site-shell-header .site-nav a:hover,
body.ui-refined > .site-shell-header .site-nav a[aria-current] { color:var(--ink); }
body.ui-refined > .site-shell-header .site-nav a[aria-current]::after {
  content:""; position:absolute; left:8px; right:8px; bottom:5px; width:auto; height:2px; background:var(--red);
}
body.ui-refined > .site-shell-header .nav-tools { display:flex; align-items:center; gap:10px; flex:0 0 auto; margin:0; padding:0; }
body.ui-refined > .site-shell-header .icon-button,
body.ui-refined > .site-shell-header .nav-toggle {
  display:none; place-items:center; width:44px; height:44px; min-height:44px; margin:0;
  padding:0; border:1px solid var(--line-strong); border-radius:0; color:var(--ink);
  background:transparent; font:600 14.4px/1.4 var(--sans); cursor:pointer;
}
body.ui-refined > .site-shell-header[data-shell-ready] .icon-button { display:inline-grid; }
body.ui-refined > .site-shell-header .nav-toggle { width:auto; min-width:76px; padding:0 12px; }
body.ui-refined > .site-shell-header .nav-toggle span { display:inline; position:static; width:auto; height:auto; background:none; }
body.ui-refined > .site-shell-header .nav-toggle span::before,
body.ui-refined > .site-shell-header .nav-toggle span::after { display:none; }
body.ui-refined > .site-shell-header .icon-button svg { width:20px; height:20px; }
body.ui-refined > .site-shell-header button:hover { border-color:var(--amber); color:var(--amber); }
body.ui-refined > .site-shell-header :is(a,button):focus-visible,
body.ui-refined > .site-shell-footer :is(a,summary):focus-visible { outline:3px solid var(--focus); outline-offset:4px; }
body.ui-refined > .site-skip-link { position:fixed; z-index:300; top:8px; left:var(--ui-gutter); padding:12px 18px; color:var(--bg); background:var(--ink); font:600 16px/1.5 var(--sans); transform:translateY(-160%); }
body.ui-refined > .site-skip-link:focus { transform:none; }
body.ui-refined > main:focus { outline:none; }
@media(max-width:1359px) {
  body.ui-refined > .site-shell-header .nav-shell { flex-wrap:wrap; }
  body.ui-refined > .site-shell-header .nav-tools { margin-left:auto; }
  body.ui-refined > .site-shell-header .site-nav {
    order:3; flex:1 0 100%; display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
    width:100%; gap:4px; margin:0; padding:0 0 18px;
    max-height:calc(100dvh - 104px); overflow:auto; overscroll-behavior:contain;
  }
  body.ui-refined > .site-shell-header .site-nav a { font:600 15px/1.5 var(--sans); letter-spacing:0; text-transform:none; min-width:0; padding:12px; border:1px solid var(--line); white-space:normal; overflow-wrap:anywhere; }
  body.ui-refined > .site-shell-header .site-nav a[aria-current] { border-color:var(--red); background:var(--panel); }
  body.ui-refined > .site-shell-header .site-nav a[aria-current]::after { display:none; }
  body.ui-refined > .site-shell-header[data-shell-ready] .site-nav:not(.is-open) { display:none; }
  body.ui-refined > .site-shell-header[data-shell-ready] .nav-toggle { display:inline-grid; }
  /* Progressive enhancement: do not hide ordinary links if the controller fails. */
  body.ui-refined > .site-shell-header:not([data-shell-ready]) { position:static; }
  body.ui-refined > header.site-header.site-shell-header:not([data-shell-ready]) .site-nav { display:grid; max-height:none; overflow:visible; }
}
@media(max-width:1023px) {
  body.ui-refined > .site-shell-header .nav-shell { min-height:72px; gap:12px; row-gap:0; }
  body.ui-refined > .site-shell-header .site-nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.ui-refined > .site-shell-header .brand { margin-block:14px; }
}
@media(max-width:420px) {
  body.ui-refined > .site-shell-header .brand { gap:7px; }
  body.ui-refined > .site-shell-header .brand img { width:36px; height:36px; }
  body.ui-refined > .site-shell-header .brand-word { font-size:17px; }
  body.ui-refined > .site-shell-header .nav-shell { gap:8px; row-gap:0; }
  body.ui-refined > .site-shell-header .nav-tools { gap:8px; }
  body.ui-refined > .site-shell-header .nav-toggle { min-width:70px; padding-inline:8px; }
}
body.ui-refined > .site-shell-footer {
  position:static; padding:44px 0 0; border:0; border-top:1px solid var(--line);
  background:var(--bg-soft); color:var(--ink);
}
body.ui-refined > .site-shell-footer > .container {
  width:min(calc(100% - var(--ui-gutter)*2),1180px); max-width:none; margin:0 auto; padding:0;
}
body.ui-refined > .site-shell-footer .ui-footer-intro { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:0 0 30px; padding:0; }
body.ui-refined > .site-shell-footer .ui-footer-intro .site-name { font:900 clamp(32px,4vw,48px)/1.1 var(--display); letter-spacing:-.04em; margin:0 0 12px; color:var(--ink); }
body.ui-refined > .site-shell-footer .site-name span { font:700 .45em/1 var(--mono); letter-spacing:0; color:var(--red); }
body.ui-refined > .site-shell-footer p { font:400 16px/1.65 var(--sans); letter-spacing:normal; color:var(--muted); margin:0 0 16px; max-width:76ch; }
body.ui-refined > .site-shell-footer .ui-footer-intro p { margin:0; max-width:52ch; }
body.ui-refined > .site-shell-footer a { font-family:var(--sans); font-weight:400; letter-spacing:normal; text-transform:none; color:var(--ink); text-decoration:none; overflow-wrap:anywhere; }
body.ui-refined > .site-shell-footer a:hover,
body.ui-refined > .site-shell-footer a[aria-current=page] { text-decoration:underline; text-underline-offset:5px; font-weight:400; }
body.ui-refined > .site-shell-footer .ui-footer-up { display:inline-flex; align-items:center; min-height:44px; font:400 16px/1.5 var(--sans); flex:none; }
body.ui-refined > .site-shell-footer .ui-footer-groups { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px; align-items:start; }
body.ui-refined > .site-shell-footer details { margin:0; padding:0; border:0; min-width:0; background:none; color:var(--ink); }
body.ui-refined > .site-shell-footer summary { display:list-item; margin:0; padding:12px 0; min-height:44px; font:700 16px/1.5 var(--sans); color:var(--ink); text-transform:none; letter-spacing:0; cursor:pointer; }
body.ui-refined > .site-shell-footer summary::marker { color:var(--amber); }
body.ui-refined > .site-shell-footer ul { display:grid; list-style:none; gap:2px; margin:0; padding:0; }
body.ui-refined > .site-shell-footer li { display:list-item; min-width:0; padding:0; margin:0; }
body.ui-refined > .site-shell-footer li::before { content:none; }
body.ui-refined > .site-shell-footer li > a { display:flex; align-items:center; min-height:44px; padding:8px 0; font:400 15.04px/1.5 var(--sans); }
body.ui-refined > .site-shell-footer .ui-footer-extra { border-top:1px solid var(--line); margin-top:22px; }
body.ui-refined > .site-shell-footer .ui-footer-about { border-top:1px solid var(--line); margin-top:12px; }
body.ui-refined > .site-shell-footer .ui-footer-extra ul { grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px 28px; padding-bottom:16px; }
body.ui-refined > .site-shell-footer .ui-footer-about p { font-size:15.04px; line-height:1.75; }
body.ui-refined > .site-shell-footer .ui-footer-bottom { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px 28px; margin:12px 0 0; padding:20px 0; border-top:1px solid var(--line); font:400 13.44px/1.7 var(--sans); color:var(--muted); }
body.ui-refined > .site-shell-footer .ui-footer-bottom a { display:inline-flex; align-items:center; min-height:44px; font:inherit; }
@media(max-width:900px) {
  body.ui-refined > .site-shell-footer .ui-footer-groups { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 28px; }
}
@media(max-width:600px) {
  body.ui-refined > .site-shell-footer { padding-top:32px; }
  body.ui-refined > .site-shell-footer .ui-footer-intro { display:block; margin-bottom:18px; }
  body.ui-refined > .site-shell-footer .ui-footer-up { margin-top:14px; }
  body.ui-refined > .site-shell-footer .ui-footer-groups { display:block; }
  body.ui-refined > .site-shell-footer .ui-footer-group { border-top:1px solid var(--line); }
  body.ui-refined > .site-shell-footer .ui-footer-group summary { min-height:52px; padding:14px 0; }
  body.ui-refined > .site-shell-footer .ui-footer-group nav { padding-bottom:14px; }
  body.ui-refined > .site-shell-footer .ui-footer-extra ul { grid-template-columns:1fr; gap:0; }
  body.ui-refined > .site-shell-footer .ui-footer-bottom { justify-content:flex-start; font-size:13.12px; }
  body.ui-refined > .site-shell-footer .ui-footer-bottom > span:first-child { flex-basis:100%; }
}
/* Former footer-specific prose stays with the page, outside the global landmarks. */
.ui-refined main > .ui-page-notes { width:min(calc(100% - var(--ui-gutter)*2),1180px); margin:28px auto 32px; padding:0; border:0; border-top:1px solid var(--line); color:var(--muted); background:none; }
.ui-refined main > .ui-page-notes > summary { padding:14px 0; min-height:48px; font:600 15px/1.6 var(--sans); cursor:pointer; color:var(--muted); }
.ui-refined main > .ui-page-notes .ui-page-notes-content { padding:4px 0 16px; }
.ui-refined main > .ui-page-notes p { font:400 15px/1.7 var(--sans); max-width:76ch; }
.ui-refined main > .ui-page-notes a { color:var(--ink); }
@media(prefers-reduced-motion:reduce) {
 body.ui-refined > .site-shell-header,body.ui-refined > .site-skip-link { transition:none; }
}
@media print {
 body.ui-refined { display:block; min-height:0; }
 body.ui-refined > .site-shell-header,body.ui-refined > .site-shell-footer,
 body.ui-refined > .site-skip-link,.ui-refined main > .ui-page-notes { display:none!important; }
}

/* A failed controller must never inherit hidden navigation from a prior .js rule. */
body.ui-refined > header.site-header.site-shell-header:not([data-shell-ready]) :is(.nav-toggle,.icon-button) { display:none; }

/* 4.47.1: shell readiness, not an unrelated legacy .js class, owns stickiness. */
body.ui-refined > header.site-header.site-shell-header[data-shell-ready] { position:sticky; }
body.ui-refined > header.site-header.site-shell-header:not([data-shell-ready]) { position:static; }
/* The main landmark itself is also an anchor (skip link and footer return). */
body.ui-refined > main { scroll-margin-top:var(--ui-anchor-gap,100px); }

/* Keep the entire keyboard focus ring inside the menu's scroll clipping area. */
@media(max-width:1359px) {
 body.ui-refined > .site-shell-header .site-nav a:focus-visible { outline-offset:-3px; }
}

/* 4.47.1: cache-status notices live inside main, never before the shared header. */
body.ui-refined > main > .ui-shell-notice {
 box-sizing:border-box; width:min(calc(100% - var(--ui-gutter)*2),1180px);
 margin:18px auto; padding:14px 18px; border:1px solid var(--amber);
 background:var(--bg-soft); color:var(--ink); font:600 15px/1.6 var(--sans);
 overflow-wrap:anywhere;
}
