/*
Theme Name: dds_logisticregressionanalysis.com
Author: Михаил Данилов
Description: Информационная тема для аналитического портала о статистическом моделировании и рынке жилья. Швейцарская сетка, холодная стальная палитра, строгая типографика.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: regmod
*/

/* ============================================================
   1. Переменные и базовые настройки
   ============================================================ */

:root {
    --page: #F4F6F9;
    --plate: #E8ECF2;
    --top: #1B2A3A;
    --bottom: #111C26;
    --side: #EDF1F7;
    --ink: #1E2B38;
    --accent: #C8102E;
    --accent-press: #A00D25;
    --amber: #F2A900;
    --muted: #6B7A8A;
    --line: #D3DAE3;
    --grid-line: #2E4055;
    --font-head: "Inter Tight", "Helvetica Now Display", "Inter", "Segoe UI", Arial, sans-serif;
    --font-body: "Inter", "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--page);
    background-image:
        repeating-linear-gradient(45deg, rgba(217, 224, 232, 0.3) 0 1px, transparent 1px 24px);
}

body::after {
    content: "";
    position: fixed;
    right: 0;
    bottom: 0;
    width: 400px;
    height: 300px;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    background-position: right bottom;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='300' viewBox='0 0 400 300'%3E%3Cg fill='none' stroke='%23C8102E' stroke-width='2' opacity='0.06'%3E%3Cpath d='M30 270 L30 20 M30 270 L380 270'/%3E%3Cpath d='M45 250 L370 60' stroke-width='3'/%3E%3C/g%3E%3Cg fill='%23C8102E' opacity='0.06'%3E%3Ccircle cx='70' cy='240' r='7'/%3E%3Ccircle cx='110' cy='215' r='9'/%3E%3Ccircle cx='150' cy='205' r='6'/%3E%3Ccircle cx='175' cy='170' r='10'/%3E%3Ccircle cx='205' cy='165' r='7'/%3E%3Ccircle cx='230' cy='130' r='8'/%3E%3Ccircle cx='265' cy='125' r='6'/%3E%3Ccircle cx='290' cy='95' r='9'/%3E%3Ccircle cx='320' cy='90' r='7'/%3E%3Ccircle cx='350' cy='60' r='8'/%3E%3Ccircle cx='125' cy='170' r='6'/%3E%3Ccircle cx='245' cy='195' r='6'/%3E%3Ccircle cx='300' cy='150' r='5'/%3E%3C/g%3E%3C/svg%3E");
}

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

figure {
    margin: 1.6rem 0;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.18;
    letter-spacing: -0.015em;
    margin: 2rem 0 1rem;
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    margin-top: 0;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.4rem;
}

h4 {
    font-size: 1.15rem;
}

/* приём: точка-буллет 6px слева у H2 и H3 */
h2::before,
h3::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    margin-right: 0.6rem;
    vertical-align: 0.22em;
}

p {
    margin: 0 0 1.1rem;
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: text-decoration-thickness 0.15s ease, text-underline-offset 0.15s ease, color 0.15s ease;
}

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

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

li {
    margin-bottom: 0.45rem;
}

blockquote {
    margin: 1.8rem 0;
    padding: 1.2rem 1.5rem;
    background: var(--plate);
    border-left: 6px solid var(--accent);
    border-radius: 2px;
}

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

code,
pre {
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.93em;
}

pre {
    padding: 1rem 1.2rem;
    background: var(--top);
    color: #E4EAF1;
    overflow-x: auto;
    border-radius: 2px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    border: 1px solid var(--top);
    font-size: 0.96rem;
}

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

th {
    background: var(--plate);
    font-family: var(--font-head);
}

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

.btn {
    display: inline-block;
    padding: 0.78rem 1.7rem;
    border-radius: 2px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover,
.btn:focus {
    background: var(--accent-press);
    border-color: var(--accent-press);
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    border: 2px solid var(--top);
    color: var(--top);
}

.btn-ghost:hover,
.btn-ghost:focus {
    background: transparent;
    border-color: var(--accent-press);
    color: var(--accent-press);
}

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

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

.top-stripe {
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, var(--accent) 0 70%, var(--amber) 70% 100%);
}

.site-head {
    background: var(--top);
    color: #EAF0F6;
    position: static;
    padding: 1.4rem 0;
}

.head-row {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    flex-wrap: wrap;
}

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

.brand:hover {
    text-decoration: none;
    color: inherit;
}

.brand-mark {
    flex: 0 0 auto;
    display: block;
}

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

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

.brand-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.35;
    color: #FFFFFF;
    display: block;
    max-width: 46ch;
}

.brand-tag {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #93A4B6;
    max-width: 58ch;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 2px solid #3A4E64;
    color: #EAF0F6;
    font-family: var(--font-head);
    font-size: 0.9rem;
    padding: 0.5rem 0.9rem;
    border-radius: 2px;
    cursor: pointer;
}

.main-nav[hidden] {
    display: none !important;
}

.main-nav {
    flex: 0 0 auto;
}

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

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

.main-nav li {
    margin: 0;
}

.main-nav a {
    color: #DCE5EE;
    text-decoration: none;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a:focus {
    color: #fff;
    border-bottom-color: var(--accent);
    text-decoration: none;
}

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

.site-main {
    position: relative;
    z-index: 1;
    padding: 2.6rem 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: 67% 27%;
    justify-content: space-between;
    align-items: start;
}

.layout-with-sidebar .content-area {
    min-width: 0;
}

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

.trail {
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
    line-height: 1.7;
}

.trail a {
    color: var(--muted);
    text-decoration: none;
}

.trail a:hover {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.trail-sep {
    margin: 0 0.35rem;
    color: #A7B4C1;
}

/* ============================================================
   6. Заголовки секций и страниц
   ============================================================ */

.sec-title,
.page-title {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    font-size: 2rem;
    margin: 0 0 1.6rem;
}

.sec-title::before,
.page-title::before {
    content: "";
    display: block;
    flex: 0 0 48px;
    width: 48px;
    height: 4px;
    background: var(--accent);
    margin: 0;
    vertical-align: baseline;
}

.page-title {
    font-size: 2.4rem;
}

.entry-title-single {
    font-size: 2.6rem;
    margin: 0 0 1rem;
}

.entry-title-single::before {
    display: none;
}

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

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

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

.card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.8rem;
    margin-bottom: 2.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #FFFFFF;
    border: 1px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(27, 42, 58, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(27, 42, 58, 0.12);
    border-color: var(--accent);
}

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

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

.card-thumb-empty {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--top);
    background-image: repeating-linear-gradient(45deg, rgba(46, 64, 85, 0.45) 0 1px, transparent 1px 14px);
}

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

.card-title {
    font-size: 1.22rem;
    margin: 0 0 0.6rem;
    line-height: 1.3;
}

.card-title::before {
    display: none;
}

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

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

.post-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
    letter-spacing: 0.02em;
}

.post-meta a {
    color: var(--muted);
    text-decoration: none;
}

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

.post-meta-sep {
    margin: 0 0.3rem;
    color: #AEBAC6;
}

.card-excerpt {
    font-size: 0.95rem;
    color: #40505F;
    margin-bottom: 1.1rem;
}

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

.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-family: var(--font-head);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2.4rem 0 0;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

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

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

/* ============================================================
   9. Главная страница
   ============================================================ */

.front-section {
    padding: 80px 0;
}

.front-section + .front-section {
    padding-top: 0;
}

.fs-inner {
    padding: 0;
}

/* Блок 1 — Hero */

.fs-hero {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background-color: var(--top);
    min-height: 460px;
    display: flex;
    align-items: flex-end;
    padding: 3.5rem 3rem;
}

.fs-hero img.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
}

.fs-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(17, 28, 38, 0.92) 0%, rgba(17, 28, 38, 0.72) 45%, rgba(17, 28, 38, 0.38) 100%);
    z-index: 1;
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 62ch;
    min-width: 0;
}

.hero-copy h1 {
    color: #FFFFFF;
    font-size: 3.5rem;
    margin: 0 0 1.1rem;
}

.hero-copy h1::before {
    display: none;
}

.hero-copy p {
    color: #C4CEDA;
    font-size: 1.12rem;
    margin: 0 0 1.8rem;
    max-width: 56ch;
}

.hero-rule {
    display: block;
    width: 96px;
    height: 4px;
    background: var(--accent);
}

/* Блок 2 — Статистика */

.fs-stats {
    background-color: var(--top);
    background-image: repeating-linear-gradient(45deg, rgba(46, 64, 85, 0.2) 0 1px, transparent 1px 24px);
    border-radius: 4px;
    padding: 3rem 2.4rem;
    color: #fff;
}

.fs-stats .sec-title {
    color: #FFFFFF;
}

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

.stat-cell {
    min-width: 0;
    padding: 0 1.4rem;
    border-right: 1px solid var(--grid-line);
}

.stat-cell:first-child {
    padding-left: 0;
}

.stat-cell:last-child {
    border-right: 0;
    padding-right: 0;
}

.stat-num {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.05;
    color: #FFFFFF;
    border-bottom: 4px solid var(--amber);
    padding-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

.stat-label {
    display: block;
    margin-top: 0.9rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--muted);
}

/* Блок «Последние записи» */

.fs-latest .front-more {
    margin-top: 2.2rem;
}

/* Блок 3 — Сетка карточек с иконками */

.fs-cards {
    padding: 3rem 2.4rem;
    background: var(--plate);
    border-radius: 4px;
}

.icard {
    background: #FFFFFF;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 1.8rem 1.6rem;
    box-shadow: 0 2px 12px rgba(27, 42, 58, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    min-width: 0;
}

.icard:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(27, 42, 58, 0.12);
    border-color: var(--accent);
}

.icard svg {
    display: block;
    margin-bottom: 1.1rem;
}

.icard h3 {
    font-size: 1.25rem;
    margin: 0 0 0.7rem;
}

.icard p {
    margin: 0;
    font-size: 0.96rem;
    color: #40505F;
}

/* Блок 4 — Цитата */

.fs-quote {
    background: var(--plate);
    border-radius: 4px;
    padding: 3rem 2.6rem;
    border-left: 6px solid var(--accent);
}

.fs-quote .quote-text {
    font-family: var(--font-head);
    font-size: 2rem;
    line-height: 1.32;
    color: var(--top);
    margin: 0 0 1.5rem;
    letter-spacing: -0.015em;
}

.fs-quote .quote-sign {
    display: block;
    font-size: 0.92rem;
    color: var(--muted);
    letter-spacing: 0.03em;
}

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

.entry {
    background: #FFFFFF;
    border-radius: 4px;
    padding: 2.4rem 2.4rem 2.6rem;
    box-shadow: 0 2px 12px rgba(27, 42, 58, 0.08);
}

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

.entry-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 2px;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content img {
    display: block;
    border-radius: 2px;
}

.entry-tags {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
    color: var(--muted);
}

.entry-tags a {
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
}

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    margin-top: 1.8rem;
    font-family: var(--font-head);
    font-size: 0.92rem;
}

.post-nav a {
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
}

.list-lead {
    margin-bottom: 2rem;
    color: #40505F;
}

.nothing {
    background: #FFFFFF;
    border-radius: 4px;
    padding: 2rem 2.2rem;
    box-shadow: 0 2px 12px rgba(27, 42, 58, 0.08);
}

/* ============================================================
   11. Сайдбар
   ============================================================ */

.sidebar {
    min-width: 0;
}

.side-block {
    background: var(--side);
    border-radius: 4px;
    padding: 1.5rem 1.5rem 1.6rem;
    margin-bottom: 1.6rem;
    color: var(--ink);
    border-top: 4px solid var(--accent);
}

.side-block-title {
    font-size: 1.12rem;
    margin: 0 0 1rem;
    color: var(--ink);
}

.side-block ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.side-block li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #DCE3EC;
    font-size: 0.95rem;
    color: var(--ink);
}

.side-block li:last-child {
    border-bottom: 0;
}

.side-block a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.side-block a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.side-block .post-date,
.side-block .rss-date {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.side-block p {
    color: var(--ink);
    font-size: 0.95rem;
}

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

.search-form {
    display: flex;
    gap: 0.5rem;
    min-width: 0;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.96rem;
    color: var(--ink);
    min-width: 0;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.search-form .btn {
    flex: 0 0 auto;
    padding: 0.65rem 1.2rem;
}

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

.talk {
    margin-top: 2.4rem;
    background: #FFFFFF;
    border-radius: 4px;
    padding: 2rem 2.2rem 2.2rem;
    box-shadow: 0 2px 12px rgba(27, 42, 58, 0.08);
}

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

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

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

.talk-body {
    background: var(--plate);
    border-radius: 2px;
    padding: 1.1rem 1.3rem 1.2rem;
}

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

.talk-author {
    font-family: var(--font-head);
    font-weight: 700;
}

.talk-author a {
    text-decoration: none;
    color: var(--ink);
}

.talk-date {
    font-size: 0.8rem;
    color: var(--muted);
}

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

.talk-tools {
    margin-top: 0.6rem;
    font-size: 0.86rem;
}

.talk-tools a {
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
}

.talk-hold {
    font-size: 0.86rem;
    color: var(--muted);
}

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

.comment-form label {
    display: block;
    font-size: 0.86rem;
    font-family: var(--font-head);
    margin-bottom: 0.3rem;
}

.comment-form .submit {
    display: inline-block;
    padding: 0.78rem 1.7rem;
    border-radius: 2px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.98rem;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

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

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

.comment-reply-title {
    font-size: 1.3rem;
}

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

.site-foot {
    background-color: var(--bottom);
    background-image: repeating-linear-gradient(45deg, rgba(46, 64, 85, 0.2) 0 1px, transparent 1px 24px);
    color: #C6D0DB;
    padding: 3.4rem 0 1.8rem;
    position: relative;
    z-index: 1;
}

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

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

.foot-block {
    margin-bottom: 1.6rem;
    color: #C6D0DB;
}

.foot-block p {
    color: #AEBBC8;
    font-size: 0.93rem;
}

.foot-block-title {
    font-size: 1.05rem;
    color: #FFFFFF;
    margin: 0 0 1rem;
}

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

.foot-block li {
    padding: 0.35rem 0;
    font-size: 0.93rem;
    color: #C6D0DB;
}

.foot-block a {
    color: #DCE5EE;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.foot-block a:hover {
    color: #FFFFFF;
    border-bottom-color: var(--accent);
}

.foot-block .post-date,
.foot-block .rss-date {
    display: block;
    font-size: 0.78rem;
    color: #8B9AA9;
}

.foot-line {
    border-top: 1px solid #22303D;
    padding-top: 1.4rem;
    font-size: 0.85rem;
    color: #8B9AA9;
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    background: var(--top);
    color: #DCE5EE;
    padding: 1.1rem 1.6rem;
    border-top: 4px solid var(--accent);
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    min-width: 0;
    flex: 1 1 320px;
}

.cookie-banner a {
    color: #fff;
}

/* ============================================================
   16. 404
   ============================================================ */

.page404 {
    background: #FFFFFF;
    border-radius: 4px;
    padding: 2.6rem 2.4rem;
    box-shadow: 0 2px 12px rgba(27, 42, 58, 0.08);
}

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

.page404 .search-form {
    max-width: 440px;
    margin-bottom: 1.6rem;
}

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

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

    h1 {
        font-size: 2.6rem;
    }

    .hero-copy h1 {
        font-size: 2.6rem;
    }

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

    .layout-single .content-area {
        width: 100%;
    }

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

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

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

    .stat-cell:nth-child(2) {
        border-right: 0;
        padding-right: 0;
    }

    .stat-cell:nth-child(3) {
        padding-left: 0;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

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

    .main-nav[hidden] {
        display: none !important;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        margin-top: 1rem;
        border-top: 1px solid #2B3B4D;
    }

    .main-nav li {
        border-bottom: 1px solid #2B3B4D;
    }

    .main-nav a {
        display: block;
        padding: 0.8rem 0;
        border-bottom: 0;
    }

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

@media (max-width: 600px) {
    h1 {
        font-size: 2.1rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .sec-title,
    .page-title {
        font-size: 1.6rem;
        gap: 0.8rem;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .entry-title-single {
        font-size: 1.85rem;
    }

    .front-section {
        padding: 48px 0;
    }

    .fs-hero {
        padding: 2rem 1.4rem;
        min-height: 360px;
    }

    .hero-copy h1 {
        font-size: 2.1rem;
    }

    .hero-copy p {
        font-size: 1rem;
    }

    .fs-stats,
    .fs-cards,
    .fs-quote {
        padding: 1.8rem 1.4rem;
    }

    .fs-quote .quote-text {
        font-size: 1.4rem;
    }

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

    .stat-cell {
        padding: 0;
        border-right: 0;
        border-bottom: 1px solid var(--grid-line);
        padding-bottom: 1.2rem;
    }

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

    .stat-num {
        font-size: 2.4rem;
    }

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

    .entry,
    .talk,
    .page404,
    .nothing {
        padding: 1.5rem 1.3rem;
    }

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

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

    body::after {
        width: 240px;
        height: 180px;
        background-size: 240px 180px;
    }
}
