/*
Theme Name: dds_centrocenec.com
Theme URI: https://centrocenec.com
Author: Анна Соколова
Author URI: https://centrocenec.com
Description: NeuroHarmony — минималистичная, воздушная тема для информационного портала и сообщества взрослых с СДВГ. Фокус на читаемость, спокойную атмосферу и доступность.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: neuroharmony
*/

/* ================================================================== *
 * 1. Переменные и сброс
 * ================================================================== */
:root {
    --bg: #F9F7F3;
    --bg-soft: #E6EFE9;
    --accent: #C25A3C;
    --accent-dark: #A3442A;
    --accent-2: #E5B83C;
    --text: #2A2B2E;
    --text-soft: #5B6C5F;
    --footer-bg: #2F3A33;
    --footer-text: #DCE6DF;
    --footer-head: #FFFFFF;
    --border: #DED9CF;
    --radius: 8px;
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
    --font-head: "General Sans", "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
}

body.density-calm    { --line: 1.9;  --rhythm: 1.55rem; --block-pad: 3.4rem; }
body.density-standard{ --line: 1.7;  --rhythm: 1.2rem;  --block-pad: 2.6rem; }
body.density-contrast{ --line: 1.5;  --rhythm: 0.85rem; --block-pad: 1.9rem; }

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

html {
    scroll-behavior: smooth;
}

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

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

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

a:hover,
a:focus {
    text-decoration: underline;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    letter-spacing: 0.012em;
    line-height: 1.25;
    color: var(--text);
    margin: 0 0 var(--rhythm, 1rem);
}

h1 { font-size: 2.15rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.28rem; }

p {
    margin: 0 0 var(--rhythm, 1rem);
}

ul, ol {
    margin: 0 0 var(--rhythm, 1rem);
}

/* ================================================================== *
 * 2. Контейнер ширины — единственное место ограничения (A12.7)
 * ================================================================== */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -999px;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 999;
    background: var(--accent);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: var(--radius);
}

/* ================================================================== *
 * 3. Кнопки
 * ================================================================== */
.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.97rem;
    line-height: 1.2;
    padding: 0.72rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    text-align: center;
}

.btn:hover,
.btn:focus {
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--accent-dark);
    box-shadow: var(--shadow);
    color: #fff;
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--bg-soft);
    color: var(--text);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: rgba(230, 239, 233, 0.55);
    color: var(--text);
}

/* ================================================================== *
 * 4. Шапка
 * ================================================================== */
.site-header {
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.3rem 0;
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.4rem;
}

.header-inner > * {
    min-width: 0;
}

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

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

.brand-logo {
    display: block;
    width: auto;
    max-height: 56px;
}

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

.site-title {
    display: block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text);
    letter-spacing: 0.01em;
}

.site-title:hover {
    text-decoration: none;
    color: var(--accent);
}

.site-desc {
    margin: 0.3rem 0 0;
    font-size: 0.85rem;
    color: var(--text-soft);
    line-height: 1.45;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.tool-btn {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-soft);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tool-btn:hover {
    background-color: rgba(229, 184, 60, 0.35);
    color: var(--accent-dark);
}

body.focus-mode .focus-toggle {
    background-color: var(--accent);
    color: #fff;
}

.density-switch {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.density-btn {
    background: var(--bg-soft);
    border: none;
    border-right: 1px solid var(--border);
    color: var(--text-soft);
    font-family: var(--font-body);
    font-size: 0.78rem;
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.density-btn:last-child {
    border-right: none;
}

.density-btn.is-active {
    background-color: var(--accent);
    color: #fff;
}

/* ----- Навигация ----- */
.main-nav {
    flex: 1 1 100%;
    min-width: 0;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 0.9rem;
    cursor: pointer;
    font-family: var(--font-head);
    color: var(--text);
}

.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    margin: 3px 0;
}

.nav-toggle-label {
    margin-left: 0.2rem;
}

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

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    font-family: var(--font-head);
    color: var(--text);
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

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

.nav-menu .sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ================================================================== *
 * 5. Основной макет
 * ================================================================== */
.site-main {
    display: block;
    padding: 2.4rem 0 3.4rem;
}

.page-wrap {
    display: block;
}

.layout-single {
    display: block;
}

.layout-single .content-area {
    display: block;
}

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

.layout-with-sidebar > * {
    min-width: 0;
}

body.focus-mode .layout-with-sidebar {
    grid-template-columns: minmax(0, 1fr);
}

body.focus-mode .sidebar {
    display: none;
}

/* ================================================================== *
 * 6. Хлебные крошки
 * ================================================================== */
.breadcrumbs {
    font-size: 0.86rem;
    color: var(--text-soft);
    margin-bottom: 1.6rem;
}

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

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

.breadcrumbs .sep {
    margin: 0 0.4rem;
    color: var(--accent-2);
}

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.card-thumb-wrap {
    overflow: hidden;
}

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

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

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

.card-meta {
    font-size: 0.8rem;
    color: var(--text-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.9rem;
    margin-bottom: 0.5rem;
}

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

.card-title {
    font-size: 1.18rem;
    margin: 0 0 0.6rem;
}

.card-title a {
    color: var(--text);
}

.card-title a:hover {
    color: var(--accent);
    text-decoration: none;
}

.card-excerpt {
    flex: 1;
    color: var(--text-soft);
    font-size: 0.95rem;
}

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

.card-more {
    align-self: flex-start;
    margin-top: 0.9rem;
}

/* «Плавающие индексы» — спокойный сдвиг чётных карточек */
@media (min-width: 961px) {
    .posts-grid .card:nth-child(even) {
        margin-top: 2.6rem;
    }
}

/* ================================================================== *
 * 8. Главная страница
 * ================================================================== */
.front-page section {
    margin-bottom: var(--block-pad, 2.6rem);
}

.hero {
    background: var(--bg-soft);
    border-radius: calc(var(--radius) * 2);
    padding: 2.8rem 2.4rem;
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: var(--accent);
    margin-bottom: 0.7rem;
}

.hero-title {
    font-size: 2.3rem;
    max-width: 24ch;
}

.hero-text {
    color: var(--text-soft);
    font-size: 1.05rem;
    max-width: 60ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.4rem;
}

.block-title {
    position: relative;
    padding-bottom: 0.5rem;
}

.block-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    background: var(--accent-2);
    border-radius: 3px;
    margin-top: 0.5rem;
}

.block-lead {
    color: var(--text-soft);
    max-width: 65ch;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1.5rem;
    margin-top: 1.6rem;
}

.feature-item {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
}

.feature-icon {
    display: inline-block;
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.feature-item h3 {
    font-size: 1.15rem;
}

.feature-item p {
    color: var(--text-soft);
    font-size: 0.95rem;
    margin: 0;
}

/* ----- Карточка-инструмент ----- */
.tool-card {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.8rem 1.9rem;
    margin-top: 1.6rem;
}

.tool-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.tool-badge {
    background: var(--accent-2);
    color: var(--text);
    font-family: var(--font-head);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
}

.tool-card-head h3 {
    margin: 0;
}

.tool-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem;
}

.tool-checklist li {
    position: relative;
    padding: 0.45rem 0 0.45rem 1.9rem;
    border-bottom: 1px dashed var(--border);
    color: var(--text-soft);
}

.tool-checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0.45rem;
    color: var(--accent);
    font-weight: 700;
}

.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.7rem;
}

.step {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    color: var(--text-soft);
}

.step-num {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-soft);
    color: var(--accent-dark);
    border-radius: 50%;
    font-family: var(--font-head);
    font-size: 0.85rem;
}

/* ----- Слайдер цитат ----- */
.quote-slider {
    background: var(--bg-soft);
    border-radius: calc(var(--radius) * 2);
    padding: 2.2rem 2.2rem 1.6rem;
    margin-top: 1.6rem;
}

.quote-track {
    min-width: 0;
}

.quote-slide {
    display: none;
    margin: 0;
    font-size: 1.2rem;
    font-family: var(--font-head);
    color: var(--text);
    line-height: 1.5;
}

.quote-slide.is-active {
    display: block;
}

.slider-dots {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.2rem;
}

.slider-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: none;
    background: rgba(42, 43, 46, 0.2);
    cursor: pointer;
    padding: 0;
}

.slider-dot.is-active {
    background: var(--accent);
}

/* ----- Контакты ----- */
.contact-block {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem 1.9rem;
    margin-top: 1.6rem;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.contact-list a {
    font-family: var(--font-head);
}

/* ================================================================== *
 * 9. Записи и страницы
 * ================================================================== */
.archive-header,
.entry-header {
    margin-bottom: 1.6rem;
}

.archive-desc {
    color: var(--text-soft);
}

.entry-meta {
    font-size: 0.86rem;
    color: var(--text-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1rem;
}

.entry-thumb {
    margin-bottom: 1.6rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.entry-thumb img {
    display: block;
    width: 100%;
}

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

.entry-content img {
    height: auto;
    border-radius: var(--radius);
}

.entry-content h2,
.entry-content h3 {
    margin-top: 1.8rem;
}

.entry-content blockquote {
    background: var(--bg-soft);
    border-left: 4px solid var(--accent);
    margin: 1.4rem 0;
    padding: 1rem 1.3rem;
    border-radius: var(--radius);
}

.entry-content pre {
    background: var(--bg-soft);
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    min-width: 0;
}

.entry-content :where(code) {
    background: var(--bg-soft);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
}

.entry-tags {
    margin-top: 1.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-chip {
    background: var(--bg-soft);
    color: var(--text-soft);
    font-size: 0.82rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
}

.tag-chip:hover {
    background: var(--accent-2);
    color: var(--text);
    text-decoration: none;
}

.page-links {
    margin-top: 1.2rem;
    font-size: 0.9rem;
}

.empty-state {
    background: var(--bg-soft);
    border-radius: var(--radius);
    padding: 1.6rem;
    color: var(--text-soft);
}

/* ----- Таблицы ----- */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 0;
    border: 1px solid var(--border);
}

.entry-content th,
.entry-content td {
    border: 1px solid var(--border);
    padding: 0.6rem 0.8rem;
    text-align: left;
}

.entry-content th {
    background: var(--bg-soft);
    font-family: var(--font-head);
}

/* ================================================================== *
 * 10. Пагинация
 * ================================================================== */
.pagination {
    margin: 2rem 0 0;
}

.pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pagination a,
.pagination span {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-head);
    background: #fff;
}

.pagination a:hover {
    background: var(--bg-soft);
    text-decoration: none;
}

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

/* ================================================================== *
 * 11. Сайдбар и виджеты
 * ================================================================== */
.sidebar {
    background: var(--bg-soft);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
    min-width: 0;
}

.sidebar .widget {
    margin-bottom: 1.8rem;
    color: var(--text);
}

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

.sidebar .widget-title {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 0.9rem;
}

.sidebar .widget a {
    color: var(--accent);
}

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

.sidebar .widget li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

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

.sidebar .widget .post-date,
.sidebar .widget time {
    display: block;
    font-size: 0.78rem;
    color: var(--text-soft);
}

/* ================================================================== *
 * 12. Подвал
 * ================================================================== */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 1.6rem;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 2rem;
}

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

.footer-col .widget {
    color: var(--footer-text);
}

.footer-col .widget-title {
    color: var(--footer-head);
    font-size: 1.05rem;
    margin-bottom: 0.9rem;
}

.footer-col .widget,
.footer-col .widget p,
.footer-col .widget li {
    color: var(--footer-text);
}

.footer-col .widget a {
    color: var(--accent-2);
}

.footer-col .widget a:hover {
    color: #fff;
}

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

.footer-col .widget li {
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

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

.footer-col .widget time,
.footer-col .widget .post-date {
    display: block;
    font-size: 0.78rem;
    color: rgba(220, 230, 223, 0.7);
}

.footer-bottom {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.copyright {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(220, 230, 223, 0.85);
}

/* ================================================================== *
 * 13. Cookie-баннер (A11 — правило [hidden] до основных стилей)
 * ================================================================== */
.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.4rem;
    background: var(--text);
    color: #fff;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.15);
}

.cookie-text {
    margin: 0;
    flex: 1 1 280px;
    min-width: 0;
    font-size: 0.9rem;
    color: #fff;
}

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

/* ================================================================== *
 * 14. Комментарии
 * ================================================================== */
.comments-area {
    margin-top: 2.6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-size: 1.3rem;
}

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

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

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

.comment-inner {
    display: flex;
    gap: 0.9rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
}

.comment-avatar {
    flex: 0 0 auto;
}

.comment-avatar img {
    display: block;
    border-radius: 50%;
}

.comment-content {
    min-width: 0;
    flex: 1;
}

.comment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 0.8rem;
    margin-bottom: 0.4rem;
}

.comment-author {
    font-family: var(--font-head);
    font-weight: 600;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-soft);
}

.comment-moderation {
    font-size: 0.85rem;
    color: var(--accent-dark);
}

.comment-reply {
    margin-top: 0.4rem;
    font-size: 0.88rem;
}

.comments-closed {
    color: var(--text-soft);
}

/* ----- Формы поиска и комментариев ----- */
.comment-respond {
    background: var(--bg-soft);
    border-radius: var(--radius);
    padding: 1.6rem 1.7rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-field {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: #fff;
    color: var(--text);
}

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

.comment-form label {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.3rem;
    color: var(--text-soft);
}

.search-form {
    margin: 1.4rem 0;
}

.search-label {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
    color: var(--text-soft);
}

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

.search-row .search-field {
    flex: 1 1 200px;
    min-width: 0;
}

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

.search-field:focus,
.comment-form textarea:focus,
.comment-form input:focus {
    outline: 2px solid var(--accent-2);
    outline-offset: 1px;
}

/* ================================================================== *
 * 15. Страница 404
 * ================================================================== */
.error-404 {
    text-align: center;
    padding: 2rem 0;
}

.error-code {
    font-family: var(--font-head);
    font-size: 4.5rem;
    color: var(--accent);
    margin: 0;
    line-height: 1;
}

.error-404 .search-form {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 1.4rem;
}

/* ================================================================== *
 * 16. Адаптивность
 * ================================================================== */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        margin-top: 0.8rem;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: #fff;
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--border);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        padding: 0.75rem 1rem;
        border-bottom: none;
    }
}

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

    h1 { font-size: 1.8rem; }
    .hero-title { font-size: 1.7rem; }
    .error-code { font-size: 3.4rem; }

    .hero {
        padding: 2rem 1.4rem;
    }

    .header-tools {
        order: 3;
        width: 100%;
    }

    .density-switch {
        flex: 1;
    }

    .density-btn {
        flex: 1;
    }

    .comment-inner {
        flex-direction: column;
    }

    .tool-card,
    .contact-block,
    .quote-slider {
        padding: 1.4rem 1.3rem;
    }
}
