/*
Theme Name: dds_tsklab.ru
Author: Алексей Корнев
Description: Информационная тема для справочника по технологиям и инструментам разработки. Лабораторный минимализм: холодная палитра, чертёжная сетка, строгая типографика.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: tsklab
*/

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

:root {
    --paper: #F4F7FA;
    --paper-alt: #E8EDF2;
    --panel: #FFFFFF;
    --deep: #1A222C;
    --ink: #1E2A36;
    --accent: #2A7DE1;
    --accent-2: #5B8CBF;
    --muted: #7A8B9F;
    --line: #D0D8E0;
    --line-soft: #C8D2DC;
    --grid: #DCE4EC;
    --f-head: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
    --f-body: "IBM Plex Mono", "Roboto Mono", "PT Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
    --shell: min(92%, 1180px);
}

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

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

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--paper);
    background-image:
        repeating-linear-gradient(to right, var(--grid) 0, var(--grid) 1px, transparent 1px, transparent 20px),
        repeating-linear-gradient(to bottom, var(--grid) 0, var(--grid) 1px, transparent 1px, transparent 20px);
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--f-body);
    font-size: 15px;
    line-height: 1.78;
}

body::after {
    content: "";
    position: fixed;
    right: -80px;
    bottom: -90px;
    width: 380px;
    height: 380px;
    pointer-events: none;
    z-index: 0;
    opacity: .35;
    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 300 300'%3E%3Ccircle cx='150' cy='150' r='140' fill='none' stroke='%235B8CBF' stroke-width='1'/%3E%3Ccircle cx='150' cy='150' r='104' fill='none' stroke='%232A7DE1' stroke-width='1' stroke-dasharray='6 7'/%3E%3Ccircle cx='150' cy='150' r='58' fill='none' stroke='%235B8CBF' stroke-width='1'/%3E%3Cpath d='M150 0v300M0 150h300' stroke='%235B8CBF' stroke-width='.7'/%3E%3C/svg%3E");
}

@media (max-width: 960px) {
    body::after {
        display: none;
    }
}

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

.shell {
    width: var(--shell);
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.shell-wide {
    width: min(85%, 1240px);
}

.site-main {
    display: block;
    position: relative;
    z-index: 1;
}

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

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

h1 {
    font-size: 3.2rem;
    letter-spacing: .05em;
}

h2 {
    font-size: 1.85rem;
}

h3 {
    font-size: 1.32rem;
}

h4 {
    font-size: 1.12rem;
}

p {
    margin: 0 0 1.15em;
    background: none;
}

a {
    color: var(--accent);
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .22s ease;
}

a:hover,
a:focus {
    background-size: 100% 1px;
}

.entry-body a {
    font-weight: 500;
}

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

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

.btn,
.comments input[type="submit"],
.search-submit {
    display: inline-block;
    font-family: var(--f-body);
    font-size: .82rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .78rem 1.6rem;
    border: 1px solid var(--accent);
    border-radius: 2px;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    background-image: none;
    transition: none;
}

.btn:hover,
.btn:focus,
.comments input[type="submit"]:hover,
.search-submit:hover {
    background: var(--accent);
    color: #fff;
    background-image: none;
}

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

.btn-solid:hover,
.btn-solid:focus {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.btn-sm {
    padding: .55rem 1.15rem;
    font-size: .74rem;
}

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

.site-top {
    position: relative;
    background: transparent;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-bottom: 1px solid rgba(122, 139, 159, .35);
    box-shadow: 0 6px 14px -12px rgba(30, 42, 54, .55);
    padding: 1.4rem 0;
    z-index: 2;
}

.site-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

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

.brand-link {
    display: block;
    flex: 0 0 auto;
    background-image: none;
    line-height: 0;
}

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

.brand-mark {
    display: block;
}

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

.brand-name {
    display: block;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.35;
    letter-spacing: .04em;
    max-width: 46ch;
}

.brand-name a {
    color: var(--ink);
    background-image: none;
}

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

.brand-tagline {
    display: block;
    margin-top: .3rem;
    font-size: .74rem;
    line-height: 1.5;
    color: var(--muted);
    max-width: 62ch;
}

.nav-switch {
    display: none;
    align-items: center;
    gap: .35rem;
    border: 1px solid var(--accent);
    border-radius: 2px;
    background: transparent;
    color: var(--accent);
    font-family: var(--f-body);
    font-size: .74rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .55rem .9rem;
    cursor: pointer;
}

.nav-switch-bar {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
}

.nav-switch-label {
    margin-left: .35rem;
}

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

.main-nav-list a {
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink);
}

.main-nav-list a:hover {
    color: var(--accent);
}

.main-nav-list .current-menu-item > a {
    color: var(--accent);
}

.main-nav-list .sub-menu {
    list-style: none;
    margin: .5rem 0 0;
    padding: 0 0 0 .8rem;
    border-left: 1px solid var(--line);
}

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

.fs {
    padding: 4.6rem 0;
    border-top: 1px dashed var(--line-soft);
    position: relative;
    overflow: hidden;
}

.fs:first-child {
    border-top: 0;
}

.fs-alt {
    background-color: var(--paper-alt);
    background-image: repeating-linear-gradient(45deg, rgba(42, 125, 225, .06) 0, rgba(42, 125, 225, .06) 1px, transparent 1px, transparent 9px);
}

.sec-head {
    display: flex;
    align-items: baseline;
    gap: 1.1rem;
    margin-bottom: 1.4rem;
    min-width: 0;
}

.sec-num {
    font-family: var(--f-body);
    font-size: 3.2rem;
    line-height: 1;
    font-weight: 700;
    color: var(--line-soft);
    flex: 0 0 auto;
}

.sec-title {
    margin: 0;
    font-size: 1.9rem;
    letter-spacing: .05em;
    min-width: 0;
}

.sec-lead {
    max-width: 68ch;
    color: var(--muted);
    margin-bottom: 2.4rem;
}

/* Hero */

.fs-hero {
    padding: 5.2rem 0 5.6rem;
    background-image: repeating-linear-gradient(90deg, rgba(91, 140, 191, .12) 0, rgba(91, 140, 191, .12) 1px, transparent 1px, transparent 100px);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 34px));
}

.fs-hero-inner {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1 1 420px;
    min-width: 0;
}

.hero-tag {
    display: inline-block;
    font-size: .74rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent-2);
    border-left: 3px solid var(--accent);
    padding-left: .7rem;
    margin-bottom: 1.4rem;
}

.hero-title {
    margin: 0 0 1.2rem;
    font-size: 3.2rem;
}

.hero-title-accent {
    color: var(--accent);
}

.hero-lead {
    max-width: 58ch;
    color: var(--ink);
}

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

.hero-art {
    flex: 0 1 320px;
    min-width: 0;
    display: flex;
    justify-content: center;
}

.hero-art svg {
    width: 100%;
    height: auto;
    max-width: 320px;
}

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

.flow {
    list-style: none;
    margin: 0;
    padding: 0 0 0 2.6rem;
    position: relative;
}

.flow::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    border-left: 1px dashed var(--accent-2);
}

.flow-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1.4rem;
    padding: 0 0 2.1rem;
    min-width: 0;
}

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

.flow-item::before {
    content: "";
    position: absolute;
    left: -2.6rem;
    top: .55rem;
    width: 13px;
    height: 13px;
    border: 1px solid var(--accent-2);
    border-radius: 50%;
    background: var(--paper-alt);
}

.flow-item.is-current::before {
    background: var(--accent);
    border-color: var(--accent);
}

.flow-num {
    font-family: var(--f-body);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent-2);
    flex: 0 0 auto;
}

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

.flow-title {
    margin: 0 0 .35rem;
    font-size: 1.14rem;
    letter-spacing: .04em;
}

.flow-body p {
    margin: 0;
    color: var(--muted);
}

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

.feed-more {
    margin: 2.4rem 0 0;
}

.feed-empty {
    color: var(--muted);
}

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

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

.stat {
    min-width: 0;
    padding: .4rem 0 .4rem 1.4rem;
    border-left: 1px solid var(--line-soft);
}

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

.stat-cap {
    display: block;
    margin-top: .5rem;
    font-size: .8rem;
    letter-spacing: .06em;
    color: var(--muted);
}

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

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

.map-tile {
    display: block;
    min-width: 0;
    padding: 1.9rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    background-image: none;
    color: var(--ink);
    position: relative;
}

.map-tile::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 9px;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
}

.map-tile:hover,
.map-tile:focus {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.map-tile:hover::before,
.map-tile:focus::before {
    border-color: #fff;
}

.map-ico {
    display: block;
    color: var(--accent);
    margin-bottom: 1rem;
}

.map-tile:hover .map-ico,
.map-tile:focus .map-ico {
    color: #fff;
}

.map-name {
    display: block;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 1.12rem;
    letter-spacing: .04em;
}

.map-note {
    display: block;
    margin-top: .5rem;
    font-size: .8rem;
    color: var(--muted);
}

.map-tile:hover .map-note,
.map-tile:focus .map-note {
    color: rgba(255, 255, 255, .85);
}

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

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    position: relative;
}

.card:hover {
    border-color: transparent;
    box-shadow: inset 4px 0 0 var(--accent);
    transform: translateY(4px);
}

.card-thumb {
    flex: 0 0 auto;
    position: static;
    overflow: hidden;
    background: var(--paper-alt);
}

.card-thumb a {
    display: block;
    position: static;
    background-image: none;
    line-height: 0;
}

.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    filter: grayscale(35%);
}

.card:hover .card-thumb img {
    filter: grayscale(0);
}

.card-body {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 1.6rem;
    position: relative;
}

.card-body::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
}

.post-meta {
    font-size: .74rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .6rem;
}

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

.meta-sep {
    color: var(--line);
}

.card-title {
    font-size: 1.24rem;
    margin: 0 0 .7rem;
    letter-spacing: .03em;
}

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

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

.card-excerpt {
    color: var(--muted);
    font-size: .92rem;
}

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

.card-more {
    margin: 1.1rem 0 0;
}

/* =========================================================
   7. Раскладки страниц
   ========================================================= */

.crumbs {
    font-size: .76rem;
    letter-spacing: .08em;
    color: var(--muted);
    padding: 1.6rem 0 .4rem;
}

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

.crumbs-sep {
    color: var(--line);
    padding: 0 .35rem;
}

.layout-single {
    display: block;
    width: 100%;
    padding: 1.6rem 0 4.5rem;
}

.layout-with-sidebar {
    display: block;
    padding: 1.6rem 0 4.5rem;
}

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

.page-head {
    margin-bottom: 2.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px dashed var(--line-soft);
}

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

.page-desc {
    margin: .9rem 0 0;
    color: var(--muted);
}

.empty-box {
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 1.8rem 1.7rem;
}

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

.entry {
    min-width: 0;
}

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

.entry-title {
    font-size: 2.5rem;
    margin: 0 0 .6rem;
}

.entry-cover {
    margin: 0 0 2rem;
    border: 1px solid var(--line);
}

.entry-cover img {
    width: 100%;
    height: auto;
    display: block;
}

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

.entry-body h2 {
    margin-top: 2.2rem;
    font-size: 1.6rem;
}

.entry-body h3 {
    margin-top: 1.8rem;
}

.entry-body ul,
.entry-body ol {
    padding-left: 1.4rem;
    margin: 0 0 1.3rem;
}

.entry-body li {
    margin-bottom: .5rem;
}

.entry-body ol {
    list-style: none;
    counter-reset: labcount;
    padding-left: 0;
}

.entry-body ol > li {
    counter-increment: labcount;
    position: relative;
    padding-left: 3rem;
}

.entry-body ol > li::before {
    content: counter(labcount, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: -.1rem;
    font-family: var(--f-body);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-2);
}

.entry-body ul {
    list-style: none;
    padding-left: 0;
}

.entry-body ul > li {
    position: relative;
    padding-left: 1.6rem;
}

.entry-body ul > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .72em;
    width: 8px;
    height: 8px;
    background: var(--accent);
}

.entry-body blockquote {
    margin: 2rem 0;
    padding: 1.7rem 1.8rem;
    background: var(--paper-alt);
    border-left: 4px solid var(--accent);
    position: relative;
    font-size: 1.02rem;
}

.entry-body blockquote::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 10px;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
}

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

.entry-body img {
    height: auto;
}

.entry-body figure {
    margin: 2rem 0;
}

.entry-body figcaption {
    font-size: .78rem;
    color: var(--muted);
    padding-top: .5rem;
}

.entry-body table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    margin: 0 0 1.6rem;
    font-size: .88rem;
}

.entry-body th,
.entry-body td {
    border: 1px solid var(--line);
    padding: .7rem .8rem;
    text-align: left;
}

.entry-body th {
    background: var(--paper-alt);
    font-family: var(--f-head);
    letter-spacing: .04em;
}

.entry-body code,
.entry-body pre {
    font-family: var(--f-body);
    background: var(--paper-alt);
    font-size: .86rem;
}

.entry-body code {
    padding: .12rem .35rem;
}

.entry-body pre {
    padding: 1.1rem 1.2rem;
    overflow-x: auto;
    border-left: 3px solid var(--accent-2);
    min-width: 0;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin: 2.2rem 0 0;
}

.tag-chip {
    display: inline-block;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .35rem .8rem;
    border: 1px solid var(--line);
    color: var(--accent-2);
    background-image: none;
}

.tag-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.entry-nav {
    display: flex;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px dashed var(--line-soft);
    font-size: .84rem;
}

.entry-nav-prev,
.entry-nav-next {
    min-width: 0;
    flex: 1 1 240px;
}

.entry-nav-next {
    text-align: right;
}

.error-code {
    display: block;
    font-family: var(--f-body);
    font-size: 4.4rem;
    font-weight: 700;
    color: var(--line-soft);
    line-height: 1;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    margin-top: 1.6rem;
}

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

.sidebar {
    min-width: 0;
    margin-top: 3rem;
}

.sidebar .widget {
    background-color: var(--panel);
    background-image: repeating-linear-gradient(45deg, rgba(122, 139, 159, .05) 0, rgba(122, 139, 159, .05) 1px, transparent 1px, transparent 6px);
    border: 1px solid var(--line);
    padding: 1.5rem 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--ink);
}

.sidebar .widget-title {
    font-size: 1rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 0 0 1rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--line);
}

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

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

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

.sidebar .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.15em;
    width: 6px;
    height: 6px;
    background: var(--accent-2);
}

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

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

.sidebar .widget .post-date {
    display: block;
    font-size: .72rem;
    letter-spacing: .08em;
    color: var(--muted);
}

.sidebar .widget p {
    color: var(--ink);
    font-size: .88rem;
}

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

.site-bottom {
    background-color: var(--deep);
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .03) 0, rgba(255, 255, 255, .03) 1px, transparent 1px, transparent 10px);
    color: #C6D0DC;
    padding: 3.6rem 0 2.2rem;
    margin-top: 0;
    position: relative;
    z-index: 1;
}

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

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

.site-bottom .widget {
    margin-bottom: 1.6rem;
    color: #C6D0DC;
}

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

.site-bottom .widget-title {
    font-size: .92rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #FFFFFF;
    margin: 0 0 1rem;
    padding-bottom: .55rem;
    border-bottom: 1px solid rgba(198, 208, 220, .25);
}

.site-bottom .widget p,
.site-bottom .widget li,
.site-bottom .widget div {
    color: #C6D0DC;
    font-size: .86rem;
}

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

.site-bottom .widget li {
    padding: .42rem 0 .42rem 1.1rem;
    position: relative;
}

.site-bottom .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05em;
    width: 6px;
    height: 6px;
    background: var(--accent);
}

.site-bottom .widget a {
    color: #E4EAF1;
}

.site-bottom .widget a:hover {
    color: #FFFFFF;
}

.site-bottom .widget .post-date {
    display: block;
    color: #93A2B4;
    font-size: .72rem;
}

.foot-line {
    display: flex;
    align-items: center;
    gap: .9rem;
    flex-wrap: wrap;
    margin-top: 2.6rem;
    padding-top: 1.3rem;
    border-top: 1px dashed rgba(198, 208, 220, .3);
    font-size: .78rem;
    letter-spacing: .06em;
    color: #93A2B4;
}

.foot-index {
    color: var(--accent);
}

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

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

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    padding: .58rem .8rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    color: var(--ink);
    font-size: .82rem;
    letter-spacing: .06em;
    background-image: none;
    background-color: var(--panel);
}

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

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

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

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

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

.search-box {
    margin: 1.4rem 0 0;
}

.search-label {
    display: block;
    font-size: .74rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .5rem;
}

.search-row {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1 1 200px;
    min-width: 0;
    font-family: var(--f-body);
    font-size: .9rem;
    padding: .68rem .9rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--panel);
    color: var(--ink);
}

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

.comments {
    margin-top: 3.2rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--line-soft);
}

.comments-title {
    font-size: 1.4rem;
    letter-spacing: .05em;
}

.comment-list,
.comment-list .children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .children {
    padding-left: 1.4rem;
    border-left: 1px solid var(--line);
    margin-top: 1rem;
}

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

.comment-inner {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 1.2rem 1.3rem;
}

.comment-head {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    flex-wrap: wrap;
    margin-bottom: .7rem;
}

.comment-author {
    font-family: var(--f-head);
    font-weight: 700;
    letter-spacing: .04em;
}

.comment-date {
    font-size: .74rem;
    color: var(--muted);
    letter-spacing: .08em;
}

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

.comment-actions {
    margin-top: .7rem;
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

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

.comment-respond {
    margin-top: 2.4rem;
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 1.8rem 1.7rem;
}

.comment-reply-title {
    font-size: 1.2rem;
    margin-top: 0;
}

.comment-form label {
    display: block;
    font-size: .76rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .4rem;
}

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

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

.comment-form .form-submit {
    margin-bottom: 0;
}

.comment-form .comment-form-cookies-consent label {
    display: inline;
    text-transform: none;
    letter-spacing: normal;
    font-size: .82rem;
}

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

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

.cookie-note {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--deep);
    border-top: 2px solid var(--accent);
    color: #DCE4EC;
    padding: 1.1rem 0;
}

.cookie-note-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.cookie-note-text {
    margin: 0;
    font-size: .82rem;
    line-height: 1.6;
    color: #DCE4EC;
    flex: 1 1 320px;
    min-width: 0;
}

.cookie-accept {
    flex: 0 0 auto;
}

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

@media (max-width: 600px) {
    .card-thumb {
        flex: none;
        width: 100%;
        position: static;
    }

    .card-thumb a {
        position: static;
    }

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

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

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

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

    .sec-num {
        font-size: 2.2rem;
    }

    .fs {
        padding: 3.2rem 0;
    }

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

    .entry-body blockquote {
        padding: 1.4rem 1.3rem;
    }

    .comment-respond,
    .empty-box {
        padding: 1.4rem 1.2rem;
    }

    .cookie-note {
        padding: 1rem 0;
    }
}

@media (min-width: 601px) {
    .card {
        flex-direction: row;
        align-items: stretch;
    }

    .card-thumb {
        flex: 0 0 240px;
        position: relative;
    }

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

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

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

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

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

@media (min-width: 961px) {
    .stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0;
    }

    .stat {
        padding: .4rem 1.6rem;
        border-left: 1px solid var(--line-soft);
    }

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

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

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

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

    .sidebar {
        margin-top: 0;
        padding-top: 1.5rem;
    }

    .flow {
        padding-left: 3.4rem;
    }

    .flow-item::before {
        left: -3.4rem;
    }

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

@media (max-width: 960px) {
    .nav-switch {
        display: inline-flex;
    }

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

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

    .main-nav-list {
        flex-direction: column;
        gap: .1rem;
        border-top: 1px dashed var(--line-soft);
        padding-top: .8rem;
        margin-top: .4rem;
    }

    .main-nav-list li {
        padding: .5rem 0;
        border-bottom: 1px dashed var(--line-soft);
    }

    .hero-art {
        flex: 1 1 100%;
        order: -1;
        max-width: 240px;
    }
}
