/*
Theme Name: dds_foodzhi.ru
Author: Алексей Зимин
Description: Тема Material Blueprint для информационного проекта о мебельном дизайне и производстве.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: mbprint
*/

/* ==================================================================
   1. Токены
   ================================================================== */

:root {
    --bg:          #EDF2F7;
    --bg-alt:      #F6F9FC;
    --paper:       #FFFFFF;
    --dark:        #1A202C;
    --dark-2:      #2A4365;
    --ink:         #1F2A44;
    --accent:      #0078A8;
    --accent-dark: #00507A;
    --accent-2:    #008C95;
    --copper:      #D38B5D;
    --muted:       #718096;
    --line:        #CBD5E0;
    --shell:       min(92%, 1180px);
    --font-head:   "Inter", "Manrope", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    --font-body:   "Roboto", "Work Sans", "Segoe UI", Arial, sans-serif;
    --font-mono:   "SFMono-Regular", "Consolas", "Roboto Mono", monospace;
}

/* ==================================================================
   2. Сброс и база
   ================================================================== */

*, *::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.72;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        repeating-linear-gradient(0deg, rgba(31, 42, 68, 0.045) 0 1px, transparent 1px 26px),
        repeating-linear-gradient(90deg, rgba(31, 42, 68, 0.045) 0 1px, transparent 1px 26px);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

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

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

.entry-content a,
.widget a,
.crumbs a {
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .25s ease, color .2s ease;
}

.entry-content a:hover,
.widget a:hover,
.crumbs a:hover { background-size: 100% 1px; }

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

h1 { font-size: 2.3rem; }
h2 { font-size: 1.75rem; margin-top: 1.7em; }
h3 { font-size: 1.3rem; margin-top: 1.5em; }
h4 { font-size: 1.12rem; }

p { margin: 0 0 1.15em; }

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

blockquote {
    margin: 1.8em 0;
    padding: 1.4rem 1.6rem;
    background: var(--bg-alt);
    border-left: 4px solid var(--accent);
    color: var(--ink);
    font-size: 1.05rem;
}

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

code, pre { font-family: var(--font-mono); font-size: .92em; }

pre {
    padding: 1rem 1.2rem;
    background: var(--dark);
    color: #E2E8F0;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    background: var(--paper);
}

table th, table td {
    border: 1px solid var(--line);
    padding: .65rem .85rem;
    text-align: left;
}

table th {
    background: var(--dark);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
}

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

::selection { background: var(--accent); color: #fff; }

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

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

/* ==================================================================
   3. Контейнеры и раскладки
   ================================================================== */

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

.site-main { padding: 2.6rem 0 3.4rem; }

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

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

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

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

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .01em;
    padding: .78rem 1.6rem;
    border: 1.5px solid var(--accent);
    background: var(--accent);
    color: #fff;
    border-radius: 0;
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 3px) 0, 100% 3px, 100% 100%, 3px 100%, 0 calc(100% - 3px));
    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(1px);
}

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

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

.btn-light {
    background: transparent;
    border-color: rgba(255, 255, 255, .55);
    color: #fff;
}

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

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

.site-header {
    position: static;
    background: var(--dark);
    color: #fff;
    border-bottom: 3px solid var(--accent);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    padding: 1.25rem 0;
    min-width: 0;
}

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

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

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

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

.brand-title {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: #fff;
    max-width: 30ch;
}

.brand-title:hover { color: #fff; }

.brand-desc {
    display: block;
    margin-top: .3rem;
    font-size: .78rem;
    line-height: 1.45;
    color: #A0AEC0;
    max-width: 46ch;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: .5rem;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, .4);
    color: #fff;
    font-family: var(--font-head);
    font-size: .9rem;
    padding: .5rem .9rem;
    cursor: pointer;
}

.nav-toggle-bars {
    display: inline-block;
    width: 18px;
    height: 2px;
    background: #fff;
    position: relative;
}

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

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

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

.main-nav li { margin: 0; position: relative; }

.main-nav a {
    display: inline-block;
    font-family: var(--font-head);
    font-size: .95rem;
    font-weight: 500;
    color: #E2E8F0;
    padding: .35rem 0;
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width .25s ease;
}

.main-nav a:hover { color: #fff; }
.main-nav a:hover::after { width: 100%; }

.main-nav .current-menu-item > a { color: #fff; }
.main-nav .current-menu-item > a::after { width: 100%; background: var(--copper); }

.main-nav ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: var(--dark-2);
    padding: .5rem 0;
    z-index: 40;
}

.main-nav li:hover > ul,
.main-nav li:focus-within > ul { display: block; }

.main-nav ul ul li { width: 100%; }
.main-nav ul ul a { display: block; padding: .5rem 1rem; }

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

.crumbs-bar {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
}

.crumbs {
    padding: .8rem 0;
    font-size: .84rem;
    color: var(--muted);
    font-family: var(--font-head);
}

.crumbs a { color: var(--accent); }
.crumbs-sep { color: var(--line); margin: 0 .3rem; }
.crumbs span:not(.crumbs-sep) { color: var(--ink); }

/* ==================================================================
   7. Заголовки секций и разделители
   ================================================================== */

.sec-title {
    position: relative;
    display: inline-block;
    font-size: 1.95rem;
    margin: 0 0 1.5rem;
    padding-bottom: .55rem;
}

.sec-title::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--accent);
    margin-right: 13px;
    transform: translateY(-9px);
}

.sec-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transition: height .2s ease;
}

.sec-title:hover::after { height: 4px; }

.sec-title.on-dark { color: #fff; }
.sec-title.on-dark::before { background: var(--copper); }
.sec-title.on-dark::after { background: var(--copper); }

.sec-lead {
    max-width: 62ch;
    color: var(--muted);
    margin: -.4rem 0 2rem;
}

.stripe-rule {
    height: 16px;
    background-image: repeating-linear-gradient(93deg, rgba(0, 120, 168, .22) 0 1px, transparent 1px 9px);
}

.fold-rule {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
}

.fold-rule::before,
.fold-rule::after {
    content: "";
    flex: 1;
    height: 1px;
    background-image: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px);
}

.fold-rule span {
    width: 9px;
    height: 9px;
    background: var(--copper);
    transform: rotate(45deg);
}

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

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

.card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    box-shadow: inset 0 0 0 3px var(--paper);
    border-radius: 0;
    overflow: hidden;
    transition: background-color .2s ease;
}

.card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background-color .2s ease;
    z-index: 2;
}

.card:hover { background: var(--paper); }
.card:hover::before { background: var(--accent); }

.card-thumb {
    position: relative;
    margin: 3px 3px 0;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

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

.card-thumb::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(26, 32, 44, .55), rgba(26, 32, 44, 0));
    pointer-events: none;
}

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

.card-meta {
    font-family: var(--font-mono);
    font-size: .76rem;
    letter-spacing: .04em;
    color: var(--muted);
    margin-bottom: .55rem;
}

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

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

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

.card-excerpt { color: #43506B; font-size: .95rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-more {
    margin-top: auto;
    padding-top: .9rem;
    font-family: var(--font-head);
    font-size: .88rem;
    font-weight: 600;
    color: var(--accent);
}

.card-more span { transition: margin-left .2s ease; display: inline-block; }
.card-more:hover span { margin-left: 5px; }

/* Горизонтальная карточка в ленте */
.card-wide { flex-direction: row; }

.card-wide .card-thumb-wrap {
    flex: 0 0 300px;
    position: relative;
    overflow: hidden;
    margin: 3px 0 3px 3px;
    min-width: 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

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

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

/* ==================================================================
   9. Главная
   ================================================================== */

.fs {
    padding: 4rem 0;
    position: relative;
}

.fs-alt { background: var(--paper); }

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

/* --- Hero --- */

.hero {
    position: relative;
    background: linear-gradient(120deg, var(--dark) 0%, var(--dark-2) 100%);
    color: #fff;
    overflow: hidden;
    padding: 4.2rem 0 4.6rem;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 28px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 28px);
    pointer-events: none;
}

.hero-corner {
    position: absolute;
    right: -40px;
    bottom: -50px;
    width: 320px;
    opacity: .07;
    pointer-events: none;
}

.hero-grid {
    position: relative;
    z-index: 2;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 3rem;
    align-items: center;
}

.hero-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: .76rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--copper);
    border: 1px solid rgba(211, 139, 93, .5);
    padding: .4rem .85rem;
    margin-bottom: 1.4rem;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.03;
    color: #fff;
    margin: 0 0 1.2rem;
}

.hero h1 em {
    display: block;
    font-style: normal;
    color: var(--copper);
}

.hero-text {
    color: #CBD5E0;
    font-size: 1.05rem;
    max-width: 52ch;
    margin-bottom: 1.9rem;
}

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

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

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

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

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

.tl { position: relative; margin-top: .5rem; }

.tl::before {
    content: "";
    position: absolute;
    left: 19px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--accent);
}

.tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 1.4rem;
    padding-bottom: 2.1rem;
}

.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent);
    background: var(--paper);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--copper);
    z-index: 2;
}

.tl-body { min-width: 0; padding-top: .25rem; }

.tl-body h3 { margin: 0 0 .35rem; font-size: 1.16rem; }
.tl-body p { margin: 0; color: #43506B; font-size: .96rem; }

@media (min-width: 961px) {
    .tl-item:nth-child(even) { margin-left: 3.2rem; }
}

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

.fs-stats {
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 26px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 26px),
        linear-gradient(120deg, var(--dark) 0%, var(--dark-2) 100%);
    color: #fff;
    padding: 3.2rem 2.4rem;
    border-radius: 0;
}

.fs-stats .sec-lead { color: #A9BBD0; }

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

.stat-cell {
    min-width: 0;
    padding: .6rem 1.2rem;
    border-left: 1px solid rgba(211, 139, 93, .55);
}

.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;
    color: #fff;
    letter-spacing: -0.03em;
}

.stat-label {
    display: block;
    margin-top: .55rem;
    font-size: .88rem;
    line-height: 1.4;
    color: #9FB6D1;
}

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

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

.topic {
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 1.9rem 1.6rem 1.5rem;
    transition: border-color .2s ease, transform .2s ease;
}

.topic:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
}

.topic-icon { margin-bottom: 1.1rem; color: var(--accent); }

.topic h3 { margin: 0 0 .5rem; font-size: 1.18rem; color: var(--ink); }

.topic p { color: var(--muted); font-size: .93rem; margin: 0 0 1.2rem; }

.topic-arrow {
    margin-top: auto;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .9rem;
    color: var(--accent);
}

.topic-arrow span { display: inline-block; transition: margin-left .2s ease; }
.topic:hover .topic-arrow span { margin-left: 6px; }

/* --- Последние записи --- */

.latest-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.latest-head .sec-title { margin-bottom: 0; }

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

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

.page-head h1 {
    font-size: 2.5rem;
    display: inline-block;
    position: relative;
    padding-bottom: .6rem;
    margin-bottom: .6rem;
}

.page-head h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
}

.entry-meta {
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--muted);
    letter-spacing: .03em;
    margin-bottom: 1.4rem;
}

.entry-meta a { color: var(--accent-2); }

.entry-thumb {
    margin: 0 0 1.8rem;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}

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

.entry-content {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 2.2rem 2.3rem;
    min-width: 0;
}

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

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

.entry-content h2 { font-size: 1.55rem; }

.entry-footer {
    margin-top: 1.6rem;
    font-size: .88rem;
    color: var(--muted);
}

.entry-footer a { color: var(--accent); }

.post-tags span {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: .78rem;
    margin-right: .4rem;
}

.archive-intro { margin-bottom: 2rem; }

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2.6rem;
}

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 .85rem;
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--ink);
    font-family: var(--font-head);
    font-size: .93rem;
    font-weight: 600;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

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

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

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

.sidebar { min-width: 0; }

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

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

.sidebar .widget-title {
    font-size: 1.08rem;
    color: var(--ink);
    margin: 0 0 1rem;
    padding-bottom: .55rem;
    border-bottom: 2px solid var(--accent);
}

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

.sidebar .widget li {
    padding: .55rem 0 .55rem 1.1rem;
    border-bottom: 1px dashed var(--line);
    position: relative;
    font-size: .95rem;
    margin: 0;
}

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

.sidebar .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05em;
    width: 6px;
    height: 6px;
    background: var(--copper);
    transform: rotate(45deg);
}

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

.sidebar .widget .post-date {
    display: block;
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--muted);
    margin-top: .2rem;
}

.sidebar .widget p { color: #43506B; font-size: .95rem; }

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

.site-footer {
    background: var(--dark);
    color: #CBD5E0;
    border-top: 3px solid var(--accent);
    margin-top: 2rem;
}

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

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

.site-footer .widget { color: #CBD5E0; font-size: .93rem; }

.site-footer .widget-title {
    font-size: 1rem;
    color: #fff;
    margin: 0 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--copper);
    display: inline-block;
}

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

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

.site-footer .widget li {
    margin: 0;
    padding: .42rem 0 .42rem 1rem;
    position: relative;
}

.site-footer .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1em;
    width: 5px;
    height: 5px;
    background: var(--accent-2);
    transform: rotate(45deg);
}

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

.site-footer .widget .post-date {
    display: block;
    font-family: var(--font-mono);
    font-size: .74rem;
    color: #8FA0B5;
}

.footer-contact { margin-top: .4rem; font-size: .92rem; }
.footer-contact a { color: var(--accent-2); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 1.2rem 0 1.6rem;
    font-size: .83rem;
    color: #8FA0B5;
    font-family: var(--font-head);
}

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

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

.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: .7rem .9rem;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: .95rem;
    border-radius: 0;
}

.search-form input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

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

.comments-title { font-size: 1.4rem; margin-top: 0; }

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

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

.comment-inner {
    background: var(--bg-alt);
    border-left: 3px solid var(--accent);
    padding: 1.1rem 1.3rem;
}

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

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

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

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

.comment-actions { margin-top: .5rem; font-size: .88rem; }

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

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

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid var(--line);
    background: var(--bg-alt);
    font-family: var(--font-body);
    font-size: .95rem;
    border-radius: 0;
}

.comment-form textarea { min-height: 140px; }

.comment-form .form-submit input[type="submit"] {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    padding: .78rem 1.6rem;
    border: 1.5px solid var(--accent);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    border-radius: 0;
    clip-path: polygon(0 0, calc(100% - 3px) 0, 100% 3px, 100% 100%, 3px 100%, 0 calc(100% - 3px));
}

.comment-form .form-submit input[type="submit"]:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.no-comments { color: var(--muted); }

/* ==================================================================
   15. 404 и поиск
   ================================================================== */

.notfound {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 2.6rem 2.4rem;
}

.notfound-code {
    font-family: var(--font-head);
    font-size: 4.4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    letter-spacing: -0.04em;
    margin-bottom: .8rem;
}

.notfound .search-form { max-width: 420px; margin: 1.6rem 0; }

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.1rem 1.6rem;
    background: var(--dark);
    color: #E2E8F0;
    border-top: 3px solid var(--copper);
    font-size: .9rem;
}

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

.cookie-banner .btn { flex: 0 0 auto; }

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

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

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .layout-single { width: 100%; }
    .fs-inner { width: 100%; }
    .hero-grid { width: 100%; grid-template-columns: minmax(0, 1fr); gap: 2.2rem; }
    .hero h1 { font-size: 2.6rem; }
    .hero-figure { max-width: 460px; }

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

    .header-inner { flex-wrap: wrap; }

    .main-nav {
        flex: 0 0 100%;
        display: none;
        padding-bottom: .8rem;
    }

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

    .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0; }

    .main-nav li { width: 100%; border-top: 1px solid rgba(255, 255, 255, .12); }

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

    .main-nav ul ul { position: static; display: block; background: transparent; padding: 0 0 0 1rem; }

    .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.6rem; }
    .stat-cell:nth-child(3) { border-left: 0; padding-left: 0; }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .entry-content { padding: 1.8rem 1.6rem; }
}

@media (max-width: 600px) {
    .fs { padding: 2.8rem 0; }
    .hero { padding: 2.8rem 0 3rem; }
    .hero h1 { font-size: 2.1rem; }
    .sec-title { font-size: 1.5rem; }
    .page-head h1 { font-size: 1.85rem; }

    .brand-desc { display: none; }

    .fs-stats { padding: 2rem 1.4rem; }
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-num { font-size: 2.1rem; }

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

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

    .card-wide .card-thumb-wrap {
        flex: none;
        width: auto;
        position: static;
        margin: 3px 3px 0;
    }

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

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

    .tl::before { left: 15px; }
    .tl-item { grid-template-columns: 32px minmax(0, 1fr); gap: 1rem; }
    .tl-dot { width: 32px; height: 32px; font-size: .92rem; }

    .entry-content { padding: 1.4rem 1.2rem; }
    .comments-area { padding: 1.4rem 1.2rem; }
    .notfound { padding: 1.8rem 1.4rem; }
    .cookie-banner { padding: 1rem 1.1rem; font-size: .85rem; }
}

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