/*
Theme Name: dds_kia-k5-club.ru
Author: Алексей Соколов
Description: Тема для профессионального медицинского журнала: японский минимализм с акцентами медицинской визуализации, фиолетовая цветовая температура.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: kardviz
*/

/* =========================================================
   1. Переменные
   ========================================================= */

:root {
    --bg: #F8F6FA;
    --bg-alt: #F0ECF7;
    --bg-deep: #1A1625;
    --bg-plate: #2A2338;
    --surface: #FFFFFF;
    --ink: #1E1A2B;
    --accent: #6C3B8C;
    --accent-soft: #C9A5D8;
    --jade: #A2D5C6;
    --muted: #8E8A9A;
    --line: #D1C8E0;
    --sans: "Futura", "Century Gothic", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    --serif: Charter, "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
}

/* =========================================================
   2. Скрытые состояния (должны идти до основных стилей)
   ========================================================= */

.cookie-note[hidden] { display: none !important; }
.primary-nav[hidden] { display: none !important; }

/* =========================================================
   3. База
   ========================================================= */

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

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

body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image: repeating-linear-gradient(30deg, rgba(108, 59, 140, 0.06) 0, rgba(108, 59, 140, 0.06) 1px, transparent 1px, transparent 8px);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.72;
}

body::after {
    content: "";
    position: fixed;
    right: -60px;
    bottom: -80px;
    width: 460px;
    height: 420px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 360'%3E%3Cpath d='M200 20c46 0 62 26 74 62 14 42 46 58 46 106 0 62-44 112-120 112S80 250 80 188c0-48 32-64 46-106 12-36 28-62 74-62z' fill='%236C3B8C'/%3E%3Cpath d='M200 40v240M150 92c-18 40-18 100 0 148M250 92c18 40 18 100 0 148' stroke='%23C9A5D8' stroke-width='8' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    filter: blur(14px);
    opacity: 0.13;
    pointer-events: none;
    z-index: -1;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--sans);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.18;
    color: var(--ink);
    margin: 0 0 0.8rem;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 1.95rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.12rem; }

p { margin: 0 0 1.15rem; }

a { color: var(--accent); }

ul, ol { padding-left: 1.3rem; }

blockquote {
    margin: 2rem 0;
    padding: 1.4rem 1.6rem;
    background: var(--bg-alt);
    border: none;
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, var(--accent), var(--jade)) 1;
    font-size: 1.08rem;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    border: 1px solid var(--line);
    font-size: 0.96rem;
}

th, td {
    border: 1px solid var(--line);
    padding: 0.7rem 0.9rem;
    text-align: left;
}

th { background: var(--bg-alt); font-family: var(--sans); font-weight: 600; }

code, pre { font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.92em; }

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

figure { margin: 1.6rem 0; }

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

.site-main { display: block; padding-bottom: 4rem; }

/* =========================================================
   4. Кнопки и ссылки
   ========================================================= */

.btn {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.72rem 1.5rem;
    border-radius: 4px;
    border: 1.5px solid var(--accent);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn-solid {
    background: var(--accent);
    color: #FFFFFF;
}

.btn-solid:hover,
.btn-solid:focus {
    background: var(--surface);
    color: var(--accent);
    border-color: var(--jade);
    box-shadow: 0 0 0 3px rgba(162, 213, 198, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
}

.btn-ghost:hover,
.btn-ghost:focus {
    background: var(--accent);
    color: #FFFFFF;
    border-color: var(--jade);
    box-shadow: 0 0 0 3px rgba(162, 213, 198, 0.3);
}

.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.86rem; }

.entry-content a,
.card-excerpt a,
.widget a {
    font-style: italic;
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-soft);
    color: inherit;
}

.entry-content a:hover,
.card-excerpt a:hover,
.widget a:hover {
    border-bottom-style: solid;
    border-bottom-color: var(--accent);
    color: var(--accent);
}

.entry-content strong,
.term {
    font-variant: small-caps;
    font-size: 1.07em;
    letter-spacing: 0.03em;
    font-weight: 600;
}

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

.topbar {
    position: relative;
    background: rgba(248, 246, 250, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 1.4rem 0 0;
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex-wrap: wrap;
    padding-bottom: 1.2rem;
}

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

.brand-link { display: block; line-height: 0; flex: 0 0 auto; }

.brand-mark { width: 52px; height: 52px; display: block; }

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-name {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.3;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brand-tagline {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topbar-rule {
    height: 1px;
    background: linear-gradient(90deg, var(--accent) 0, var(--accent) 90px, var(--line) 90px, var(--line) 100%);
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1.5px solid var(--accent);
    border-radius: 4px;
    padding: 0.5rem 0.9rem;
    font-family: var(--sans);
    font-size: 0.88rem;
    color: var(--accent);
    cursor: pointer;
}

.nav-toggle-bar {
    width: 18px;
    height: 2px;
    background: var(--accent);
    position: relative;
    display: block;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: var(--accent);
}

.nav-toggle-bar::before { top: -5px; }
.nav-toggle-bar::after { top: 5px; }

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

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

.nav-list a {
    font-family: var(--sans);
    font-size: 0.95rem;
    color: var(--ink);
    text-decoration: none;
    padding-bottom: 3px;
    border-bottom: 1px solid transparent;
}

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

.nav-list .sub-menu {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* =========================================================
   6. Главная: hero
   ========================================================= */

.hero {
    position: relative;
    margin-bottom: 4rem;
    background: var(--bg-deep);
    overflow: hidden;
}

.hero-media {
    display: block;
    width: 100%;
    height: 520px;
    object-fit: cover;
    opacity: 0.72;
}

.hero-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(26, 22, 37, 0.92) 0%, rgba(26, 22, 37, 0.55) 60%, rgba(26, 22, 37, 0.3) 100%);
}

.hero-inner {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2.6rem;
    top: 2.6rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-kicker {
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--jade);
    margin: 0 0 0.9rem;
}

.hero-title {
    color: #FFFFFF;
    font-size: 2.6rem;
    margin: 0 0 1rem;
    max-width: 22ch;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-title::first-letter {
    font-size: 1.4em;
    color: var(--accent-soft);
}

.hero-sub {
    color: rgba(255, 255, 255, 0.82);
    max-width: 62ch;
    font-size: 1rem;
    margin: 0 0 1.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.hero-meta span { padding-right: 0.9rem; border-right: 1px solid rgba(201, 165, 216, 0.5); }
.hero-meta span:last-child { border-right: none; padding-right: 0; }

/* =========================================================
   7. Главная: секции
   ========================================================= */

.front-shell { width: min(85%, 1180px); }

.front-block { margin-bottom: 5rem; }

.section-title {
    border-left: 4px solid var(--accent);
    border-bottom: 1px solid var(--line);
    padding: 0 0 0.7rem 1rem;
    margin-bottom: 1.8rem;
}

.section-title-light { color: #FFFFFF; border-bottom-color: rgba(201, 165, 216, 0.4); }

.block-lead { color: var(--muted); max-width: 74ch; margin-bottom: 2.2rem; }

.ecg-divider { margin: 0 0 5rem; opacity: 0.85; }
.ecg-divider svg { display: block; }

.rubric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
}

.rubric-cell {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 1.8rem 1.8rem 1.6rem;
    min-width: 0;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.rubric-cell:hover { border-color: var(--accent); background: #FDFCFE; }

.rubric-cell svg { display: block; margin-bottom: 1rem; }

.rubric-name {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
}

.rubric-text { margin: 0; font-size: 0.98rem; color: #3A3348; }

.latest-more { margin-top: 2rem; }

.empty-note { color: var(--muted); }

/* Таймлайн */

.block-timeline { background: var(--bg-alt); padding: 2.8rem 2.4rem; }

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

.tline-item {
    display: flex;
    gap: 2rem;
    padding: 0 0 2rem 0;
    position: relative;
    min-width: 0;
}

.tline-item::before {
    content: "";
    position: absolute;
    left: 122px;
    top: 0.55rem;
    bottom: -0.5rem;
    border-left: 2px dashed var(--accent-soft);
}

.tline-item:last-child { padding-bottom: 0; }
.tline-item:last-child::before { display: none; }

.tline-when {
    flex: 0 0 110px;
    text-align: right;
    font-family: var(--sans);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: var(--muted);
}

.tline-day { font-size: 0.98rem; color: var(--accent); font-weight: 600; }
.tline-hour { font-size: 0.84rem; letter-spacing: 0.06em; }

.tline-what { flex: 1 1 auto; min-width: 0; position: relative; padding-left: 1.6rem; }

.tline-what::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 0.62rem;
    width: 11px;
    height: 11px;
    background: var(--accent);
    border-radius: 50%;
}

.tline-name { font-size: 1.14rem; margin-bottom: 0.4rem; }
.tline-what p { margin: 0; font-size: 0.98rem; }

/* Статистика */

.block-stats {
    background-color: var(--bg-plate);
    background-image: radial-gradient(circle at 50% 40%, rgba(162, 213, 198, 0.16) 0%, rgba(42, 35, 56, 0) 62%);
    padding: 2.8rem 2.4rem 2.4rem;
    color: #FFFFFF;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.8rem;
}

.stat-cell { min-width: 0; }

.stat-num {
    font-family: var(--sans);
    font-size: 3rem;
    line-height: 1;
    color: #FFFFFF;
    margin: 0 0 0.7rem;
}

.stat-frac { color: var(--jade); font-size: 0.62em; }

.stat-cap {
    margin: 0;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.72);
    padding-top: 0.7rem;
    border-top: 1px solid rgba(201, 165, 216, 0.35);
}

/* =========================================================
   8. Раскладки внутренних страниц
   ========================================================= */

.page-shell { padding-top: 2.2rem; }

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

.layout-single { display: block; }

.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

.page-title { font-size: 2.4rem; margin-bottom: 1.6rem; }

.archive-note { color: var(--muted); margin-bottom: 1.8rem; }

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

.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs-sep { color: var(--accent-soft); padding: 0 0.25rem; }

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

.card-stack { display: flex; flex-direction: column; gap: 1.6rem; }

.card {
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--line);
    overflow: hidden;
    transition: border-color 0.18s ease;
}

.card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -2px;
    bottom: 2px;
    background: #FCFAFE;
    z-index: 0;
}

.card:hover { border-color: var(--accent); }
.card:hover::before { background: #FFFFFF; }

.card-thumb-wrap {
    position: relative;
    z-index: 1;
    overflow: hidden;
    background: var(--bg-alt);
}

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

.card-thumb-wrap a { display: block; }

.card-body {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
    padding: 1.5rem 1.7rem 1.6rem;
    display: flex;
    flex-direction: column;
}

.card-title { font-size: 1.32rem; margin-bottom: 0.55rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent); }

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-family: var(--sans);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.9rem;
}

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

.card-excerpt { font-size: 0.98rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-more { margin: auto 0 0; padding-top: 1rem; }

/* =========================================================
   10. Запись и страница
   ========================================================= */

.entry { margin-bottom: 2.6rem; }

.entry-title { margin-bottom: 1rem; }

.entry-title::first-letter { font-size: 1.22em; color: var(--accent); }

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--sans);
    font-size: 0.83rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.8rem;
}

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

.entry-cover img { display: block; width: 100%; height: auto; }

.entry-content h2 {
    border-left: 4px solid var(--accent);
    padding-left: 0.9rem;
    margin-top: 2.4rem;
}

.entry-content h3 { margin-top: 1.9rem; }

.entry-content img { display: block; height: auto; }

.entry-content ul {
    list-style: none;
    padding-left: 1.5rem;
}

.entry-content ul li { position: relative; }

.entry-content ul li::before {
    content: "";
    position: absolute;
    left: -1.4rem;
    top: 0.62em;
    width: 11px;
    height: 11px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M5 0h2v5h5v2H7v5H5V7H0V5h5z' fill='%236C3B8C'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.entry-content ul li,
.entry-content ol li { margin-bottom: 0.5rem; }

.entry-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }

.entry-tags a {
    font-family: var(--sans);
    font-size: 0.82rem;
    padding: 0.32rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--accent);
    text-decoration: none;
}

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

.entry-nav {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.4rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-family: var(--sans);
    font-size: 0.92rem;
}

.entry-nav a { color: var(--accent); text-decoration: none; }
.entry-nav a:hover { text-decoration: underline; }

.lead-404 { max-width: 62ch; }
.back-home { margin-top: 1.8rem; }

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

.sidebar {
    min-width: 0;
    background: var(--surface);
    box-shadow: 0 2px 18px rgba(30, 26, 43, 0.07);
    padding: 1.6rem 1.5rem;
}

.sidebar .widget { margin-bottom: 2rem; color: var(--ink); }
.sidebar .widget:last-child { margin-bottom: 0; }

.sidebar .widget-title {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-left: 4px solid var(--accent);
    padding: 0 0 0.5rem 0.8rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    margin-bottom: 1rem;
}

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

.sidebar .widget li {
    padding: 0.55rem 0;
    border-bottom: 1px dotted var(--line);
    font-size: 0.96rem;
    color: var(--ink);
}

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

.sidebar .widget a { color: var(--ink); border-bottom-color: var(--accent-soft); }
.sidebar .widget a:hover { color: var(--accent); }

.sidebar .post-date { display: block; font-family: var(--sans); font-size: 0.78rem; color: var(--muted); }

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.6rem;
}

.pager .page-numbers {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.92rem;
    padding: 0.5rem 0.95rem;
    border: 1.5px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    text-decoration: none;
    background: var(--surface);
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.pager a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 3px rgba(162, 213, 198, 0.28);
}

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

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

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

.notes { margin-top: 3rem; }

.notes-title { font-size: 1.6rem; margin-bottom: 1.4rem; }

.notes-list, .notes-list .children { list-style: none; margin: 0; padding: 0; }
.notes-list .children { margin-left: 1.6rem; padding-left: 1.2rem; border-left: 1px solid var(--line); }

.note { margin-bottom: 1.4rem; }

.note-body { background: var(--surface); border: 1px solid var(--line); padding: 1.2rem 1.4rem; }

.note-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

.note-author { font-weight: 600; color: var(--accent); }
.note-date { color: var(--muted); }
.note-hold { color: var(--muted); font-size: 0.9rem; }
.note-text p:last-child { margin-bottom: 0; }
.note-actions { margin-top: 0.6rem; font-family: var(--sans); font-size: 0.86rem; }
.note-actions a { color: var(--accent); text-decoration: none; }

.notes-pager { display: flex; justify-content: space-between; gap: 1rem; margin: 1.4rem 0; font-family: var(--sans); }

.comment-respond { margin-top: 2.4rem; background: var(--bg-alt); padding: 1.8rem 1.7rem; }

.comment-reply-title { font-size: 1.3rem; }

.notes-hint { color: var(--muted); font-size: 0.9rem; }

.comment-form label {
    display: block;
    font-family: var(--sans);
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--ink);
}

.comment-form textarea:focus,
.comment-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(162, 213, 198, 0.3);
}

.comment-form p { margin-bottom: 1rem; }

.comment-form .submit {
    font-family: var(--sans);
    font-weight: 600;
    padding: 0.72rem 1.5rem;
    border-radius: 4px;
    border: 1.5px solid var(--accent);
    background: var(--accent);
    color: #FFFFFF;
    cursor: pointer;
}

.comment-form .submit:hover {
    background: var(--surface);
    color: var(--accent);
    border-color: var(--jade);
}

/* =========================================================
   14. Форма поиска
   ========================================================= */

.search-line { margin: 1.6rem 0; }

.search-label { display: block; }

.search-label-text {
    display: block;
    font-family: var(--sans);
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 0.45rem;
}

.search-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.search-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.66rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--ink);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(162, 213, 198, 0.3);
}

.search-submit { flex: 0 0 auto; }

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

.site-foot {
    background: var(--bg-deep);
    color: rgba(255, 255, 255, 0.78);
    margin-top: 4rem;
    padding-bottom: 2rem;
}

.cardio-rule { line-height: 0; background: var(--bg-deep); }
.cardio-rule svg { display: block; }

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

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

.site-foot .widget { color: rgba(255, 255, 255, 0.78); font-size: 0.96rem; }

.site-foot .widget-title {
    font-family: var(--sans);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #FFFFFF;
    border-left: 4px solid var(--jade);
    padding: 0 0 0.5rem 0.8rem;
    border-bottom: 1px solid rgba(201, 165, 216, 0.3);
    margin-bottom: 1rem;
}

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

.site-foot .widget li { padding: 0.42rem 0; border-bottom: 1px dotted rgba(201, 165, 216, 0.25); }
.site-foot .widget li:last-child { border-bottom: none; }

.site-foot .widget a {
    color: var(--accent-soft);
    font-style: normal;
    text-decoration: none;
    border-bottom: 1px dashed rgba(201, 165, 216, 0.45);
}

.site-foot .widget a:hover { color: #FFFFFF; border-bottom-style: solid; border-bottom-color: var(--jade); }

.site-foot .widget p { margin-bottom: 0.8rem; color: rgba(255, 255, 255, 0.72); }

.foot-bottom { padding-top: 2rem; margin-top: 2rem; border-top: 1px solid rgba(201, 165, 216, 0.22); }

.foot-copy {
    margin: 0;
    font-family: var(--sans);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

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

.cookie-note {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    background: var(--bg-plate);
    border-top: 2px solid var(--accent);
    padding: 1.1rem 1.6rem;
    color: rgba(255, 255, 255, 0.85);
}

.cookie-text { margin: 0; font-size: 0.92rem; max-width: 76ch; min-width: 0; }

.cookie-accept { flex: 0 0 auto; }

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

@media (min-width: 601px) {
    .card { flex-direction: row; align-items: stretch; }

    .card-thumb-wrap {
        flex: 0 0 280px;
        position: relative;
    }

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

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

@media (max-width: 960px) {
    h1 { font-size: 2.5rem; }

    .nav-toggle { display: inline-flex; }

    .primary-nav { flex: 1 1 100%; display: none; }
    .primary-nav.is-open { display: block; }

    .nav-list { flex-direction: column; gap: 0.85rem; padding: 0.8rem 0 0.3rem; }

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.6rem; }

    .layout-single .content-area { width: 100%; }

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

    .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }

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

    .hero-media { height: 460px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }

    h1 { font-size: 2.05rem; }
    h2 { font-size: 1.55rem; }

    .hero { margin-bottom: 3rem; }
    .hero-media { height: 520px; }
    .hero-inner { top: 1.8rem; bottom: 1.8rem; }
    .hero-title { font-size: 1.85rem; }

    .front-block { margin-bottom: 3.2rem; }
    .ecg-divider { margin-bottom: 3.2rem; }

    .rubric-grid { grid-template-columns: minmax(0, 1fr); }

    .rubric-cell { padding: 1.4rem 1.3rem; }

    .block-timeline { padding: 1.8rem 1.4rem; }

    .tline-item { flex-direction: column; gap: 0.5rem; }
    .tline-item::before { display: none; }
    .tline-when { flex: none; text-align: left; flex-direction: row; gap: 0.8rem; align-items: baseline; }
    .tline-what { padding-left: 1.1rem; border-left: 2px solid var(--accent-soft); }
    .tline-what::before { left: -6px; }

    .block-stats { padding: 1.8rem 1.4rem; }
    .stat-row { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .stat-num { font-size: 2.4rem; }

    .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }

    .card-thumb-wrap a { position: static; }

    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .card-body { padding: 1.2rem 1.2rem 1.3rem; }

    .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }

    .comment-respond { padding: 1.3rem 1.2rem; }

    .cookie-note { padding: 1rem 1.2rem; }

    .sidebar { padding: 1.3rem 1.2rem; }
}
