/*
Theme Name: dds_simonvargasart.com
Theme URI: https://simonvargasart.com/
Author: Simon Vargas
Author URI: https://simonvargasart.com/
Description: Тема для информационно-аналитического портала о применении AI и цифровых технологий в креативных индустриях и финтехе.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: svart
*/

/* ==== Переменные ==== */
:root {
    --bg: #F6F3F9;
    --bg-alt: #EFEAF5;
    --head-bg: #2A1B38;
    --foot-bg: #1A1123;
    --side-bg: #FFFFFF;
    --ink: #1E1729;
    --accent: #B48AD9;
    --accent-deep: #7C4A9C;
    --aqua: #6EC8D9;
    --muted: #9A8BA6;
    --line: #D8CFE5;
    --card-bg: #F9F7FB;
    --font-head: "Manrope", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-body: "Roboto", "SF Pro Text", system-ui, -apple-system, "Segoe UI", sans-serif;
    --shell: min(92%, 1180px);
}

/* ==== Управление видимостью (см. правило [hidden]) ==== */
.cookie-note[hidden] { display: none !important; }
.main-nav[hidden] { display: none !important; }

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==== База ==== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 100% 0, rgba(180, 138, 217, 0.14) 0, rgba(180, 138, 217, 0) 58%),
        radial-gradient(rgba(180, 138, 217, 0.16) 1px, transparent 1px);
    background-size: 100% 900px, 22px 22px;
    background-position: right top, 0 0;
    background-repeat: no-repeat, repeat;
    background-attachment: fixed, fixed;
}

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

a { color: var(--accent-deep); text-decoration: none; }

.entry-body a,
.widget-area a,
.crumbs a {
    position: relative;
}

.entry-body a {
    color: var(--accent-deep);
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-size: 100% 1px;
    background-position: 0 100%;
    transition: background-size .25s ease, color .2s ease;
}

.entry-body a:hover {
    color: var(--accent);
    background-size: 100% 3px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.22;
    letter-spacing: -0.01em;
    margin: 0 0 .7em;
}

h1 { font-size: 4rem; font-weight: 800; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 700; }
h4 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0 0 1.1em; }

.shell {
    width: var(--shell);
    margin-inline: auto;
}

/* ==== Кнопки ==== */
.btn,
.entry-body .btn {
    display: inline-block;
    padding: .78em 1.7em;
    border: 0;
    border-radius: 8px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .98rem;
    color: #fff;
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-deep) 100%);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .25s ease;
    background-size: 100% 100%;
}

.btn:hover {
    color: #fff;
    background: linear-gradient(120deg, var(--accent-deep) 0%, #5F3479 100%);
    transform: translateY(2px);
    box-shadow: inset 0 3px 10px rgba(26, 17, 35, .28);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent-deep);
}

.btn-ghost:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: inset 0 3px 10px rgba(26, 17, 35, .18);
}

.btn-aqua {
    background: linear-gradient(120deg, var(--aqua) 0%, #46A9BC 100%);
    color: #10202B;
}

.btn-aqua:hover {
    background: linear-gradient(120deg, #46A9BC 0%, #2E8B9E 100%);
    color: #0B1720;
}

/* ==== Шапка ==== */
.site-head {
    background: var(--head-bg);
    background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 20px 20px;
    color: #F1EAF8;
    border-bottom: 3px solid var(--accent-deep);
}

.head-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: .95rem;
    min-width: 0;
    flex: 1 1 320px;
}

.brand-logo,
.brand-mark {
    flex: 0 0 auto;
    display: block;
    width: 54px;
    height: 54px;
}

.brand-text { min-width: 0; }

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1.3;
    color: #FFFFFF;
    max-height: 3.9em;
    overflow: hidden;
}

.brand-name:hover { color: var(--accent); }

.brand-tagline {
    display: block;
    margin-top: .3rem;
    font-size: .8rem;
    line-height: 1.5;
    color: #B7A4C7;
    max-height: 4.5em;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    padding: .55em 1em;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 8px;
    background: transparent;
    color: #F1EAF8;
    font-family: var(--font-head);
    font-size: .95rem;
    cursor: pointer;
}

.main-nav { flex: 0 1 auto; }

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem 1.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav a {
    display: inline-block;
    padding: .35em 0;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .98rem;
    color: #E7DDF2;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: #fff;
    border-bottom-color: var(--aqua);
}

/* ==== Хлебные крошки ==== */
.crumbs {
    padding: 1.1rem 0 .2rem;
    font-size: .87rem;
    color: var(--muted);
}

.crumbs a { color: var(--accent-deep); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { margin: 0 .45rem; color: var(--line); }

/* ==== Раскладки ==== */
.site-main { padding: 1.4rem 0 3.5rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    justify-content: space-between;
    gap: 2.6rem;
    align-items: start;
}

.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.content-area { min-width: 0; }

.page-head {
    margin-bottom: 1.8rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--line);
}

.page-head h1 { font-size: 2.6rem; margin-bottom: .2rem; }
.page-head p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ==== Карточки записей ==== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.8rem;
}

.card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(42, 27, 56, .08);
    transition: transform .22s ease, box-shadow .22s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(42, 27, 56, .12);
}

.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card-thumb-ph {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #2A1B38 0%, #4B2A63 100%);
    background-image:
        linear-gradient(135deg, #2A1B38 0%, #4B2A63 100%),
        radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 100% 100%, 16px 16px;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.4rem 1.5rem 1.6rem;
}

.card-meta {
    margin-bottom: .55rem;
    font-family: var(--font-head);
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.card-meta .aqua { color: #3E98AB; }

.card-title {
    font-size: 1.25rem;
    margin: 0 0 .7rem;
}

.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent-deep); }

.card-excerpt {
    flex: 1;
    color: #4A4056;
    font-size: .96rem;
}

.card-excerpt p { margin: 0 0 .5em; background: none; }

.card-foot {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--line);
}

.card-more {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .92rem;
    color: var(--accent-deep);
}

.card-more:hover { color: var(--accent); }

/* Горизонтальная карточка ленты */
.card-row { flex-direction: row; }

.card-row .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
    background: var(--bg-alt);
}

.card-row .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.card-row .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-row .card-thumb-wrap .ph-fill {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #33203F;
    background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px);
    background-size: 16px 16px;
}

/* ==== Пагинация ==== */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2.6rem;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 2.6rem;
    padding: .5em .85em;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    color: var(--ink);
    text-align: center;
}

.pager a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent-deep);
}

.pager .page-numbers.current {
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-deep) 100%);
    border-color: transparent;
    color: #fff;
}

.pager .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

/* ==== Запись и страница ==== */
.entry {
    background: #fff;
    border-radius: 16px;
    padding: 2.2rem 2.4rem 2.6rem;
    box-shadow: 0 4px 15px rgba(42, 27, 56, .08);
}

.entry-title { font-size: 2.5rem; margin-bottom: .5rem; }

.entry-meta {
    margin-bottom: 1.6rem;
    font-family: var(--font-head);
    font-size: .82rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.entry-cover {
    display: block;
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.8rem;
}

.entry-body h2 { font-size: 1.75rem; margin-top: 1.9rem; }
.entry-body h3 { font-size: 1.3rem; margin-top: 1.5rem; }

.entry-body ul,
.entry-body ol { padding-left: 1.3rem; margin: 0 0 1.2em; }

.entry-body ul { list-style: none; padding-left: 0; }

.entry-body ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: .5em;
}

.entry-body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .62em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--aqua);
}

.entry-body ol li { margin-bottom: .5em; }

.entry-body blockquote {
    margin: 1.6em 0;
    padding: 1.4rem 1.6rem;
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
    background: var(--bg-alt);
    font-size: 1.05rem;
}

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

.entry-body img { border-radius: 12px; display: block; }

.entry-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    border: 1px solid var(--line);
    font-size: .95rem;
}

.entry-body th,
.entry-body td {
    border: 1px solid var(--line);
    padding: .7em .9em;
    text-align: left;
}

.entry-body th {
    background: var(--bg-alt);
    font-family: var(--font-head);
    font-weight: 700;
}

.entry-tags {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--line);
    font-size: .9rem;
    color: var(--muted);
}

.entry-tags a {
    display: inline-block;
    margin: .2rem .35rem .2rem 0;
    padding: .25em .8em;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--accent-deep);
    font-size: .85rem;
}

.entry-tags a:hover { border-color: var(--accent); background: var(--bg-alt); }

.post-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.8rem;
}

.post-nav a {
    flex: 1 1 240px;
    min-width: 0;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(42, 27, 56, .08);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    color: var(--ink);
}

.post-nav a:hover { color: var(--accent-deep); }
.post-nav span {
    display: block;
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .25rem;
}

/* ==== Сайдбар ==== */
.sidebar { min-width: 0; }

.widget {
    background: var(--side-bg);
    border-radius: 16px;
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.6rem;
    box-shadow: 0 4px 15px rgba(42, 27, 56, .08);
    color: var(--ink);
    font-size: .95rem;
}

.widget .widget-title {
    position: relative;
    margin: 0 0 1rem;
    padding-left: 1.5rem;
    font-size: 1.05rem;
    color: var(--ink);
}

.widget .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .28em;
    width: 8px;
    height: 1em;
    border-radius: 2px;
    background: var(--accent);
}

.widget p { color: #4A4056; margin-bottom: .8em; }

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

.widget li {
    position: relative;
    padding: .45em 0 .45em 1.1rem;
    border-bottom: 1px dashed var(--line);
}

.widget li:last-child { border-bottom: 0; }

.widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--aqua);
}

.widget a { color: var(--ink); }
.widget a:hover { color: var(--accent-deep); }
.widget .post-date { display: block; font-size: .8rem; color: var(--muted); }

/* ==== Форма поиска ==== */
.search-form {
    display: flex;
    gap: .5rem;
    min-width: 0;
}

.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: .7em .9em;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--ink);
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
}

/* ==== Подвал ==== */
.site-foot {
    background: var(--foot-bg);
    background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 22px 22px;
    color: #D8CDE4;
    padding: 3rem 0 1.6rem;
    border-top: 3px solid var(--accent-deep);
}

.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
}

.foot-col { min-width: 0; }

.site-foot .widget {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 1.4rem;
    color: #D8CDE4;
}

.site-foot .widget .widget-title { color: #FFFFFF; }
.site-foot .widget .widget-title::before { background: var(--aqua); }
.site-foot .widget p { color: #C3B6D2; }
.site-foot .widget a { color: #E4DAEE; }
.site-foot .widget a:hover { color: var(--aqua); }
.site-foot .widget li { border-bottom-color: rgba(255, 255, 255, .12); }
.site-foot .widget li::before { background: var(--accent); }
.site-foot .widget .post-date { color: #9A8BA6; }

.foot-bottom {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .85rem;
    color: #9A8BA6;
}

/* ==== Cookie-баннер ==== */
.cookie-note {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.6rem;
    background: #241732;
    border-top: 2px solid var(--accent);
    color: #E4DAEE;
    font-size: .9rem;
}

.cookie-note p { margin: 0; min-width: 0; }
.cookie-note a { color: var(--aqua); }

/* ==== Главная ==== */
.front-section {
    padding: 3.4rem 0;
    position: relative;
}

.front-section.alt {
    background: var(--bg-alt);
    border-radius: 20px;
    padding: 3.4rem 2.4rem;
    margin: 1.2rem 0;
}

.sec-head { margin-bottom: 2rem; }

.sec-num {
    display: block;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.6rem;
    line-height: 1;
    color: rgba(124, 74, 156, .18);
    margin-bottom: .3rem;
}

.sec-title {
    position: relative;
    padding-left: 1.6rem;
    font-size: 2.05rem;
    margin: 0 0 .6rem;
}

.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .2em;
    width: 10px;
    height: .82em;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
}

.sec-lead {
    max-width: 62ch;
    color: #4A4056;
    margin: 0;
}

/* Hero */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    gap: 2.6rem;
    margin-top: 1.6rem;
    padding: 3.4rem 3rem;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(125deg, #2A1B38 0%, #4B2A63 55%, #6B4489 100%);
    color: #F3ECF9;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.hero-text { position: relative; z-index: 2; min-width: 0; }

.hero h1 {
    color: #fff;
    font-size: 4rem;
    margin-bottom: .6rem;
}

.hero h1 em {
    font-style: normal;
    color: var(--aqua);
}

.hero-sub {
    font-size: 1.08rem;
    color: #DBCDE8;
    max-width: 46ch;
    margin-bottom: 1.7rem;
}

.hero-art {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.hero-art svg { display: block; width: 100%; height: auto; }

/* Таймлайн */
.tl {
    position: relative;
    margin-top: 1.4rem;
    padding: .5rem 0;
}

.tl::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--aqua) 100%);
}

.tl-item {
    position: relative;
    width: 46%;
    margin-bottom: 1.8rem;
    padding: 1.5rem 1.6rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(42, 27, 56, .08);
    min-width: 0;
}

.tl-item:nth-child(odd) { margin-right: auto; }
.tl-item:nth-child(even) { margin-left: auto; }

.tl-item::after {
    content: "";
    position: absolute;
    top: 1.9rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--aqua);
    box-shadow: 0 0 0 4px rgba(110, 200, 217, .25);
}

.tl-item:nth-child(odd)::after { right: -12.5%; }
.tl-item:nth-child(even)::after { left: -12.5%; }

.tl-date {
    display: block;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--accent-deep);
    margin-bottom: .3rem;
}

.tl-item h3 { font-size: 1.12rem; margin-bottom: .4rem; }
.tl-item p { margin: 0; font-size: .93rem; color: #4A4056; }

/* Статистика */
.stats {
    margin: 1.2rem 0;
    padding: 3rem 2.6rem;
    border-radius: 22px;
    background: linear-gradient(120deg, #2A1B38 0%, #4B2A63 100%);
    background-image:
        linear-gradient(120deg, #2A1B38 0%, #4B2A63 100%),
        radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
    background-size: 100% 100%, 20px 20px;
    color: #EFE7F6;
}

.stats .sec-title { color: #fff; }
.stats .sec-title::before { background: var(--aqua); }
.stats .sec-lead { color: #CFC0DE; }
.stats .sec-num { color: rgba(255, 255, 255, .16); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 1.4rem;
    margin-top: 1.8rem;
}

.stat-cell {
    min-width: 0;
    padding: 1.6rem 1.4rem;
    border-radius: 16px;
    background: #F7F5FA;
    text-align: center;
}

.stat-num {
    display: block;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.8rem;
    line-height: 1.05;
    color: #2E8B9E;
    margin-bottom: .4rem;
}

.stat-cap {
    display: block;
    font-size: .92rem;
    color: #4A4056;
}

/* Рубрикатор */
.topics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 1.4rem;
    margin-top: 1.6rem;
}

.topic-tile {
    display: block;
    min-width: 0;
    padding: 1.7rem 1.6rem;
    border: 1px solid transparent;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(42, 27, 56, .08);
    color: var(--ink);
    transition: background .22s ease, border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}

.topic-tile:hover {
    background: var(--bg-alt);
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(42, 27, 56, .12);
}

.topic-tile svg {
    display: block;
    width: 40px;
    height: 40px;
    margin-bottom: .9rem;
}

.topic-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.12rem;
    margin-bottom: .35rem;
}

.topic-desc {
    display: block;
    font-size: .9rem;
    color: #4A4056;
}

/* Разделитель между секциями */
.sec-split {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: .6rem 0;
    color: var(--line);
}

.sec-split::before,
.sec-split::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.sec-split span {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--accent);
    transform: rotate(45deg);
}

.front-latest .card-grid { margin-top: 1.6rem; }

/* ==== Комментарии ==== */
.comments {
    margin-top: 2.2rem;
    background: #fff;
    border-radius: 16px;
    padding: 2rem 2.2rem;
    box-shadow: 0 4px 15px rgba(42, 27, 56, .08);
}

.comments h2 { font-size: 1.5rem; }

.comment-list {
    list-style: none;
    margin: 0 0 1.6rem;
    padding: 0;
}

.comment-list ul.children {
    list-style: none;
    margin: 1rem 0 0 1.6rem;
    padding: 0;
}

.comment-list li article {
    padding: 1.1rem 1.3rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: var(--bg-alt);
}

.comment-meta {
    font-family: var(--font-head);
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: .5rem;
}

.comment-meta b { color: var(--ink); }

.comment-form label {
    display: block;
    font-size: .9rem;
    margin-bottom: .3rem;
    font-family: var(--font-head);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .7em .9em;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--ink);
}

.comment-form textarea { min-height: 140px; }

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

.comment-form .submit {
    display: inline-block;
    padding: .78em 1.7em;
    border: 0;
    border-radius: 8px;
    font-family: var(--font-head);
    font-weight: 700;
    color: #fff;
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-deep) 100%);
    cursor: pointer;
}

.comment-form .submit:hover { transform: translateY(2px); }

/* ==== 404 ==== */
.err-box {
    padding: 3rem 2.4rem;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 15px rgba(42, 27, 56, .08);
    text-align: center;
}

.err-code {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 5rem;
    line-height: 1;
    color: var(--accent);
    margin-bottom: .4rem;
}

.err-box .search-form {
    max-width: 420px;
    margin: 1.6rem auto;
}

/* ==== Адаптив ==== */
@media (max-width: 960px) {
    h1 { font-size: 3rem; }
    .hero { grid-template-columns: 1fr; padding: 2.6rem 2rem; }
    .hero h1 { font-size: 2.9rem; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .layout-single { width: 100%; }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tl::before { left: 10px; }
    .tl-item { width: 100%; margin-left: 0; margin-right: 0; padding-left: 2.4rem; }
    .tl-item:nth-child(odd)::after,
    .tl-item:nth-child(even)::after { left: 4px; right: auto; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.55rem; }
    .head-inner { padding: 1.1rem 0; }
    .nav-toggle { display: inline-block; }
    .main-nav { flex: 1 1 100%; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { border-bottom: 1px solid rgba(255, 255, 255, .12); }
    .main-nav a { display: block; padding: .7em 0; }
    .hero { padding: 2rem 1.4rem; border-radius: 16px; }
    .hero h1 { font-size: 2.1rem; }
    .entry { padding: 1.5rem 1.3rem 1.8rem; }
    .entry-title { font-size: 1.8rem; }
    .page-head h1 { font-size: 1.9rem; }
    .front-section { padding: 2.2rem 0; }
    .front-section.alt { padding: 2.2rem 1.4rem; }
    .stats { padding: 2rem 1.4rem; }
    .comments { padding: 1.4rem 1.2rem; }
    .err-box { padding: 2rem 1.3rem; }
    .foot-cols { grid-template-columns: minmax(0, 1fr); }
    .card-row { flex-direction: column; }
    .card-row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-row .card-thumb-wrap a { position: static; }
    .card-row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .card-row .card-thumb-wrap .ph-fill {
        position: static;
        display: block;
        width: 100%;
        aspect-ratio: 16 / 9;
    }
    .stat-num { font-size: 2.2rem; }
    .cookie-note { padding: 1rem 1.1rem; }
}
