/*
Theme Name: dds_axaresearchfund-expertseries.com
Theme URI: https://axaresearchfund-expertseries.com/
Author: Екатерина Лаврова
Description: Тема для экспертно-аналитического портала об исследованиях рынка жилья. Скандинавский минимализм со швейцарской сеткой, холодная палитра, строгая типографика.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: axres
*/

/* ==================================================================
   1. Переменные и база
   ================================================================== */

:root {
    --bg: #F7F9FB;
    --bg-alt: #EDF2F7;
    --bg-head: #FFFFFF;
    --bg-foot: #1E293B;
    --bg-aside: #F1F5F9;
    --ink: #0F172A;
    --accent: #2563EB;
    --accent-dark: #1D4ED8;
    --accent-2: #0EA5E9;
    --muted: #64748B;
    --line: #E2E8F0;
    --line-2: #CBD5E1;
    --chip-bg: #DBEAFE;
    --chip-ink: #1E40AF;
    --shadow-1: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-2: 0 4px 12px rgba(15, 23, 42, 0.10);
    --font-head: "Inter Tight", "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-body: "Inter", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --gap: 6%;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image: radial-gradient(rgba(226, 232, 240, 0.4) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16.5px;
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
}

body::after {
    content: "";
    position: fixed;
    right: -40px;
    bottom: -30px;
    width: 460px;
    height: 300px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right bottom;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 460 300'%3E%3Cpolyline points='0,260 60,215 120,235 190,150 250,175 310,95 370,120 440,30' fill='none' stroke='%232563EB' stroke-width='6'/%3E%3Cpolyline points='0,290 70,275 140,282 210,240 280,255 350,205 420,225 460,190' fill='none' stroke='%232563EB' stroke-width='3'/%3E%3C/svg%3E");
}

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

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

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

h1 { font-size: 3.2rem; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

p {
    margin: 0 0 1.15em;
}

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

li {
    margin-bottom: 0.4em;
}

blockquote {
    margin: 1.8em 0;
    padding: 0.2rem 0 0.2rem 1.5rem;
    border-left: 3px solid var(--accent-2);
    color: #23324a;
    font-size: 1.08rem;
}

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

code, pre {
    font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.92em;
}

pre {
    overflow-x: auto;
    padding: 1rem 1.2rem;
    background: #E8EEF5;
    border-left: 3px solid var(--accent);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.6em;
    border: 1px solid var(--line-2);
    background: #fff;
}

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

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

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
    position: relative;
    z-index: 1;
}

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

/* ==================================================================
   2. Типовые элементы: кнопки, ссылки, теги, заголовки секций
   ================================================================== */

.btn {
    display: inline-block;
    padding: 0.78rem 1.7rem;
    border-radius: 4px;
    font-family: var(--font-head);
    font-size: 0.97rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.25;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-fill {
    background: var(--accent);
    color: #fff;
    border: 1.5px solid var(--accent);
}

.btn-fill:hover,
.btn-fill:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

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

.btn-line:hover,
.btn-line:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
}

.btn-light {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
}

.btn-light:hover,
.btn-light:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.3);
}

.entry-content a:not(.btn),
.widget-text a,
.comment-text a {
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 0;
    transition: background-size 0.22s ease;
}

.entry-content a:not(.btn):hover,
.widget-text a:hover,
.comment-text a:hover {
    background-size: 100% 1px;
}

.tagchip {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
    background: var(--chip-bg);
    color: var(--chip-ink);
    font-family: var(--font-head);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.5;
}

a.tagchip:hover {
    background: #c7ddfd;
    color: var(--chip-ink);
}

.sec-head {
    margin-bottom: 2.4rem;
}

.sec-kicker {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.sec-title {
    position: relative;
    margin: 0;
    padding-left: 1.1rem;
    text-align: left;
    font-size: 2.1rem;
}

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

.divider-dash {
    width: 80px;
    height: 0;
    margin: 0 auto;
    border-top: 1px dashed var(--line-2);
}

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

.edge {
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
}

.masthead {
    position: relative;
    background: var(--bg-head);
    border-bottom: 1px solid var(--line);
    z-index: 2;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
    max-width: 58%;
}

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

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

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

.brand-name {
    display: block;
    margin: 0;
    font-family: var(--font-head);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.32;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.brand-name a {
    color: inherit;
}

.brand-desc {
    display: block;
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.45;
    max-width: 52ch;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.95rem;
    background: transparent;
    border: 1.5px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font-family: var(--font-head);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

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

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

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

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

.site-nav ul {
    display: flex;
    align-items: center;
    gap: 1.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav li {
    margin: 0;
}

.site-nav a {
    display: inline-block;
    position: relative;
    padding: 0.25rem 0;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.2s ease;
}

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

.site-nav a:hover::after,
.site-nav .current-menu-item > a::after {
    transform: scaleY(1);
}

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

.site-main {
    position: relative;
    z-index: 1;
    padding: 2.4rem 0 4.5rem;
}

.front-main {
    padding: 0 0 4.5rem;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: var(--gap);
    row-gap: 3rem;
    align-items: start;
}

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

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

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

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

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

.trail-sep {
    margin: 0 0.35rem;
    color: var(--line-2);
}

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

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

.page-head .page-sub {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
}

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

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.6rem;
    margin-bottom: 2.6rem;
}

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

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

.card-thumb {
    display: block;
    line-height: 0;
    background: var(--bg-alt);
}

.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:
        repeating-linear-gradient(135deg, rgba(37, 99, 235, 0.07) 0 2px, transparent 2px 14px),
        var(--bg-alt);
}

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

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

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

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

.entry-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

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

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

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

.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-family: var(--font-head);
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

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

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

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

.front-section .shell {
    width: min(85%, 1180px);
}

.front-section.is-alt {
    background-color: var(--bg-alt);
    background-image: radial-gradient(rgba(203, 213, 225, 0.6) 1px, transparent 1px);
    background-size: 16px 16px;
}

/* 6.1 Hero */

.fs-hero {
    position: relative;
    padding: 0;
    overflow: hidden;
    background: #1E293B;
}

.fs-hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.fs-hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fs-hero-veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(100deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 41, 59, 0.78) 45%, rgba(30, 41, 59, 0.42) 100%);
}

.fs-hero .shell {
    position: relative;
    z-index: 2;
    padding: 6.4rem 0 6.1rem;
}

.fs-hero-text {
    width: 60%;
    min-width: 0;
}

.fs-hero .sec-kicker {
    color: #93C5FD;
}

.fs-hero h1 {
    margin: 0 0 1.1rem;
    color: #fff;
    font-size: 3.2rem;
}

.fs-hero-sub {
    margin: 0 0 2rem;
    color: #CBD5E1;
    font-size: 1.1rem;
    line-height: 1.66;
    max-width: 54ch;
}

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

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

.stat-cell {
    min-width: 0;
    padding: 0.4rem 1.4rem;
    border-left: 1px solid var(--line);
    text-align: left;
}

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

.stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 2.9rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--accent);
}

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

/* 6.3 Таймлайн */

.timeline {
    position: relative;
    margin: 0;
    padding: 0.5rem 0 0 0;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: var(--accent);
    transform: translateX(-0.5px);
}

.tl-item {
    position: relative;
    width: 50%;
    margin: 0 0 2.2rem;
    padding-right: 3rem;
    min-width: 0;
}

.tl-item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 3rem;
}

.tl-item::before {
    content: "";
    position: absolute;
    top: 1.9rem;
    right: -5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.tl-item:nth-child(even)::before {
    right: auto;
    left: -5px;
}

.tl-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow-1);
    padding: 1.4rem 1.5rem;
    transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

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

.tl-stage {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--accent-2);
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.tl-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.16rem;
}

.tl-card p {
    margin: 0;
    color: #2b3a52;
    font-size: 0.95rem;
}

/* 6.4 CTA */

.fs-cta-plate {
    position: relative;
    overflow: hidden;
    background: var(--bg-foot);
    border-radius: 6px;
    padding: 3.4rem 2.6rem;
    text-align: center;
}

.fs-cta-plate::before {
    content: "";
    position: absolute;
    top: -30px;
    right: -30px;
    width: 260px;
    height: 200px;
    opacity: 0.22;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.9) 0 1px, transparent 1px 22px),
        repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.9) 0 1px, transparent 1px 22px);
}

.fs-cta-plate > * {
    position: relative;
    z-index: 1;
}

.fs-cta-plate h2 {
    margin: 0 0 0.8rem;
    color: #fff;
    font-size: 2.1rem;
}

.fs-cta-plate p {
    margin: 0 auto 1.9rem;
    color: #94A3B8;
    font-size: 1.02rem;
    max-width: 62ch;
}

.fs-cta-plate .sec-kicker {
    color: #93C5FD;
}

/* 6.5 Последние записи на главной */

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

/* ==================================================================
   7. Запись и страница
   ================================================================== */

.entry-header {
    margin-bottom: 1.8rem;
}

.entry-header h1 {
    font-size: 2.6rem;
    margin-bottom: 0.7rem;
}

.entry-thumb {
    margin: 0 0 2rem;
    line-height: 0;
}

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

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

.entry-content h2 {
    margin-top: 2.1em;
    font-size: 1.75rem;
}

.entry-content h3 {
    margin-top: 1.7em;
    font-size: 1.35rem;
}

.entry-content img {
    height: auto;
    border-radius: 6px;
}

.entry-footer {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.entry-footer .tags-label {
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.post-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: space-between;
    margin-top: 2.2rem;
}

.post-switch a {
    max-width: 48%;
    font-family: var(--font-head);
    font-size: 0.92rem;
    font-weight: 600;
}

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

.sidebar {
    min-width: 0;
    background: var(--bg-aside);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.6rem 1.5rem 1.2rem;
}

.sidebar .widget {
    margin-bottom: 1.9rem;
    color: #22303f;
}

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

.sidebar .widget-title {
    position: relative;
    margin: 0 0 1rem;
    padding-left: 0.85rem;
    color: var(--ink);
    font-size: 1.05rem;
}

.sidebar .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 3px;
    background: var(--accent);
}

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

.sidebar li {
    margin-bottom: 0.7rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px dashed var(--line-2);
    font-size: 0.94rem;
    line-height: 1.5;
}

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

.sidebar a {
    color: #1c2a3d;
}

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

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

.sidebar .widget p {
    color: #2b3a52;
    font-size: 0.94rem;
}

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

.site-footer {
    position: relative;
    z-index: 1;
    background: var(--bg-foot);
    color: #CBD5E1;
}

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

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

.site-footer .widget {
    color: #CBD5E1;
    font-size: 0.94rem;
}

.site-footer .widget-title {
    position: relative;
    margin: 0 0 1rem;
    padding-left: 0.85rem;
    color: #fff;
    font-size: 1.02rem;
}

.site-footer .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 3px;
    background: var(--accent-2);
}

.site-footer .widget p {
    color: #CBD5E1;
}

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

.site-footer li {
    margin-bottom: 0.55rem;
    line-height: 1.5;
}

.site-footer a {
    color: #E2E8F0;
}

.site-footer a:hover {
    color: #7DD3FC;
}

.site-footer .post-date {
    display: block;
    color: #94A3B8;
    font-size: 0.8rem;
}

.footer-base {
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    padding: 1.3rem 0 1.6rem;
    color: #94A3B8;
    font-size: 0.84rem;
}

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 2.6rem 0 0;
}

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

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

.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);
}

/* ==================================================================
   11. Форма поиска, комментарии, 404
   ================================================================== */

.searchform {
    display: flex;
    gap: 0.5rem;
    max-width: 460px;
}

.searchform label {
    flex: 1;
    min-width: 0;
}

.searchform input[type="search"],
.searchform input[type="text"] {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line-2);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.searchform input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
}

.searchform button {
    padding: 0.7rem 1.3rem;
    border: 1.5px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.searchform button:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-1px);
}

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

.comments-title,
.comment-reply-title {
    font-size: 1.5rem;
}

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

.comment-list .children {
    margin: 1rem 0 0 1.4rem;
    padding: 0;
    list-style: none;
}

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

.comment-inner {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow-1);
}

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

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

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

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

.comment-actions {
    margin-top: 0.6rem;
    font-size: 0.87rem;
}

.comment-hold {
    color: var(--muted);
    font-size: 0.87rem;
}

.comment-respond {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.6rem 1.7rem;
}

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

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

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form .submit {
    padding: 0.78rem 1.7rem;
    border: 1.5px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

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

.nocomments {
    color: var(--muted);
}

.error404-box {
    text-align: left;
}

.error404-code {
    font-family: var(--font-head);
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    letter-spacing: -0.04em;
}

.error404-box .searchform {
    margin: 1.6rem 0;
}

.no-results {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.8rem 1.9rem;
    box-shadow: var(--shadow-1);
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-foot);
    border-top: 3px solid var(--accent);
    color: #CBD5E1;
    font-size: 0.88rem;
    line-height: 1.55;
}

.cookie-banner p {
    margin: 0;
    max-width: 70ch;
}

.cookie-banner a {
    color: #7DD3FC;
}

.cookie-accept {
    flex: 0 0 auto;
    padding: 0.6rem 1.4rem;
    border: 1.5px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-head);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cookie-accept:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-1px);
}

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

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

    .masthead-inner {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .brand {
        max-width: calc(100% - 140px);
    }

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

    .site-nav {
        flex: 0 0 100%;
        order: 3;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        border-top: 1px solid var(--line);
        padding-top: 0.6rem;
    }

    .site-nav li {
        width: 100%;
        border-bottom: 1px dashed var(--line);
    }

    .site-nav li:last-child {
        border-bottom: 0;
    }

    .site-nav a {
        display: block;
        width: 100%;
        padding: 0.75rem 0;
    }

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

    .layout-single {
        width: 100%;
    }

    .fs-hero .shell {
        padding: 4.6rem 0 4.4rem;
    }

    .fs-hero h1 {
        font-size: 2.5rem;
    }

    .fs-hero-text {
        width: 85%;
    }

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

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

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

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

    h1 { font-size: 2.05rem; }
    h2 { font-size: 1.55rem; }
    h3 { font-size: 1.25rem; }

    .sec-title { font-size: 1.55rem; }

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

    .fs-hero .shell {
        padding: 3.6rem 0 3.4rem;
    }

    .fs-hero h1 {
        font-size: 2.05rem;
    }

    .fs-hero-text {
        width: 100%;
    }

    .fs-hero-sub {
        font-size: 1rem;
    }

    .fs-stats .stats-row {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 1.5rem;
    }

    .stat-cell {
        border-left: 0;
        padding: 0 0 0 1rem;
        border-left: 2px solid var(--line);
    }

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

    .timeline::before {
        left: 6px;
    }

    .tl-item,
    .tl-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding-left: 2rem;
        padding-right: 0;
    }

    .tl-item::before,
    .tl-item:nth-child(even)::before {
        left: 1px;
        right: auto;
        top: 1.6rem;
    }

    .fs-cta-plate {
        padding: 2.2rem 1.4rem;
    }

    .fs-cta-plate h2 {
        font-size: 1.6rem;
    }

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

    .footer-cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
        padding: 2.6rem 0 2rem;
    }

    .sidebar {
        padding: 1.3rem 1.2rem 1rem;
    }

    .comment-respond {
        padding: 1.2rem 1.1rem;
    }

    .brand {
        max-width: 100%;
    }

    .brand-desc {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .cookie-banner {
        justify-content: flex-start;
        padding: 0.9rem 1.1rem;
        gap: 0.8rem;
    }

    .post-switch a {
        max-width: 100%;
    }

    .error404-code {
        font-size: 3.6rem;
    }
}
