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

:root {
    --bg: #14181F;
    --bg-alt: #1B212B;
    --bg-head: #0F1319;
    --bg-foot: #0B0E13;
    --bg-side: #1A202A;
    --line: #2A3442;
    --text: #E8EDF4;
    --muted: #8A97A8;
    --blue: #4DB8FF;
    --amber: #F2A65A;
    --font-head: "Exo 2", "Segoe UI", "Roboto Condensed", Arial, sans-serif;
    --font-body: "PT Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image: repeating-linear-gradient(45deg, rgba(31, 38, 51, 0.3) 0, rgba(31, 38, 51, 0.3) 1px, transparent 1px, transparent 24px);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    position: relative;
}

body::after {
    content: "";
    position: fixed;
    right: -40px;
    bottom: -40px;
    width: 380px;
    height: 380px;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M150 18a34 34 0 0 0-42 44L28 142a16 16 0 0 0 23 23l80-80a34 34 0 0 0 44-42l-20 20-19-4-4-19z' fill='none' stroke='%234DB8FF' stroke-width='5' stroke-linejoin='round'/%3E%3Ccircle cx='40' cy='153' r='6' fill='none' stroke='%234DB8FF' stroke-width='4'/%3E%3C/svg%3E");
}

.flow-line, .masthead, .site-main, .site-foot { position: relative; z-index: 1; }

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

p { margin: 0 0 1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    margin: 1.6em 0 0.6em;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

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

.entry-content a,
.page-intro a,
.card-excerpt a,
.breadcrumbs a,
.widget a,
.comments a,
.entry-meta a,
.entry-tags a {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    padding-bottom: 3px;
    transition: background-size 0.25s ease;
}
.entry-content a:hover,
.page-intro a:hover,
.card-excerpt a:hover,
.breadcrumbs a:hover,
.widget a:hover,
.comments a:hover,
.entry-meta a:hover,
.entry-tags a:hover { background-size: 100% 1px; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; border: 1px solid var(--line); }
th, td { border: 1px solid var(--line); padding: 0.55em 0.8em; text-align: left; }
th { background: var(--bg-alt); font-family: var(--font-head); font-weight: 600; }

blockquote {
    margin: 1.4em 0;
    padding: 1.1em 1.4em;
    background: var(--bg-alt);
    border-left: 3px solid var(--blue);
    border-radius: 4px;
}
blockquote p:last-child { margin-bottom: 0; }

code, pre { font-family: Consolas, "DejaVu Sans Mono", monospace; font-size: 0.92em; }
pre { background: var(--bg-head); border: 1px solid var(--line); padding: 1em 1.2em; overflow-x: auto; border-radius: 4px; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

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

/* ---------- Контейнер ---------- */

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

/* ---------- Кнопки ---------- */

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
    padding: 0.8em 1.5em;
    border-radius: 4px;
    border: 2px solid var(--blue);
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-fill { background: var(--blue); color: var(--bg); }
.btn-fill:hover { background: var(--amber); border-color: var(--amber); color: var(--bg); }
.btn-line { background: transparent; color: var(--blue); }
.btn-line:hover { background: var(--blue); color: var(--bg); }
.btn-sm { font-size: 0.88rem; padding: 0.55em 1.1em; }

/* ---------- Шапка ---------- */

.flow-line { height: 3px; background: linear-gradient(90deg, var(--blue), var(--amber)); }

.masthead { background: var(--bg-head); border-bottom: 1px solid var(--line); }
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.9rem; color: var(--text); min-width: 0; flex: 1 1 420px; }
.brand-mark { flex: 0 0 auto; }
.brand-logo { width: auto; max-height: 56px; }
.brand-svg { display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.3;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-desc {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.35;
    margin-top: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.55rem 0.9rem;
    font-family: var(--font-head);
    font-size: 0.9rem;
    cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--blue);
    position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; }
.nav-list a {
    display: block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.nav-list a:hover,
.nav-list .current-menu-item > a { color: var(--blue); border-bottom-color: var(--blue); }

/* ---------- Главная: общие секции ---------- */

.front-section { padding: 5rem 0; }
.tone-base { background: transparent; }
.tone-alt { background: var(--bg-alt); }

.sec-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1.2rem;
}
.sec-title::before {
    content: "";
    flex: 0 0 40px;
    height: 3px;
    background: var(--blue);
}
.sec-lead { color: var(--muted); max-width: 62ch; margin: 0 0 2.4rem; }

.section-more { margin-top: 2.4rem; }
.empty-note { color: var(--muted); }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: center;
    background: var(--bg);
}
.hero-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 24, 31, 0.96) 0%, rgba(20, 24, 31, 0.84) 45%, rgba(20, 24, 31, 0.45) 100%);
    z-index: 1;
}
.hero-inner { position: relative; z-index: 2; padding: 5.5rem 0; }
.hero-title {
    font-size: 3.2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.08;
    max-width: 18ch;
    margin: 0 0 1.4rem;
}
.hero-lead { max-width: 56ch; color: #C9D2DD; font-size: 1.15rem; margin: 0 0 2rem; }
.hero-wrench {
    position: absolute;
    right: 3%;
    bottom: -20px;
    width: 220px;
    height: 220px;
    opacity: 0.18;
    z-index: 2;
    pointer-events: none;
}

/* ---------- Шаги ---------- */

.steps { list-style: none; margin: 0; padding: 0; max-width: 860px; }
.step {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.8rem 0;
    border-bottom: 1px dashed var(--line);
}
.step:first-child { padding-top: 0.4rem; }
.step:last-child { border-bottom: 0; }
.step-num {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 4rem;
    line-height: 0.9;
    color: var(--blue);
}
.step-warn .step-num { color: var(--amber); }
.step-text { min-width: 0; }
.step-text h3 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.step-text p { margin: 0; color: #C9D2DD; }

/* ---------- Факты ---------- */

.facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
}
.fact { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.fact-num {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 2.9rem;
    line-height: 1;
    color: var(--blue);
    white-space: nowrap;
}
.fact-label { color: var(--muted); font-size: 0.98rem; line-height: 1.45; }

/* ---------- Карта тем ---------- */

.topic-map {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}
.topic-tile {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    min-width: 0;
    padding: 1.6rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg-alt);
    color: var(--text);
    transition: border-color 0.2s ease;
}
.topic-tile:hover { border-color: var(--amber); }
.topic-ico {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    fill: none;
    stroke: var(--blue);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.topic-name { font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; line-height: 1.3; min-width: 0; }

/* ---------- Карточки ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}
.card-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-single .card-grid-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.tone-alt .card { background: var(--bg); }
.card:hover { border-color: var(--blue); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }

.card-thumb { display: block; background: var(--bg-head); }
.card-thumb img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.card-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: repeating-linear-gradient(45deg, #121620 0, #121620 10px, #151A23 10px, #151A23 20px);
}
.card-thumb-empty svg { display: block; }

.card-body { flex: 1; display: flex; flex-direction: column; padding: 1.3rem 1.4rem 1.5rem; min-width: 0; }
.card-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.84rem; color: var(--muted); margin-bottom: 0.6rem; }
.card-cat { color: var(--amber); }
.card-title { font-size: 1.18rem; margin: 0 0 0.7rem; position: relative; padding-left: 1rem; }
.card-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
}
.card-title a { color: var(--text); transition: color 0.2s ease; }
.card-title a:hover { color: var(--blue); }
.card-excerpt { color: #BFC8D4; font-size: 0.98rem; margin-bottom: 1.2rem; flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-body .btn { align-self: flex-start; }

/* ---------- Внутренние страницы ---------- */

.page-wrap { padding: 2rem 0 4.5rem; }

.breadcrumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 2rem; overflow-wrap: anywhere; }
.breadcrumbs .sep { color: var(--line); margin: 0 0.35rem; }
.breadcrumbs span:last-child { color: var(--text); }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    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-head { margin-bottom: 2.2rem; }
.page-title { font-size: 2.2rem; }
.page-intro { color: var(--muted); max-width: 64ch; }

.entry-head { margin-bottom: 1.6rem; }
.entry-title {
    font-size: 2.4rem;
    margin: 0 0 0.8rem;
    position: relative;
    padding-left: 1.4rem;
}
.entry-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 0 4px rgba(77, 184, 255, 0.15);
}
.entry-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; color: var(--muted); font-size: 0.9rem; }
.entry-thumb { margin: 0 0 2rem; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.entry-thumb img { width: 100%; }

.entry-content { overflow-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 1.65rem; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content li::marker { color: var(--blue); }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 0.5em; }
.entry-content iframe, .entry-content video { max-width: 100%; }

.entry-content .warn,
.entry-content .wp-block-group.is-style-warn {
    position: relative;
    background: rgba(242, 166, 90, 0.08);
    border: 1px solid rgba(242, 166, 90, 0.35);
    border-radius: 6px;
    padding: 1.1rem 1.4rem 1.1rem 2.4rem;
    margin: 1.6em 0;
}
.entry-content .warn::before,
.entry-content .wp-block-group.is-style-warn::before {
    content: "";
    position: absolute;
    left: 1.1rem;
    top: 1.55rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--amber);
}

.entry-tags { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: 0.92rem; }
.tags-label { color: var(--muted); margin-right: 0.4rem; }
.entry-tags a { margin-right: 0.8rem; }

.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2.8rem 0 0; }
.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg-alt);
    color: var(--text);
    font-family: var(--font-head);
    font-weight: 600;
    transition: border-color 0.2s ease;
}
.post-nav-link span { font-family: var(--font-body); font-weight: 400; font-size: 0.82rem; color: var(--muted); }
.post-nav-link:hover { border-color: var(--blue); }
.post-nav-next { grid-column: 2; text-align: right; }

.nf-block { text-align: left; }
.nf-code { font-family: var(--font-head); font-size: 6rem; line-height: 1; color: var(--blue); margin: 0 0 1rem; font-weight: 700; }
.nf-block .search-box { margin: 1.6rem 0; }
.empty-block .search-box { margin-top: 1rem; }

/* ---------- Поиск и формы ---------- */

.search-box { display: flex; gap: 0.6rem; max-width: 520px; }
.search-field,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    min-width: 0;
    background: var(--bg-head);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.7em 0.9em;
    font: inherit;
}
.search-field::placeholder { color: #66727F; }
.search-field:focus,
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--blue); outline: none; }

/* ---------- Пагинация ---------- */

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 2.8rem; }
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 0.85rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg-alt);
    color: var(--text);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.pager a.page-numbers:hover { border-color: var(--blue); color: var(--blue); }
.pager .page-numbers.current { background: var(--blue); border-color: var(--blue); color: var(--bg); }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding: 0 0.3rem; color: var(--muted); }
.pager .post-page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.4rem; height: 2.4rem; border: 1px solid var(--line); border-radius: 4px; color: var(--text);
}
.pager .post-page-numbers.current { background: var(--blue); color: var(--bg); border-color: var(--blue); }

/* ---------- Сайдбар ---------- */

.sidebar {
    min-width: 0;
    background: var(--bg-side);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.6rem 1.5rem;
    color: var(--text);
}
.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.sidebar .widget-title::before { content: ""; flex: 0 0 22px; height: 3px; background: var(--blue); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.7rem 0; border-bottom: 1px dashed var(--line); color: #C9D2DD; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: #D7DEE8; }
.sidebar a:hover { color: var(--blue); }
.sidebar .post-date { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.sidebar p, .sidebar .textwidget { color: #C9D2DD; }

/* ---------- Комментарии ---------- */

.comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.comments-title, .comment-reply-title { font-size: 1.4rem; margin: 0 0 1.2rem; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.6rem; margin: 0; border-left: 1px solid var(--line); }
.comment-body { padding: 1rem 1.2rem; margin-bottom: 1rem; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; }
.comment-author { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-head); font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 0.8rem; margin: 0.3rem 0 0.6rem; }
.comment-metadata a { color: var(--muted); }
.reply a { font-size: 0.88rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 0.3rem; }
.comment-form .comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-form .comment-form-cookies-consent label { display: inline; margin: 0; }
.comment-notes, .logged-in-as { font-size: 0.88rem; color: var(--muted); }

/* ---------- Подвал ---------- */

.site-foot { background: var(--bg-foot); border-top: 1px solid var(--line); color: #C3CCD8; margin-top: 0; }
.foot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.6rem;
    padding: 3.6rem 0 2.6rem;
}
.foot-col { min-width: 0; }
.site-foot .widget { margin-bottom: 1.6rem; color: #C3CCD8; }
.site-foot .widget-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #E8EDF4;
    margin: 0 0 1rem;
}
.site-foot .textwidget, .site-foot p { color: #AEB8C5; font-size: 0.95rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { padding: 0.35rem 0; }
.site-foot a { color: #D7DEE8; }
.site-foot a:hover { color: var(--blue); }
.site-foot .post-date { color: var(--muted); font-size: 0.8rem; }
.foot-bottom { border-top: 1px solid #1A212B; padding: 1.3rem 0 1.5rem; }
.foot-bottom p { margin: 0; font-size: 0.85rem; color: var(--muted); }

/* ---------- Cookie ---------- */

.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    width: min(92%, 760px);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 1.3rem;
    background: var(--bg-head);
    border: 1px solid var(--line);
    border-top: 3px solid var(--amber);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.cookie-text { margin: 0; font-size: 0.9rem; color: #C9D2DD; flex: 1; min-width: 0; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */

@media (max-width: 960px) {
    .hero-title { font-size: 2.5rem; }
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topic-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid, .layout-single .card-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 2.6rem; }
    .layout-single > .content-area { width: 100%; }
    .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .nav-toggle { display: inline-flex; }
    .primary-nav { display: none; width: 100%; }
    .primary-nav.is-open { display: block; }
    .nav-list { flex-direction: column; gap: 0; border-top: 1px solid var(--line); padding-top: 0.4rem; }
    .nav-list a { padding: 0.7rem 0; border-bottom: 1px solid #1A212B; }
    .brand { flex: 1 1 0; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .shell.shell-front { width: 92%; }
    .front-section { padding: 3.4rem 0; }
    .sec-title { font-size: 1.35rem; gap: 0.7rem; }
    .sec-title::before { flex-basis: 28px; }
    .hero { min-height: 480px; }
    .hero-inner { padding: 3.6rem 0; }
    .hero-title { font-size: 1.95rem; }
    .hero-lead { font-size: 1rem; }
    .hero-wrench { width: 140px; height: 140px; }
    .step { grid-template-columns: 56px minmax(0, 1fr); gap: 1rem; }
    .step-num { font-size: 2.8rem; }
    .facts { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .fact-num { font-size: 2.4rem; }
    .topic-map { grid-template-columns: minmax(0, 1fr); }
    .topic-tile { padding: 1.2rem 1.2rem; }
    .card-grid, .card-grid-list, .layout-single .card-grid-list { grid-template-columns: minmax(0, 1fr); }
    .brand-desc { display: none; }
    .entry-title { font-size: 1.7rem; }
    .page-title { font-size: 1.5rem; }
    .sidebar { padding: 1.3rem 1.2rem; }
    .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; padding: 2.6rem 0 1.6rem; }
    .post-nav { grid-template-columns: minmax(0, 1fr); }
    .post-nav-next { grid-column: auto; }
    .search-box { flex-direction: column; }
    .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem 1.1rem; }
    .entry-content .warn { padding: 1rem 1.1rem 1rem 2.2rem; }
    .nf-code { font-size: 4rem; }
}
