/* kinologlife.online — Articles page dark theme
   Applies only on archive/blog pages via body class selectors */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&display=swap");

:root {
    --kl-primary: #0a0a14;
    --kl-accent: #c9943e;
    --kl-accent-light: #dbb06a;
    --kl-bg-dark: #080810;
    --kl-bg-card: rgba(255,255,255,0.025);
    --kl-border: rgba(255,255,255,0.06);
    --kl-text: #e8e8f0;
    --kl-text-muted: #9a9aaa;
    --kl-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --kl-gradient: linear-gradient(135deg, #c9943e 0%, #dbb06a 50%, #c9943e 100%);
    --kl-radius: 16px;
}

/* ── Page background & base ─────────────────────────────── */

body.archive,
body.blog,
body.search-results {
    background: var(--kl-bg-dark) !important;
    color: var(--kl-text);
    font-family: var(--kl-font);
}

body.archive #page,
body.blog #page,
body.search-results #page {
    background: transparent;
}

/* ── Header / breadcrumbs muting ──────────────────────── */

body.archive .site-header,
body.blog .site-header,
body.search-results .site-header {
    background: rgba(10,10,20,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--kl-border);
}

/* ── Hide page header block entirely ──────────────────── */

body.archive .page-header,
body.blog .page-header {
    display: none !important;
}

/* ── Content area — full width, override theme flex layout ── */

body.archive .site-content,
body.blog .site-content,
body.search-results .site-content {
    max-width: 1240px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    display: block !important;
    flex-direction: unset !important;
}

body.archive .content-area,
body.blog .content-area,
body.search-results .content-area {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
}

body.archive .content-area-inner,
body.blog .content-area-inner,
body.search-results .content-area-inner {
    max-width: 100% !important;
}

/* Hide sidebar on articles page */
body.archive .sidebar,
body.archive #secondary,
body.archive aside.widget-area,
body.archive .site-content > aside,
body.blog .sidebar,
body.blog #secondary,
body.blog aside.widget-area,
body.blog .site-content > aside,
body.search-results .sidebar,
body.search-results #secondary,
body.search-results aside.widget-area,
body.search-results .site-content > aside,
body.archive .widget-area,
body.blog .widget-area,
body.search-results .widget-area {
    display: none !important;
}

/* ── 3-column card grid ───────────────────────────────── */

body.archive .post-cards,
body.blog .post-cards,
body.search-results .post-cards {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 28px !important;
    padding-bottom: 48px;
}

/* ── Card design ──────────────────────────────────────── */

body.archive .post-card,
body.blog .post-card,
body.search-results .post-card {
    background: var(--kl-bg-card);
    border: 1px solid var(--kl-border);
    border-radius: var(--kl-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body.archive .post-card:hover,
body.blog .post-card:hover,
body.search-results .post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201,148,62,0.4);
    box-shadow: 0 8px 32px rgba(201,148,62,0.12), 0 2px 8px rgba(0,0,0,0.3);
}

/* ── Card image ───────────────────────────────────────── */

body.archive .post-card__image,
body.blog .post-card__image,
body.search-results .post-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

body.archive .post-card__image a,
body.blog .post-card__image a,
body.search-results .post-card__image a {
    display: block;
    width: 100%;
    height: 100%;
}

body.archive .post-card__image img,
body.blog .post-card__image img,
body.search-results .post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

body.archive .post-card:hover .post-card__image img,
body.blog .post-card:hover .post-card__image img,
body.search-results .post-card:hover .post-card__image img {
    transform: scale(1.05);
}

/* ── Card header (meta above title) ───────────────────── */

body.archive .post-card__header,
body.blog .post-card__header,
body.search-results .post-card__header {
    padding: 16px 20px 0;
}

body.archive .post-card__header .post-card__meta,
body.blog .post-card__header .post-card__meta,
body.search-results .post-card__header .post-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

body.archive .post-card__header .post-card__meta a,
body.blog .post-card__header .post-card__meta a,
body.search-results .post-card__header .post-card__meta a {
    font-size: 0.8rem;
    color: var(--kl-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

body.archive .post-card__header .post-card__meta a:hover,
body.blog .post-card__header .post-card__meta a:hover,
body.search-results .post-card__header .post-card__meta a:hover {
    color: var(--kl-accent);
}

/* Category link gold */
body.archive .post-card__header .article-category-link,
body.blog .post-card__header .article-category-link,
body.search-results .post-card__header .article-category-link {
    color: var(--kl-accent) !important;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Card title (inside header) ───────────────────────── */

body.archive .post-card__header .entry-title,
body.archive .post-card__header h2,
body.blog .post-card__header .entry-title,
body.blog .post-card__header h2,
body.search-results .post-card__header .entry-title,
body.search-results .post-card__header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 8px 0 0;
    color: #fff;
}

body.archive .post-card__header .entry-title a,
body.archive .post-card__header h2 a,
body.blog .post-card__header .entry-title a,
body.blog .post-card__header h2 a,
body.search-results .post-card__header .entry-title a,
body.search-results .post-card__header h2 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

body.archive .post-card__header .entry-title a:hover,
body.archive .post-card__header h2 a:hover,
body.blog .post-card__header .entry-title a:hover,
body.blog .post-card__header h2 a:hover,
body.search-results .post-card__header .entry-title a:hover,
body.search-results .post-card__header h2 a:hover {
    color: var(--kl-accent-light);
}

/* ── Card content (excerpt) ───────────────────────────── */

body.archive .post-card__content,
body.blog .post-card__content,
body.search-results .post-card__content {
    padding: 12px 20px 0;
    flex: 1;
    color: var(--kl-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

body.archive .post-card__content p,
body.blog .post-card__content p,
body.search-results .post-card__content p {
    margin: 0;
}

/* ── Card footer ──────────────────────────────────────── */

body.archive .post-card__footer,
body.blog .post-card__footer,
body.search-results .post-card__footer {
    padding: 12px 20px 16px;
    margin-top: auto;
    border-top: 1px solid var(--kl-border);
}

body.archive .post-card__footer .post-card__meta,
body.blog .post-card__footer .post-card__meta,
body.search-results .post-card__footer .post-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.archive .post-card__footer .post-card__meta a,
body.archive .post-card__footer .post-card__meta span,
body.blog .post-card__footer .post-card__meta a,
body.blog .post-card__footer .post-card__meta span,
body.search-results .post-card__footer .post-card__meta a,
body.search-results .post-card__footer .post-card__meta span {
    font-size: 0.8rem;
    color: var(--kl-text-muted);
    text-decoration: none;
}

body.archive .post-card__footer .post-card__meta a:hover,
body.blog .post-card__footer .post-card__meta a:hover,
body.search-results .post-card__footer .post-card__meta a:hover {
    color: var(--kl-accent);
}

/* ── Ordering — override theme inline <style> ─────────── */

body.archive .post-cards .post-card__image,
body.blog .post-cards .post-card__image,
body.search-results .post-cards .post-card__image {
    order: 1 !important;
    -ms-flex-order: 1 !important;
}

body.archive .post-cards .post-card__header,
body.blog .post-cards .post-card__header,
body.search-results .post-cards .post-card__header {
    order: 2 !important;
    -ms-flex-order: 2 !important;
}

body.archive .post-cards .post-card__content,
body.blog .post-cards .post-card__content,
body.search-results .post-cards .post-card__content {
    order: 3 !important;
    -ms-flex-order: 3 !important;
}

body.archive .post-cards .post-card__footer,
body.blog .post-cards .post-card__footer,
body.search-results .post-cards .post-card__footer {
    order: 4 !important;
    -ms-flex-order: 4 !important;
}

/* ── Pagination ───────────────────────────────────────── */

body.archive .post-cards .navigation.pagination,
body.archive .post-cards nav.post-navigation,
body.blog .post-cards .navigation.pagination,
body.blog .post-cards nav.post-navigation,
body.search-results .post-cards .navigation.pagination {
    grid-column: 1 / -1;
    text-align: center;
    padding: 32px 0 48px;
}

body.archive .navigation.pagination,
body.archive nav.post-navigation,
body.blog .navigation.pagination,
body.blog nav.post-navigation,
body.search-results .navigation.pagination {
    text-align: center;
    padding: 32px 0 48px;
}

body.archive .nav-links,
body.blog .nav-links,
body.search-results .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

body.archive .nav-links .page-numbers,
body.blog .nav-links .page-numbers,
body.search-results .nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    background: var(--kl-bg-card);
    border: 1px solid var(--kl-border);
    color: var(--kl-text-muted);
}

body.archive .nav-links .page-numbers:hover,
body.blog .nav-links .page-numbers:hover,
body.search-results .nav-links .page-numbers:hover {
    background: rgba(201,148,62,0.1);
    border-color: rgba(201,148,62,0.3);
    color: var(--kl-accent);
}

body.archive .nav-links .page-numbers.current,
body.blog .nav-links .page-numbers.current,
body.search-results .nav-links .page-numbers.current {
    background: var(--kl-gradient);
    border-color: transparent;
    color: #0a0a14;
    font-weight: 700;
}

body.archive .nav-links .page-numbers.dots,
body.blog .nav-links .page-numbers.dots,
body.search-results .nav-links .page-numbers.dots {
    background: transparent;
    border: none;
    color: var(--kl-text-muted);
}

/* ── Links global color fix ───────────────────────────── */

body.archive a,
body.blog a,
body.search-results a {
    color: var(--kl-text);
}

/* ── Site-content / sidebar layout fix ────────────────── */

body.archive .site-content,
body.blog .site-content,
body.search-results .site-content {
    display: block;
}

/* ── Breadcrumbs ──────────────────────────────────────── */

body.archive .breadcrumbs,
body.blog .breadcrumbs,
body.search-results .breadcrumbs {
    color: var(--kl-text-muted);
    font-size: 0.85rem;
    padding: 16px 0 0;
}

body.archive .breadcrumbs a,
body.blog .breadcrumbs a,
body.search-results .breadcrumbs a {
    color: var(--kl-text-muted);
    text-decoration: none;
}

body.archive .breadcrumbs a:hover,
body.blog .breadcrumbs a:hover,
body.search-results .breadcrumbs a:hover {
    color: var(--kl-accent);
}

/* ── Footer ───────────────────────────────────────────── */

body.archive .site-footer,
body.blog .site-footer,
body.search-results .site-footer {
    background: var(--kl-bg-dark);
    border-top: 1px solid var(--kl-border);
    color: var(--kl-text-muted);
}

body.archive .site-footer a,
body.blog .site-footer a,
body.search-results .site-footer a {
    color: var(--kl-text-muted);
}

/* ── Responsive: tablet (2 columns) ──────────────────── */

@media (max-width: 1024px) {
    body.archive .post-cards,
    body.blog .post-cards,
    body.search-results .post-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    body.archive .page-header .page-title,
    body.blog .page-header .page-title {
        font-size: 2rem;
    }
}

/* ── Responsive: mobile (1 column) ───────────────────── */

@media (max-width: 768px) {

    /* ── Layout ── */
    body.archive .site-content,
    body.blog .site-content,
    body.search-results .site-content {
        max-width: 100% !important;
        padding: 0 14px !important;
        margin: 0 !important;
    }

    body.archive .content-area,
    body.blog .content-area,
    body.search-results .content-area {
        width: 100% !important;
        padding: 0 !important;
    }

    /* ── Grid → single column ── */
    body.archive .post-cards,
    body.blog .post-cards,
    body.search-results .post-cards {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        padding-bottom: 32px;
    }

    /* ── Card ── */
    body.archive .post-card,
    body.blog .post-card,
    body.search-results .post-card {
        border-radius: 12px !important;
        overflow: hidden;
    }

    /* ── Card image ── */
    body.archive .post-card__image,
    body.blog .post-card__image,
    body.search-results .post-card__image {
        aspect-ratio: 16 / 9;
        order: 1 !important;
    }

    body.archive .post-card__image img,
    body.blog .post-card__image img,
    body.search-results .post-card__image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* ── Card header ── */
    body.archive .post-card__header,
    body.blog .post-card__header,
    body.search-results .post-card__header {
        padding: 12px 14px 0 !important;
        order: 2 !important;
    }

    /* ── Card title ── */
    body.archive .post-card__header .entry-title,
    body.archive .post-card__header h2,
    body.archive .post-card__header .post-card__title,
    body.blog .post-card__header .entry-title,
    body.blog .post-card__header h2,
    body.blog .post-card__header .post-card__title,
    body.search-results .post-card__header .entry-title,
    body.search-results .post-card__header h2,
    body.search-results .post-card__header .post-card__title {
        font-size: 1rem !important;
        line-height: 1.35 !important;
        margin: 6px 0 0 !important;
    }

    /* ── Card meta (author, date, category) ── */
    body.archive .post-card__header .post-card__meta,
    body.blog .post-card__header .post-card__meta,
    body.search-results .post-card__header .post-card__meta {
        gap: 8px !important;
        flex-wrap: wrap !important;
    }

    body.archive .post-card__header .post-card__meta a,
    body.blog .post-card__header .post-card__meta a,
    body.search-results .post-card__header .post-card__meta a {
        font-size: 0.75rem !important;
    }

    body.archive .post-meta__author,
    body.blog .post-meta__author,
    body.search-results .post-meta__author {
        font-size: 0.75rem !important;
    }

    body.archive .post-meta img.avatar,
    body.blog .post-meta img.avatar,
    body.search-results .post-meta img.avatar {
        width: 20px !important;
        height: 20px !important;
    }

    /* ── Vote buttons — compact ── */
    body.archive .post-card-right__vote,
    body.blog .post-card-right__vote,
    body.search-results .post-card-right__vote,
    body.archive .vote,
    body.blog .vote,
    body.search-results .vote {
        transform: scale(0.85);
        transform-origin: right center;
    }

    /* ── Card content (excerpt) ── */
    body.archive .post-card__content,
    body.blog .post-card__content,
    body.search-results .post-card__content {
        padding: 10px 14px 0 !important;
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        order: 3 !important;
    }

    /* ── Card footer ── */
    body.archive .post-card__footer,
    body.blog .post-card__footer,
    body.search-results .post-card__footer {
        padding: 10px 14px 12px !important;
        order: 4 !important;
    }

    body.archive .post-card__footer .post-card__meta,
    body.blog .post-card__footer .post-card__meta,
    body.search-results .post-card__footer .post-card__meta {
        gap: 8px !important;
        flex-wrap: wrap !important;
    }

    body.archive .post-card__footer .post-card__meta a,
    body.archive .post-card__footer .post-card__meta span,
    body.blog .post-card__footer .post-card__meta a,
    body.blog .post-card__footer .post-card__meta span,
    body.search-results .post-card__footer .post-card__meta a,
    body.search-results .post-card__footer .post-card__meta span {
        font-size: 0.75rem !important;
    }

    body.archive .post-card__footer svg,
    body.blog .post-card__footer svg,
    body.search-results .post-card__footer svg {
        width: 16px !important;
        height: 16px !important;
    }

    /* ── Site header on mobile ── */
    body.archive .site-header,
    body.blog .site-header,
    body.search-results .site-header {
        padding: 8px 14px !important;
    }

    body.archive .site-branding .site-title,
    body.blog .site-branding .site-title,
    body.search-results .site-branding .site-title {
        font-size: 0.9rem !important;
    }

    /* ── Breadcrumbs on mobile ── */
    body.archive .breadcrumbs,
    body.blog .breadcrumbs,
    body.search-results .breadcrumbs {
        font-size: 0.75rem !important;
        padding: 10px 0 0 !important;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* ── Pagination on mobile ── */
    body.archive .nav-links,
    body.blog .nav-links,
    body.search-results .nav-links {
        flex-wrap: wrap !important;
        gap: 6px !important;
        justify-content: center !important;
    }

    body.archive .nav-links .page-numbers,
    body.blog .nav-links .page-numbers,
    body.search-results .nav-links .page-numbers {
        min-width: 36px !important;
        height: 36px !important;
        padding: 0 10px !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
    }

    body.archive .post-cards .navigation.pagination,
    body.blog .post-cards .navigation.pagination {
        padding: 20px 0 32px !important;
    }

    /* ── Footer on mobile ── */
    body.archive .site-footer,
    body.blog .site-footer,
    body.search-results .site-footer {
        padding: 16px 14px !important;
        font-size: 0.8rem !important;
    }

    body.archive .site-footer .footer-widgets,
    body.blog .site-footer .footer-widgets,
    body.search-results .site-footer .footer-widgets {
        flex-direction: column !important;
        gap: 12px !important;
    }

    /* ── Hide elements that clutter mobile ── */
    body.archive .post-meta__right,
    body.blog .post-meta__right,
    body.search-results .post-meta__right {
        order: 100 !important;
    }

    /* Page header hidden stays hidden */
    body.archive .page-header,
    body.blog .page-header {
        display: none !important;
    }

    /* Category link — smaller pill */
    body.archive .post-card__header .article-category-link,
    body.blog .post-card__header .article-category-link,
    body.search-results .post-card__header .article-category-link {
        font-size: 0.65rem !important;
        letter-spacing: 0.03em !important;
    }
}

/* ── Avatar in meta — small round ─────────────────────── */

body.archive .post-card .post-meta img.avatar,
body.blog .post-card .post-meta img.avatar,
body.search-results .post-card .post-meta img.avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}

/* ── Vote / bookmark icons ────────────────────────────── */

body.archive .post-card .post-meta .vote-count,
body.archive .post-card .post-meta .bookmark-btn,
body.blog .post-card .post-meta .vote-count,
body.blog .post-card .post-meta .bookmark-btn {
    color: var(--kl-text-muted);
}

body.archive .post-card .post-meta .vote-count:hover,
body.archive .post-card .post-meta .bookmark-btn:hover,
body.blog .post-card .post-meta .vote-count:hover,
body.blog .post-card .post-meta .bookmark-btn:hover {
    color: var(--kl-accent);
}

/* ── Date text ────────────────────────────────────────── */

body.archive .post-card .post-meta time,
body.blog .post-card .post-meta time,
body.search-results .post-card .post-meta time {
    color: var(--kl-text-muted);
    font-size: 0.8rem;
}

/* ── SVG icons in meta ────────────────────────────────── */

body.archive .post-card .post-meta svg,
body.blog .post-card .post-meta svg,
body.search-results .post-card .post-meta svg {
    fill: currentColor;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE POST — современный макет: тёмная тема (по умолчанию) + details
   Рубрика «Исследования» — body:is(.single-post,.page).kl-kb-issled-article
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Base & layout ────────────────────────────────────── */

/* Тема WP: html,body { background:#060610 !important } — перебиваем на singular */
html:has(body.single.single-post:not(.kl-kb-issled-article):not(.kl-kb-metody-kb-article)) {
    background: #0a0c10 !important;
    background-color: #0a0c10 !important;
}

body.single.single-post {
    --kl-read-max: 56rem;
    background:
        radial-gradient(1200px 600px at 20% -10%, rgba(201, 148, 62, 0.08), transparent 55%),
        radial-gradient(900px 500px at 90% 20%, rgba(99, 140, 255, 0.06), transparent 50%),
        #0a0c10 !important;
    color: #e8e9ef;
    font-family: "DM Sans", var(--kl-font);
}

body.single.single-post #page {
    background: transparent;
}

body.single.single-post .site-header {
    background: rgba(8, 10, 14, 0.78);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* На десктопе «капсула» только у .site-header-inner (kl-global); иначе двойная подложка за шапкой */
@media (min-width: 992px) {
    body.single.single-post .site-header {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-bottom: none !important;
        box-shadow: none !important;
    }
}

body.single.single-post .site-content {
    max-width: min(68rem, calc(100vw - 32px)) !important;
    margin: 0 auto !important;
    padding: 0 clamp(16px, 3vw, 28px) !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* База знаний (статьи): шире колонка чтения */
body.single.single-post.kl-kb-issled-article,
body.single.single-post.kl-kb-metody-kb-article,
body.single.single-post.kl-kb-bz-article {
    --kl-read-max: 56rem;
}

body.single.single-post.kl-kb-issled-article .site-content,
body.single.single-post.kl-kb-metody-kb-article .site-content,
body.single.single-post.kl-kb-bz-article .site-content {
    max-width: min(68rem, calc(100vw - 32px)) !important;
}

body.single.single-post .content-area,
body.single.single-post .content-area-inner {
    width: 100% !important;
    max-width: 100% !important;
}

body.single.single-post .sidebar,
body.single.single-post #secondary,
body.single.single-post aside.widget-area,
body.single.single-post .site-content > aside,
body.single.single-post .widget-area {
    display: none !important;
}

body.single.single-post .breadcrumbs {
    color: var(--kl-text-muted);
    font-size: 0.85rem;
    padding: 16px 0 0;
}

body.single.single-post .breadcrumbs a {
    color: var(--kl-text-muted);
    text-decoration: none;
}

body.single.single-post .breadcrumbs a:hover {
    color: var(--kl-accent);
}

body.single.single-post .site-footer {
    background: var(--kl-bg-dark);
    border-top: 1px solid var(--kl-border);
    color: var(--kl-text-muted);
}

body.single.single-post .site-footer a {
    color: var(--kl-text-muted);
}

body.single.single-post a {
    color: var(--kl-text);
}

/* ── Single: article card (no border/card look, just spacing) ── */

body.single.single-post .site-main .post-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

/* ── Single: header meta & title ─────────────────────────── */

body.single.single-post .post-card__header {
    padding: 28px 0 24px;
}

body.single.single-post .post-card__header .post-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

body.single.single-post .post-card__header .post-card__meta a,
body.single.single-post .post-card__header .post-card__meta span {
    font-size: 0.85rem;
    color: var(--kl-text-muted);
    text-decoration: none;
}

body.single.single-post .post-card__header .post-card__meta a:hover {
    color: var(--kl-accent);
}

body.single.single-post .post-card__header .article-category-link {
    color: var(--kl-accent) !important;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body.single.single-post .post-card__header img.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}

body.single.single-post .post-card__title,
body.single.single-post .post-card__header h1 {
    font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
    font-size: clamp(1.85rem, 4.2vw, 2.65rem);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.02em;
    margin: 12px 0 8px;
    color: #f7f7fb;
    padding-bottom: 0;
    border-bottom: none;
    max-width: var(--kl-read-max);
}

body.single.single-post .post-card__title a,
body.single.single-post .post-card__header h1 a {
    color: inherit;
    text-decoration: none;
}

body.single.single-post .post-card__title a:hover,
body.single.single-post .post-card__header h1 a:hover {
    color: var(--kl-accent-light);
}

/* ── Single: featured image ─────────────────────────────── */

body.single.single-post .post-card__image {
    margin: 1.75rem 0 2rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 24px 48px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

body.single.single-post .post-card__image img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
}

/* ── Single: entry content ──────────────────────────────── */

body.single.single-post .entry-content {
    color: #d8d8e4;
    font-size: 1.0625rem;
    line-height: 1.82;
    letter-spacing: 0.01em;
    word-spacing: 0.02em;
    padding: 0 0 56px;
    font-weight: 400;
    font-style: normal !important;
    max-width: var(--kl-read-max);
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    hyphens: manual;
    -webkit-hyphens: manual;
    -ms-hyphens: manual;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.single.single-post .entry-content * {
    font-style: normal !important;
}

body.single.single-post .entry-content em,
body.single.single-post .entry-content i,
body.single.single-post .entry-content cite {
    font-style: italic !important;
    color: #c4c6d0;
}

body.single.single-post .entry-content p {
    margin: 0 0 1.35em;
}

/* Вводный абзац после лид-класса (если есть в контенте) */
body.single.single-post .entry-content .kl-kb-lead {
    font-size: 1.05rem;
    line-height: 1.72;
    color: #c8c8d4;
    padding: 1rem 1.15rem;
    margin: 0 0 1.5rem;
    border-left: 3px solid rgba(201, 148, 62, 0.55);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 12px 12px 0;
}

body.single.single-post .entry-content p:last-child {
    margin-bottom: 0;
}

/* First paragraph after heading — drop-cap accent */
body.single.single-post .entry-content h2 + p:first-letter,
body.single.single-post .entry-content h3 + p:first-letter {
    color: var(--kl-accent);
    font-size: 2.4em;
    font-weight: 800;
    float: left;
    line-height: 0.85;
    margin: 0.05em 0.12em 0 0;
    padding-top: 0.05em;
}

/* ── Headings hierarchy ── */

body.single.single-post .entry-content h2,
body.single.single-post .entry-content h3,
body.single.single-post .entry-content h4,
body.single.single-post .entry-content h5,
body.single.single-post .entry-content h6 {
    color: #f2f3f7;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.28;
    font-family: "Source Serif 4", Georgia, serif;
    text-align: left;
}

body.single.single-post .entry-content h2 {
    font-size: clamp(1.35rem, 2.8vw, 1.6rem);
    border-left: none;
    padding: 0 0 0.5rem;
    margin: 2.75rem 0 0.85rem;
    background: none;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.single.single-post .entry-content h2:first-of-type {
    margin-top: 1.25rem;
}

body.single.single-post .entry-content h3 {
    font-size: 1.2rem;
    margin: 2.25rem 0 0.65rem;
    padding-bottom: 0;
    border-bottom: none;
    color: #e4c59a;
}

body.single.single-post .entry-content h4 {
    font-size: 1.08rem;
    margin: 1.75em 0 0.55em;
    color: #c9b896;
    font-family: "DM Sans", var(--kl-font);
    font-weight: 600;
}

body.single.single-post .entry-content h5,
body.single.single-post .entry-content h6 {
    font-size: 1rem;
    margin: 1.8em 0 0.6em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--kl-text-muted);
}

/* ── Links ── */

body.single.single-post .entry-content a {
    color: var(--kl-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(201,148,62,0.3);
    transition: border-color 0.2s, color 0.2s;
    padding-bottom: 1px;
}

body.single.single-post .entry-content a:hover {
    color: var(--kl-accent-light);
    border-bottom-color: var(--kl-accent-light);
}

/* ── Lists ── */

body.single.single-post .entry-content ul,
body.single.single-post .entry-content ol {
    margin: 1em 0 2em;
    padding-left: 1.6em;
    text-align: left;
}

body.single.single-post .entry-content li {
    margin-bottom: 0.8em;
    line-height: 1.9;
    padding-left: 0.4em;
    text-align: left;
}

body.single.single-post .entry-content ul li {
    list-style-type: disc;
}

body.single.single-post .entry-content ul li::marker {
    color: var(--kl-accent);
    font-size: 1.2em;
}

body.single.single-post .entry-content ol li::marker {
    color: var(--kl-accent);
    font-weight: 700;
}

/* ── Blockquote ── */

body.single.single-post .entry-content blockquote {
    margin: 2.5em 0;
    padding: 28px 32px;
    background: rgba(201,148,62,0.04);
    border-left: 4px solid var(--kl-accent);
    border-radius: 0 var(--kl-radius) var(--kl-radius) 0;
    color: #ccccd8;
    font-size: 1.08rem;
    line-height: 2;
    text-align: left;
}

body.single.single-post .entry-content blockquote em,
body.single.single-post .entry-content blockquote i {
    font-style: italic !important;
}

body.single.single-post .entry-content blockquote p:last-child {
    margin-bottom: 0;
}

/* ── Images & figures ── */

body.single.single-post .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    margin: 2.5em auto;
}

body.single.single-post .entry-content figure {
    margin: 3em 0;
}

body.single.single-post .entry-content figcaption {
    font-size: 0.88rem;
    color: var(--kl-text-muted);
    margin-top: 0.6em;
    text-align: center;
}

/* ── Раскрывающиеся блоки (библиография, FAQ) ───────────────── */

body.single.single-post .entry-content details {
    margin: 0.75rem 0 1rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

body.single.single-post .entry-content details[open] {
    background: rgba(255, 255, 255, 0.045);
}

body.single.single-post .entry-content summary {
    cursor: pointer;
    list-style: none;
    padding: 0.85rem 1rem 0.85rem 1.1rem;
    font-family: "DM Sans", var(--kl-font);
    font-weight: 600;
    font-size: 0.95rem;
    color: #f0f1f5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
    transition: background 0.15s ease;
}

body.single.single-post .entry-content summary::-webkit-details-marker {
    display: none;
}

body.single.single-post .entry-content summary::after {
    content: "";
    width: 0.45em;
    height: 0.45em;
    border-right: 2px solid var(--kl-accent);
    border-bottom: 2px solid var(--kl-accent);
    transform: rotate(45deg);
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0.85;
    transition: transform 0.2s ease;
}

body.single.single-post .entry-content details[open] > summary::after {
    transform: rotate(-135deg);
    margin-top: 0.2em;
}

body.single.single-post .entry-content summary:hover {
    background: rgba(201, 148, 62, 0.07);
}

body.single.single-post .entry-content details > p,
body.single.single-post .entry-content details .wp-block-list,
body.single.single-post .entry-content details ul {
    margin: 0;
    padding: 0 1.1rem 1rem 1.15rem;
    font-size: 0.98rem;
    line-height: 1.7;
    color: #d0d2dc;
}

/* ── Horizontal rule ── */

body.single.single-post .entry-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201,148,62,0.3), transparent);
    margin: 3.5em 0;
}

/* ── Strong/Bold ── */

body.single.single-post .entry-content strong,
body.single.single-post .entry-content b {
    color: #f2f2fa;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ── Intro-style bold labels (Что делаем:, Зачем: etc.) ── */

body.single.single-post .entry-content p > strong:first-child {
    color: var(--kl-accent-light);
    font-size: 1.06em;
}

/* Table of contents */
body.single.single-post .entry-content .table-of-contents,
body.single.single-post .table-of-contents {
    background: var(--kl-bg-card);
    border: 1px solid var(--kl-border);
    border-radius: var(--kl-radius);
    padding: 20px 24px;
    margin: 1.5em 0;
}

body.single.single-post .entry-content .table-of-contents a,
body.single.single-post .table-of-contents a {
    color: var(--kl-text);
    text-decoration: none;
}

body.single.single-post .entry-content .table-of-contents a:hover,
body.single.single-post .table-of-contents a:hover {
    color: var(--kl-accent);
}

body.single.single-post .entry-content .table-of-contents ul {
    margin: 0;
    padding-left: 1.2em;
}

body.single.single-post .entry-content .table-of-contents li {
    margin-bottom: 0.25em;
}

/* ── Single: post footer (meta, tags) ───────────────────── */

body.single.single-post .post-card__footer {
    padding: 24px 0;
    border-top: 1px solid var(--kl-border);
}

body.single.single-post .post-card__footer .post-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

body.single.single-post .post-card__footer .post-card__meta a,
body.single.single-post .post-card__footer .post-card__meta span {
    font-size: 0.85rem;
    color: var(--kl-text-muted);
    text-decoration: none;
}

body.single.single-post .post-card__footer .post-card__meta a:hover {
    color: var(--kl-accent);
}

body.single.single-post .post-card__footer svg {
    fill: currentColor;
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

body.single.single-post .post-card__footer .post-meta__tags a,
body.single.single-post .post-meta__tags .tag-link {
    display: inline-block;
    padding: 4px 12px;
    margin: 2px 4px 2px 0;
    background: var(--kl-bg-card);
    border: 1px solid var(--kl-border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--kl-text-muted);
    text-decoration: none;
}

body.single.single-post .post-card__footer .post-meta__tags a:hover,
body.single.single-post .post-meta__tags .tag-link:hover {
    border-color: rgba(201,148,62,0.4);
    color: var(--kl-accent);
}

/* ── Single: comments ───────────────────────────────────── */

body.single.single-post #comments,
body.single.single-post .comments-area {
    padding: 32px 0;
    border-top: 1px solid var(--kl-border);
}

body.single.single-post #comments .comments-title,
body.single.single-post .comments-area .comments-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
}

body.single.single-post .comment-list .comment {
    background: var(--kl-bg-card);
    border: 1px solid var(--kl-border);
    border-radius: var(--kl-radius);
    padding: 16px 20px;
    margin-bottom: 12px;
}

body.single.single-post .comment-list .comment-meta,
body.single.single-post .comment-list .comment-author {
    color: var(--kl-text-muted);
    font-size: 0.85rem;
}

body.single.single-post .comment-list .comment-author a {
    color: var(--kl-accent);
}

body.single.single-post .comment-list .comment-content {
    color: var(--kl-text);
    margin-top: 8px;
}

body.single.single-post .comment-form label {
    color: var(--kl-text-muted);
    display: block;
    margin-bottom: 4px;
}

body.single.single-post .comment-form input[type="text"],
body.single.single-post .comment-form input[type="email"],
body.single.single-post .comment-form input[type="url"],
body.single.single-post .comment-form textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 14px;
    background: var(--kl-bg-card);
    border: 1px solid var(--kl-border);
    border-radius: 8px;
    color: var(--kl-text);
    font-family: var(--kl-font);
    font-size: 1rem;
    caret-color: #ffb6d5;
}

body.single.single-post .comment-form input:focus,
body.single.single-post .comment-form textarea:focus {
    border-color: var(--kl-accent);
    outline: none;
}

body.single.single-post .comment-form input::placeholder,
body.single.single-post .comment-form textarea::placeholder {
    color: rgba(232, 232, 240, 0.72);
    -webkit-text-fill-color: rgba(232, 232, 240, 0.72);
}

body.single.single-post .comment-list .avatar {
    border-radius: 50%;
}

/* ── Single: threaded comments (ветка обсуждения) ─────────── */

body.single.single-post .comment-list,
body.single.single-post .comment-list .children {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.single.single-post .comment-list > li.comment {
    margin-bottom: 14px;
}

body.single.single-post .comment-list .children {
    margin-top: 14px;
    margin-bottom: 4px;
    margin-left: 0;
    padding-left: clamp(12px, 2.5vw, 22px);
    border-left: 3px solid rgba(201, 148, 62, 0.35);
}

body.single.single-post .comment-list .children .children {
    border-left-color: rgba(201, 148, 62, 0.22);
}

body.single.single-post .comment-list .children .children .children {
    border-left-color: rgba(201, 148, 62, 0.14);
}

/* Заглушки «в корзине» / спам (запас к MU-плагину kl-comments-front.php) */
body.single #comments .comment.comment-trash,
body.single #comments .comment.comment-spam,
body.single .comments-area .comment.comment-trash,
body.single .comments-area .comment.comment-spam,
body.single .comment-list li.comment-trash,
body.single .comment-list li.comment-spam,
body.single .comment-list .comment.comment-trash,
body.single .comment-list .comment.comment-spam,
body.single #comments .comment:has(a[href*="untrash"]),
body.single .comments-area .comment:has(a[href*="untrash"]),
body.single .comment-list li.comment:has(a[href*="untrash"]),
body.single .comment-list .comment:has(a[href*="untrash"]) {
    display: none !important;
}

body.single.single-post .comment-list .children:empty {
    display: none !important;
}

body.single.single-post .comment-meta {
    display: flex;
    align-items: flex-start;
    gap: 10px 14px;
    flex-wrap: wrap;
}

body.single.single-post .comment-meta .avatar {
    float: none !important;
    margin: 2px 0 0 !important;
    flex-shrink: 0;
}

body.single.single-post .comment-content {
    margin-top: 10px;
}

body.single.single-post .reply .comment-reply-link {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    padding: 7px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--kl-accent) !important;
    background: rgba(201, 148, 62, 0.1);
    border: 1px solid rgba(201, 148, 62, 0.28);
    border-radius: 999px;
    text-decoration: none !important;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

body.single.single-post .reply .comment-reply-link:hover {
    background: rgba(201, 148, 62, 0.18);
    border-color: rgba(201, 148, 62, 0.45);
    color: var(--kl-accent-light) !important;
}

body.single.single-post .comment-respond,
body.single.single-post #respond {
    margin-top: 28px;
    padding-top: 26px;
    border-top: 1px solid var(--kl-border);
}

body.single.single-post .comment-respond .comment-reply-title,
body.single.single-post #respond .comment-reply-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 16px;
}

body.single.single-post .comment-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

body.single.single-post .comment-form textarea {
    min-height: 128px;
    line-height: 1.55;
    resize: vertical;
}

body.single.single-post .comment-form .form-submit {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

body.single.single-post .comment-form .form-submit input[type="submit"],
body.single.single-post .comment-form .form-submit button[type="submit"],
body.single.single-post #respond .form-submit input[type="submit"],
body.single.single-post #respond .form-submit button[type="submit"],
body.single.single-post .comments-area input[name="submit"] {
    padding: 11px 22px;
    background: linear-gradient(135deg, #c9943e, #dbb06a);
    color: #1a1209 !important;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: filter 0.15s, transform 0.08s;
}

body.single.single-post .comment-form .form-submit input[type="submit"]:hover,
body.single.single-post .comment-form .form-submit button[type="submit"]:hover,
body.single.single-post #respond .form-submit input[type="submit"]:hover,
body.single.single-post #respond .form-submit button[type="submit"]:hover {
    filter: brightness(1.06);
}

body.single.single-post #cancel-comment-reply-link {
    font-size: 0.86rem;
    color: var(--kl-text-muted) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Мобильная ветка: не обрезать вложенные ответы (kl-global даёт overflow-x:hidden на #page ≤991px) */
@media (max-width: 991px) {
    body.single.single-post .site-main,
    body.single.single-post .site-main-inner,
    body.single.single-post #comments,
    body.single.single-post .comments-area {
        overflow-x: visible !important;
    }
}

@media (max-width: 782px) {
    body.single.single-post #comments,
    body.single.single-post .comments-area,
    body.single.single-post .comment-list,
    body.single.single-post .comment-list ol {
        overflow: visible !important;
        max-width: 100% !important;
    }

    body.single.single-post .comment-list li.comment,
    body.single.single-post .comment-list .comment-body,
    body.single.single-post .comment-list article.comment-body {
        overflow: visible !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body.single.single-post .comment-list .children {
        display: block !important;
        visibility: visible !important;
        list-style: none !important;
        margin-top: 12px !important;
        margin-left: 0 !important;
        padding-left: max(14px, 4vw) !important;
        border-left-width: 3px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    body.single.single-post .comment-list .children .children {
        padding-left: max(12px, 3.5vw) !important;
    }
}

@media (max-width: 600px) {
    body.single.single-post .comment-list .children {
        padding-left: max(12px, 4vw) !important;
        border-left-width: 2px !important;
    }

    body.single.single-post .comment-form .form-submit {
        justify-content: stretch;
    }

    body.single.single-post .comment-form .form-submit input[type="submit"],
    body.single.single-post .comment-form .form-submit button[type="submit"],
    body.single.single-post #respond .form-submit input[type="submit"],
    body.single.single-post #respond .form-submit button[type="submit"] {
        width: 100%;
    }
}

/* ── Single: related posts ──────────────────────────────── */

body.single.single-post .related-posts,
body.single.single-post .wpcommunity-related-posts {
    padding: 32px 0;
    border-top: 1px solid var(--kl-border);
}

body.single.single-post .related-posts h2,
body.single.single-post .related-posts h3,
body.single.single-post .wpcommunity-related-posts h2,
body.single.single-post .wpcommunity-related-posts h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
}

body.single.single-post .related-posts .post-cards,
body.single.single-post .wpcommunity-related-posts .post-cards {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

body.single.single-post .related-posts .post-card,
body.single.single-post .wpcommunity-related-posts .post-card {
    background: var(--kl-bg-card);
    border: 1px solid var(--kl-border);
    border-radius: var(--kl-radius);
    overflow: hidden;
}

body.single.single-post .related-posts .post-card:hover,
body.single.single-post .wpcommunity-related-posts .post-card:hover {
    border-color: rgba(201,148,62,0.4);
}

body.single.single-post .related-posts .post-card__header .entry-title a,
body.single.single-post .related-posts .post-card__header h2 a,
body.single.single-post .wpcommunity-related-posts .post-card__header .entry-title a,
body.single.single-post .wpcommunity-related-posts .post-card__header h2 a {
    color: #fff;
}

body.single.single-post .related-posts .post-card__header .entry-title a:hover,
body.single.single-post .wpcommunity-related-posts .post-card__header .entry-title a:hover {
    color: var(--kl-accent-light);
}

@media (max-width: 768px) {
    body.single.single-post .site-content {
        max-width: 100% !important;
        padding: 0 16px !important;
    }

    body.single.single-post .post-card__title,
    body.single.single-post .post-card__header h1 {
        font-size: 1.6rem;
        padding-bottom: 12px;
    }

    body.single.single-post .entry-content {
        font-size: 1.02rem;
        line-height: 1.95;
        max-width: 100%;
        width: 100%;
        text-align: left;
        hyphens: none;
    }

    body.single.single-post .entry-content p {
        margin: 0 0 1.6em;
    }

    body.single.single-post .entry-content h2 + p:first-letter,
    body.single.single-post .entry-content h3 + p:first-letter {
        font-size: 2em;
    }

    body.single.single-post .entry-content h2 {
        font-size: 1.3rem;
        margin: 2.2em 0 0.7em;
        padding: 10px 0 10px 16px;
    }

    body.single.single-post .entry-content h3 {
        font-size: 1.15rem;
        margin: 1.8em 0 0.6em;
    }

    body.single.single-post .related-posts .post-cards,
    body.single.single-post .wpcommunity-related-posts .post-cards {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    body.single.single-post .site-content {
        padding: 0 12px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Статьи рубрики «Исследования» — полноширинный слой в духе research-solo + CTA
   ═══════════════════════════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600&display=swap");

body:is(.single-post, .page).kl-kb-issled-article {
    --kl-paper: #e9e4d8;
    --kl-paper-2: #dcd6c8;
    --kl-ink: #161412;
    --kl-ink-soft: #3d3a36;
    --kl-rust: #7c3d1a;
    --kl-rust-soft: #a35a2d;
    --kl-rs-edge: #1a1814;
    --kl-rs-accent: #b91c1c;
}

html:has(body:is(.single-post, .page).kl-kb-issled-article) {
    background: #e9e4d8 !important;
    background-color: #e9e4d8 !important;
}

body:is(.single-post, .page).kl-kb-issled-article {
    background:
        radial-gradient(1100px 520px at 18% -8%, rgba(185, 28, 28, 0.04), transparent 52%),
        radial-gradient(880px 420px at 92% 12%, rgba(26, 24, 20, 0.05), transparent 48%),
        linear-gradient(180deg, var(--kl-paper) 0%, var(--kl-paper-2) 100%) !important;
    color: var(--kl-ink);
}

/* Полная ширина контента, как у .kl-kb-explorer--research-solo */
body:is(.single-post, .page).kl-kb-issled-article .site-content {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: clamp(1rem, 3vw, 2rem) !important;
    padding-right: clamp(1rem, 3vw, 2rem) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

body:is(.single-post, .page).kl-kb-issled-article .site-main,
body:is(.single-post, .page).kl-kb-issled-article .site-main-inner,
body:is(.single-post, .page).kl-kb-issled-article .content-area,
body:is(.single-post, .page).kl-kb-issled-article .content-area-inner {
    max-width: none !important;
    width: 100% !important;
}

/* Хлебные крошки снова видны (kl-global скрывает на single-post) */
body:is(.single-post, .page).kl-kb-issled-article .breadcrumbs,
body:is(.single-post, .page).kl-kb-issled-article .breadcrumb {
    display: block !important;
}

body:is(.single-post, .page).kl-kb-issled-article .breadcrumbs-container {
    padding-top: clamp(0.5rem, 2vw, 1rem) !important;
    margin-bottom: 0.25rem !important;
}

body:is(.single-post, .page).kl-kb-issled-article .breadcrumbs {
    padding: 0.65rem 0 1rem !important;
    border-bottom: 1px solid rgba(22, 20, 18, 0.1) !important;
}

/* Панель кнопок над записью */
body:is(.single-post, .page).kl-kb-issled-article .kl-issled-article-wrap,
body:is(.single-post).kl-kb-metody-kb-article .kl-issled-article-wrap {
    width: 100%;
    max-width: min(1240px, 100%);
    margin: 0 auto 1.25rem;
    padding-top: 0.35rem;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-issled-article-actions,
body:is(.single-post).kl-kb-metody-kb-article .kl-issled-article-actions {
    display: flex !important;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.65rem 1rem;
    column-gap: 1rem;
    row-gap: 0.65rem;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-issled-article-actions__between,
body:is(.single-post).kl-kb-metody-kb-article .kl-issled-article-actions__between {
    flex: 0 0 0.5rem;
    width: 0.5rem;
    min-width: 0.5rem;
    max-width: 0.5rem;
    align-self: stretch;
    pointer-events: none;
}

body:is(.single-post, .page).kl-kb-issled-article a.kl-issled-article-actions__btn,
body:is(.single-post).kl-kb-metody-kb-article a.kl-issled-article-actions__btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1rem !important;
    border-radius: 0 !important;
    font-family: "IBM Plex Mono", ui-monospace, monospace !important;
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none !important;
    border: 2px solid var(--kl-rs-edge) !important;
    background: var(--kl-rs-edge) !important;
    color: #fcfbf8 !important;
    -webkit-text-fill-color: #fcfbf8 !important;
    box-shadow: none !important;
    line-height: 1.2;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
}

body:is(.single-post, .page).kl-kb-issled-article a.kl-issled-article-actions__btn span,
body:is(.single-post).kl-kb-metody-kb-article a.kl-issled-article-actions__btn span {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

body:is(.single-post, .page).kl-kb-issled-article a.kl-issled-article-actions__btn:hover,
body:is(.single-post, .page).kl-kb-issled-article a.kl-issled-article-actions__btn:focus,
body:is(.single-post).kl-kb-metody-kb-article a.kl-issled-article-actions__btn:hover,
body:is(.single-post).kl-kb-metody-kb-article a.kl-issled-article-actions__btn:focus {
    background: transparent !important;
    color: var(--kl-rs-edge) !important;
    -webkit-text-fill-color: var(--kl-rs-edge) !important;
}

body:is(.single-post, .page).kl-kb-issled-article a.kl-issled-article-actions__btn--accent,
body:is(.single-post).kl-kb-metody-kb-article a.kl-issled-article-actions__btn--accent {
    border-color: var(--kl-rs-accent) !important;
    box-shadow:
        0 0 0 1px rgba(185, 28, 28, 0.35),
        0 6px 24px rgba(26, 24, 20, 0.12) !important;
}

body:is(.single-post, .page).kl-kb-issled-article a.kl-issled-article-actions__btn--accent:hover,
body:is(.single-post, .page).kl-kb-issled-article a.kl-issled-article-actions__btn--accent:focus,
body:is(.single-post).kl-kb-metody-kb-article a.kl-issled-article-actions__btn--accent:hover,
body:is(.single-post).kl-kb-metody-kb-article a.kl-issled-article-actions__btn--accent:focus {
    border-color: var(--kl-rs-edge) !important;
    box-shadow: none !important;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-kb-x__btn-arr,
body:is(.single-post).kl-kb-metody-kb-article .kl-kb-x__btn-arr {
    transition: transform 0.15s ease;
}

body:is(.single-post, .page).kl-kb-issled-article a.kl-issled-article-actions__btn:hover .kl-kb-x__btn-arr,
body:is(.single-post).kl-kb-metody-kb-article a.kl-issled-article-actions__btn:hover .kl-kb-x__btn-arr {
    transform: translateX(3px);
}

body:is(.single-post, .page).kl-kb-issled-article a.kl-issled-article-actions__btn:hover .kl-kb-x__btn-arr--back,
body:is(.single-post).kl-kb-metody-kb-article a.kl-issled-article-actions__btn:hover .kl-kb-x__btn-arr--back {
    transform: translateX(-3px);
}

/* Внешнюю обёртку не красим — иначе прямоугольник «за» капсулой kl-global; отступ сверху сохраняем */
body:is(.single-post, .page).kl-kb-issled-article .site-header {
    margin: 0 !important;
    margin-top: 0.75rem !important;
    max-width: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body:is(.single-post, .page).kl-kb-issled-article #page {
    padding-top: 0.25rem !important;
}

/* Широкая карточка + светлая подложка (перебивает kl-global.single-post) */
body:is(.single-post, .page).kl-kb-issled-article article.post-card {
    width: 100% !important;
    max-width: min(1240px, 100%) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0.5rem !important;
    border-radius: 0 !important;
    padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 3vw, 2rem) !important;
    background: rgba(252, 251, 248, 0.88) !important;
    border: 1px solid rgba(28, 25, 22, 0.12) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 18px 48px rgba(28, 25, 22, 0.1) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body:is(.single-post, .page).kl-kb-issled-article .breadcrumbs {
    color: var(--kl-ink-soft);
}

body:is(.single-post, .page).kl-kb-issled-article .breadcrumbs a {
    color: var(--kl-rust-soft);
}

body:is(.single-post, .page).kl-kb-issled-article .breadcrumbs a:hover {
    color: var(--kl-rust);
}

body:is(.single-post, .page).kl-kb-issled-article a {
    color: var(--kl-ink);
}

/* Выдержка WP под заголовком: kl-global красит её под тёмную карточку — на бумаге не видно */
body:is(.single-post, .page).kl-kb-issled-article article.post-card .post-card__excerpt,
body:is(.single-post, .page).kl-kb-issled-article article.post-card .entry-summary {
    color: var(--kl-ink-soft) !important;
    -webkit-text-fill-color: var(--kl-ink-soft) !important;
}

body:is(.single-post, .page).kl-kb-issled-article article.post-card .post-card__content {
    color: var(--kl-ink-soft) !important;
}

/* Подвал: бумажные страницы не получают #kl-force-dark — дублируем тёмный футер как в kl-global */
body:is(.single-post, .page).kl-kb-issled-article .site-footer,
body:is(.single-post, .page).kl-kb-issled-article #colophon,
body:is(.single-post, .page).kl-kb-issled-article footer.site-footer {
    background: #060610 !important;
    background-color: #060610 !important;
    color: rgba(160, 160, 175, 0.88) !important;
    border-top: 1px solid rgba(201, 148, 62, 0.14) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .site-footer a {
    color: rgba(160, 160, 175, 0.9) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .site-footer a:hover {
    color: #c9943e !important;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-footer {
    background: linear-gradient(180deg, rgba(10, 10, 20, 0.55) 0%, #060610 38%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
    color: rgba(175, 175, 190, 0.88) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-footer__brand-name {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-footer__brand-name span {
    background: linear-gradient(135deg, #c9943e, #dbb06a) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-footer__brand-desc {
    color: rgba(180, 180, 185, 0.78) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-footer__col-title {
    color: #fff !important;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-footer__links a {
    color: rgba(160, 160, 175, 0.88) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-footer__links a:hover {
    color: #c9943e !important;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-footer__social a {
    color: rgba(160, 160, 175, 0.88) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-footer__social a:hover {
    color: #c9943e !important;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-footer__bottom,
body:is(.single-post, .page).kl-kb-issled-article .kl-footer__bottom a {
    color: rgba(138, 138, 154, 0.65) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .kl-footer__bottom a:hover {
    color: #c9943e !important;
}

/* Шапка материала: без рубрики/аватара/автора — только заголовок и обложка */
body:is(.single-post, .page).kl-kb-issled-article .post-card__header .post-card__meta,
body:is(.single-post, .page).kl-kb-issled-article .post-card__header .post-meta,
body:is(.single-post, .page).kl-kb-issled-article .post-card__header img.avatar,
body:is(.single-post, .page).kl-kb-issled-article .post-card__header .article-category-link,
body:is(.single-post, .page).kl-kb-issled-article .post-card__header .author,
body:is(.single-post, .page).kl-kb-issled-article .post-card__header .written-by,
body:is(.single-post, .page).kl-kb-issled-article .post-card__header .post-author {
    display: none !important;
}

body:is(.single-post, .page).kl-kb-issled-article .post-card__header {
    margin-bottom: 1rem !important;
}

body:is(.single-post, .page).kl-kb-issled-article .post-card__title,
body:is(.single-post, .page).kl-kb-issled-article .post-card__header h1 {
    color: var(--kl-ink) !important;
    -webkit-text-fill-color: var(--kl-ink) !important;
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    border-bottom-color: rgba(28, 25, 22, 0.15) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .post-card__title a:hover,
body:is(.single-post, .page).kl-kb-issled-article .post-card__header h1 a:hover {
    color: var(--kl-rust);
}

body:is(.single-post, .page).kl-kb-issled-article .post-card__image {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65) inset,
        0 20px 50px rgba(28, 25, 22, 0.12);
    border: 1px solid rgba(28, 25, 22, 0.1);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content {
    color: var(--kl-ink-soft) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content p {
    color: var(--kl-ink-soft) !important;
}

/* Оглавление: базовые стили заточены под тёмную тему (color: var(--kl-text)) — на бумаге нужен тёмный текст */
body:is(.single-post, .page).kl-kb-issled-article .entry-content .table-of-contents,
body:is(.single-post, .page).kl-kb-issled-article .table-of-contents {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(28, 25, 22, 0.14) !important;
    color: var(--kl-ink) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content .table-of-contents .toc-title,
body:is(.single-post, .page).kl-kb-issled-article .table-of-contents .toc-title,
body:is(.single-post, .page).kl-kb-issled-article .entry-content .table-of-contents h2,
body:is(.single-post, .page).kl-kb-issled-article .entry-content .table-of-contents h3,
body:is(.single-post, .page).kl-kb-issled-article .table-of-contents h2,
body:is(.single-post, .page).kl-kb-issled-article .table-of-contents h3,
body:is(.single-post, .page).kl-kb-issled-article .entry-content .table-of-contents strong,
body:is(.single-post, .page).kl-kb-issled-article .table-of-contents strong {
    color: var(--kl-ink) !important;
    -webkit-text-fill-color: var(--kl-ink) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content .table-of-contents a,
body:is(.single-post, .page).kl-kb-issled-article .table-of-contents a {
    color: var(--kl-ink-soft) !important;
    -webkit-text-fill-color: var(--kl-ink-soft) !important;
    text-decoration: none;
    border-bottom: 1px solid rgba(124, 61, 26, 0.28);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content .table-of-contents a:hover,
body:is(.single-post, .page).kl-kb-issled-article .table-of-contents a:hover {
    color: var(--kl-rust) !important;
    -webkit-text-fill-color: var(--kl-rust) !important;
    border-bottom-color: var(--kl-rust);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content .table-of-contents li,
body:is(.single-post, .page).kl-kb-issled-article .table-of-contents li {
    color: var(--kl-ink-soft) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content .table-of-contents ol li::marker,
body:is(.single-post, .page).kl-kb-issled-article .table-of-contents ol li::marker {
    color: var(--kl-rust-soft) !important;
    font-weight: 600;
}

/* Нумерованные списки в теле статьи (не только TOC) */
body:is(.single-post, .page).kl-kb-issled-article .entry-content ol > li {
    color: var(--kl-ink-soft) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content ol > li::marker {
    color: var(--kl-rust-soft) !important;
    font-weight: 600;
}

/* Вводные «Что делаем:» — на светлом фоне янтарь слабее читается */
body:is(.single-post, .page).kl-kb-issled-article .entry-content p > strong:first-child {
    color: var(--kl-rust) !important;
}

/* Маркеры списков — ромбы в фирменном красном */
body:is(.single-post, .page).kl-kb-issled-article .entry-content ul:not([class*="wp-"]) {
    padding-left: 0;
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content ul:not([class*="wp-"]) > li {
    list-style: none;
    position: relative;
    padding-left: 1.2rem;
    margin: 0.4em 0;
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content ul:not([class*="wp-"]) > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 5px;
    height: 5px;
    background: var(--kl-rs-accent);
    transform: rotate(45deg);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content em,
body:is(.single-post, .page).kl-kb-issled-article .entry-content i,
body:is(.single-post, .page).kl-kb-issled-article .entry-content cite {
    color: #3d3832;
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content .kl-kb-lead {
    color: var(--kl-ink) !important;
    -webkit-text-fill-color: var(--kl-ink) !important;
    background: rgba(255, 255, 255, 0.55);
    border-left-color: var(--kl-rust);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content .kl-kb-lead cite {
    color: var(--kl-rust-soft) !important;
    -webkit-text-fill-color: var(--kl-rust-soft) !important;
    font-style: normal !important;
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content h2,
body:is(.single-post, .page).kl-kb-issled-article .entry-content h3,
body:is(.single-post, .page).kl-kb-issled-article .entry-content h4,
body:is(.single-post, .page).kl-kb-issled-article .entry-content h5,
body:is(.single-post, .page).kl-kb-issled-article .entry-content h6 {
    color: var(--kl-ink);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content h2 {
    border-bottom-color: rgba(28, 25, 22, 0.12);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content h3 {
    color: var(--kl-rust);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content h4 {
    color: var(--kl-rust-soft);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content h5,
body:is(.single-post, .page).kl-kb-issled-article .entry-content h6 {
    color: #6b645a;
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content a {
    color: var(--kl-rust);
    border-bottom-color: rgba(124, 61, 26, 0.35);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content a:hover {
    color: #5c2c0f;
    border-bottom-color: #5c2c0f;
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content strong,
body:is(.single-post, .page).kl-kb-issled-article .entry-content b {
    color: var(--kl-ink);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content blockquote {
    background: rgba(124, 61, 26, 0.06);
    border-left-color: var(--kl-rust);
    color: var(--kl-ink-soft);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content details {
    border-color: rgba(28, 25, 22, 0.12);
    background: rgba(255, 255, 255, 0.45);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content details[open] {
    background: rgba(255, 255, 255, 0.65);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content summary {
    color: var(--kl-ink);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content summary::after {
    border-color: var(--kl-rust);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content summary:hover {
    background: rgba(124, 61, 26, 0.08);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content details > p,
body:is(.single-post, .page).kl-kb-issled-article .entry-content details ul {
    color: var(--kl-ink-soft);
}

body:is(.single-post, .page).kl-kb-issled-article .entry-content hr {
    background: linear-gradient(90deg, transparent, rgba(124, 61, 26, 0.25), transparent);
}

body:is(.single-post, .page).kl-kb-issled-article .post-card__footer {
    border-top-color: rgba(28, 25, 22, 0.12);
}

body:is(.single-post, .page).kl-kb-issled-article .post-card__footer .post-card__meta a,
body:is(.single-post, .page).kl-kb-issled-article .post-card__footer .post-card__meta span {
    color: var(--kl-ink-soft);
}

body:is(.single-post, .page).kl-kb-issled-article #comments,
body:is(.single-post, .page).kl-kb-issled-article .comments-area {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
    padding: 1.5rem 1.35rem !important;
    background: rgba(252, 251, 248, 0.95) !important;
    border: 1px solid rgba(28, 25, 22, 0.14) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 36px rgba(28, 25, 22, 0.08);
}

body:is(.single-post, .page).kl-kb-issled-article #comments .comments-title,
body:is(.single-post, .page).kl-kb-issled-article .comments-area .comments-title,
body:is(.single-post, .page).kl-kb-issled-article #comments .comment-reply-title,
body:is(.single-post, .page).kl-kb-issled-article #respond .comment-reply-title,
body:is(.single-post, .page).kl-kb-issled-article .comments-area h2,
body:is(.single-post, .page).kl-kb-issled-article .comments-area h3 {
    color: var(--kl-ink) !important;
}

/* Поля комментария: не наследовать светлый --kl-text от «тёмной» схемы на белом фоне */
body:is(.single-post, .page).kl-kb-issled-article .comment-form label,
body:is(.single-post, .page).kl-kb-issled-article #respond label {
    color: var(--kl-ink-soft) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .comment-form input[type="text"],
body:is(.single-post, .page).kl-kb-issled-article .comment-form input[type="email"],
body:is(.single-post, .page).kl-kb-issled-article .comment-form input[type="url"],
body:is(.single-post, .page).kl-kb-issled-article .comment-form textarea,
body:is(.single-post, .page).kl-kb-issled-article #respond input[type="text"],
body:is(.single-post, .page).kl-kb-issled-article #respond input[type="email"],
body:is(.single-post, .page).kl-kb-issled-article #respond input[type="url"],
body:is(.single-post, .page).kl-kb-issled-article #respond textarea {
    color: var(--kl-ink) !important;
    -webkit-text-fill-color: var(--kl-ink) !important;
    background: #fff !important;
    border-color: rgba(28, 25, 22, 0.2) !important;
    caret-color: #ffb6d5;
}

body:is(.single-post, .page).kl-kb-issled-article .comment-form input::placeholder,
body:is(.single-post, .page).kl-kb-issled-article .comment-form textarea::placeholder,
body:is(.single-post, .page).kl-kb-issled-article #respond input::placeholder,
body:is(.single-post, .page).kl-kb-issled-article #respond textarea::placeholder {
    color: rgba(61, 58, 54, 0.82) !important;
    -webkit-text-fill-color: rgba(61, 58, 54, 0.82) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .comment-list .comment {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(28, 25, 22, 0.1);
}

body:is(.single-post, .page).kl-kb-issled-article .comment-list .comment-content {
    color: var(--kl-ink-soft);
}

body:is(.single-post, .page).kl-kb-issled-article .comment-list .children {
    border-left-color: rgba(124, 61, 26, 0.35);
}

body:is(.single-post, .page).kl-kb-issled-article .comment-list .children .children {
    border-left-color: rgba(124, 61, 26, 0.22);
}

body:is(.single-post, .page).kl-kb-issled-article .comment-list .children .children .children {
    border-left-color: rgba(124, 61, 26, 0.14);
}

body:is(.single-post, .page).kl-kb-issled-article .reply .comment-reply-link {
    color: var(--kl-rust) !important;
    background: rgba(124, 61, 26, 0.08);
    border-color: rgba(124, 61, 26, 0.28);
}

body:is(.single-post, .page).kl-kb-issled-article .reply .comment-reply-link:hover {
    background: rgba(124, 61, 26, 0.14);
    border-color: rgba(124, 61, 26, 0.42);
    color: #5c2c0f !important;
}

body:is(.single-post, .page).kl-kb-issled-article .comment-respond .comment-reply-title {
    color: var(--kl-ink);
}

body:is(.single-post, .page).kl-kb-issled-article .comment-form .form-submit input[type="submit"],
body:is(.single-post, .page).kl-kb-issled-article .comment-form .form-submit button[type="submit"],
body:is(.single-post, .page).kl-kb-issled-article #respond .form-submit input[type="submit"],
body:is(.single-post, .page).kl-kb-issled-article #respond .form-submit button[type="submit"],
body:is(.single-post, .page).kl-kb-issled-article .comments-area input[name="submit"] {
    background: linear-gradient(135deg, var(--kl-rust), #9a4a20);
    color: #fffdf8 !important;
}

body:is(.single-post, .page).kl-kb-issled-article #cancel-comment-reply-link {
    color: var(--kl-ink-soft) !important;
}

body:is(.single-post, .page).kl-kb-issled-article .related-posts,
body:is(.single-post, .page).kl-kb-issled-article .wpcommunity-related-posts {
    border-top-color: rgba(28, 25, 22, 0.12);
}

body:is(.single-post, .page).kl-kb-issled-article .related-posts h2,
body:is(.single-post, .page).kl-kb-issled-article .related-posts h3,
body:is(.single-post, .page).kl-kb-issled-article .wpcommunity-related-posts h2,
body:is(.single-post, .page).kl-kb-issled-article .wpcommunity-related-posts h3 {
    color: var(--kl-ink);
}

body:is(.single-post, .page).kl-kb-issled-article .related-posts .post-card__header .entry-title a,
body:is(.single-post, .page).kl-kb-issled-article .wpcommunity-related-posts .post-card__header .entry-title a,
body:is(.single-post, .page).kl-kb-issled-article .related-posts .post-card__header h2 a,
body:is(.single-post, .page).kl-kb-issled-article .wpcommunity-related-posts .post-card__header h2 a {
    color: var(--kl-ink);
}

/* Drop-cap на светлом фоне */
body:is(.single-post, .page).kl-kb-issled-article .entry-content h2 + p:first-letter,
body:is(.single-post, .page).kl-kb-issled-article .entry-content h3 + p:first-letter {
    color: var(--kl-rust);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Энциклопедия «Методы и методики дрессировки» (metody-bz, _kl_metody_kb)
   — тот же светлый читательский слой, что у бумажных «Исследований»; без общей
   навигации issled (кнопки назад в рубрику там свои). Перебивает тёмный single-post.
   ═══════════════════════════════════════════════════════════════════════════ */

body:is(.single-post).kl-kb-metody-kb-article {
    --kl-paper: #e9e4d8;
    --kl-paper-2: #dcd6c8;
    --kl-ink: #161412;
    --kl-ink-soft: #3d3a36;
    --kl-rust: #7c3d1a;
    --kl-rust-soft: #a35a2d;
    --kl-rs-edge: #1a1814;
}

html:has(body:is(.single-post).kl-kb-metody-kb-article) {
    background: #e9e4d8 !important;
    background-color: #e9e4d8 !important;
}

body:is(.single-post).kl-kb-metody-kb-article {
    background:
        radial-gradient(1100px 520px at 18% -8%, rgba(185, 28, 28, 0.04), transparent 52%),
        radial-gradient(880px 420px at 92% 12%, rgba(26, 24, 20, 0.05), transparent 48%),
        linear-gradient(180deg, var(--kl-paper) 0%, var(--kl-paper-2) 100%) !important;
    color: var(--kl-ink) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .site-content {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: clamp(1rem, 3vw, 2rem) !important;
    padding-right: clamp(1rem, 3vw, 2rem) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

body:is(.single-post).kl-kb-metody-kb-article .site-main,
body:is(.single-post).kl-kb-metody-kb-article .site-main-inner,
body:is(.single-post).kl-kb-metody-kb-article .content-area,
body:is(.single-post).kl-kb-metody-kb-article .content-area-inner {
    max-width: none !important;
    width: 100% !important;
}

body:is(.single-post).kl-kb-metody-kb-article .breadcrumbs,
body:is(.single-post).kl-kb-metody-kb-article .breadcrumb {
    display: block !important;
}

body:is(.single-post).kl-kb-metody-kb-article .breadcrumbs-container {
    padding-top: clamp(0.5rem, 2vw, 1rem) !important;
    margin-bottom: 0.25rem !important;
}

body:is(.single-post).kl-kb-metody-kb-article .breadcrumbs {
    padding: 0.65rem 0 1rem !important;
    border-bottom: 1px solid rgba(22, 20, 18, 0.1) !important;
    color: var(--kl-ink-soft) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .breadcrumbs a {
    color: var(--kl-rust-soft) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .breadcrumbs a:hover {
    color: var(--kl-rust) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .site-header {
    margin: 0 !important;
    margin-top: 0.75rem !important;
    max-width: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body:is(.single-post).kl-kb-metody-kb-article #page {
    padding-top: 0.25rem !important;
}

body:is(.single-post).kl-kb-metody-kb-article article.post-card {
    width: 100% !important;
    max-width: min(1240px, 100%) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0.5rem !important;
    border-radius: 0 !important;
    padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 3vw, 2rem) !important;
    background: rgba(252, 251, 248, 0.88) !important;
    border: 1px solid rgba(28, 25, 22, 0.12) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 18px 48px rgba(28, 25, 22, 0.1) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .post-card__header .post-card__meta,
body:is(.single-post).kl-kb-metody-kb-article .post-card__header .post-meta,
body:is(.single-post).kl-kb-metody-kb-article .post-card__header img.avatar,
body:is(.single-post).kl-kb-metody-kb-article .post-card__header .article-category-link,
body:is(.single-post).kl-kb-metody-kb-article .post-card__header .author,
body:is(.single-post).kl-kb-metody-kb-article .post-card__header .written-by,
body:is(.single-post).kl-kb-metody-kb-article .post-card__header .post-author {
    display: none !important;
}

body:is(.single-post).kl-kb-metody-kb-article .post-card__header {
    margin-bottom: 1rem !important;
}

body:is(.single-post).kl-kb-metody-kb-article .post-card__title,
body:is(.single-post).kl-kb-metody-kb-article .post-card__header h1 {
    color: var(--kl-ink) !important;
    -webkit-text-fill-color: var(--kl-ink) !important;
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
}

body:is(.single-post).kl-kb-metody-kb-article .post-card__title a:hover,
body:is(.single-post).kl-kb-metody-kb-article .post-card__header h1 a:hover {
    color: var(--kl-rust) !important;
    -webkit-text-fill-color: var(--kl-rust) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .post-card__image {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65) inset,
        0 20px 50px rgba(28, 25, 22, 0.12);
    border: 1px solid rgba(28, 25, 22, 0.1);
}

body:is(.single-post).kl-kb-metody-kb-article .entry-content,
body:is(.single-post).kl-kb-metody-kb-article .entry-content p,
body:is(.single-post).kl-kb-metody-kb-article .entry-content li,
body:is(.single-post).kl-kb-metody-kb-article .entry-content ul,
body:is(.single-post).kl-kb-metody-kb-article .entry-content ol {
    color: var(--kl-ink-soft) !important;
    -webkit-text-fill-color: var(--kl-ink-soft) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .entry-content h2,
body:is(.single-post).kl-kb-metody-kb-article .entry-content h3,
body:is(.single-post).kl-kb-metody-kb-article .entry-content h4 {
    color: var(--kl-ink) !important;
    -webkit-text-fill-color: var(--kl-ink) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .entry-content strong,
body:is(.single-post).kl-kb-metody-kb-article .entry-content b {
    color: var(--kl-ink) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .entry-content a {
    color: var(--kl-rust) !important;
    -webkit-text-fill-color: var(--kl-rust) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .entry-content a:hover {
    color: #5c2c0f !important;
}

body:is(.single-post).kl-kb-metody-kb-article .kl-metody-article-prose,
body:is(.single-post).kl-kb-metody-kb-article .kl-metody-article-lead,
body:is(.single-post).kl-kb-metody-kb-article .kl-metody-callout {
    color: var(--kl-ink-soft) !important;
    -webkit-text-fill-color: var(--kl-ink-soft) !important;
}

/* Как у «Исследований»: текст на всю ширину карточки, без узкой «колонки» 46rem из inline-стилей */
body:is(.single-post).kl-kb-metody-kb-article .kl-metody-article-prose {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body:is(.single-post).kl-kb-metody-kb-article .kl-metody-article-prose h2 {
    color: var(--kl-ink) !important;
    -webkit-text-fill-color: var(--kl-ink) !important;
    border-bottom-color: rgba(22, 20, 18, 0.12) !important;
}

body:is(.single-post).kl-kb-metody-kb-article article.post-card .post-card__excerpt,
body:is(.single-post).kl-kb-metody-kb-article article.post-card .entry-summary {
    color: var(--kl-ink-soft) !important;
    -webkit-text-fill-color: var(--kl-ink-soft) !important;
}

/* Оглавление внутри статьи методички — как у «Исследований» (тёмный текст на «бумаге») */
body:is(.single-post).kl-kb-metody-kb-article .entry-content .kl-metody-toc,
body:is(.single-post).kl-kb-metody-kb-article .kl-metody-toc {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(28, 25, 22, 0.14) !important;
    color: var(--kl-ink) !important;
    -webkit-text-fill-color: var(--kl-ink) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .kl-metody-toc__title {
    color: var(--kl-ink) !important;
    -webkit-text-fill-color: var(--kl-ink) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .kl-metody-toc__item {
    color: var(--kl-ink-soft) !important;
    -webkit-text-fill-color: var(--kl-ink-soft) !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

body:is(.single-post).kl-kb-metody-kb-article .kl-metody-toc__idx {
    color: var(--kl-rust-soft) !important;
    -webkit-text-fill-color: var(--kl-rust-soft) !important;
    min-width: 2.15rem !important;
}

body:is(.single-post).kl-kb-metody-kb-article .kl-metody-toc__link {
    color: var(--kl-ink-soft) !important;
    -webkit-text-fill-color: var(--kl-ink-soft) !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(124, 61, 36, 0.28) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .kl-metody-toc__link:hover {
    color: var(--kl-rust) !important;
    -webkit-text-fill-color: var(--kl-rust) !important;
}

/* Явные номера в разметке + flex — без нативного <ol>, глобальные стили .entry-content li не ломают отступы. */
body:is(.single-post).kl-kb-metody-kb-article .kl-metody-toc__list {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0.35rem 0 0 !important;
}

body:is(.single-post).kl-kb-metody-kb-article .kl-metody-toc__item {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 0.55rem !important;
    margin: 0.55rem 0 !important;
}

body:is(.single-post).kl-kb-metody-kb-article .kl-metody-toc__item::before,
body:is(.single-post).kl-kb-metody-kb-article .kl-metody-toc__item::marker {
    content: none !important;
    display: none !important;
}

/*
 * Одно оглавление на странице методички: контент генерирует .kl-metody-toc.
 * Тема/плагины (table-of-contents, ez-toc, LuckyWP, Rank Math) — скрыть, если фильтр PHP не сработал.
 */
body:is(.single-post).kl-kb-metody-kb-article .entry-content .table-of-contents,
body:is(.single-post).kl-kb-metody-kb-article .entry-content #ez-toc-container,
body:is(.single-post).kl-kb-metody-kb-article .entry-content [id^="lwptoc"],
body:is(.single-post).kl-kb-metody-kb-article .entry-content .lwptoc,
body:is(.single-post).kl-kb-metody-kb-article .entry-content [class*="ez-toc-container"],
body:is(.single-post).kl-kb-metody-kb-article .entry-content [class*="ez-toc-v"],
body:is(.single-post).kl-kb-metody-kb-article .entry-content .wp-block-rank-math-toc-block,
body:is(.single-post).kl-kb-metody-kb-article .entry-content [class*="rank-math-toc"],
body:is(.single-post).kl-kb-metody-kb-article .entry-content .ls-table-of-contents {
    display: none !important;
}

body:is(.single-post).kl-kb-metody-kb-article a {
    color: var(--kl-rust-soft);
}

body:is(.single-post).kl-kb-metody-kb-article .site-footer,
body:is(.single-post).kl-kb-metody-kb-article #colophon,
body:is(.single-post).kl-kb-metody-kb-article footer.site-footer {
    background: #060610 !important;
    color: rgba(160, 160, 175, 0.88) !important;
    border-top: 1px solid rgba(201, 148, 62, 0.14) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .site-footer a {
    color: rgba(160, 160, 175, 0.9) !important;
}

body:is(.single-post).kl-kb-metody-kb-article .site-footer a:hover {
    color: #c9943e !important;
}


