/*
Theme Name: dds_128bits.ru
Theme URI: https://128bits.ru/
Author: Андрей Логинов
Description: Тема для информационного проекта о практической кибербезопасности.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: secbits
*/

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

:root {
    --bg:        #F2F7FA;
    --bg-alt:    #E3EEF5;
    --deep:      #0B1C2A;
    --side:      #DCE8F0;
    --ink:       #1A2B3C;
    --accent:    #E8572A;
    --accent-2:  #3A7CA5;
    --muted:     #7A8B9B;
    --rule:      #B0C4D8;
    --hair:      #D0DFEB;
    --shell:     min(92%, 1180px);
    --font-head: "Inter", "Manrope", "Segoe UI", "Arial Narrow", Arial, sans-serif;
    --font-body: "Noto Sans", "Roboto", "Helvetica Neue", Arial, sans-serif;
}

/* =========================================================
   Скрытые элементы (правило выше основных стилей)
   ========================================================= */

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

/* =========================================================
   База
   ========================================================= */

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--bg);
    background-image: repeating-linear-gradient(45deg,
        rgba(0, 0, 0, 0) 0,
        rgba(0, 0, 0, 0) 11.5px,
        var(--hair) 11.5px,
        var(--hair) 12px);
}

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

a { color: var(--accent); text-decoration: none; }
a:hover,
a:focus {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 0.7em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.3rem; }
li { margin-bottom: 0.45em; }

.shell {
    width: var(--shell);
    margin-inline: auto;
}

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

.hl { color: var(--accent); font-weight: 700; }

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

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

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.75rem 1.6rem;
    border: 0;
    border-radius: 2px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover,
.btn:focus {
    color: #fff;
    text-decoration: none;
    transform: translateY(2px);
    box-shadow: 0 4px 0 rgba(11, 28, 42, 0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    box-shadow: inset 0 0 0 2px var(--accent);
}
.btn-ghost:hover,
.btn-ghost:focus {
    color: var(--accent);
    box-shadow: inset 0 0 0 2px var(--accent), 0 4px 0 rgba(11, 28, 42, 0.2);
}

/* =========================================================
   Шапка
   ========================================================= */

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

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: #fff;
    text-decoration: none;
    min-width: 0;
    flex: 1 1 320px;
}
.brand:hover { text-decoration: none; }

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

.brand-mark { flex: 0 0 46px; width: 46px; height: 46px; }

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

.site-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
}

.site-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #9FB4C6;
    margin-top: 0.25rem;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid #35506A;
    border-radius: 2px;
    color: #fff;
    font-family: var(--font-head);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    margin: 0;
    padding: 0;
}
.main-nav li { margin: 0; }
.main-nav a {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    color: #D6E3EE;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a:focus,
.main-nav .current-menu-item > a {
    color: #fff;
    text-decoration: none;
    border-bottom-color: var(--accent);
}

/* =========================================================
   Каркас страницы
   ========================================================= */

.site-main { display: block; }

.page-block { padding: 3rem 0 4rem; }

.layout-single { display: block; }
.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    min-width: 0;
}

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

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

.crumbs {
    font-size: 0.85rem;
    color: var(--muted);
    padding: 1rem 0 0;
    display: block;
}
.crumbs a { color: var(--accent-2); }
.crumbs .sep { color: var(--rule); margin: 0 0.35rem; }

/* =========================================================
   Заголовки секций
   ========================================================= */

.sec-title {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 1.6rem;
}
.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 4px;
    background: var(--accent);
}
.sec-lead {
    max-width: 60ch;
    color: #33475C;
    margin-bottom: 2.2rem;
}

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

.fs {
    position: relative;
    overflow: hidden;
    padding: 4.5rem 0;
    border-top: 1px solid var(--rule);
}
.fs::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 280px;
    height: 280px;
    opacity: 0.02;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%230B1C2A' d='M50 20a30 30 0 1 0 0 60 30 30 0 0 0 0-60zm0 12a18 18 0 1 1 0 36 18 18 0 0 1 0-36z'/%3E%3Cg fill='%230B1C2A'%3E%3Crect x='46' y='2' width='8' height='16'/%3E%3Crect x='46' y='82' width='8' height='16'/%3E%3Crect x='2' y='46' width='16' height='8'/%3E%3Crect x='82' y='46' width='16' height='8'/%3E%3Crect x='14' y='14' width='8' height='16' transform='rotate(-45 18 22)'/%3E%3Crect x='78' y='70' width='8' height='16' transform='rotate(-45 82 78)'/%3E%3Crect x='78' y='14' width='8' height='16' transform='rotate(45 82 22)'/%3E%3Crect x='14' y='70' width='8' height='16' transform='rotate(45 18 78)'/%3E%3C/g%3E%3C/svg%3E");
}
.fs-alt { background: var(--bg-alt); }
.fs-dense {
    background-color: var(--bg-alt);
    background-image: repeating-linear-gradient(45deg,
        rgba(0, 0, 0, 0) 0,
        rgba(0, 0, 0, 0) 5.5px,
        #C4D7E6 5.5px,
        #C4D7E6 6px);
}

/* Блок 1 — hero */

.fs-hero {
    background: var(--deep);
    color: #E9F1F7;
    border-top: 0;
    padding: 5rem 0;
}
.fs-hero::after { opacity: 0.05; }
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}
.hero-tag {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(232, 87, 42, 0.5);
    border-radius: 2px;
    padding: 0.3rem 0.7rem;
    margin-bottom: 1.4rem;
}
.hero-title {
    color: #fff;
    margin-bottom: 1rem;
}
.hero-sub {
    color: #B9CBDA;
    font-size: 1.1rem;
    max-width: 52ch;
    margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero-art { min-width: 0; }
.hero-art svg { width: 100%; height: auto; display: block; }

/* Блок 2 — таймлайн */

.tl {
    position: relative;
    margin-top: 2.5rem;
    padding: 0.5rem 0;
}
.tl::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px dotted var(--rule);
    transform: translateX(-1px);
}
.tl-item {
    position: relative;
    width: 46%;
    margin-bottom: 2.2rem;
    padding: 1.4rem 1.6rem;
    background: #fff;
    box-shadow: 6px 6px 0 rgba(11, 28, 42, 0.08);
    min-width: 0;
}
.tl-item:nth-child(odd) { margin-right: auto; }
.tl-item:nth-child(even) { margin-left: auto; }
.tl-item::after {
    content: "";
    position: absolute;
    top: 1.9rem;
    width: 12px;
    height: 12px;
    background: var(--accent);
}
.tl-item:nth-child(odd)::after { right: -8.9%; }
.tl-item:nth-child(even)::after { left: -8.9%; }
.tl-year {
    font-family: var(--font-head);
    font-size: 0.9rem;
    letter-spacing: 0.14em;
    color: var(--accent-2);
    display: block;
    margin-bottom: 0.35rem;
}
.tl-item h3 { margin-bottom: 0.4rem; }
.tl-item p { margin: 0; font-size: 0.95rem; color: #33475C; }

/* Блок 3 — статистика */

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.stat {
    background: rgba(255, 255, 255, 0.75);
    padding: 1.8rem 1.4rem;
    border-left: 4px solid var(--accent);
    min-width: 0;
}
.stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}
.stat-cap {
    display: block;
    margin-top: 0.6rem;
    font-size: 0.9rem;
    color: var(--muted);
}

/* Блок 4 — рубрикатор */

.topics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
    margin-top: 2rem;
}
.topic {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.6rem 1.5rem;
    background: #fff;
    color: var(--ink);
    border-radius: 0;
    box-shadow: 6px 6px 0 rgba(11, 28, 42, 0.08);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    min-width: 0;
}
.topic svg { flex: 0 0 32px; width: 32px; height: 32px; stroke: var(--accent-2); }
.topic:hover,
.topic:focus {
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    transform: translateY(-4px);
}
.topic:hover svg,
.topic:focus svg { stroke: #fff; }
.topic:hover .topic-desc,
.topic:focus .topic-desc { color: rgba(255, 255, 255, 0.85); }
.topic-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}
.topic-desc {
    display: block;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.5;
}

/* Технический бокс */

.tech-box {
    margin: 2rem 0 2rem 1.5rem;
    padding: 1.6rem 1.8rem;
    background: #fff;
    border-left: 6px solid var(--accent);
    box-shadow: 6px 6px 0 rgba(11, 28, 42, 0.08);
}
.tech-box p:last-child { margin-bottom: 0; }

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

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
}
.cards-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.8rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: 6px 6px 0 rgba(11, 28, 42, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    min-width: 0;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 10px 10px 0 rgba(11, 28, 42, 0.16);
}

.card-thumb { display: block; overflow: hidden; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb-empty {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-alt);
    background-image: repeating-linear-gradient(45deg,
        rgba(0, 0, 0, 0) 0,
        rgba(0, 0, 0, 0) 7.5px,
        #C4D7E6 7.5px,
        #C4D7E6 8px);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.4rem 1.5rem 1.6rem;
    min-width: 0;
}
.card-title {
    font-size: 1.2rem;
    margin: 0 0 0.6rem;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); text-decoration: none; }

.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}
.card-meta a { color: var(--accent-2); }

.card-excerpt { font-size: 0.95rem; color: #33475C; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-more {
    margin-top: auto;
    padding-top: 1rem;
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 600;
}

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2.5rem 0 0;
}
.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 0.92rem;
}
.pager a.page-numbers:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: #fff;
    text-decoration: none;
}
.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pager .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

/* =========================================================
   Контент записи и страницы
   ========================================================= */

.entry-head { margin-bottom: 1.6rem; }
.entry-title { font-size: 2.4rem; margin-bottom: 0.6rem; }
.entry-meta { font-size: 0.85rem; color: var(--muted); display: flex; gap: 1rem; flex-wrap: wrap; }
.entry-meta a { color: var(--accent-2); }

.entry-thumb { margin-bottom: 1.8rem; }
.entry-thumb img { width: 100%; height: auto; display: block; }

.entry-content { font-size: 1.02rem; }
.entry-content h2 {
    position: relative;
    padding-left: 1.1rem;
    margin-top: 2.2rem;
    font-size: 1.8rem;
}
.entry-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 4px;
    background: var(--accent);
}
.entry-content h3 { margin-top: 1.8rem; }
.entry-content img { margin: 1.4rem 0; }
.entry-content blockquote {
    margin: 2rem 0 2rem 1.5rem;
    padding: 1.4rem 1.8rem;
    background: #fff;
    border-left: 6px solid var(--accent);
    box-shadow: 6px 6px 0 rgba(11, 28, 42, 0.08);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    background: #fff;
}
.entry-content table,
.entry-content th,
.entry-content td { border: 1px solid var(--rule); }
.entry-content th,
.entry-content td { padding: 0.7rem 0.9rem; text-align: left; }
.entry-content th { background: var(--bg-alt); font-family: var(--font-head); }

.entry-tags { margin-top: 2rem; font-size: 0.9rem; color: var(--muted); }
.entry-tags a { color: var(--accent-2); }

.post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 2.5rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--rule);
    font-size: 0.95rem;
}
.post-nav .nav-prev { text-align: left; }
.post-nav .nav-next { text-align: right; }

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

.sidebar {
    background: var(--side);
    padding: 1.6rem 1.5rem;
    min-width: 0;
}
.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    position: relative;
    padding-left: 0.9rem;
    font-size: 1.05rem;
    color: var(--ink);
    margin-bottom: 1rem;
}
.sidebar .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 4px;
    background: var(--accent);
}
.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: var(--ink); }
.sidebar .widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar .widget li {
    padding: 0.55rem 0;
    border-bottom: 1px solid #C3D4E1;
    font-size: 0.95rem;
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--ink); }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .post-date { display: block; font-size: 0.8rem; color: #5E7284; }

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

.site-bottom {
    background: var(--deep);
    color: #C9D9E5;
    border-top: 3px solid var(--accent);
    margin-top: 4rem;
}
.bottom-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    padding: 3rem 0 2.2rem;
}
.bottom-cols .widget { min-width: 0; }
.bottom-cols .widget-title {
    position: relative;
    padding-left: 0.9rem;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 1rem;
}
.bottom-cols .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 4px;
    background: var(--accent);
}
.bottom-cols .widget,
.bottom-cols .widget p,
.bottom-cols .widget li { color: #C9D9E5; font-size: 0.93rem; }
.bottom-cols .widget ul { list-style: none; padding: 0; margin: 0; }
.bottom-cols .widget li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #16303F;
}
.bottom-cols .widget li:last-child { border-bottom: 0; }
.bottom-cols .widget a { color: #E6EEF5; }
.bottom-cols .widget a:hover { color: var(--accent); text-decoration: none; }
.bottom-cols .post-date { display: block; font-size: 0.8rem; color: #8CA3B6; }

.copyright {
    border-top: 1px solid #16303F;
    padding: 1.3rem 0 2rem;
    font-size: 0.85rem;
    color: #8CA3B6;
}

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
    padding: 1rem 1.6rem;
    background: var(--deep);
    color: #D6E3EE;
    border-top: 3px solid var(--accent);
    font-size: 0.88rem;
}
.cookie-banner p { margin: 0; min-width: 0; }
.cookie-banner a { color: var(--accent); }

/* =========================================================
   Формы поиска и комментариев
   ========================================================= */

.search-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.search-form label { flex: 1 1 200px; min-width: 0; }
.search-form .search-field {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
}
.search-form .search-field:focus {
    outline: 2px solid var(--accent-2);
    outline-offset: 1px;
}

.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
}
.comments-title { font-size: 1.5rem; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-item { margin-bottom: 1.2rem; }
.comment-inner {
    background: #fff;
    padding: 1.2rem 1.4rem;
    box-shadow: 6px 6px 0 rgba(11, 28, 42, 0.08);
}
.comment-head {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.comment-author { font-family: var(--font-head); font-weight: 700; }
.comment-date { font-size: 0.82rem; color: var(--muted); }
.comment-text p:last-child { margin-bottom: 0; }
.comment-actions { margin-top: 0.6rem; font-size: 0.88rem; }

.comment-respond {
    background: #fff;
    padding: 1.6rem 1.7rem;
    box-shadow: 6px 6px 0 rgba(11, 28, 42, 0.08);
}
.comment-form label { display: block; font-size: 0.9rem; margin-bottom: 0.3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink);
    background: #fff;
}
.comment-form textarea { min-height: 150px; }
.comment-form .submit {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    padding: 0.75rem 1.6rem;
    border: 0;
    border-radius: 2px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.comment-form .submit:hover {
    transform: translateY(2px);
    box-shadow: 0 4px 0 rgba(11, 28, 42, 0.25);
}

/* =========================================================
   404 и заглушки
   ========================================================= */

.notice-block {
    background: #fff;
    padding: 2rem 2.2rem;
    box-shadow: 6px 6px 0 rgba(11, 28, 42, 0.08);
}
.err-code {
    font-family: var(--font-head);
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 0.6rem;
}
.err-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.4rem; }

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

@media (max-width: 960px) {
    h1 { font-size: 2.4rem; }
    h2 { font-size: 1.7rem; }

    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }
    .layout-single .content-area,
    .wide { width: 100%; }

    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bottom-cols { grid-template-columns: minmax(0, 1fr); gap: 2rem; }

    .nav-toggle { display: inline-block; margin-left: auto; }
    .main-nav { flex: 1 1 100%; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { border-bottom: 1px solid #16303F; }
    .main-nav a { display: block; padding: 0.7rem 0; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 2rem; }
    .entry-title { font-size: 1.8rem; }

    .fs { padding: 3rem 0; }
    .fs-hero { padding: 3.2rem 0; }
    .page-block { padding: 2rem 0 3rem; }

    .cards,
    .cards-list,
    .topics,
    .stats { grid-template-columns: minmax(0, 1fr); }

    .tl::before { left: 6px; }
    .tl-item { width: 100%; margin-left: 0; margin-right: 0; padding: 1.2rem 1.2rem 1.2rem 1.6rem; }
    .tl-item:nth-child(odd)::after,
    .tl-item:nth-child(even)::after { left: -18px; right: auto; }

    .tech-box { margin-left: 0; padding: 1.3rem 1.3rem; }
    .stat { padding: 1.4rem 1.2rem; }
    .topic { padding: 1.3rem 1.3rem; }
    .notice-block { padding: 1.5rem 1.4rem; }
    .comment-respond { padding: 1.3rem 1.3rem; }
    .cookie-banner { padding: 1rem 1.2rem; font-size: 0.84rem; }
    .post-nav { grid-template-columns: minmax(0, 1fr); }
    .post-nav .nav-next { text-align: left; }
    .sidebar { padding: 1.3rem 1.2rem; }
    .err-code { font-size: 3.4rem; }
}
