/*
Theme Name: WP Pro v3
Theme URI: https://wp-pro.com/wp-pro
Author: Developer
Author URI: https://wp-pro.com
Description: Lightweight, SEO-optimized WordPress theme with clean typography and responsive design. v3 adds full design support for the content-md (Markdown-sourced) content format alongside the original HTML-import format.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wp-pro
Tags: blog, one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ============================
   CSS Variables
   ============================ */
:root {
    --wp-color-primary: #1a1a2e;
    --wp-color-accent: #0f3460;
    --wp-color-highlight: #e94560;
    --wp-color-text: #2d3436;
    --wp-color-text-light: #636e72;
    --wp-color-bg: #ffffff;
    --wp-color-bg-alt: #f8f9fa;
    --wp-color-border: #e1e5e9;
    --wp-color-link: #0f3460;
    --wp-color-link-hover: #e94560;
    --wp-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --wp-font-mono: "SF Mono", "Fira Code", "Roboto Mono", monospace;
    --wp-radius: 8px;
    --wp-radius-lg: 12px;
    --wp-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --wp-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --wp-transition: 0.25s ease;
    --wp-container: 1200px;
    --wp-content-width: 900px;
}

/* ============================
   Reset & Base
   ============================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--wp-font-body);
    font-size: initial;
    line-height: 1.7;
    color: var(--wp-color-text);
    background: var(--wp-color-bg);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--wp-color-link);
    text-decoration: none;
    transition: color var(--wp-transition);
}

a:hover {
    color: var(--wp-color-link-hover);
}

/* ============================
   Layout
   ============================ */
.container,
.articles-container {
    max-width: var(--wp-container);
    margin: 0 auto;
    padding: 0 1.25rem;
}

main {
    min-height: 60vh;
    padding: 2rem 0;
}

main>article,
main>.content,
main>header,
main>section,
main>.no-content {
    max-width: var(--wp-container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* ============================
   Typography
   ============================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--wp-color-primary);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h2 {
    font-size: clamp(1.4rem, 3vw, 1.875rem);
}

h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin: 0 0 1.25em;
}

blockquote {
    margin: 1.5em 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--wp-color-highlight);
    background: var(--wp-color-bg-alt);
    border-radius: 0 var(--wp-radius) var(--wp-radius) 0;
    font-style: italic;
    color: var(--wp-color-text-light);
}

blockquote p:last-child {
    margin-bottom: 0;
}

pre,
code {
    font-family: var(--wp-font-mono);
    font-size: 0.9em;
}

pre {
    background: var(--wp-color-primary);
    color: #e8e8e8;
    padding: 1.25rem;
    border-radius: var(--wp-radius);
    overflow-x: auto;
    margin: 1.5em 0;
    line-height: 1.5;
}

code {
    background: var(--wp-color-bg-alt);
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

pre code {
    background: none;
    padding: 0;
}

ul,
ol {
    padding-left: 1.5em;
    margin: 0 0 1.25em;
}

li {
    margin-bottom: 0.35em;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

th,
td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--wp-color-border);
    text-align: left;
}

th {
    background: var(--wp-color-bg-alt);
    font-weight: 600;
}

hr {
    border: none;
    border-top: 1px solid var(--wp-color-border);
    margin: 2em 0;
}

/* ============================
   Entry Header & Content
   ============================ */
.entry-header {
    margin-bottom: 2rem;
}

.entry-header .header-content {
    max-width: var(--wp-content-width);
    margin: 0 auto;
}

.title,
h1.title {
    margin-top: 0;
    text-align: center;
}

.post-thumbnail {
    margin: 1.5rem 0;
    border-radius: var(--wp-radius-lg);
    overflow: hidden;
}

.post-thumbnail img,
.hero-banner {
    width: 100%;
    border-radius: var(--wp-radius-lg);
    object-fit: cover;
}

.content {
    max-width: var(--wp-content-width);
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.8;
}

.content img {
    border-radius: var(--wp-radius);
    margin: 1em 0;
}

.content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.content a:hover {
    text-decoration: none;
}

/* ============================
   Header Meta
   ============================ */
.header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--wp-color-text-light);
    width: 100%;
}

.header-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.header-meta svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.header-meta time {
    font-size: 0.9rem;
}

/* ============================
   Breadcrumbs
   ============================ */
.breadcrumbs {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
    color: var(--wp-color-text-light);
    max-width: var(--wp-container);
    margin: 0 auto 1rem;
    text-align: center;
}

.breadcrumbs a {
    color: var(--wp-color-text-light);
}

.breadcrumbs a:hover {
    color: var(--wp-color-link-hover);
}

.breadcrumbs .separator {
    margin: 0 0.4em;
    opacity: 0.5;
}

.breadcrumbs .current {
    color: var(--wp-color-text);
    font-weight: 500;
}

.child-pages-small-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .child-pages-small-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .child-pages-small-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================
   TOC
   ============================ */
.toc-wrap {
    background: var(--wp-color-bg-alt);
    border: 1px solid var(--wp-color-border);
    border-radius: var(--wp-radius-lg);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.toc-wrap__title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--wp-color-primary);
    cursor: pointer;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 0.35rem;
}

.toc-list li a {
    display: inline-block;
    padding: 0.25rem 0;
    color: var(--wp-color-text);
    font-size: 0.95rem;
    transition: color var(--wp-transition), padding-left var(--wp-transition);
}

.toc-list li a:hover {
    color: var(--wp-color-link-hover);
    padding-left: 4px;
}

.toc-gotop {
    font-size: 0.8rem;
    color: var(--wp-color-text-light);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.toc-anchlink {
    color: var(--wp-color-text-light);
    opacity: 0;
    transition: opacity var(--wp-transition);
    margin-right: 0.25rem;
}

h2:hover .toc-anchlink,
h3:hover .toc-anchlink,
h4:hover .toc-anchlink {
    opacity: 1;
}

/* ============================
   Footer
   ============================ */
/* .footer-navigation {
    padding: 1.5rem 1.25rem;
} */

.footer-menu {
    /* display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem; */
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: var(--wp-container);
}

.footer-menu li a {
    color: var(--wp-color-text-light);
    font-size: 0.9rem;
}

.footer-menu li a:hover {
    color: var(--wp-color-link-hover);
}

/* ============================
   404 & Empty States
   ============================ */
.error-404,
.no-content {
    text-align: center;
    padding: 4rem 1.25rem;
}

.error-404 .page-title {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin-bottom: 1rem;
}

.error-404 .page-content p {
    text-align: center;
    color: var(--wp-color-text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.error-404 .button,
.home-link .button,
.no-content a {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--wp-color-accent);
    color: #fff;
    border-radius: var(--wp-radius);
    font-weight: 600;
    transition: background var(--wp-transition), transform var(--wp-transition);
}

.error-404 .button:hover,
.home-link .button:hover,
.no-content a:hover {
    background: var(--wp-color-highlight);
    color: #fff;
    transform: translateY(-1px);
}

.pages-list {
    margin-top: 2rem;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.pages-list ul {
    list-style: none;
    padding: 0;
}

.pages-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--wp-color-border);
}

/* ============================
   Author Box
   ============================ */
.author-box {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--wp-color-bg-alt);
    border: 1px solid var(--wp-color-border);
    border-radius: var(--wp-radius-lg);
    margin: 2rem 0;
}

.author-avatar img {
    border-radius: 50%;
}

.author-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.author-header .h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.verified-badge svg {
    width: 20px;
    height: 20px;
    color: #0984e3;
}

.author-bio {
    font-size: 0.9rem;
    color: var(--wp-color-text-light);
    margin: 0 0 0.5rem;
}

.author-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--wp-color-text-light);
}

.author-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.author-stat svg {
    width: 16px;
    height: 16px;
}

/* ============================
   Pagination & Page Links
   ============================ */
.page-links {
    margin: 2rem 0;
    font-weight: 600;
}

/* ============================
   WP Alignment
   ============================ */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-block-image figcaption,
.wp-block-embed figcaption {
    font-size: 0.85rem;
    color: var(--wp-color-text-light);
    text-align: center;
    margin-top: 0.5rem;
}

/* ============================
   Accessibility
   ============================ */
.screen-reader-text,
.um-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--wp-color-accent);
    outline-offset: 2px;
}

/* ============================
   Print
   ============================ */
@media print {

    .um-header,
    .footer-navigation,
    .breadcrumbs,
    .toc-wrap,
    .toc-gotop {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}

/* ============================
   Responsive
   ============================ */
/* ============================
   Header Navigation (inline CSS moved here)
   ============================ */
.um-header *,
.um-header *::before,
.um-header *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    text-decoration: none;
    list-style: none;
}

.um-header {
    --um-primary-color: #333;
    --um-bg-color: #fff;
    --um-hover-color: inherit;
    --um-border-color: #ddd;
    --um-transition: 0.3s ease;
    --um-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    all: initial;
    font-family: inherit;
    display: block;
    position: relative;
    background-color: var(--um-bg-color);
    color: var(--um-primary-color);
}

.um-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding: 1rem;
    gap: 1rem;
    max-width: 1200px;
    margin:auto;
}

.um-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    font-weight: bold;
}

.um-logo__image {
    display: block;
    max-width: 200px;
    height: auto;
}

.um-logo__text {
    font-size: 1.25rem;
}

.um-logo-text {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
    font-size: 1.25rem;
}

.um-burger {
    --um-burger-width: 30px;
    --um-burger-height: 22px;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: var(--um-burger-width);
    height: var(--um-burger-height);
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.um-burger__line {
    width: 100%;
    height: 3px;
    background-color: currentColor;
    border-radius: 1px;
    transition: transform var(--um-transition), opacity var(--um-transition);
}

.um-burger[aria-expanded="true"] .um-burger__line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.um-burger[aria-expanded="true"] .um-burger__line:nth-child(2) {
    opacity: 0;
}

.um-burger[aria-expanded="true"] .um-burger__line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.um-navigation {
    position: relative;
    z-index: 1000;
}

.um-menu {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
}

.um-menu-item {
    position: relative;
}

.um-menu-item__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.um-menu-link {
    display: block;
    padding: 0.75rem 1rem;
    color: inherit;
    text-decoration: none !important;
    flex: 1;
    transition: color var(--um-transition);
    border-radius: 4px;
}

a.um-menu-link:hover {
    color: var(--um-hover-color);
    background-color: rgba(0, 0, 0, 0.03);
}

.um-menu-item--current>.um-menu-item__inner>.um-menu-link {
    color: var(--um-hover-color);
    font-weight: 600;
}

.um-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    border-radius: 4px;
    flex-shrink: 0;
    transition: background-color var(--um-transition);
}

.um-menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.um-menu-toggle__icon {
    transition: transform var(--um-transition);
}

.um-menu-toggle[aria-expanded="true"] .um-menu-toggle__icon {
    transform: rotate(180deg);
}

.um-sub-menu {
    display: none;
    min-width: 200px;
    background-color: var(--um-bg-color);
    box-shadow: var(--um-shadow);
    border: 1px solid var(--um-border-color);
    border-radius: 6px;
}

.um-sub-menu--depth-0 {
    position: absolute;
}

.um-sub-menu--depth-1 {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
}

.um-sub-menu--depth-2 {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 0.5rem;
}

.um-sub-menu.active {
    display: block;
}

.um-sub-menu .um-menu-link {
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    text-align: left;
}

/* ── Запасная навигация: пункты меню не назначены в Appearance → Menus,
   выводится список страниц (см. wpro_render_nav() в header.php) — те
   же отступы/наведение, что и у обычного .um-menu-link. ──────────────── */
.um-menu--fallback {
    list-style: none;
}

.um-menu--fallback li {
    position: relative;
}

.um-menu--fallback a {
    display: block;
    padding: 0.75rem 1rem;
    color: inherit;
    text-decoration: none;
    border-radius: 4px;
    transition: color var(--um-transition);
}

.um-menu--fallback a:hover {
    color: var(--um-hover-color);
    background-color: rgba(0, 0, 0, 0.03);
}

@media (max-width: 1023px) {
    .um-burger {
        display: flex;
    }

    .um-menu-link {
        text-align: left;
        ;
    }

    .um-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--um-bg-color);
        transition: left var(--um-transition);
        overflow-y: auto;
        padding: 5rem 1rem 2rem;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .um-navigation.active {
        left: 0;
    }

    .um-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .um-overlay.active {
        display: block;
    }

    .um-sub-menu--depth-1,
    .um-sub-menu--depth-2 {
        position: static;
        margin-left: 1rem;
        margin-top: 0.5rem;
        box-shadow: none;
        border: none;
    }
}

@media (min-width: 1024px) {
    .um-container {
        flex-wrap: nowrap;
    }

    .um-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .um-menu-toggle {
        display: none;
    }

    .um-menu-item--has-children:hover>.um-sub-menu {
        display: block;
    }

    /* JS-driven open state (navigation.js) — debounced mouseenter/mouseleave
       на .um-menu-item--has-children, отдельно от чистого :hover выше. Нужно,
       потому что чистый :hover "мигает"/закрывается на полпути, когда мышь
       идёт от пункта меню вниз к самому подменю (диагональное движение задевает
       соседние элементы меню/зазор между триггером и выпадающим списком) —
       JS-класс с задержкой на закрытие прощает этот путь мыши, :hover выше
       остаётся как мгновенный fallback (например, для клавиатурной навигации
       через :focus-within его нет, но hover не помешает). */
    .um-menu-item--has-children.um-menu-item--nav-open>.um-sub-menu {
        display: block;
    }

    .um-menu-item:last-child .um-sub-menu--depth-1,
    .um-menu-item:nth-last-child(2) .um-sub-menu--depth-1 {
        left: auto;
        right: 0;
    }
}

.um-menu-toggle:focus-visible,
.um-menu-link:focus-visible,
.um-burger:focus-visible {
    outline: 2px solid var(--um-hover-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .um-header * {
        transition: none !important;
        animation: none !important;
    }
}

.um-header.um-theme-dark {
    --um-primary-color: inherit;
    --um-bg-color: inherit;
    --um-hover-color: inherit;
    --um-border-color: inherit;
}

/* ============================
   Header Variant: CENTERED
   ============================ */
.um-header--centered .um-container--centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.um-header--centered .um-centered-logo {
    margin-bottom: 0.25rem;
}

.um-header--centered .um-centered-nav .um-menu {
    justify-content: center;
}

@media (max-width: 1023px) {
    .um-header--centered .um-container--centered {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ============================
   Header Variant: MINIMAL
   ============================ */
@media (min-width: 1024px) {
    .um-header--minimal .um-burger {
        display: flex;
    }

    .um-header--minimal .um-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--um-bg-color);
        transition: left var(--um-transition);
        overflow-y: auto;
        padding: 5rem 1rem 2rem;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .um-header--minimal .um-navigation.active {
        left: 0;
    }

    .um-header--minimal .um-menu {
        flex-direction: column;
    }

    .um-header--minimal .um-menu-toggle {
        display: flex;
    }

    .um-header--minimal .um-menu-item--has-children:hover>.um-sub-menu {
        display: none;
    }

    .um-header--minimal .um-sub-menu.active {
        display: block;
    }

    .um-header--minimal .um-sub-menu--depth-1,
    .um-header--minimal .um-sub-menu--depth-2 {
        position: static;
        margin-left: 1rem;
        margin-top: 0.5rem;
        box-shadow: none;
        border: none;
    }
}

/* ============================
   News Template (page-news.php)
   ============================ */
.news-main {
    padding: 2rem 0;
}

.news-header {
    margin-bottom: 2rem;
}

.news-page-title {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin: 0;
}

.news-breadcrumbs {
    margin-bottom: 1rem;
}

/* Featured (first) post */
.news-featured {
    margin-bottom: 2.5rem;
    border-radius: var(--wp-radius-lg);
    overflow: hidden;
    border: 1px solid var(--wp-color-border);
    transition: box-shadow var(--wp-transition);
}

.news-featured:hover {
    box-shadow: var(--wp-shadow-md);
}

.news-featured__link {
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-decoration: none;
    color: inherit;
    min-height: 320px;
}

.news-featured__image {
    position: relative;
    overflow: hidden;
}

.news-featured__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-featured:hover .news-featured__img {
    transform: scale(1.03);
}

.news-featured__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--wp-color-accent), var(--wp-color-primary));
    color: rgba(255, 255, 255, 0.4);
}

.news-featured__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.news-featured__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--wp-color-text-light);
    margin-bottom: 0.75rem;
}

.news-tag {
    display: inline-block;
    padding: 0.2em 0.6em;
    background: var(--wp-color-highlight);
    color: #fff;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.news-reading-time {
    opacity: 0.7;
}

.news-featured__title {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.news-featured__excerpt {
    color: var(--wp-color-text-light);
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

.news-featured__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--wp-color-accent);
    transition: gap var(--wp-transition);
}

.news-featured:hover .news-featured__cta {
    gap: 0.75rem;
}

/* Grid of remaining posts */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.news-card {
    border-radius: var(--wp-radius);
    overflow: hidden;
    border: 1px solid var(--wp-color-border);
    transition: box-shadow var(--wp-transition), transform var(--wp-transition);
}

.news-card:hover {
    box-shadow: var(--wp-shadow-sm);
    transform: translateY(-2px);
}

.news-card__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.news-card__image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.news-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card__img {
    transform: scale(1.05);
}

.news-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--wp-color-bg-alt);
    color: var(--wp-color-text-light);
}

.news-card__body {
    padding: 1rem 1.25rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--wp-color-text-light);
    margin-bottom: 0.5rem;
}

.news-card__sep {
    opacity: 0.5;
}

.news-card__title {
    font-size: 1.05rem;
    margin: 0 0 0.5rem;
    line-height: 1.35;
}

.news-card__excerpt {
    font-size: 0.875rem;
    color: var(--wp-color-text-light);
    line-height: 1.5;
    margin: 0;
}

/* News empty state */
.news-empty {
    text-align: center;
    padding: 4rem 1.25rem;
}

.news-empty h2 {
    margin-top: 0;
}

.news-empty__link {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--wp-color-accent);
    color: #fff;
    border-radius: var(--wp-radius);
    font-weight: 600;
    transition: background var(--wp-transition);
}

.news-empty__link:hover {
    background: var(--wp-color-highlight);
    color: #fff;
}

/* News responsive */
@media (max-width: 992px) {
    .news-featured__link {
        grid-template-columns: 1fr;
    }

    .news-featured__image {
        height: 250px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-featured__body {
        padding: 1.25rem;
    }

    .news-featured__image {
        height: 200px;
    }

    .news-card__image {
        height: 160px;
    }
}

/* ============================
   Footer Bottom
   ============================ */
.footer-bottom {
    padding: 1rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--wp-color-text-light);
}

.footer-copyright a {
    color: var(--wp-color-text-light);
}

.footer-copyright a:hover {
    color: var(--wp-color-link-hover);
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 768px) {
    main {
        padding: 1.25rem 0;
    }

    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-meta {
        justify-content: center;
    }
}

/* ============================
   Header Variant: Centered
   ============================ */
.um-header--centered .um-container--centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.um-header--centered .um-centered-logo {
    margin-bottom: 0.5rem;
}

.um-header--centered .um-centered-nav {
    width: 100%;
}

.um-header--centered .um-menu {
    justify-content: center;
}

@media (max-width: 1023px) {
    .um-header--centered .um-container--centered {
        flex-direction: row;
        justify-content: space-between;
    }

    .um-header--centered .um-centered-logo {
        margin-bottom: 0;
    }
}

/* ============================
   Header Variant: Minimal
   ============================ */
.um-header--minimal .um-navigation {
    /* Hide desktop menu completely — only mobile drawer */
    display: none;
}

.um-header--minimal .um-burger {
    display: flex;
    /* Always show burger */
}

/* When burger opens drawer */
.um-header--minimal .um-navigation.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--um-bg-color);
    overflow-y: auto;
    padding: 5rem 1rem 2rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* ============================
   News Template
   ============================ */
.news-main {
    padding: 2rem 0;
}

.news-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.news-page-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin: 0;
}

.news-breadcrumbs {
    margin-bottom: 1rem;
}

/* Featured (hero) card */
.news-featured {
    margin-bottom: 2.5rem;
    border-radius: var(--wp-radius-lg);
    overflow: hidden;
    background: var(--wp-color-bg-alt);
    border: 1px solid var(--wp-color-border);
    transition: box-shadow var(--wp-transition);
}

.news-featured:hover {
    box-shadow: var(--wp-shadow-md);
}

.news-featured__link {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    text-decoration: none;
    color: inherit;
    min-height: 340px;
}

.news-featured__image {
    position: relative;
    overflow: hidden;
}

.news-featured__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-featured:hover .news-featured__img {
    transform: scale(1.03);
}

.news-featured__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--wp-color-accent) 0%, var(--wp-color-primary) 100%);
    color: rgba(255, 255, 255, 0.4);
}

.news-featured__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 2.5rem;
}

.news-featured__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--wp-color-text-light);
    margin-bottom: 0.75rem;
}

.news-tag {
    display: inline-block;
    background: var(--wp-color-highlight);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2em 0.6em;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.news-featured__title {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    margin: 0 0 0.75rem;
    line-height: 1.3;
    color: var(--wp-color-primary);
}

.news-featured__excerpt {
    color: var(--wp-color-text-light);
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

.news-featured__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--wp-color-accent);
    transition: gap var(--wp-transition);
}

.news-featured:hover .news-featured__cta {
    gap: 0.8rem;
}

@media (max-width: 768px) {
    .news-featured__link {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .news-featured__image {
        height: 220px;
    }

    .news-featured__body {
        padding: 1.25rem;
    }
}

/* Grid cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.news-card {
    border-radius: var(--wp-radius-lg);
    overflow: hidden;
    background: var(--wp-color-bg);
    border: 1px solid var(--wp-color-border);
    transition: box-shadow var(--wp-transition), transform var(--wp-transition);
}

.news-card:hover {
    box-shadow: var(--wp-shadow-md);
    transform: translateY(-2px);
}

.news-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.news-card__image {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.news-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card__img {
    transform: scale(1.05);
}

.news-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3e3e3f 0%, #5c5b5d 100%);
    color: rgba(255, 255, 255, 0.4);
}

.news-card__body {
    padding: 1rem 1.25rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card__meta {
    font-size: 0.8rem;
    color: var(--wp-color-text-light);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.news-card__sep {
    opacity: 0.5;
}

.news-card__title {
    font-size: 1.1rem;
    line-height: 1.35;
    margin: 0 0 0.5rem;
    color: var(--wp-color-primary);
}

.news-card__excerpt {
    font-size: 0.9rem;
    color: var(--wp-color-text-light);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .news-card__image {
        height: 160px;
    }
}

/* News pagination */
.news-pagination {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.news-pagination ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.news-pagination li {
    margin: 0;
}

.news-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: var(--wp-radius);
    text-decoration: none;
    color: var(--wp-color-text);
    font-weight: 500;
    border: 1px solid var(--wp-color-border);
    transition: all var(--wp-transition);
}

.news-pagination .current {
    background: var(--wp-color-accent);
    color: #fff;
    border-color: var(--wp-color-accent);
}

.news-pagination a.page-numbers:hover {
    background: var(--wp-color-bg-alt);
    border-color: var(--wp-color-accent);
}

.news-empty {
    text-align: center;
    padding: 4rem 0;
}

.news-empty h2 {
    margin-top: 0;
}

.news-empty__link {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--wp-color-accent);
    color: #fff;
    border-radius: var(--wp-radius);
    font-weight: 600;
    margin-top: 1rem;
}

.news-empty__link:hover {
    background: var(--wp-color-highlight);
    color: #fff;
}

.news-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================
   Sitemap (moved from inline)
   ============================ */
.sitemap-content {
    margin: 30px 0;
}

.sitemap-section {
    margin-bottom: 40px;
    padding: 20px;
    border-radius: var(--wp-radius);
}

.sitemap-section h2 {
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.sitemap-section h3 {
    color: var(--wp-color-text-light);
    margin: 15px 0 10px;
}

.sitemap-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.sitemap-list .has-children {
    grid-column: span 3;
}

.sitemap-list.depth-1 {
    padding: 16px 0px;
}

@media (max-width: 1024px) {
    .sitemap-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .sitemap-list .has-children {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .sitemap-list {
        grid-template-columns: 1fr;
    }

    .sitemap-list .has-children {
        grid-column: span 1;
    }
}

.sitemap-list li {
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.sitemap-list li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: var(--wp-color-accent);
}

.sitemap-list a {
    text-decoration: none;
    color: inherit;
    transition: color var(--wp-transition);
}

.sitemap-list a:hover {
    color: var(--wp-color-link-hover);
}

.category-group {
    margin-bottom: 20px;
}

.tags-cloud {
    line-height: 2;
}

.tag {
    display: inline-block;
    background: var(--wp-color-bg-alt);
    padding: 5px 10px;
    margin: 3px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--wp-color-text);
    font-size: 0.875rem;
    border: 1px solid var(--wp-color-border);
    transition: all var(--wp-transition);
}

.tag:hover {
    background: var(--wp-color-accent);
    color: #fff;
    border-color: var(--wp-color-accent);
}

/*  */
.articles-main {
    padding: 20px 0;
}

.articles-breadcrumbs {
    margin-bottom: 20px;
}

.articles-header {
    text-align: center;
    margin-bottom: 40px;
}

.articles-page-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 0;
    color: #333;
}

.articles-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.articles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 50px;
}

.article-item {
    flex: 1 1 calc(50% - 30px);
    min-width: 300px;
    box-sizing: border-box;
}

.article-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}


.article-card__image-link {
    display: block;
    text-decoration: none;
}

.article-card__image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.article-card__img {
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-card__img {
    transform: scale(1.05);
}

.article-card__image--placeholder {
    background: linear-gradient(135deg, #e0e6fe 0%, #353337 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 60px;
    opacity: 0.7;
}

.article-card__content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card__header {
    margin-bottom: 15px;
}

.article-card__title {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    line-height: 1.3;
}

.article-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-card__title a:hover {
    color: inherit;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: inherit;
}

.article-meta__separator {
    color: #999;
    font-size: 0.9em;
}

.article-meta__date,
.article-meta__author,
.article-meta__category,
.article-meta__time {
    display: inline-flex;
    align-items: center;
}

.article-card__excerpt {
    flex: 1;
    margin-bottom: 20px;
    line-height: 1.6;
    color: inherit;
}

.article-card__footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.article-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.article-card__read-more:hover {
    gap: 10px;
}

.read-more-arrow {
    transition: transform 0.3s ease;
}

.article-card__read-more:hover .read-more-arrow {
    transform: translateX(3px);
}

.articles-pagination {
    margin-top: 40px;
}

.articles-pagination ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.articles-pagination li {
    margin: 0;
}

.articles-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
}

.articles-pagination .current {
    background: inherit;
    color: inherit;
    border-color: inherit;
}

.articles-pagination a.page-numbers:hover {
    background: inherit;
    border-color: inherit;
    color: inherit;
}

.articles-empty {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    text-align: center;
}

.articles-empty__content {
    max-width: 500px;
}

.articles-empty__title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
}

.articles-empty__text {
    color: #666;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.articles-empty__link {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.articles-empty__link:hover {
    background: #005a87;
}

@media (max-width: 992px) {
    .article-item {
        flex: 1 1 calc(50% - 30px);
    }

    .articles-page-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .articles-grid {
        gap: 20px;
    }

    .article-item {
        flex: 1 1 100%;
    }

    .article-card__content {
        padding: 20px;
    }

    .article-card__image {
        height: 180px;
    }

    .articles-page-title {
        font-size: 1.8rem;
    }

    .article-meta {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .articles-container {
        padding: 0 15px;
    }

    .article-card__image {
        height: 160px;
    }

    .article-card__title {
        font-size: 1.2rem;
    }

    .articles-pagination .page-numbers {
        min-width: 35px;
        height: 35px;
        padding: 0 10px;
        font-size: 0.9rem;
    }
}

.footer-grid h3 {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wp-color-highlight, inherit);
    margin-bottom: 0.9rem;
}

/* =============================================================================
   v3 — Content-md design system
   =============================================================================
   Всё ниже применяется только к элементам, которые реально создаёт
   wpro_markdown_to_html() / inc/content-md-enhance.php (.wpro-figure,
   .wpro-callout, .wpro-table, .wpro-eyebrow) — на старом HTML-контенте этих
   классов физически нет, поэтому раздел не меняет вид уже импортированных
   страниц. Использует ту же переменную-палитру :root, что и остальная тема.
   ============================================================================= */

/* ── Eyebrow: строка "обновлено/проверено" над героем ──────────────────── */
.wpro-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    margin: 0 0 1.25rem;
    padding: 0.4rem 0.9rem;
    background: var(--wp-color-bg-alt);
    border: 1px solid var(--wp-color-border);
    border-radius: 100px;
    font-size: 0.82rem;
    color: var(--wp-color-text-light);
    line-height: 1.4;
}

.wpro-eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--wp-color-highlight);
}

/* ── Figure: картинка + подпись (из "![]() \n *caption*") ──────────────── */
.wpro-figure {
    margin: 1.75em 0;
}

.wpro-figure img {
    width: 100%;
    border-radius: var(--wp-radius-lg);
    box-shadow: var(--wp-shadow-sm);
    margin: 0;
}

.wpro-figure figcaption {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--wp-color-text-light);
    text-align: center;
    font-style: italic;
}

/* Первая figure статьи — визуальный герой: чуть крупнее радиус/тень,
   без верхнего отступа (сразу под H1/eyebrow). */
.content > .wpro-figure:first-of-type,
.hub-intro > .wpro-figure:first-of-type {
    margin-top: 0;
}

/* ── Callout: "Метка : текст" (Verdict, Le piège classique, ...) ───────── */
.wpro-callout {
    margin: 1.75em 0;
    padding: 1.25rem 1.5rem;
    background: var(--wp-color-bg-alt);
    border: 1px solid var(--wp-color-border);
    border-left: 4px solid var(--wp-color-accent);
    border-radius: 0 var(--wp-radius-lg) var(--wp-radius-lg) 0;
}

.wpro-callout__label {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.15em 0.7em;
    border-radius: 100px;
    background: var(--wp-color-accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wpro-callout p {
    margin: 0;
    color: var(--wp-color-text);
}

.wpro-callout p:not(:last-child) {
    margin-bottom: 0.6em;
}

/* ── Table: карточка-сравнение (зебра, hover, липкая шапка) ─────────────── */
.wpro-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.75em 0;
    border: 1px solid var(--wp-color-border);
    border-radius: var(--wp-radius-lg);
    overflow: hidden;
}

.wpro-table th,
.wpro-table td {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--wp-color-border);
    border-right: none;
    text-align: left;
    font-size: 0.92rem;
}

.wpro-table th {
    background: var(--wp-color-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    position: sticky;
    top: 0;
}

.wpro-table tbody tr:nth-child(even) {
    background: var(--wp-color-bg-alt);
}

.wpro-table tbody tr:hover {
    background: rgba(15, 52, 96, 0.06);
}

.wpro-table tbody tr:last-child td {
    border-bottom: none;
}

.wpro-table td:first-child,
.wpro-table th:first-child {
    font-weight: 600;
}

/* table-responsive wrapper (добавляется JS в functions.php для всех таблиц
   темы) — на .wpro-table убираем лишнюю внешнюю рамку/тень контейнера,
   раз она уже есть на самой таблице. */
.table-responsive:has(.wpro-table) {
    border-radius: var(--wp-radius-lg);
}

/* ── Category hub (page-hub.php) ────────────────────────────────────────── */
.hub-main .entry-header {
    margin-bottom: 1.5rem;
}

.hub-intro {
    margin-bottom: 2rem;
}

.hub-articles {
    border-top: 1px solid var(--wp-color-border);
    padding-top: 2rem;
}

.hub-articles__head {
    max-width: var(--wp-container);
    margin: 0 auto 1.5rem;
    padding: 0 1.25rem;
}

.hub-count {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--wp-color-text-light);
}

.hub-count strong {
    color: var(--wp-color-primary);
}

@media (max-width: 768px) {
    .wpro-callout {
        padding: 1rem 1.1rem;
    }

    .wpro-table th,
    .wpro-table td {
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
    }
}

/* ── Footer content-md (inc/footer-md.php) ──────────────────────────────
   Обёртка .wpro-md-footer нужна, чтобы эти правила НИКОГДА не задевали
   старый pillar-футер (_pillar_custom_footer) — даже если он использует
   те же имена классов (footer-grid/footer-col), он выводится вне этой
   обёртки и получает только свои собственные встроенные стили. ──────── */
.wpro-md-footer {
    max-width: var(--wp-container);
    margin: 0 auto;
    padding: 3rem 1.25rem 2rem;
}

.wpro-md-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.wpro-md-footer .footer-col h5 {
    margin: 0 0 0.9rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wp-color-primary);
}

.wpro-md-footer .footer-col p {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--wp-color-text-light);
}

.wpro-md-footer .footer-col a {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--wp-color-text-light);
    text-decoration: none;
}

.wpro-md-footer .footer-col a:hover {
    color: var(--wp-color-accent);
    text-decoration: underline;
}

.wpro-md-footer .age-badge {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.2rem 0.6rem;
    border: 1.5px solid var(--wp-color-highlight);
    border-radius: var(--wp-radius);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--wp-color-highlight);
}

.wpro-md-footer .footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--wp-color-border);
}

.wpro-md-footer .footer-bottom p {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    color: var(--wp-color-text-light);
}

.wpro-md-footer .footer-bottom .disclaimer {
    font-size: 0.75rem;
    line-height: 1.5;
    opacity: 0.85;
}

@media (max-width: 900px) {
    .wpro-md-footer .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem 1.5rem;
    }
}

@media (max-width: 520px) {
    .wpro-md-footer {
        padding: 2.25rem 1.25rem 1.5rem;
    }

    .wpro-md-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
}

/* Footer — сноска, не часть статьи */
body > footer {
  max-width: var(--wide-width);
  width: calc(100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-footer);
  line-height: 1.5;
  color: var(--color-text-secondary);
}
body > footer:empty { min-height: 4rem; }
body > footer p,
body > footer li { font-size: var(--fs-footer); color: var(--color-text-secondary); }

/* =========================================================
   4. Компоненты
   ========================================================= */

/* --- tldr --- */
.tldr {
  max-width: var(--wide-width);
  width: calc(100% - 2 * var(--gutter));
  background: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding-block: 1.4rem 1.1rem;
  padding-inline: 1.5rem;
  box-shadow: none;
  color: var(--color-text);
}
.tldr h2 {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.05rem + .3vw, 1.25rem);
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-text);
  text-align: left;
  margin: 0 0 .8rem;
}
.tldr ul { margin: 0; padding-left: 1.1em; }
.tldr li {
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--color-text);
  text-align: left;
  margin-bottom: .5em;
}
.tldr li::marker { color: var(--color-accent); }

/* --- info-box --- */
.info-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-info);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.4rem .4rem;
  margin: 1.75rem 0;
}
.info-box p,
.info-box li {
  color: var(--color-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-align: left;
}
.info-box p:first-child { font-family: var(--font-display); margin-bottom: .6em; }
.info-box ul { padding-left: 1.1em; }
.info-box li::marker { color: var(--color-info); }

/* --- callout --- */
.callout {
  background: var(--color-surface);
  border-left: 4px solid var(--color-negative);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
  padding: 1.15rem 1.4rem .4rem;
  margin: 1.75rem 0;
}
.callout p,
.callout li {
  color: var(--color-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-align: left;
}
.callout p:first-child strong { color: var(--color-text); font-weight: 700; }
.callout ul { padding-left: 1.1em; }
.callout li::marker { color: var(--color-negative); }

/* --- odds-example (тёмный блок в обеих темах) --- */
.odds-example {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.6rem 1.4rem;
  margin: 1.75rem 0;
}
.odds-example p {
  background: var(--color-primary);
  color: var(--color-on-primary);
  text-align: center;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-body);
  line-height: 1.5;
  margin: 0 0 .5rem;
}
.odds-example p:first-child {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-on-primary-muted);
  text-align: center;
}
.odds-example p strong {
  font-size: var(--fs-odds);
  font-weight: 600;
  color: var(--color-accent);
}
.odds-example p:last-child {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  color: var(--color-on-primary-muted);
  text-align: center;
  margin: .9rem 0 0;
}

/* --- worked-example --- */
.worked-example {
  counter-reset: step;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem 1.75rem;
  margin: 1.75rem 0;
}
.worked-example p {
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  line-height: 1.6;
  text-align: left;
  margin: 0;
  padding: .55rem 0;
}
.worked-example p:first-child {
  font-family: var(--font-display);
  font-size: var(--fs-body);
  padding-top: 0;
  margin-bottom: .3rem;
}
.worked-example p + p {
  counter-increment: step;
  border-top: 1px dashed var(--color-border);
  padding-left: 2.2rem;
  position: relative;
}
.worked-example p + p::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .55rem;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  font-size: var(--fs-label);
  color: var(--color-text);
}
.worked-example p:last-child {
  font-weight: 600;
  color: var(--color-text);
  border-top: 2px solid var(--color-accent);
}

/* --- comparison --- */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.75rem 0;
}
.comparison > div {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.comparison > div > p:first-child {
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-display);
  font-weight: 700;
  text-align: left;
  margin: 0;
  padding: .7rem 1.1rem;
}
.comparison > div > p:first-child strong { color: var(--color-on-primary); }
.comparison ul { margin: 0; padding: 1rem 1.1rem .6rem 2.2rem; }
.comparison li,
.comparison p {
  color: var(--color-text);
  font-size: var(--fs-small);
  line-height: 1.55;
  text-align: left;
}

/* --- card-grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.75rem 0;
}
.card-grid > div {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.1rem .4rem;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card-grid > div:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-grid p {
  color: var(--color-text);
  font-size: var(--fs-small);
  line-height: 1.55;
  text-align: left;
  margin-bottom: .6em;
}
.card-grid p:first-child {
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.3;
}

/* --- at-a-glance --- */
.at-a-glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin: 1.75rem 0;
  overflow: hidden;
}
.at-a-glance > div {
  padding: 1rem .9rem;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-right: -1px;
  margin-bottom: -1px;
}
.at-a-glance p {
  color: var(--color-text-secondary);
  background: var(--color-bg);
  font-size: var(--fs-small);
  line-height: 1.45;
  text-align: center;
  margin: 0;
}
.at-a-glance p:first-child {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin-bottom: .35rem;
}

/* --- key-takeaway --- */
.key-takeaway {
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.key-takeaway p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.15rem + .4vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
  text-align: left;
  margin: 0;
}
.key-takeaway strong { color: var(--color-text); }

/* --- fun-fact --- */
.fun-fact {
  position: relative;
  background: none;
  border: 0;
  box-shadow: none;
  padding-left: 1.75rem;
  margin: 1.75rem 0;
}
.fun-fact::before {
  content: "2014";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-accent);
  font-weight: 700;
  line-height: var(--lh-body);
}
.fun-fact p {
  font-style: italic;
  color: var(--color-text-secondary);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-align: left;
  margin: 0;
}

/* --- glossary-term --- */
.glossary-term {
  background: var(--color-bg);
  border-bottom: 1px dotted var(--color-border);
  padding: .75rem 0;
  margin: 1.25rem 0;
}
.glossary-term p {
  color: var(--color-text-secondary);
  font-size: var(--fs-small);
  line-height: 1.6;
  text-align: left;
  margin: 0;
}
.glossary-term strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-body);
  color: var(--color-text);
}

/* --- dos-donts --- */
.dos-donts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.75rem 0;
}
.dos-donts > div {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.2rem .4rem;
}
.dos-donts > div:first-child { border-top: 3px solid var(--color-positive); }
.dos-donts > div:last-child { border-top: 3px solid var(--color-negative); }
.dos-donts p:first-child {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  text-align: left;
  margin-bottom: .5rem;
}
.dos-donts > div:first-child p:first-child strong { color: var(--color-positive); font-weight: 700; }
.dos-donts > div:last-child p:first-child strong { color: var(--color-negative); font-weight: 700; }
.dos-donts ul { padding-left: 1.1em; }
.dos-donts li {
  color: var(--color-text);
  font-size: var(--fs-small);
  line-height: 1.55;
  text-align: left;
}
.dos-donts > div:first-child li::marker { color: var(--color-positive); }
.dos-donts > div:last-child li::marker { color: var(--color-negative); }

/* --- pre-bet-checklist --- */
.pre-bet-checklist {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.2rem 1.4rem .6rem;
  margin: 1.75rem 0;
}
.pre-bet-checklist p:first-child {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text);
  text-align: left;
  margin-bottom: .9rem;
}
.pre-bet-checklist ul { list-style: none; padding: 0; margin: 0 0 .6rem; }
.pre-bet-checklist li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--color-text);
  font-size: var(--fs-small);
  line-height: 1.55;
  text-align: left;
  margin-bottom: .6em;
}
.pre-bet-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  width: .8em;
  height: .8em;
  border: 2px solid var(--color-accent);
  border-radius: 2px;
}

/* --- section-bridge --- */
.section-bridge {
  position: relative;
  margin: calc(var(--section-gap) / 2) 0 0;
  padding-top: 1.25rem;
}
.section-bridge::before {
  content: "";
  position: absolute;
  top: 0;
  left: 30%;
  width: 40%;
  border-top: 1px solid var(--color-border);
}
.section-bridge p {
  font-style: italic;
  color: var(--color-text-secondary);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-align: left;
  margin: 0;
}

/* =========================================================
   5. Hero
   ========================================================= */
article > header[data-content="hero"] {
  position: relative;
  isolation: isolate;
  max-width: none;
  width: 100%;
  margin: 0;
  padding-top: clamp(3.5rem, 2rem + 6vw, 7rem);
  padding-bottom: clamp(5rem, 3rem + 7vw, 9rem);
  padding-inline: max(var(--gutter), calc((100% - var(--hero-width)) / 2));
  background:
    linear-gradient(180deg,
      var(--color-primary) 0%,
      var(--color-primary-2) calc(100% - 5rem),
      var(--color-bg) 100%);
  color: var(--color-on-primary);
  overflow: hidden;
}
/* Разметка поля: центральный круг и средняя линия, растворяется к центру */
article > header[data-content="hero"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--pattern-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 600' fill='none' stroke='%23FFFFFF' stroke-width='3'%3E%3Cline x1='600' y1='40' x2='600' y2='560'/%3E%3Ccircle cx='600' cy='300' r='110'/%3E%3Ccircle cx='600' cy='300' r='4' fill='%23FFFFFF'/%3E%3Crect x='40' y='170' width='150' height='260'/%3E%3Crect x='1010' y='170' width='150' height='260'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 20%, #000 75%);
  mask-image: radial-gradient(ellipse at center, transparent 20%, #000 75%);
}
article > header[data-content="hero"] h1 {
  color: var(--color-on-primary);
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  text-align: left;
  max-width: 20ch;
  margin: 0 0 1.1rem;
}
article > header[data-content="hero"] .hero-hook {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-accent);
  text-align: left;
  margin: 0 0 1.75rem;
}
article > header[data-content="hero"] .hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
  margin: 0 0 2rem;
  text-align: left;
}
article > header[data-content="hero"] .hero-meta span {
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-on-primary-muted);
}
article > header[data-content="hero"] .badge-date {
  padding: .3rem .7rem;
  border: 1px solid rgba(244, 246, 249, .28);
  border-radius: 999px;
  color: var(--color-on-primary);
}
article > header[data-content="hero"] .badge-date time { color: var(--color-on-primary); }
article > header[data-content="hero"] .badge-age {
  padding: .3rem .7rem;
  border-radius: 999px;
  background: rgba(244, 246, 249, .08);
}
article > header[data-content="hero"] .btn-start {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.2rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-on-primary);
  text-decoration: none;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
article > header[data-content="hero"] .btn-start::after {
  content: "2193";
  transition: transform var(--dur) var(--ease);
}
article > header[data-content="hero"] .btn-start:hover {
  background: rgba(242, 106, 27, .14);
  transform: translateY(-2px);
}
article > header[data-content="hero"] .btn-start:hover::after { transform: translateY(2px); }
article > header[data-content="hero"] .hero-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2.5rem auto 0;
  border-radius: var(--radius);
}
article > header[data-content="hero"] figcaption {
  color: var(--color-on-primary-muted);
  text-align: center;
}

/* =========================================================
   6. Медиа-запросы
   ========================================================= */
@media (max-width: 760px) {
  :root { --gutter: 1rem; }
  .comparison,
  .dos-donts { grid-template-columns: 1fr; }
  .at-a-glance { grid-template-columns: 1fr; }
  .at-a-glance > div { border-right: 0; margin-right: 0; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  thead th, tbody td { white-space: nowrap; }
  .worked-example { padding: 1.2rem 1.1rem; }
  .tldr { padding-inline: 1.1rem; }
  [data-content="toc"] ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; scrollbar-color: var(--color-border) transparent; }
  [data-content="toc"] a { white-space: nowrap; }
  article > header[data-content="hero"] h1 { max-width: none; }
}

/* =========================================================
   images-styles.css — изображения pillar-страницы
   Использует CSS-переменные из :root основной страницы.
   ========================================================= */

/* --- Базовые правила для всех изображений --- */
img {
  max-width: 100%;
  height: auto;
}

/* --- Hero-изображение --- */
article > header[data-content="hero"] .hero-figure {
  margin: clamp(2rem, 1.5rem + 2vw, 3rem) 0 0;
  max-width: 1200px;
}

article > header[data-content="hero"] .hero-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  aspect-ratio: 1200 / 630;
  border-radius: var(--radius);
  background-color: var(--color-primary-2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

article > header[data-content="hero"] .hero-figure figcaption {
  margin-top: .75rem;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--color-on-primary-muted);
  background-color: transparent;
  text-align: center;
}

/* --- Изображения внутри секций статьи --- */
[data-content] .article-figure {
  margin: 2.25rem auto;
  max-width: 100%;
}

[data-content] .article-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

[data-content] .article-figure:hover .article-image {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

[data-content] .article-figure figcaption {
  margin-top: .7rem;
  padding-inline: .5rem;
  font-size: var(--fs-small);
  line-height: 1.5;
  font-style: italic;
  color: var(--color-text-secondary);
  text-align: center;
}

/* --- Мобильные --- */
@media (max-width: 760px) {
  article > header[data-content="hero"] .hero-figure { margin-top: 1.75rem; }
  [data-content] .article-figure { margin: 1.75rem auto; }
  [data-content] .article-figure figcaption { padding-inline: 0; }
}

/* --- Без анимаций для пользователей с reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  [data-content] .article-image { transition: none; }
  [data-content] .article-figure:hover .article-image { transform: none; }
}



/* ===== v2: сетка с боковым оглавлением, hero с цифрами, ритм секций ===== */
:root {
  --toc-width: 15rem;
  --layout-gap: 3.5rem;
  --text-width: 46rem;
  --layout-width: calc(var(--toc-width) + var(--layout-gap) + var(--text-width));
  --hero-width: var(--layout-width);
  --section-gap: clamp(2.5rem, 1.75rem + 2.5vw, 4rem);
}
h2 { text-wrap: pretty; }

/* main: две колонки — оглавление | контент */
main > article {
  display: grid;
  grid-template-columns:
    [full-start] minmax(var(--gutter), 1fr)
    [toc-start] var(--toc-width) [toc-end]
    var(--layout-gap)
    [text-start] minmax(0, var(--text-width)) [text-end]
    minmax(var(--gutter), 1fr) [full-end];
}
main > article > header[data-content="hero"] { grid-column: full; grid-row: 1; }
main > article > [data-content]:not(:where([data-content="hero"])) {
  grid-column: text;
  max-width: none;
  width: auto;
  margin-inline: 0;
  padding-inline: 0;
}
main > article > .tldr { width: auto; max-width: none; padding-inline: 1.5rem; }

/* Секции: тонкий разделитель задаёт ритм */
main > article > [data-content]:not([data-content="hero"]):not([data-content="intro"]):not([data-content="tldr"]):not([data-content="toc"]) {
  border-top: 1px solid var(--color-border);
  padding-top: clamp(2rem, 1.5rem + 1.5vw, 3rem);
}

/* Sticky sidebar TOC */
main > article > [data-content="toc"] {
  grid-column: toc;
  grid-row: 2 / span 16;
  align-self: start;
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  margin: calc(var(--section-gap) / 2) 0 0;
  padding: 0 .5rem 0 0;
  border: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
main > article > [data-content="toc"]::-webkit-scrollbar { width: 4px; }
main > article > [data-content="toc"]::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
main > article > [data-content="toc"] ul {
  display: block;
  border-left: 2px solid var(--color-border);
}
main > article > [data-content="toc"] li { display: block; margin: 0; }
main > article > [data-content="toc"] a {
  display: block;
  padding: .4rem 0 .4rem .9rem;
  margin-left: -2px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  background: none;
  font-size: var(--fs-small);
  line-height: 1.35;
  color: var(--color-text-secondary);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
main > article > [data-content="toc"] a:hover {
  color: var(--color-text);
  border-left-color: var(--color-accent);
  transform: translateX(2px);
}
main > article > [data-content="toc"] li:first-child a { color: var(--color-text); font-weight: 600; }

/* Hero: текст слева, картинка справа, цифры полосой снизу */
article > header[data-content="hero"] {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr auto;
  column-gap: 3rem;
  align-items: start;
  padding-top: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  padding-bottom: clamp(4.5rem, 3rem + 4vw, 7rem);
}
article > header[data-content="hero"] h1,
article > header[data-content="hero"] .hero-hook,
article > header[data-content="hero"] .hero-meta,
article > header[data-content="hero"] .btn-start { grid-column: 1; }
article > header[data-content="hero"] h1 { max-width: none; font-size: clamp(2rem, 1.3rem + 2.4vw, 3.1rem); }
article > header[data-content="hero"] .btn-start { justify-self: start; }
article > header[data-content="hero"] .hero-figure {
  grid-column: 2;
  grid-row: 1 / 5;
  align-self: center;
  margin: 0;
}
article > header[data-content="hero"] .hero-figure figcaption { text-align: left; }

.hero-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(2rem, 1.5rem + 2vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(244, 246, 249, .16);
}
.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin: 0;
  padding: 1.1rem 1.25rem 0 0;
  text-align: left;
}
.hero-stats li + li { padding-left: 1.25rem; border-left: 1px solid rgba(244, 246, 249, .16); }
.hero-stats .stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1rem + 1.1vw, 2rem);
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--color-on-primary);
}
.hero-stats .stat-label {
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--color-on-primary-muted);
}
.hero-stats .stat-src {
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-accent);
}

/* Footer по ширине сетки */
body > footer { max-width: var(--layout-width); }

@media (max-width: 900px) {
  main > article { grid-template-columns: [full-start] var(--gutter) [toc-start text-start] minmax(0, 1fr) [toc-end text-end] var(--gutter) [full-end]; }
  main > article > [data-content="toc"] {
    grid-column: toc;
    grid-row: auto;
    position: static;
    max-height: none;
    overflow-y: visible;
    padding: 1.5rem 0 .5rem;
  }
  article > header[data-content="hero"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  article > header[data-content="hero"] .hero-figure { grid-column: 1; grid-row: auto; margin-top: 2rem; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.25rem; }
  .hero-stats li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 480px) {
  .hero-stats { grid-template-columns: minmax(0, 1fr); }
  .hero-stats li + li { padding-left: 0; border-left: 0; }
}