/* polyhelper.ai — the site's header and footer, alone (09.10.2026). For pages that can't take site.css whole:
   site.css resets lists and link underlines and adds a moving glow, which would break a paper's text. These rules
   copy the site's dark-lilac header and footer (site.css: "Header", "Footer") and touch nothing else on the page:
   every selector starts at .site-header, .site-footer or .skip. Fonts: the site's own Montserrat, latin + cyrillic. */
@font-face {
  font-family: Montserrat; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/fonts/montserrat-latin.woff2) 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;
}
@font-face {
  font-family: Montserrat; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/fonts/montserrat-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

.skip {
  position: absolute; top: -100%; left: 1rem; z-index: 10;
  padding: .75rem 1.5rem; border-radius: 0 0 8px 8px;
  background: #667eea; color: #fff; font: 600 1rem/1.4 Montserrat, system-ui, sans-serif; text-decoration: none;
}
.skip:focus { top: 0; }

.site-header, .site-footer {
  --c-bg: #110a1c; --c-text: #f3f0fa; --c-muted: #c3bbd6; --c-link: #b9a6ff; --c-line: rgb(255 255 255 / .1);
  background: radial-gradient(120% 220% at 15% 0%, rgb(102 126 234 / .22), transparent 55%),
              radial-gradient(120% 220% at 85% 0%, rgb(118 75 162 / .3), transparent 55%), var(--c-bg);
  color: var(--c-text);
  font-family: Montserrat, system-ui, sans-serif;
}
.site-header a, .site-footer a { color: inherit; text-decoration: none; }
.site-header .brand, .site-footer .brand {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 44px;
  font-weight: 800; letter-spacing: .3px;
  background: linear-gradient(135deg, #8d9cf2, #b48ee6 55%, #f093fb); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-header .logo, .site-footer .logo { flex: none; }

/* Header: small logo (the page's own title stays the largest text), no animation */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1.5rem;
  padding: .5rem max(20px, (100% - 1140px) / 2);
  box-shadow: 0 2px 15px rgb(102 126 234 / .3);
  font-size: 1rem;
}
.site-header .brand { font-size: 1.15rem; }
.site-header .logo { width: 30px; height: 30px; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; }
.site-header .main-nav { gap: 0 1.6rem; margin-left: auto; }
.site-header nav a { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-weight: 500; }
.site-header .main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .45rem; height: 2px; border-radius: 2px;
  background: linear-gradient(135deg, #667eea, #764ba2); transform: scaleX(0); transition: transform .25s;
}
.site-header .main-nav a:hover::after, .site-header .main-nav a[aria-current]::after { transform: none; }
.site-header nav a[aria-current] { color: var(--c-link); }
.site-header .r-langs { gap: 2px; }
.site-header .r-langs a { min-width: 44px; padding: 0 6px; border-radius: 999px; font-size: .85rem; font-weight: 700; letter-spacing: .03em; color: var(--c-muted); }
.site-header .r-langs a:hover { color: var(--c-text); background: rgb(255 255 255 / .07); }
.site-header .r-langs a[aria-current] { color: var(--c-text); border: 1px solid rgb(102 126 234 / .5); background: rgb(102 126 234 / .14); }
.site-header :focus-visible, .site-footer :focus-visible { outline: 2px solid #f093fb; outline-offset: 2px; border-radius: 4px; }

/* Footer */
.site-footer { padding: 44px 20px 30px; text-align: center; border-top: 1px solid var(--c-line); font-size: .95rem; }
.site-footer > * { max-width: 1180px; margin-inline: auto; }
.site-footer .brand { justify-content: center; width: fit-content; margin-bottom: 18px; font-size: 1.2rem; font-weight: 900; }
.site-footer .logo { width: 30px; height: 30px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 30px; padding-bottom: 20px; border-bottom: 1px solid var(--c-line); }
.site-footer nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--c-muted); transition: color .3s; }
.site-footer nav a:hover, .site-footer p a:hover { color: var(--c-link); }
.site-footer p { margin: 16px auto 0; color: #a59dba; font-size: .9em; line-height: 1.6; }
.site-footer .legal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--c-muted); }
.site-footer .lic a { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 768px) {
  .site-header { justify-content: center; gap: 0 .75rem; padding: .35rem 12px; }
  .site-header .brand { width: 100%; justify-content: center; }
  .site-header .main-nav { margin-left: 0; gap: 0 .9rem; justify-content: center; }
  .site-footer nav { gap: 2px 18px; }
}
@media print { .site-header, .site-footer, .skip { display: none; } }
