/*
Theme Name: csm-expert.ru
Theme URI: https://csm-expert.ru/
Author: Анна Смирнова
Author URI: https://csm-expert.ru/
Description: Информационно-экспертная тема для портала о влиянии цифровой среды на детей. Спокойный, воздушный дизайн на стыке доказательной медицины и психологической поддержки: тёплая молочная палитра, мягкие тени, акценты приглушённого сине-зелёного. Адаптивная вёрстка, собственные хлебные крошки, режим тихого чтения.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: csmexpert
*/

/* =========================================================================
   1. ПЕРЕМЕННЫЕ
   ====================================================================== */
:root {
    --bg: #F9F7F5;
    --card: #FFFFFF;
    --ink: #2C2A29;
    --ink-soft: #5E5A57;
    --accent: #3B7A6E;
    --accent-dark: #2C5D54;
    --terracotta: #D48C6B;
    --linen: #E8DFD4;
    --code-bg: #E0A96D;
    --footer-bg: #243B37;
    --footer-ink: #E6EFEC;
    --footer-soft: #A9C2BB;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-lift: 0 10px 26px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --radius-btn: 24px;
    --shell: min(92%, 1180px);
    --font-head: 'Raleway', 'Trebuchet MS', sans-serif;
    --font-body: 'Lora', Georgia, serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
}

/* =========================================================================
   2. СБРОС / БАЗА
   ====================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 0.6em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

code, kbd, .term {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--code-bg);
    color: #3a2a14;
    padding: 0.1em 0.4em;
    border-radius: 5px;
}
pre {
    font-family: var(--font-mono);
    background: #2C2A29;
    color: #F4ECE2;
    padding: 1em 1.2em;
    border-radius: 12px;
    overflow-x: auto;
    min-width: 0;
}
pre code { background: none; color: inherit; padding: 0; }

blockquote {
    margin: 1.4em 0;
    padding: 1em 1.4em;
    background: var(--linen);
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
    color: var(--ink);
    font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid #D9D2C8;
}
th, td {
    border: 1px solid #D9D2C8;
    padding: 0.6em 0.9em;
    text-align: left;
}
th { background: var(--linen); font-family: var(--font-head); }

/* =========================================================================
   3. КОНТЕЙНЕР
   ====================================================================== */
.shell {
    width: var(--shell);
    margin-inline: auto;
}

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

/* =========================================================================
   4. КНОПКИ
   ====================================================================== */
.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.98rem;
    padding: 12px 28px;
    border-radius: var(--radius-btn);
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.btn:hover {
    background: var(--accent-dark);
    color: #fff;
    box-shadow: 0 8px 18px rgba(43, 93, 84, 0.25);
}
.btn-link {
    display: inline-block;
    background: none;
    color: var(--accent);
    font-family: var(--font-head);
    font-weight: 600;
    border: none;
    border-bottom: 1px dashed transparent;
    padding: 0;
    cursor: pointer;
}
.btn-link:hover {
    color: var(--accent-dark);
    border-bottom-color: var(--accent-dark);
}

/* =========================================================================
   5. ШАПКА
   ====================================================================== */
.site-header {
    background: var(--card);
    border-bottom: 1px solid #ECE6DD;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1;
}
.brand-logo,
.brand-logo-svg {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 14px;
    display: block;
}
.brand-text { min-width: 0; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    line-height: 1.3;
    display: block;
}
.brand-name a { color: inherit; }
.brand-desc {
    font-size: 0.82rem;
    color: var(--ink-soft);
    line-height: 1.4;
    margin-top: 2px;
}
.header-tools {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Переключатель тихого чтения */
.quiet-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--linen);
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: background 0.2s ease;
}
.quiet-toggle:hover { background: #DDD2C2; }

/* Навигация */
.nav-toggle {
    display: none;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 9px 12px;
    cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
    content: '';
    position: absolute;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.main-nav { background: var(--bg); border-bottom: 1px solid #ECE6DD; }
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.main-nav li { margin: 0; }
.main-nav a {
    display: block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
    padding: 0.85rem 1rem;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--accent);
}

/* =========================================================================
   6. КАРКАС СТРАНИЦ
   ====================================================================== */
.site-main { padding: 2.4rem 0 3rem; }

.layout-single .content-area {
    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: 2.4rem;
    align-items: start;
}
.layout-with-sidebar .content-area { min-width: 0; }

/* Главная — фиксированная ширина 85% без grid */
.front-area {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================================================
   7. ХЛЕБНЫЕ КРОШКИ
   ====================================================================== */
.breadcrumbs {
    font-family: var(--font-head);
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 1.6rem;
    line-height: 1.6;
}
.breadcrumbs a { color: var(--accent); }
.breadcrumbs .sep { margin: 0 0.15rem; }
.breadcrumbs span:last-child { color: var(--ink-soft); }

/* =========================================================================
   8. КАРТОЧКИ ЗАПИСЕЙ
   ====================================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    min-width: 0;
}
.card:hover {
    box-shadow: var(--shadow-lift);
    transform: translateY(-3px);
}
.card-thumb {
    display: block;
    width: 100%;
}
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #E8DFD4, #D8E4E0);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.3rem 1.4rem;
    min-width: 0;
}
.card-type {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    align-self: flex-start;
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    background: #EAF1EF;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    margin-bottom: 0.7rem;
}
.card-title {
    font-size: 1.18rem;
    margin: 0 0 0.5rem;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); }
.card-meta {
    font-family: var(--font-head);
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-bottom: 0.6rem;
}
.card-excerpt {
    color: var(--ink-soft);
    font-size: 0.95rem;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-more {
    margin-top: auto;
    padding-top: 0.8rem;
}

/* =========================================================================
   9. ОДИНОЧНАЯ ЗАПИСЬ / СТРАНИЦА
   ====================================================================== */
.entry {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem 2.2rem 2.4rem;
    min-width: 0;
}
.entry-header { margin-bottom: 1.4rem; }
.entry-title { font-size: 2rem; }
.entry-meta {
    font-family: var(--font-head);
    font-size: 0.85rem;
    color: var(--ink-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
}
.entry-thumb {
    margin: 0 0 1.6rem;
    border-radius: 12px;
    overflow: hidden;
}
.entry-thumb img { display: block; width: 100%; }
.entry-content { font-size: 1.04rem; }
.entry-content img { border-radius: 10px; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }

.entry-tags {
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid #ECE6DD;
    font-family: var(--font-head);
    font-size: 0.85rem;
}
.entry-tags a {
    display: inline-block;
    background: var(--linen);
    color: var(--ink);
    padding: 0.25rem 0.7rem;
    border-radius: 14px;
    margin: 0.2rem 0.3rem 0.2rem 0;
}
.entry-tags a:hover { background: var(--accent); color: #fff; }

/* Авторский блок Анны Смирновой */
.author-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: var(--linen);
    border-radius: var(--radius);
    padding: 1.4rem 1.6rem;
    margin: 2rem 0;
    min-width: 0;
}
.author-photo {
    position: relative;
    flex: 0 0 84px;
    width: 84px;
    height: 84px;
}
.author-photo .author-ava {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    filter: sepia(0.45);
    display: block;
}
.author-photo .author-ava-fallback {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #C9B79E, #9C8466);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}
.author-badge {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-style: italic;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid var(--linen);
}
.author-info { min-width: 0; }
.author-name { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.author-role { font-size: 0.88rem; color: var(--ink-soft); }
.author-count { font-size: 0.82rem; color: var(--accent); font-family: var(--font-head); }

/* Цитата дня для статей о вреде гаджетов */
.entry-content .digit-of-day {
    float: left;
    width: 150px;
    margin: 0.2rem 1.4rem 1rem 0;
    padding: 1rem;
    background: #FBEFE8;
    border-radius: 12px;
    color: var(--terracotta);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.2;
    text-align: center;
}

/* =========================================================================
   10. КОММЕНТАРИИ
   ====================================================================== */
.comments-area {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.8rem 2.2rem 2rem;
    margin-top: 1.8rem;
    min-width: 0;
}
.comments-title { font-size: 1.3rem; }
.comment-list {
    list-style: none;
    margin: 0 0 1.6rem;
    padding: 0;
}
.comment-list ul.children {
    list-style: none;
    margin: 1rem 0 0;
    padding-left: 1.4rem;
    border-left: 2px solid #ECE6DD;
}
.comment-item { margin-bottom: 1.2rem; }
.comment-body {
    background: var(--bg);
    border-radius: 12px;
    padding: 1rem 1.2rem;
}
.comment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.8rem;
    align-items: baseline;
    margin-bottom: 0.4rem;
}
.comment-author { font-family: var(--font-head); font-weight: 600; }
.comment-date { font-size: 0.8rem; color: var(--ink-soft); }
.comment-awaiting { font-size: 0.85rem; color: var(--terracotta); }
.comment-text { font-size: 0.96rem; }
.comment-actions { font-family: var(--font-head); font-size: 0.85rem; }

.comment-respond {
    background: var(--bg);
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.96rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid #D9D2C8;
    border-radius: 10px;
    background: #fff;
    margin-bottom: 0.4rem;
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form label { font-family: var(--font-head); font-size: 0.88rem; }

/* =========================================================================
   11. ПАГИНАЦИЯ
   ====================================================================== */
.pagination { margin-top: 2rem; }
.pagination ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.pagination a,
.pagination span {
    display: block;
    font-family: var(--font-head);
    font-size: 0.92rem;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    background: var(--card);
    color: var(--ink);
    box-shadow: var(--shadow);
}
.pagination a:hover { background: var(--accent); color: #fff; }
.pagination .current {
    background: var(--accent);
    color: #fff;
}
.pagination .dots { background: none; box-shadow: none; }

/* =========================================================================
   12. САЙДБАР И ВИДЖЕТЫ
   ====================================================================== */
.sidebar { min-width: 0; }

.widget {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.4rem;
    color: var(--ink);
}
.widget-title {
    font-size: 1.05rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--linen);
    color: var(--ink);
}
.widget a { color: var(--accent); }
.widget a:hover { color: var(--accent-dark); }
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #F0EBE3;
    color: var(--ink);
}
.widget li:last-child { border-bottom: none; }
.widget .post-date {
    display: block;
    font-family: var(--font-head);
    font-size: 0.76rem;
    color: var(--ink-soft);
}

/* Индекс цифрового спокойствия */
.calm-index {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.4rem;
    border-left: 5px solid var(--accent);
}
.calm-index-eyebrow {
    font-family: var(--font-head);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
}
.calm-index-level {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--accent);
}
.calm-index-note { font-size: 0.86rem; color: var(--ink-soft); }
.calm-index.calm-mid { border-left-color: var(--code-bg); }
.calm-index.calm-mid .calm-index-level { color: #B07D2E; }
.calm-index.calm-high { border-left-color: var(--terracotta); }
.calm-index.calm-high .calm-index-level { color: var(--terracotta); }

/* =========================================================================
   13. ПОДВАЛ
   ====================================================================== */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 2.8rem 0 1.4rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.site-footer .widget {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
    color: var(--footer-ink);
}
.site-footer .widget-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.18);
}
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li {
    color: var(--footer-ink);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
.site-footer .widget a { color: #fff; }
.site-footer .widget a:hover { color: var(--terracotta); }
.site-footer .widget .post-date { color: var(--footer-soft); }
.site-copyright {
    margin-top: 2.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-family: var(--font-head);
    font-size: 0.83rem;
    color: var(--footer-soft);
    text-align: center;
}

/* =========================================================================
   14. ГЛАВНАЯ СТРАНИЦА
   ====================================================================== */
.home-section { margin-bottom: 3rem; }
.section-head { margin-bottom: 1.4rem; }
.section-eyebrow {
    font-family: var(--font-head);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--accent);
}
.section-title { font-size: 1.7rem; margin: 0.2rem 0 0.3rem; }
.section-lead { color: var(--ink-soft); }

.hero {
    background: linear-gradient(135deg, #EAF1EF 0%, #F4ECE2 100%);
    border-radius: var(--radius);
    padding: 2.6rem 2.4rem;
    box-shadow: var(--shadow);
}
.hero h1 { font-size: 2.2rem; max-width: 22ch; }
.hero p { color: var(--ink-soft); max-width: 60ch; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 1.4rem;
}
.feature {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem 1.5rem 1.6rem;
    min-width: 0;
}
.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #EAF1EF;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}
.feature h3 { font-size: 1.15rem; }
.feature p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.4rem;
    counter-reset: step;
}
.step {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    margin-bottom: 0.7rem;
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--ink-soft); font-size: 0.94rem; margin: 0; }

.topics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
    gap: 0.8rem;
}
.topic-chip {
    display: block;
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 0.85rem 1.1rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
    border-left: 4px solid var(--accent);
}
.topic-chip:hover { color: var(--accent); }

.cta-band {
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    padding: 2.2rem 2.4rem;
    text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #DCEAE6; max-width: 56ch; margin-inline: auto; }
.cta-band .contact-row { margin-top: 1rem; }
.cta-band .contact-row a {
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    margin: 0 0.6rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.6);
}

/* =========================================================================
   15. ФОРМА ПОИСКА
   ====================================================================== */
.search-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    font-family: var(--font-body);
    font-size: 0.96rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid #D9D2C8;
    border-radius: var(--radius-btn);
    background: #fff;
}
.search-form .search-submit {
    font-family: var(--font-head);
    font-weight: 600;
    border: none;
    background: var(--accent);
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-btn);
    cursor: pointer;
}
.search-form .search-submit:hover { background: var(--accent-dark); }

/* =========================================================================
   16. 404
   ====================================================================== */
.error-404 {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.6rem 2.4rem;
    text-align: center;
    min-width: 0;
}
.error-404 .code-big {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 4rem;
    color: var(--terracotta);
    line-height: 1;
}
.error-404 .search-form { max-width: 420px; margin: 1.4rem auto 0; }

/* =========================================================================
   17. COOKIE-БАННЕР  (правило A11 — до основного блока)
   ====================================================================== */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    background: var(--ink);
    color: #F4ECE2;
    padding: 1rem 0;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.18);
}
.cookie-banner .shell {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.cookie-text {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
}
.cookie-text a { color: var(--code-bg); }

/* =========================================================================
   18. ПЛАВАЮЩАЯ ПАНЕЛЬ «ЧТО ДЕЛАТЬ ПРЯМО СЕЙЧАС»
   ====================================================================== */
.quick-tools[hidden] { display: none !important; }

.quick-tools {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 8000;
    width: 240px;
    max-width: calc(100% - 2rem);
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
    overflow: hidden;
}
.quick-tools-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--accent);
    color: #fff;
    border: none;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.86rem;
    padding: 0.7rem 0.9rem;
    cursor: pointer;
}
.quick-tools-body {
    display: flex;
    flex-direction: column;
    padding: 0.6rem;
    gap: 0.4rem;
}
.quick-tools.collapsed .quick-tools-body { display: none; }
.quick-tool {
    display: block;
    text-align: left;
    background: var(--bg);
    color: var(--ink);
    border: none;
    border-radius: 10px;
    font-family: var(--font-head);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.6rem 0.7rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.quick-tool:hover { background: var(--linen); color: var(--accent-dark); }

/* =========================================================================
   19. МОДАЛЬНОЕ ОКНО «ДЫХАТЕЛЬНАЯ ПАУЗА»
   ====================================================================== */
.modal[hidden] { display: none !important; }

.modal {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(36, 42, 41, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.modal-box {
    position: relative;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
    padding: 2rem 2.2rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
}
.modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: var(--shadow);
    color: var(--ink-soft);
    font-size: 1.1rem;
    cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
.breath-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 1.2rem auto;
    background: radial-gradient(circle at 40% 35%, #6FB3A5, var(--accent));
    animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
    0%, 100% { transform: scale(0.7); }
    50% { transform: scale(1); }
}

/* =========================================================================
   20. РЕЖИМ ТИХОГО ЧТЕНИЯ
   ====================================================================== */
body.quiet-reading {
    background: #ECEAE7;
}
body.quiet-reading .layout-with-sidebar {
    display: block;
}
body.quiet-reading .sidebar,
body.quiet-reading .main-nav,
body.quiet-reading .quick-tools {
    display: none;
}
body.quiet-reading .layout-with-sidebar .content-area,
body.quiet-reading .layout-single .content-area {
    width: auto;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
body.quiet-reading .entry { font-size: 1.12rem; }
body.quiet-reading .entry-content { font-size: 1.16rem; line-height: 1.85; }

/* =========================================================================
   21. АДАПТИВ
   ====================================================================== */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
    }
    .footer-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .layout-single .content-area,
    .front-area {
        width: 100%;
    }
}

@media (max-width: 600px) {
    body { font-size: 17px; }
    h1 { font-size: 1.7rem; }
    .entry-title { font-size: 1.55rem; }
    .hero { padding: 1.8rem 1.4rem; }
    .entry, .comments-area, .error-404 { padding: 1.4rem 1.3rem; }

    .header-inner { gap: 1rem; }
    .header-tools { width: 100%; justify-content: space-between; }

    .nav-toggle { display: block; }
    .main-nav ul {
        display: none;
        flex-direction: column;
    }
    .main-nav ul.is-open { display: flex; }
    .main-nav a { padding: 0.7rem 0; }

    .footer-cols {
        grid-template-columns: 1fr;
    }
    .entry-content .digit-of-day {
        float: none;
        width: auto;
        margin: 1rem 0;
    }
    .author-card { flex-direction: column; text-align: center; }
}
