/* Manrope се тегли от Google Fonts CDN (inc/enqueue.php, handle 'ototon-fonts') — НЕ
 * self-hosted тук. Self-hosted .woff2 копие се оказа с повредена name-таблица (виж
 * docs/conventions.md "Известни капани при промени"). */

/* Reset/фон — само фронт + editor iframe (body няма .wp-admin).
   Глобален `* { box-sizing }` / `body { margin:0 }` чупи Gutenberg chrome. */
body:not(.wp-admin) {
    margin: 0;
    background: #f9f9f7;
    color: #1a1c1b;
    font-family: 'Manrope', system-ui, sans-serif;
    font-synthesis: none;
    /* Chromium понякога anti-alias-ва текст в iframe различно от текст извън него,
     * дори при идентичен шрифт/тегло/размер (block editor canvas е iframe). Изрично
     * форсираме еднакъв rendering path и на двете места. */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
body:not(.wp-admin) *,
body:not(.wp-admin) *::before,
body:not(.wp-admin) *::after {
    box-sizing: border-box;
}

body:not(.wp-admin) .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Типография за съдържание (важи и на фронта, и в блоковия редактор) */
.editor-styles-wrapper {
    font-family: 'Manrope', system-ui, sans-serif;
    color: #1a1c1b;
    background: #f9f9f7;
}
.prose {
    max-width: 65ch;
    line-height: 1.6;
}
.prose h1, .prose h2, .prose h3, .prose h4 {
    line-height: 1.25;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}
.prose p {
    margin-bottom: 1em;
}
/*
 * Links inserted via ACF WYSIWYG (TinyMCE emits bare <a>, no class).
 * Not tied to .prose — that class clamps to 65ch and is often omitted on full-width text.
 * UI links (buttons, cards, menus) always have a class and are excluded.
 * Inline style from the color/underline toolbar wins over these declarations.
 */
:is(
    [class*="wp-block-ototon-"],
    .ototon-popup,
    .ototon-lead-form__below,
    .ototon-blog-tip__text,
    .ototon-blog-article__body,
    .mce-content-body
) a:not([class]) {
    color: var(--ototon-cta-bg, #b92746);
    text-decoration: underline;
    text-underline-offset: 0.22em;
    text-decoration-thickness: 1px;
}
:is(
    [class*="wp-block-ototon-"],
    .ototon-popup,
    .ototon-lead-form__below,
    .ototon-blog-tip__text,
    .ototon-blog-article__body,
    .mce-content-body
) a:not([class]):hover {
    opacity: 0.85;
}
.prose img {
    max-width: 100%;
    height: auto;
}
