/* ==========================================================================
   CodeSeven base — шрифтове, достъпност и поправки, общи за всички страници.
   Зарежда се след tokens.css.
   ========================================================================== */

/* Onest + JetBrains Mono (OFL), self-hosted, латиница + кирилица ------------ */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/onest-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/onest-latin-400-normal.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: "Onest"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/onest-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/onest-latin-500-normal.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: "Onest"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/onest-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/onest-latin-600-normal.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: "Onest"; font-style: normal; font-weight: 700 800; font-display: swap; src: url(/assets/fonts/onest-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 700 800; font-display: swap; src: url(/assets/fonts/onest-latin-700-normal.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: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/jetbrains-mono-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/jetbrains-mono-latin-400-normal.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: "JetBrains Mono"; font-style: normal; font-weight: 600 700; font-display: swap; src: url(/assets/fonts/jetbrains-mono-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 600 700; font-display: swap; src: url(/assets/fonts/jetbrains-mono-latin-600-normal.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; }

/* Типография ---------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { font-family: var(--font-sans); background-color: var(--bg); color: var(--text-1); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
/* support.php и някои стари блокове слагат шрифт на *, наследяваме вместо това */
* { font-family: inherit; }
code, pre, kbd, samp, .mono,
.cs-nav-unified-mark, .logo-icon, .footer-logo-icon, .section-label, .avatar,
.cs-license-key, .su-key, .lic-key { font-family: var(--font-mono); }

/* Форми: текстът следва темата (иначе черен текст върху тъмен фон) ------------ */
input, select, textarea, button { font: inherit; }
input, select, textarea { color: var(--text-1); }
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: 1; }
select option { color: var(--text-1); background: var(--surface); }

/* Фокус — видим, контрастен, само при клавиатура ----------------------------- */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }

/* Фиксираната навигация не покрива съдържанието ------------------------------- */
body.has-fixed-nav { padding-top: var(--nav-h); }

/* Достъпност --------------------------------------------------------------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.cs-skip { position: absolute; left: 16px; top: -100px; z-index: calc(var(--z-nav) + 10); background: var(--accent); color: #fff; padding: 10px 16px; border-radius: var(--r-md); font-weight: 600; text-decoration: none; }
.cs-skip:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Превключвател на езика ------------------------------------------------------- */
.cs-lang { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.cs-lang a { min-width: 34px; min-height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; border-radius: 7px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; color: var(--text-2); text-decoration: none; }
.cs-lang a:hover { color: var(--text-1); background: var(--surface-2); }
.cs-lang a.active { background: var(--accent); color: #fff; }

/* Общ footer ------------------------------------------------------------------- */
.cs-site-footer { border-top: 1px solid var(--border); background: var(--bg); color: var(--text-2); font-size: var(--fs-sm); position: relative; z-index: 1; }
.cs-site-footer-inner { max-width: var(--container); margin: 0 auto; padding: var(--s-10) var(--s-4); display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
.cs-site-footer a { color: var(--text-2); text-decoration: none; }
.cs-site-footer a:hover { color: var(--text-1); text-decoration: underline; }
.cs-site-footer-brand { display: flex; flex-direction: column; gap: var(--s-2); }
.cs-site-footer-brand strong { color: var(--text-1); font-size: var(--fs-md); }
.cs-site-footer-links { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); align-items: flex-start; }
.cs-site-footer-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-6); border-top: 1px solid var(--border); color: var(--text-3); font-size: var(--fs-xs); }
@media (min-width: 768px) { .cs-site-footer-inner { grid-template-columns: 1.2fr 2fr; } .cs-site-footer-links { justify-content: flex-end; } }
