/*
Theme Name: dds_rkib.rf
Description: Информационная тема для сайта об инфекциях, диагностике и лечении. Лабораторная чистота и акцентные вспышки.
Author: Анна Власова
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: rkiblab
*/

/* =========================================================
   1. Переменные и база
   ========================================================= */

:root {
    --bg: #F4F7FC;
    --bg-alt: #E8F0FE;
    --bg-head: #FFFFFF;
    --bg-foot: #1A2639;
    --bg-side: #F0F5FF;
    --ink: #1E2A41;
    --accent: #FF4D6D;
    --accent2: #00C9A7;
    --muted: #7A8A9E;
    --line: #D7E3F0;
    --line-hard: #B0C8DF;
    --shadow: #D0DCE8;
    --shadow-hard: #A9BCCE;
    --head-font: "Manrope", "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --body-font: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--body-font);
    font-size: 17px;
    line-height: 1.72;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    background-image:
        repeating-linear-gradient(60deg, #1E2A41 0 1px, transparent 1px 26px),
        repeating-linear-gradient(-60deg, #1E2A41 0 1px, transparent 1px 26px),
        repeating-linear-gradient(0deg, #1E2A41 0 1px, transparent 1px 45px);
}

.site-wrap { position: relative; z-index: 1; }

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

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

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

.entry-body a::after,
.crumbs a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    border-bottom: 2px dashed var(--accent2);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform .18s ease;
}

.entry-body a:hover::after,
.crumbs a:hover::after { transform: scaleY(1); }

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

h1 { font-size: 3.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: .4em; }

blockquote {
    margin: 1.8em 0;
    padding: 1.4rem 1.6rem;
    background: var(--bg-alt);
    border-left: 5px solid var(--accent);
    font-size: 1.06rem;
}

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

code, pre {
    font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
    font-size: .92em;
}

pre {
    background: #E8F0FE;
    border: 1px solid var(--line);
    padding: 1rem 1.1rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    border: 1px solid var(--line-hard);
}

th, td {
    border: 1px solid var(--line-hard);
    padding: .65rem .8rem;
    text-align: left;
}

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

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* =========================================================
   2. Кнопки
   ========================================================= */

.btn {
    display: inline-block;
    font-family: var(--head-font);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .03em;
    padding: .82rem 1.6rem;
    color: #fff;
    background: var(--accent);
    border: 0;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
    transition: transform .16s ease, filter .16s ease;
}

.btn:hover,
.btn:focus {
    color: #fff;
    transform: translateY(2px);
    filter: drop-shadow(3px 4px 0 rgba(0, 201, 167, .55));
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 2px var(--ink);
}

.btn-ghost:hover { color: var(--ink); }

input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
textarea {
    width: 100%;
    max-width: 100%;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0;
    padding: .7rem .85rem;
}

input:focus, textarea:focus { outline: 2px solid var(--accent2); outline-offset: 1px; }

/* =========================================================
   3. Диагностическая полоса
   ========================================================= */

.diag-strip {
    display: flex;
    width: 100%;
    height: 4px;
}

.diag-seg { flex: 1 1 auto; height: 4px; display: block; }
.diag-a { background: var(--accent); }
.diag-b { background: var(--accent2); }
.diag-g { background: #B0C8DF; }

/* =========================================================
   4. Шапка
   ========================================================= */

.site-head {
    background: var(--bg-head);
    border-bottom: 1px solid rgba(176, 200, 223, .55);
}

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

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

.brand-logo { width: 54px; height: 54px; flex: 0 0 auto; }

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

.brand-name {
    font-family: var(--head-font);
    font-weight: 700;
    font-size: 1.06rem;
    letter-spacing: .03em;
    color: var(--ink);
    line-height: 1.3;
    display: block;
}

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

.brand-desc {
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.45;
    margin-top: .25rem;
    display: block;
}

.main-nav[hidden] { display: none !important; }

.nav-toggle {
    display: none;
    align-items: center;
    gap: .5rem;
    font-family: var(--head-font);
    font-weight: 700;
    font-size: .9rem;
    background: transparent;
    color: var(--ink);
    border: 2px solid var(--ink);
    padding: .5rem .9rem;
    cursor: pointer;
}

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

.main-nav li { margin: 0; }

.main-nav a {
    font-family: var(--head-font);
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .03em;
    color: var(--ink);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

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

/* =========================================================
   5. Секции и заголовки
   ========================================================= */

.section {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.section-base { background: var(--bg); }
.section-alt { background: var(--bg-alt); }

.section-accent {
    background-image:
        repeating-linear-gradient(60deg, rgba(30, 42, 65, .08) 0 1px, transparent 1px 26px),
        repeating-linear-gradient(-60deg, rgba(30, 42, 65, .08) 0 1px, transparent 1px 26px),
        linear-gradient(160deg, #F4F7FC 0%, #DCE8F8 100%);
}

.section::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -30px;
    width: 320px;
    height: 320px;
    opacity: .03;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 320' fill='none' stroke='%231E2A41' stroke-width='5'%3E%3Cpath d='M40 0C40 40 160 60 160 100S40 160 40 200s120 60 120 100'/%3E%3Cpath d='M160 0c0 40-120 60-120 100s120 60 120 100-120 60-120 100'/%3E%3Cpath d='M52 40h96M40 80h120M40 120h120M52 160h96M52 200h96M40 240h120M40 280h120'/%3E%3C/svg%3E");
}

.section-head { margin-bottom: 2.8rem; }

.section-head::before {
    content: "";
    display: block;
    width: 100%;
    height: 4px;
    background: var(--accent);
    margin-bottom: 1.2rem;
}

.section-head.head-teal::before { background: var(--accent2); }

.section-title {
    display: flex;
    align-items: stretch;
    gap: .9rem;
    margin: 0;
    font-size: 2rem;
}

.section-title::before {
    content: "";
    flex: 0 0 11px;
    width: 11px;
    min-height: 2.2em;
    border: 1px solid var(--line-hard);
    background: linear-gradient(to top, var(--accent) 0 72%, transparent 72% 100%);
}

.section-head.head-teal .section-title::before {
    background: linear-gradient(to top, var(--accent2) 0 64%, transparent 64% 100%);
}

.section-title span { min-width: 0; }

.section-lead {
    max-width: 760px;
    margin: 1.1rem 0 0;
    color: var(--muted);
    font-size: 1.02rem;
}

.dot-divider {
    display: block;
    height: 3px;
    width: 100%;
    background-image: repeating-linear-gradient(90deg, var(--line-hard) 0 6px, transparent 6px 14px);
}

.divider-wrap { background: var(--bg); padding: 26px 0; }

/* =========================================================
   6. Hero
   ========================================================= */

.hero {
    position: relative;
    background: #12202F;
    overflow: hidden;
    padding: 0;
}

.hero-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-veil {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(105deg, rgba(11, 20, 32, .93) 0%, rgba(15, 28, 45, .80) 52%, rgba(20, 38, 60, .55) 100%);
}

.hero-inner {
    position: relative;
    padding: 120px 0 100px;
}

.hero-kicker {
    display: inline-block;
    font-family: var(--head-font);
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent2);
    border-top: 3px solid var(--accent2);
    padding-top: .5rem;
    margin-bottom: 1.4rem;
}

.hero h1 {
    color: #FFFFFF;
    max-width: 16ch;
    margin-bottom: 1.1rem;
}

.hero-sub {
    color: #C7D6E6;
    font-size: 1.14rem;
    max-width: 62ch;
    margin-bottom: 2.6rem;
}

.hero-plate {
    background: rgba(255, 77, 109, .93);
    color: #fff;
    max-width: 640px;
    padding: 1.6rem 1.8rem;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}

.hero-plate strong {
    display: block;
    font-family: var(--head-font);
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: .8rem;
    margin-bottom: .5rem;
}

.hero-plate p { margin: 0; font-size: 1rem; line-height: 1.6; }

/* =========================================================
   7. Таймлайн (блок 2)
   ========================================================= */

.tline {
    position: relative;
    margin: 0;
    padding: 0 0 0 46px;
    list-style: none;
}

.tline::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 8px;
    bottom: 8px;
    width: 0;
    border-left: 3px dashed var(--accent);
}

.tline-item {
    position: relative;
    margin: 0 0 1.8rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 4px 6px 0 var(--shadow);
    padding: 1.5rem 1.7rem;
    min-width: 0;
    transition: transform .16s ease, box-shadow .16s ease;
}

.tline-item:last-child { margin-bottom: 0; }

.tline-item:hover {
    transform: translateX(-6px);
    box-shadow: 8px 10px 0 var(--shadow-hard);
}

.tline-mark {
    position: absolute;
    left: -46px;
    top: 1.5rem;
    width: 36px;
    height: 36px;
    background: var(--bg);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tline-mark svg { width: 19px; height: 19px; stroke: var(--accent); fill: none; stroke-width: 2; }

.tline-step {
    font-family: var(--head-font);
    font-size: .74rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent2);
    display: block;
    margin-bottom: .35rem;
}

.tline-item h3 { margin-bottom: .5rem; font-size: 1.24rem; }
.tline-item p { margin: 0; color: #3A4A5F; }

/* =========================================================
   8. Статистика (блок 3)
   ========================================================= */

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: #FFFFFF;
    border: 1px solid var(--line);
    box-shadow: 4px 6px 0 var(--shadow);
    padding: 2.4rem 2rem;
}

.stat-cell {
    flex: 1 1 220px;
    min-width: 0;
    padding: .8rem 1.6rem;
    text-align: center;
    border-left: 2px solid var(--accent2);
}

.stat-cell:first-child { border-left: 0; }

.stat-num {
    display: block;
    font-family: var(--head-font);
    font-weight: 800;
    font-size: 3.3rem;
    line-height: 1.05;
    color: var(--accent);
    letter-spacing: .01em;
}

.stat-cap {
    display: block;
    margin-top: .6rem;
    color: var(--muted);
    font-size: .96rem;
}

/* =========================================================
   9. Карта тем (блок 4)
   ========================================================= */

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

.topic-tile {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
    padding: 1.5rem 1.5rem;
    background: var(--bg);
    border: 2px solid var(--line);
    color: var(--ink);
    font-family: var(--head-font);
    font-weight: 700;
    letter-spacing: .03em;
    box-shadow: none;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.topic-tile:nth-child(2n) {
    border-color: var(--accent2);
    color: var(--ink);
}

.topic-tile:nth-child(3n) {
    border-color: var(--line);
    color: #048E7A;
}

.topic-tile svg {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

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

.topic-note {
    margin: 1.6rem 0 0;
    color: var(--muted);
    font-size: .96rem;
}

/* =========================================================
   10. Карточки записей
   ========================================================= */

.cards { display: grid; gap: 1.8rem; }

.card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 4px 6px 0 var(--shadow);
    min-width: 0;
    transition: transform .16s ease, box-shadow .16s ease;
}

.card:hover {
    transform: translateX(-6px);
    box-shadow: 8px 10px 0 var(--shadow-hard);
}

.card-row {
    display: flex;
    flex: 1;
    min-width: 0;
}

.card-thumb-wrap {
    flex: 0 0 240px;
    position: relative;
    overflow: hidden;
    min-height: 250px;
    background: var(--bg-alt);
}

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

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

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

.card-meta {
    font-family: var(--head-font);
    font-size: .76rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent2);
    margin-bottom: .6rem;
}

.card-title { font-size: 1.35rem; margin: 0 0 .7rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); }

.card-excerpt { color: #3A4A5F; flex: 1; min-width: 0; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-more {
    align-self: flex-start;
    margin-top: 1.1rem;
    font-family: var(--head-font);
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    border-bottom: 2px solid transparent;
}

.card-more:hover { border-bottom-color: var(--accent2); }

.card-nothumb .card-body { padding: 1.8rem; }

/* =========================================================
   11. Раскладки
   ========================================================= */

.page-body { padding: 70px 0 100px; }

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

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 3.4rem;
    align-items: start;
}

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

.crumbs {
    font-size: .88rem;
    color: var(--muted);
    margin-bottom: 1.8rem;
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs-sep { color: var(--line-hard); margin: 0 .35rem; }

.entry-head { margin-bottom: 1.8rem; }
.entry-title { font-size: 2.5rem; margin-bottom: .6rem; }

.entry-meta {
    font-family: var(--head-font);
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent2);
}

.entry-thumb { margin-bottom: 1.8rem; border: 1px solid var(--line); }

.entry-body { font-size: 1.04rem; }
.entry-body img { margin: 1.4rem 0; }
.entry-body h2 { margin-top: 1.8em; font-size: 1.7rem; }
.entry-body h3 { margin-top: 1.6em; }

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

/* =========================================================
   12. Пагинация
   ========================================================= */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 3rem;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 44px;
    text-align: center;
    padding: .55rem .85rem;
    font-family: var(--head-font);
    font-weight: 700;
    font-size: .92rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 3px 4px 0 var(--shadow);
}

.pager .page-numbers:hover {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.pager .page-numbers.current {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}

.pager .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

/* =========================================================
   13. Сайдбар и виджеты
   ========================================================= */

.sidebar {
    background: var(--bg-side);
    border: 1px solid var(--line);
    padding: 1.8rem 1.6rem;
    min-width: 0;
}

.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }

.sidebar .widget-title {
    font-size: 1.06rem;
    color: var(--ink);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: .55rem;
    border-bottom: 3px solid var(--accent);
}

.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: #2C3A50; }

.sidebar .widget a { color: #16324B; }
.sidebar .widget a:hover { color: var(--accent); }

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

.sidebar .widget li {
    padding: .5rem 0 .5rem .95rem;
    border-bottom: 1px dashed var(--line);
    position: relative;
    font-size: .96rem;
}

.sidebar .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05em;
    width: 6px;
    height: 6px;
    background: var(--accent2);
}

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

.sidebar .post-date,
.sidebar .widget .rss-date { display: block; color: var(--muted); font-size: .82rem; }

.search-form { display: flex; gap: .5rem; }
.search-form .search-field { flex: 1; min-width: 0; }

/* =========================================================
   14. Подвал
   ========================================================= */

.site-foot {
    background: var(--bg-foot);
    color: #C9D6E4;
    padding: 70px 0 0;
    position: relative;
    z-index: 1;
}

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

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

.site-foot .widget-title {
    color: #FFFFFF;
    font-size: 1.02rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: .55rem;
    border-bottom: 3px solid var(--accent2);
}

.site-foot .widget,
.site-foot .widget p,
.site-foot .widget li { color: #C9D6E4; font-size: .95rem; }

.site-foot .widget a { color: #E6EEF6; }
.site-foot .widget a:hover { color: var(--accent); }

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

.site-foot .widget li {
    padding: .42rem 0 .42rem .95rem;
    position: relative;
    border-bottom: 1px solid rgba(201, 214, 228, .14);
}

.site-foot .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1em;
    width: 6px;
    height: 6px;
    background: var(--accent);
}

.foot-bottom {
    border-top: 1px solid rgba(201, 214, 228, .18);
    padding: 1.4rem 0 1.8rem;
    font-size: .88rem;
    color: #93A6BA;
}

/* =========================================================
   15. Cookie-баннер
   ========================================================= */

.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem;
    justify-content: space-between;
    background: #14202F;
    color: #DCE6F0;
    border-top: 4px solid var(--accent);
    padding: 1.1rem 1.6rem;
}

.cookie-banner p { margin: 0; font-size: .92rem; min-width: 0; }
.cookie-banner a { color: var(--accent2); }

/* =========================================================
   16. Комментарии
   ========================================================= */

.comments-area {
    margin-top: 3.4rem;
    padding-top: 2rem;
    border-top: 3px solid var(--accent);
}

.comments-title, .comment-reply-title { font-size: 1.5rem; }

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

.comment-item { margin-bottom: 1.2rem; }

.comment-inner {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 4px 6px 0 var(--shadow);
    padding: 1.2rem 1.4rem;
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    align-items: baseline;
    margin-bottom: .6rem;
}

.comment-author { font-family: var(--head-font); font-weight: 700; }
.comment-date { font-size: .82rem; color: var(--muted); }
.comment-actions a { font-size: .85rem; font-weight: 700; }

.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-size: .9rem; margin-bottom: .3rem; color: var(--muted); }
.comment-form .submit { display: inline-block; font-family: var(--head-font); font-weight: 700; letter-spacing: .03em; padding: .82rem 1.6rem; color: #fff; background: var(--accent); border: 0; cursor: pointer; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%); }
.comment-form .submit:hover { transform: translateY(2px); }

/* =========================================================
   17. 404 и поиск
   ========================================================= */

.err-box { text-align: left; }
.err-code {
    font-family: var(--head-font);
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    letter-spacing: .02em;
}

.err-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

.no-results {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 4px 6px 0 var(--shadow);
    padding: 1.8rem 1.9rem;
}

/* =========================================================
   18. Адаптив
   ========================================================= */

@media (max-width: 960px) {
    h1 { font-size: 2.6rem; }
    .section { padding: 80px 0; }
    .hero-inner { padding: 84px 0 72px; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.6rem; }
    .layout-single { width: 100%; }
    .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 2.1rem; }
    h2, .section-title { font-size: 1.55rem; }
    .entry-title { font-size: 1.85rem; }
    .section { padding: 62px 0; }
    .hero-inner { padding: 62px 0 56px; }
    .hero-plate { padding: 1.3rem 1.35rem; }
    .stats { padding: 1.6rem 1.3rem; }
    .stat-cell { flex: 1 1 100%; border-left: 0; border-top: 2px solid var(--accent2); padding: 1.1rem .6rem; }
    .stat-cell:first-child { border-top: 0; }
    .stat-num { font-size: 2.6rem; }
    .topics { grid-template-columns: minmax(0, 1fr); }
    .topic-tile { padding: 1.2rem 1.2rem; }
    .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .tline { padding-left: 34px; }
    .tline::before { left: 12px; }
    .tline-mark { left: -34px; width: 26px; height: 26px; top: 1.2rem; }
    .tline-mark svg { width: 14px; height: 14px; }
    .tline-item { padding: 1.2rem 1.2rem; }

    .nav-toggle { display: inline-flex; }
    .main-nav { flex: 1 1 100%; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .main-nav a { display: block; padding: .75rem 0; border-bottom: 0; }

    .card-row { flex-direction: column; }
    .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
        min-height: 0;
    }
    .card-thumb-wrap a { position: static; }
    .card-thumb-wrap img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
    .card-body { padding: 1.3rem 1.3rem; }
    .sidebar { padding: 1.4rem 1.2rem; }
    .cookie-banner { padding: 1rem 1.1rem; gap: .9rem; }
    .comment-list .children { margin-left: .8rem; }
}
