/*
Theme Name: dds_vip-zip.ru
Author: Алексей Зацепин
Description: Тема для онлайн-школы практического ремонта электроники и радиотехники. Технический гранж: строгая сетка, холодная стальная палитра, медный акцент.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: vipzip
*/

/* ============================ Переменные ============================ */
:root {
    --bg: #F2F5F8;
    --bg-alt: #E6ECF2;
    --dark: #0B1A2E;
    --ink: #1E2A3A;
    --accent: #D74E2C;
    --accent-dark: #A6361E;
    --teal: #2C7A7B;
    --muted: #6B7B8D;
    --line: #B0C0D0;
    --edge: #D0D9E2;
    --aside: #DCE4ED;
    --head: "Roboto Condensed", "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;
    --text: Charter, "Bitstream Charter", "Literata", Georgia, "Times New Roman", serif;
    --mono: "JetBrains Mono", "Consolas", "SFMono-Regular", monospace;
}

/* ============================ Скрытие ============================ */
.cookie-banner[hidden] { display: none !important; }
.nav-list[hidden] { display: none !important; }
.tab-pane[hidden] { display: none !important; }

/* ============================ База ============================ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 300 300'%3E%3Cg fill='none' stroke='%230B1A2E' stroke-opacity='0.03' stroke-width='3'%3E%3Cpath d='M20 280 L20 180 L80 120 L80 40'/%3E%3Cpath d='M50 280 L50 210 L140 120 L240 120'/%3E%3Cpath d='M90 280 L170 200 L170 150 L260 60'/%3E%3Cpath d='M130 280 L130 240 L220 240'/%3E%3C/g%3E%3Cg fill='%230B1A2E' fill-opacity='0.035'%3E%3Ccircle cx='20' cy='180' r='7'/%3E%3Ccircle cx='80' cy='120' r='7'/%3E%3Ccircle cx='140' cy='120' r='7'/%3E%3Ccircle cx='170' cy='150' r='7'/%3E%3Ccircle cx='220' cy='240' r='7'/%3E%3Crect x='96' y='96' width='48' height='48' rx='2'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle, #DCE4ED 1px, transparent 1.2px);
    background-repeat: no-repeat, repeat;
    background-position: left -30px bottom -20px, 0 0;
    background-size: 300px 300px, 40px 40px;
    background-attachment: fixed, scroll;
    color: var(--ink);
    font-family: var(--text);
    font-size: 17px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--head);
    color: var(--dark);
    line-height: 1.18;
    margin: 0 0 0.7em;
    font-weight: 700;
}

h1 { font-size: 3.2rem; letter-spacing: 0.045em; }
h2 { font-size: 2rem; letter-spacing: 0.02em; }
h3 { font-size: 1.45rem; letter-spacing: 0.015em; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.15em; }

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

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

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

/* ============================ Ссылки и кнопки ============================ */
.entry-content a,
.widget a,
.crumbs a,
.comment-text a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: var(--line);
    transition: color .18s ease, text-decoration-color .18s ease;
}

.entry-content a:hover,
.widget a:hover,
.crumbs a:hover,
.comment-text a:hover {
    color: var(--accent-dark);
    text-decoration-color: var(--accent);
}

.btn {
    display: inline-block;
    font-family: var(--head);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 0.78rem 1.6rem;
    border-radius: 4px;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, transform .12s ease, color .18s ease;
}

.btn:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(2px);
}

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

.btn-ghost:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-ghost-light {
    background: transparent;
    border-color: #fff;
    color: #fff;
}

.btn-ghost-light:hover {
    background: #fff;
    border-color: #fff;
    color: var(--dark);
}

/* ============================ Шапка ============================ */
.site-head {
    background: var(--dark);
    color: #E6ECF2;
    border-bottom: 3px solid var(--accent);
    position: relative;
}

.head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.brand-logo { width: 56px; height: 56px; flex: 0 0 auto; }

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

.brand-name {
    font-family: var(--head);
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
    text-transform: uppercase;
    line-height: 1.2;
    display: block;
}

.brand-desc {
    font-size: 0.82rem;
    line-height: 1.45;
    color: #8FA3B8;
    display: block;
    margin-top: 0.3rem;
    max-width: 46ch;
}

.nav-toggle {
    display: none;
    font-family: var(--head);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: transparent;
    color: #fff;
    border: 2px solid #35506E;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

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

.main-nav a {
    font-family: var(--head);
    font-size: 0.98rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #D5DFEA;
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color .18s ease, border-color .18s ease;
}

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

/* ============================ Хлебные крошки ============================ */
.crumbs {
    font-family: var(--head);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: var(--muted);
    padding: 1.4rem 0 0;
}

.crumbs a { color: var(--muted); text-decoration-color: var(--edge); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--line); margin: 0 0.3rem; }

/* ============================ Раскладка ============================ */
.site-main { padding: 1.6rem 0 4rem; }

.layout-single { display: block; }

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

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

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

.page-head { margin: 2rem 0 2.2rem; }

.page-head h1 { margin-bottom: 0.4rem; }

.page-head .sub {
    font-family: var(--head);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.82rem;
    color: var(--teal);
}

/* Заголовок секции: плашка 4px слева */
.sec-title {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 1.6rem;
}

.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12em;
    width: 4px;
    height: 1.5em;
    background: var(--accent);
}

.sec-title.on-dark { color: #fff; }

/* ============================ Карточки записей ============================ */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.card:hover {
    box-shadow: none;
    transform: translateX(-2px);
    border-color: var(--accent);
}

.card-layout {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-width: 0;
}

.card-thumb-wrap {
    flex: 0 0 260px;
    position: relative;
    overflow: hidden;
    background: var(--bg-alt);
}

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

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

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

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

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

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

.card-title a {
    color: var(--dark);
    text-decoration: none;
    transition: color .18s ease;
}

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

.card-excerpt { color: var(--ink); font-size: 0.98rem; }

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

.card-more {
    margin-top: auto;
    padding-top: 0.9rem;
    font-family: var(--head);
    font-size: 0.86rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    align-self: flex-start;
    border-bottom: 2px solid transparent;
    transition: border-color .18s ease, color .18s ease;
}

.card-more:hover { border-bottom-color: var(--accent); color: var(--accent-dark); }

/* Важные/закреплённые — миниатюра сверху */
.card--feature .card-layout { flex-direction: column; }

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

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

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

.card--feature { border-left: 4px solid var(--teal); }

/* ============================ Пагинация ============================ */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2.8rem 0 0;
}

.pager .page-numbers {
    font-family: var(--head);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    min-width: 44px;
    text-align: center;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    color: var(--dark);
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}

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

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

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

/* ============================ Главная ============================ */
.front-section {
    padding: 4.5rem 0;
    position: relative;
    overflow: hidden;
}

.front-section + .front-section { border-top: 1px dashed var(--line); }

.front-inner {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.front-section.alt { background: var(--bg-alt); }

.front-section.sunken {
    background: linear-gradient(180deg, var(--bg) 0%, #DCE4ED 100%);
}

/* Диагональная «трассировка» в углу секции */
.front-section::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 260px;
    height: 2px;
    background: var(--accent);
    opacity: 0.15;
    transform: rotate(45deg);
    transform-origin: right top;
    pointer-events: none;
}

/* --- Hero --- */
.hero {
    background: var(--dark);
    color: #E6ECF2;
    padding: 4.8rem 0 3.2rem;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 3rem;
    align-items: center;
}

.hero-eyebrow {
    font-family: var(--head);
    font-size: 0.82rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 1.1rem;
    display: block;
}

.hero h1 { color: #fff; margin-bottom: 1.1rem; }

.hero-rule {
    width: 140px;
    height: 5px;
    background: var(--accent);
    margin: 0 0 1.4rem;
}

.hero-desc {
    color: #B7C6D6;
    font-size: 1.06rem;
    max-width: 62ch;
    margin-bottom: 1.9rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-art { min-width: 0; }

.hero-art img { width: 100%; height: auto; display: block; }

.hero-sign {
    margin-top: 2.6rem;
    padding-top: 1.1rem;
    border-top: 1px dashed #2A3D55;
    font-family: var(--head);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7F93A8;
}

.hero-sign strong { color: #B7C6D6; font-weight: 700; }

/* --- Сетка карточек-направлений --- */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.doc-card {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--edge);
    border-radius: 0;
    padding: 1.9rem 1.7rem 1.7rem;
    box-shadow: 4px 4px 0 var(--edge);
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
    min-width: 0;
}

.doc-card:hover {
    box-shadow: none;
    transform: translateX(-2px);
    border-color: var(--accent);
}

.doc-card .doc-index {
    font-family: var(--mono);
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    color: var(--teal);
    display: block;
    margin-bottom: 0.8rem;
}

.doc-card h3 { margin-bottom: 0.55rem; }

.doc-card p { margin: 0; font-size: 0.96rem; color: var(--ink); }

.doc-icon {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    width: 34px;
    height: 34px;
    opacity: 0.5;
}

/* --- Цитата --- */
.quote-plate {
    background: rgba(44, 122, 123, 0.1);
    border-left: 8px solid var(--accent);
    padding: 2.8rem 2.6rem;
    position: relative;
}

.quote-plate .q-mark {
    display: block;
    width: 54px;
    height: 6px;
    background: var(--teal);
    margin-bottom: 1.4rem;
}

.quote-plate blockquote {
    margin: 0;
    font-family: var(--head);
    font-size: 2.1rem;
    line-height: 1.28;
    letter-spacing: 0.01em;
    color: var(--dark);
    font-weight: 700;
}

.quote-plate .q-foot {
    margin-top: 1.5rem;
    font-family: var(--head);
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--teal);
}

/* --- Шаги 2x2 --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.2rem;
}

.step {
    display: flex;
    gap: 1.3rem;
    align-items: flex-start;
    min-width: 0;
}

.step-num {
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    border: 2px solid var(--line);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 1.05rem;
    color: var(--accent);
    letter-spacing: 0.05em;
    background: transparent;
}

.step-body { min-width: 0; }

.step-body h3 { margin-bottom: 0.4rem; font-size: 1.24rem; }

.step-body p { margin: 0; font-size: 0.98rem; color: var(--ink); }

/* --- CTA внутри секции шагов --- */
.mini-cta {
    margin-top: 2.6rem;
    background: var(--dark);
    color: #D5DFEA;
    padding: 2rem 2.2rem;
    border-radius: 4px;
    display: flex;
    gap: 1.6rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.mini-cta p {
    margin: 0;
    min-width: 0;
    font-size: 1.02rem;
}

.mini-cta strong { color: #fff; }

/* --- Последние записи на главной --- */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.latest-grid .card-layout { flex-direction: column; }

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

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

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

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

/* ============================ Контент записи/страницы ============================ */
.entry {
    background: #fff;
    border: 1px solid var(--edge);
    box-shadow: 4px 4px 0 var(--edge);
    padding: 2.4rem 2.4rem 2.6rem;
    margin-bottom: 2.4rem;
}

.entry-head { margin-bottom: 1.6rem; }

.entry-head h1 { font-size: 2.6rem; margin-bottom: 0.6rem; }

.entry-meta {
    font-family: var(--head);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    display: flex;
    gap: 1.1rem;
    flex-wrap: wrap;
}

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

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

.entry-content h2,
.entry-content h3 {
    position: relative;
    padding-left: 1.5rem;
    margin-top: 2rem;
}

.entry-content h2::before,
.entry-content h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 10px;
    height: 10px;
    background: var(--accent);
}

.entry-content h3::before { background: var(--teal); }

.entry-content ul,
.entry-content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }

.entry-content li { margin-bottom: 0.5em; }

.entry-content blockquote {
    margin: 1.8em 0;
    padding: 1.4rem 1.6rem;
    background: var(--bg-alt);
    border-left: 4px solid var(--teal);
    font-style: italic;
}

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

.entry-content img { margin: 1.4em 0; }

.entry-content figure { margin: 1.6em 0; }

.entry-content figcaption {
    font-family: var(--head);
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

.entry-content code {
    font-family: var(--mono);
    font-size: 0.9em;
    background: var(--bg-alt);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

.entry-content pre {
    font-family: var(--mono);
    background: var(--dark);
    color: #D5DFEA;
    padding: 1.2rem 1.4rem;
    overflow-x: auto;
    border-radius: 4px;
}

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

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

.entry-content th {
    background: var(--bg-alt);
    font-family: var(--head);
    letter-spacing: 0.04em;
}

/* Шкала сложности */
.gauge {
    margin-top: 2.4rem;
    padding: 1.4rem 1.6rem;
    border: 1px solid var(--edge);
    background: var(--bg);
}

.gauge-label {
    display: block;
    font-family: var(--head);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.9rem;
}

.gauge-bar { display: flex; gap: 4px; }

.gauge-seg {
    flex: 1;
    min-width: 0;
    height: 34px;
    border: 1px solid var(--line);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-seg em {
    font-family: var(--head);
    font-style: normal;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.gauge-seg.is-on { background: var(--accent); border-color: var(--accent); }

.gauge-seg.is-on em { color: #fff; }

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

.entry-tags a {
    font-family: var(--head);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--dark);
    text-decoration: none;
}

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

.post-nav {
    display: flex;
    gap: 1.4rem;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 2.4rem;
}

.post-nav a {
    font-family: var(--head);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    color: var(--dark);
    text-decoration: none;
    border-bottom: 2px solid var(--edge);
    max-width: 46%;
}

.post-nav a:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* ============================ Сайдбар ============================ */
.sidebar { min-width: 0; }

.sidebar .widget {
    background: var(--aside);
    border: 1px solid var(--edge);
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.8rem;
    color: var(--ink);
}

.sidebar .widget-title {
    font-size: 1.05rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dark);
    position: relative;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.sidebar .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.28em;
    width: 4px;
    height: 1.1em;
    background: var(--accent);
}

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

.sidebar .widget li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.96rem;
}

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

.sidebar .widget a {
    color: var(--dark);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

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

.sidebar .widget .post-date,
.sidebar .widget .rss-date { color: var(--muted); font-size: 0.85rem; display: block; }

/* ============================ Форма поиска ============================ */
.search-form {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font-family: var(--text);
    font-size: 0.96rem;
}

.search-form .search-field:focus {
    outline: none;
    border-color: var(--accent);
}

.search-form .search-submit {
    font-family: var(--head);
    font-size: 0.86rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.7rem 1.2rem;
    border: 2px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: background-color .18s ease, transform .12s ease;
}

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

/* ============================ Комментарии ============================ */
.comments-area {
    background: #fff;
    border: 1px solid var(--edge);
    box-shadow: 4px 4px 0 var(--edge);
    padding: 2.2rem 2.4rem;
}

.comments-area h2 {
    font-size: 1.5rem;
    position: relative;
    padding-left: 1.1rem;
}

.comments-area h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12em;
    width: 4px;
    height: 1.5em;
    background: var(--accent);
}

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

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

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

.comment-body {
    border: 1px solid var(--edge);
    padding: 1.2rem 1.4rem;
    background: var(--bg);
}

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

.comment-author {
    font-family: var(--head);
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--dark);
}

.comment-date { font-size: 0.82rem; color: var(--muted); font-family: var(--head); letter-spacing: 0.06em; }

.comment-text p:last-child { margin-bottom: 0; }

.comment-reply a,
.comment-reply-link {
    font-family: var(--head);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
}

.comment-wait { color: var(--teal); font-size: 0.9rem; }

.comment-respond { margin-top: 1.6rem; }

.comment-form label {
    display: block;
    font-family: var(--head);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 85%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    font-family: var(--text);
    font-size: 0.96rem;
    color: var(--ink);
}

.comment-form textarea { width: 100%; min-height: 150px; }

.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--accent); }

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

.comment-form .submit {
    font-family: var(--head);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.75rem 1.6rem;
    border: 2px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: background-color .18s ease, transform .12s ease;
}

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

.comment-notes,
.logged-in-as,
.comment-form-cookies-consent label {
    font-size: 0.88rem;
    color: var(--muted);
    text-transform: none;
    letter-spacing: 0;
    font-family: var(--text);
    display: inline;
}

/* ============================ Подвал ============================ */
.site-foot {
    background: var(--dark);
    color: #B7C6D6;
    border-top: 3px solid var(--accent);
    padding: 3.2rem 0 1.6rem;
}

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

.site-foot .widget { color: #B7C6D6; margin-bottom: 1.4rem; }

.site-foot .widget-title {
    color: #fff;
    font-size: 1.02rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    position: relative;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.site-foot .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.28em;
    width: 4px;
    height: 1.1em;
    background: var(--teal);
}

.site-foot .widget p { color: #B7C6D6; font-size: 0.96rem; }

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

.site-foot .widget li {
    padding: 0.4rem 0;
    border-bottom: 1px dashed #24384F;
    font-size: 0.95rem;
}

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

.site-foot .widget a {
    color: #D5DFEA;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.site-foot .widget a:hover { color: #fff; border-bottom-color: var(--accent); }

.site-foot .widget .post-date { color: #8FA3B8; font-size: 0.84rem; display: block; }

.foot-bottom {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px dashed #24384F;
    font-family: var(--head);
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    color: #7F93A8;
}

/* ============================ Cookie-баннер ============================ */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--dark);
    color: #D5DFEA;
    border-top: 3px solid var(--accent);
    padding: 1.1rem 1.4rem;
    display: flex;
    gap: 1.4rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.cookie-banner p { margin: 0; font-size: 0.92rem; max-width: 70ch; min-width: 0; }

.cookie-banner .btn { padding: 0.6rem 1.3rem; font-size: 0.86rem; }

/* ============================ 404 и поиск ============================ */
.notfound {
    background: #fff;
    border: 1px solid var(--edge);
    box-shadow: 4px 4px 0 var(--edge);
    padding: 2.6rem 2.4rem;
}

.notfound .code {
    font-family: var(--mono);
    font-size: 4.4rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.6rem;
}

.notfound .search-form { margin: 1.6rem 0; }

.no-results {
    background: #fff;
    border: 1px solid var(--edge);
    padding: 2rem 2.2rem;
}

/* ============================ Адаптив ============================ */
@media (max-width: 960px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.7rem; }

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

    .layout-single > .content-area,
    .front-inner { width: 100%; }

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

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

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

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

    .main-nav { flex-basis: 100%; }

    .main-nav ul {
        flex-direction: column;
        gap: 0.2rem;
        border-top: 1px dashed #24384F;
        padding-top: 0.8rem;
        margin-top: 0.4rem;
    }

    .main-nav a { display: block; padding: 0.55rem 0; border-bottom: 1px dashed #24384F; }
}

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

    h1 { font-size: 2.05rem; }
    h2 { font-size: 1.45rem; }
    h3 { font-size: 1.2rem; }

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

    .hero { padding: 3.2rem 0 2.4rem; }

    .card-layout { flex-direction: column; }

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

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

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

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

    .doc-grid,
    .latest-grid,
    .steps-grid,
    .foot-cols { grid-template-columns: minmax(0, 1fr); }

    .doc-card { padding: 1.6rem 1.3rem; }

    .quote-plate { padding: 2rem 1.4rem; border-left-width: 6px; }

    .quote-plate blockquote { font-size: 1.5rem; }

    .mini-cta { padding: 1.6rem 1.4rem; }

    .entry,
    .comments-area,
    .notfound { padding: 1.6rem 1.3rem; }

    .entry-head h1 { font-size: 1.9rem; }

    .step-num { width: 52px; height: 52px; }

    .gauge { padding: 1.1rem 1.1rem; }

    .gauge-seg em { font-size: 0.68rem; letter-spacing: 0.05em; }

    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form input[type="url"] { width: 100%; }

    .cookie-banner { padding: 1rem 1.1rem; }
}
