/*
Theme Name: dds_mipak.rf
Theme URI: https://xn--80adjkc.xn--p1ai/
Author: Владимир Синицын
Author URI: https://xn--80adjkc.xn--p1ai/
Description: Тема для информационного сайта об упаковочных материалах и производстве. Цифровой минимализм с индустриальным характером: холодный фиолетово-серый фон и медный акцент.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.6
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: mipak
*/

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

:root {
    --bg: #F4F2F7;
    --bg-alt: #EAE6F0;
    --dark: #1C1826;
    --text: #2A2434;
    --accent: #C68F47;
    --accent-dark: #A87A34;
    --accent-2: #766C87;
    --muted: #9A91A8;
    --line: #D6D0DF;
    --light-on-dark: #E4E0EC;

    --font-head: "Montserrat", "Jost", "Futura", "Century Gothic", "Trebuchet MS", system-ui, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Arial, "Helvetica Neue", sans-serif;

    --radius-card: 8px;
    --radius-btn: 4px;
}

/* =========================================================
   2. Скрытые состояния (до основных блоков — см. приоритет)
   ========================================================= */

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

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

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

html { scroll-behavior: smooth; }

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

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");
}

.site-top,
.site-main,
.site-bottom { position: relative; z-index: 1; }

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

figure { margin: 0 0 1.5rem; }

a {
    color: var(--accent);
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .22s ease, color .18s ease;
}

a:hover,
a:focus-visible { background-size: 100% 1px; color: var(--accent-dark); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

/* =========================================================
   4. Типографика
   ========================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text);
    line-height: 1.18;
    letter-spacing: -0.01em;
    margin: 0 0 .9rem;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .75), 0 -1px 0 rgba(28, 24, 38, .05);
}

h1 { font-size: clamp(2rem, 4.6vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 1.9vw, 1.45rem); font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }
h5, h6 { font-size: 1.02rem; font-weight: 600; }

h2::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: .82em;
    margin-right: .62rem;
    background: var(--accent);
    vertical-align: -0.06em;
}

.card-title::before,
.comments-title::before,
.widget-title::before { content: none; }

p { margin: 0 0 1.15rem; }

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

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

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

code, pre, kbd {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: .93em;
}

pre {
    padding: 1rem 1.2rem;
    background: var(--dark);
    color: var(--light-on-dark);
    border-radius: var(--radius-card);
    overflow-x: auto;
}

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

.section-title,
.page-title { position: relative; }

.section-title::after,
.page-title::after {
    content: "";
    display: block;
    width: 40%;
    height: 2px;
    margin-top: .75rem;
    background: var(--accent);
}

.section-lead,
.page-lead {
    max-width: 62ch;
    color: var(--accent-2);
    font-size: 1.03rem;
    margin-bottom: 2rem;
}

/* =========================================================
   5. Раскладка
   ========================================================= */

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

.site-main { display: block; }

.page-shell { padding: 2rem 0 3.5rem; }

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

.layout-with-sidebar { display: block; }

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

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

.btn {
    display: inline-block;
    padding: .72rem 1.5rem;
    border-radius: var(--radius-btn);
    font-family: var(--font-head);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.3;
    cursor: pointer;
    background-image: none;
    transition: background-color .18s ease, color .18s ease, transform .18s ease, border-color .18s ease;
}

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

.btn-solid:hover,
.btn-solid:focus-visible {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #FFFFFF;
    transform: translateY(-2px);
    background-size: 0 1px;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background-color: var(--accent);
    color: #FFFFFF;
    transform: translateY(-2px);
    background-size: 0 1px;
}

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

.site-top {
    background-color: var(--dark);
    border-bottom: 3px solid var(--accent);
}

.site-top-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
    flex: 1 1 auto;
}

.brand-link { display: block; flex: 0 0 auto; background-image: none; }

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

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

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

.brand-name {
    font-family: var(--font-head);
    font-size: .96rem;
    font-weight: 700;
    line-height: 1.25;
    color: #FFFFFF;
    letter-spacing: -0.01em;
}

.brand-tagline {
    font-size: .78rem;
    line-height: 1.4;
    color: var(--muted);
    margin-top: .28rem;
    display: none;
}

.nav-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .9rem;
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: var(--radius-btn);
    color: var(--accent);
    font-family: var(--font-head);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}

.nav-toggle-bar {
    position: relative;
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
    content: "";
    position: absolute;
    left: 0;
    width: 16px;
    height: 2px;
    background: currentColor;
}

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

.site-nav {
    flex: 1 1 100%;
    display: none;
}

.site-nav.is-open { display: block; }

.nav-list {
    list-style: none;
    margin: .6rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.nav-list li { min-width: 0; }

.nav-list a {
    display: block;
    padding: .58rem .2rem;
    font-family: var(--font-head);
    font-size: .95rem;
    font-weight: 500;
    color: var(--light-on-dark);
    border-bottom: 1px solid rgba(214, 208, 223, .14);
}

.nav-list a:hover,
.nav-list a:focus-visible { color: var(--accent); }

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

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

/* =========================================================
   8. Хлебные крошки
   ========================================================= */

.breadcrumbs {
    font-size: .86rem;
    color: var(--accent-2);
    margin-bottom: 1.6rem;
    line-height: 1.6;
}

.breadcrumbs a { color: var(--accent-2); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--muted); margin: 0 .35rem; }

/* =========================================================
   9. Секции главной
   ========================================================= */

.front-section {
    position: relative;
    overflow: hidden;
    padding: 3.2rem 0;
}

.fs-rubrics,
.fs-stats { background-color: var(--bg); }

.fs-latest,
.fs-checklist {
    background-color: var(--bg-alt);
    background-image:
        repeating-linear-gradient(0deg, rgba(118, 108, 135, .06) 0 1px, transparent 1px 44px),
        repeating-linear-gradient(90deg, rgba(118, 108, 135, .06) 0 1px, transparent 1px 62px);
}

/* Hero */

.fs-hero {
    background-color: var(--dark);
    padding: 3.6rem 0 3.4rem;
}

.hero-decor {
    position: absolute;
    right: -60px;
    bottom: -50px;
    width: 300px;
    height: auto;
    opacity: .22;
    pointer-events: none;
    display: none;
}

.hero-inner { padding: 0; }

.hero-kicker {
    font-family: var(--font-head);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.hero-title {
    color: #FFFFFF;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .45);
    margin-bottom: 1.1rem;
}

.hero-title::after { background: var(--accent); }

.hero-lead {
    color: var(--light-on-dark);
    font-size: 1.05rem;
    max-width: 64ch;
    margin-bottom: 1.6rem;
}

.hero-slogan {
    font-family: var(--font-head);
    font-size: clamp(1.15rem, 2.2vw, 1.6rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--accent);
    border-left: 4px solid var(--accent);
    padding: .3rem 0 .3rem 1.1rem;
    margin-bottom: 1.8rem;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .4);
}

/* Рубрикатор */

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

.rubric-card {
    min-width: 0;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: 4px 4px 0 rgba(28, 24, 38, .10);
    padding: 1.5rem 1.5rem 1.3rem;
    transition: box-shadow .18s ease, transform .18s ease;
}

.rubric-card:hover {
    box-shadow: 6px 6px 0 rgba(28, 24, 38, .14);
    transform: translateY(-2px);
}

.rubric-icon {
    display: block;
    width: 40px;
    height: 40px;
    margin-bottom: .9rem;
    color: var(--accent);
}

.rubric-title { font-size: 1.12rem; margin-bottom: .5rem; }

.rubric-text { margin: 0; font-size: .95rem; color: var(--accent-2); }

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

.stat-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
    padding: 1.8rem 1.6rem;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: 4px 4px 0 rgba(28, 24, 38, .08);
}

.stat-item {
    min-width: 0;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--line);
}

.stat-row .stat-item:last-child { padding-bottom: 0; border-bottom: 0; }

.stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    text-shadow: 0 2px 0 rgba(255, 255, 255, .9), 0 3px 2px rgba(28, 24, 38, .12);
    margin-bottom: .5rem;
}

.stat-cap {
    display: block;
    font-size: .9rem;
    line-height: 1.55;
    color: var(--accent-2);
}

/* Чек-лист */

.checklist {
    list-style: none;
    margin: 0;
    padding: 1.6rem 1.6rem .6rem;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: 4px 4px 0 rgba(28, 24, 38, .08);
}

.check-item {
    position: relative;
    padding: 0 0 1rem 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px dashed var(--line);
    font-size: .99rem;
}

.checklist .check-item:last-child { border-bottom: 0; }

.check-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: .28rem;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    background-color: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5 L8.5 14 L15 6.5' fill='none' stroke='%23FFFFFF' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
}

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

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

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

.card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: 4px 4px 0 rgba(28, 24, 38, .10);
    transition: box-shadow .18s ease, transform .18s ease;
}

.card:hover {
    box-shadow: 6px 6px 0 rgba(28, 24, 38, .14);
    transform: translateY(-2px);
}

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

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

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

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

.card-title { font-size: 1.18rem; margin-bottom: .5rem; }

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

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

.card-meta {
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: .85rem;
}

.meta-sep { margin: 0 .4rem; color: var(--line); }

.card-excerpt { font-size: .96rem; color: var(--accent-2); }

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

.card-excerpt p:last-child { margin-bottom: 0; }

.card-more { margin: 1.1rem 0 0; padding-top: .2rem; }

.card img { display: block; }

/* =========================================================
   11. Записи и страницы
   ========================================================= */

.page-head { margin-bottom: 1.8rem; }

.single-meta {
    font-size: .86rem;
    color: var(--muted);
    margin-top: 1.1rem;
}

.single-thumb { margin: 0 0 1.8rem; }

.single-thumb img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

.entry-content { font-size: 1.02rem; }

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

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

.entry-content li { margin-bottom: .45rem; }

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

table { border-collapse: collapse; }

table, th, td { border: 1px solid var(--line); }

th, td { padding: .65rem .8rem; text-align: left; }

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

.alignleft { float: left; margin: .4rem 1.4rem 1rem 0; }
.alignright { float: right; margin: .4rem 0 1rem 1.4rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .85rem; color: var(--muted); }

.page-links { margin-top: 1.4rem; font-size: .92rem; }

.single-taxonomy {
    margin-top: 2rem;
    padding: 1.2rem 1.4rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    font-size: .92rem;
}

.tax-line { margin: 0 0 .5rem; }
.tax-line:last-child { margin-bottom: 0; }
.tax-label { font-family: var(--font-head); font-weight: 600; color: var(--text); }

.post-switch {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 2.2rem;
}

.switch-link {
    display: block;
    min-width: 0;
    padding: 1.1rem 1.3rem;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: 4px 4px 0 rgba(28, 24, 38, .08);
    background-image: none;
    transition: box-shadow .18s ease, transform .18s ease;
}

.switch-link:hover {
    box-shadow: 6px 6px 0 rgba(28, 24, 38, .12);
    transform: translateY(-2px);
}

.switch-dir {
    display: block;
    font-size: .76rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .35rem;
    font-family: var(--font-head);
    font-weight: 600;
}

.switch-title {
    display: block;
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

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

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

.sidebar .widget {
    margin-bottom: 2rem;
    padding: 1.3rem 1.4rem;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: 4px 4px 0 rgba(28, 24, 38, .07);
    color: var(--text);
}

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

.sidebar .widget-title {
    font-size: 1.02rem;
    color: var(--text);
    margin-bottom: .9rem;
    padding-bottom: .55rem;
    border-bottom: 2px solid var(--accent);
}

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

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

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

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

.sidebar .widget .post-date {
    display: block;
    font-size: .8rem;
    color: var(--muted);
    margin-top: .18rem;
}

.sidebar .widget p { color: var(--text); font-size: .95rem; }

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

.site-bottom {
    position: relative;
    overflow: hidden;
    background-color: var(--dark);
    color: var(--light-on-dark);
    padding: 3rem 0 1.8rem;
    border-top: 3px solid var(--accent);
}

.foot-decor {
    position: absolute;
    right: -40px;
    top: 20px;
    width: 300px;
    height: auto;
    opacity: .16;
    pointer-events: none;
    display: none;
}

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

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

.foot-col .widget { margin-bottom: 1.6rem; color: var(--light-on-dark); }
.foot-col .widget:last-child { margin-bottom: 0; }

.foot-col .widget-title {
    font-size: 1rem;
    color: #FFFFFF;
    text-shadow: none;
    margin-bottom: .9rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--accent);
}

.foot-col .widget p { color: var(--light-on-dark); font-size: .93rem; }

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

.foot-col .widget li {
    padding: .42rem 0;
    border-bottom: 1px solid rgba(214, 208, 223, .12);
    font-size: .93rem;
    color: var(--light-on-dark);
}

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

.foot-col .widget a { color: var(--light-on-dark); }
.foot-col .widget a:hover { color: var(--accent); }

.foot-col .widget .post-date { display: block; font-size: .8rem; color: var(--muted); }

.copyright {
    margin: 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(214, 208, 223, .16);
    font-size: .86rem;
    color: var(--muted);
}

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: 2.4rem;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    padding: .5rem .8rem;
    text-align: center;
    font-family: var(--font-head);
    font-size: .92rem;
    font-weight: 600;
    color: var(--text);
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-btn);
    background-image: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.pager a.page-numbers:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
    transform: translateY(-2px);
}

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

.pager .page-numbers.dots {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
}

.comment-pager { margin-top: 1.6rem; font-size: .92rem; }

/* =========================================================
   15. Формы
   ========================================================= */

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 1.4rem;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
    flex: 1 1 200px;
    min-width: 0;
    padding: .68rem .9rem;
    font-family: var(--font-body);
    font-size: .96rem;
    color: var(--text);
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-btn);
}

textarea { width: 100%; resize: vertical; }

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

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

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

.comments-area {
    margin-top: 2.8rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.comments-title { font-size: 1.35rem; margin-bottom: 1.4rem; }

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

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

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

.comment-inner {
    padding: 1.1rem 1.3rem;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

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

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

.comment-date { font-size: .82rem; color: var(--muted); }

.comment-text { font-size: .97rem; }
.comment-text p:last-child { margin-bottom: 0; }

.comment-actions { margin-top: .7rem; font-size: .87rem; }
.comment-hold { font-size: .87rem; color: var(--accent-dark); }
.comments-closed { color: var(--accent-2); font-size: .93rem; }

.comment-respond {
    margin-top: 1.6rem;
    padding: 1.5rem 1.6rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

.comment-reply-title { font-size: 1.2rem; margin-bottom: 1rem; }

.comment-form label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: .35rem;
    font-family: var(--font-head);
}

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

.comment-notes { font-size: .87rem; color: var(--accent-2); }

.comment-form .submit {
    display: inline-block;
    padding: .72rem 1.5rem;
    border-radius: var(--radius-btn);
    border: 1px solid var(--accent);
    background-color: var(--accent);
    color: #FFFFFF;
    font-family: var(--font-head);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .18s ease, transform .18s ease;
}

.comment-form .submit:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-2px);
}

/* =========================================================
   17. 404
   ========================================================= */

.error-box {
    padding: 1.8rem 1.6rem;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: 4px 4px 0 rgba(28, 24, 38, .08);
}

.error-links { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.2rem 0 0; }

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--dark);
    border-top: 2px solid var(--accent);
    color: var(--light-on-dark);
}

.cookie-text {
    margin: 0;
    flex: 1 1 260px;
    min-width: 0;
    font-size: .88rem;
    line-height: 1.55;
}

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

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

@media (min-width: 600px) {
    .brand-tagline { display: block; }

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

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

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

    .stat-item { padding-bottom: 0; border-bottom: 0; }

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

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

    .front-section { padding: 4rem 0; }

    .fs-hero { padding: 4.5rem 0; }

    .checklist { padding: 2rem 2.2rem 1rem; }

    .stat-row { padding: 2.2rem 2.2rem; }

    .error-box { padding: 2.2rem 2.2rem; }
}

@media (min-width: 960px) {
    body { font-size: 18px; }

    .nav-toggle { display: none; }

    .site-nav {
        display: block;
        flex: 0 0 auto;
        margin-left: auto;
    }

    .nav-list {
        flex-direction: row;
        align-items: center;
        gap: 1.6rem;
        margin: 0;
    }

    .nav-list a {
        padding: .3rem 0;
        border-bottom: 2px solid transparent;
    }

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

    .nav-list .sub-menu { padding-left: 0; }

    .brand { flex: 0 1 46%; }

    .brand-name { font-size: 1.02rem; }

    .layout-single { width: 85%; }

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

    .sidebar {
        margin-top: 0;
        padding-top: 0;
        padding-left: 1.8rem;
        border-top: 0;
        border-left: 1px solid var(--line);
    }

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

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

    .layout-with-sidebar .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

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

    .stat-item {
        padding: 0 1.6rem;
        border-left: 1px solid var(--line);
        border-bottom: 0;
    }

    .stat-row .stat-item:first-child { border-left: 0; padding-left: 0; }
    .stat-row .stat-item:last-child { padding-right: 0; }

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

    .hero-decor { display: block; }
    .foot-decor { display: block; }

    .front-section { padding: 5rem 0; }
    .fs-hero { padding: 5.5rem 0 5rem; }

    .page-shell { padding: 2.4rem 0 4.5rem; }
}

@media (max-width: 599px) {
    .checklist { padding: 1.4rem 1.2rem .6rem; }
    .stat-row { padding: 1.6rem 1.3rem; }
    .error-box { padding: 1.5rem 1.2rem; }
    .comment-respond { padding: 1.3rem 1.2rem; }
    .single-taxonomy { padding: 1.1rem 1.2rem; }
    .cookie-banner { padding: 1rem 1.1rem; }
    .hero-slogan { padding-left: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
