/*
Theme Name: dds_judithcorning.com
Theme URI: https://judithcorning.com/
Author: Софья Ларина
Description: Тема для информационного сайта об изобразительном искусстве и художественных техниках. Японский минимализм, холодная сине-серая палитра, асимметрия и текстура бумаги.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: jcorn
*/

/* ---------- Переменные ---------- */
:root {
    --bg: #F4F6F9;
    --bg-alt: #E8EDF2;
    --paper: #FFFFFF;
    --ink: #1E262E;
    --deep: #1A212B;
    --accent: #B0C4DE;
    --accent-2: #2C3E50;
    --muted: #7A8B9E;
    --line: #DCE4EB;
    --font-head: "Inter", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    --font-body: "Cormorant Garamond", "Literata", Georgia, "Times New Roman", serif;
}

/* ---------- Служебные правила скрытия ---------- */
.cookie-banner[hidden] { display: none !important; }
.nav-list[hidden] { display: none !important; }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image: repeating-linear-gradient(45deg, rgba(30, 38, 46, .03) 0 1px, transparent 1px 10px);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

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

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

h1 { font-size: clamp(2.1rem, 5vw, 4.5rem); letter-spacing: .03em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

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

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

blockquote {
    margin: 1.8rem 0;
    padding: 1.4rem 1.6rem;
    background: var(--paper);
    border-left: 4px solid var(--accent);
    font-size: 1.15rem;
}

code, pre {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: .9em;
    background: var(--bg-alt);
}

pre { padding: 1rem 1.2rem; overflow-x: auto; }

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

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

th { background: var(--bg-alt); font-family: var(--font-head); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }

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

/* ---------- Контейнер ---------- */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* ---------- Кнопки ---------- */
.btn {
    position: relative;
    z-index: 0;
    display: inline-block;
    padding: .78rem 1.7rem;
    border: 1.5px solid var(--accent-2);
    border-radius: 2px;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: .78rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    text-decoration: none;
    overflow: hidden;
    transition: color .3s ease, border-color .3s ease;
    cursor: pointer;
}

.btn::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0; bottom: 0; left: 0;
    width: 0;
    background: linear-gradient(90deg, var(--accent-2) 0 50%, rgba(44, 62, 80, .93) 50% 100%);
    transition: width .38s ease;
}

.btn:hover, .btn:focus { color: #FFFFFF; border-color: var(--accent-2); }
.btn:hover::before, .btn:focus::before { width: 100%; }

.btn-ghost {
    border-color: transparent;
    padding-left: 0;
    padding-right: .6rem;
    color: var(--accent-2);
}

.btn-ghost::before { display: none; }

.btn-ghost:hover, .btn-ghost:focus {
    color: var(--accent-2);
    box-shadow: inset 0 -1px 0 var(--accent);
}

.btn-light { border-color: var(--accent); color: #FFFFFF; }
.btn-light::before { background: linear-gradient(90deg, var(--accent) 0 50%, rgba(176, 196, 222, .9) 50% 100%); }
.btn-light:hover, .btn-light:focus { color: var(--deep); }

/* ---------- Заголовки секций ---------- */
.section-title {
    position: relative;
    padding-left: 2.3rem;
    margin: 0 0 1.6rem;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: clamp(1.25rem, 2.2vw, 1.7rem);
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .28em;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    filter: blur(.4px);
}

.section-lead {
    max-width: 62ch;
    margin: 0 0 2.2rem;
    color: var(--muted);
}

/* ---------- Декоративный разделитель из 5 точек ---------- */
.dots-divider {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 14% 0 0;
    margin: 0;
}

.dots-divider span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--accent);
    filter: blur(.35px);
}

/* ---------- Шапка ---------- */
.site-header {
    position: relative;
    background: rgba(244, 246, 249, .55);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    border-bottom: 1px solid var(--line);
    transition: background .3s ease;
}

.site-header.is-scrolled { background: #FFFFFF; }

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

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

.brand-logo, .brand-mark { display: block; flex: 0 0 auto; }
.brand-mark { width: 46px; height: 46px; }

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

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    line-height: 1.35;
    color: var(--ink);
}

.brand-desc {
    display: block;
    font-size: .92rem;
    color: var(--muted);
    line-height: 1.4;
    margin-top: .25rem;
    max-width: 46ch;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: .55rem;
    padding: .55rem 1rem;
    border: 1.5px solid var(--accent-2);
    border-radius: 2px;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: .75rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
}

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

.nav-list li { position: relative; }

.nav-list a {
    font-family: var(--font-head);
    font-size: .82rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    padding-bottom: 4px;
    background-image: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 8px);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .28s ease, color .28s ease;
}

.nav-list a:hover, .nav-list a:focus { background-size: calc(100% - .5em) 1px; }

.nav-list .current-menu-item > a,
.nav-list .current_page_item > a {
    color: var(--accent-2);
    background-size: calc(100% - .5em) 1px;
}

/* ---------- Основа страницы ---------- */
.site-main { padding: 3.4rem 0 4.2rem; }

.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);
    column-gap: 6%;
    row-gap: 2.6rem;
    align-items: start;
}

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

/* ---------- Хлебные крошки ---------- */
.crumbs {
    font-family: var(--font-head);
    font-size: .78rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.8rem;
}

.crumbs a { color: var(--accent-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--accent); padding: 0 .35rem; }

/* ---------- Карточки записей ---------- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
}

.cards-list {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 0;
    overflow: hidden;
    transition: transform .28s ease, border-color .28s ease;
}

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

.card-thumb-wrap {
    position: relative;
    overflow: hidden;
    background: var(--bg-alt);
}

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

.card-thumb-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}

.card:hover .card-thumb-wrap::after { opacity: 1; }

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

.card-meta {
    font-family: var(--font-head);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .6rem;
}

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

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

.card-excerpt { color: #40505E; font-size: 1rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }

.card-more { margin-top: auto; padding-top: .8rem; }

/* Карточки в сетке — миниатюра сверху */
.card--grid .card-thumb-wrap img { aspect-ratio: 16 / 10; }

/* Горизонтальные карточки — миниатюра сбоку */
.card--row .card-thumb-wrap img { aspect-ratio: 16 / 10; }

@media (min-width: 601px) {
    .card--row { flex-direction: row; }
    .card--row .card-thumb-wrap {
        flex: 0 0 280px;
        position: relative;
    }
    .card--row .card-thumb-wrap a {
        display: block;
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
    }
    .card--row .card-thumb-wrap img { aspect-ratio: auto; }
}

/* ---------- Пагинация ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 2.6rem 0 0;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 44px;
    padding: .55rem .85rem;
    border: 1.5px solid var(--line);
    border-radius: 2px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-head);
    font-size: .8rem;
    letter-spacing: .08em;
    text-align: center;
    text-decoration: none;
    transition: border-color .25s ease, background .25s ease, color .25s ease;
}

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

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

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

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    background: var(--paper);
    border-left: 1px dashed var(--accent);
    padding: 1.6rem 1.4rem;
    color: var(--ink);
}

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

.sidebar .widget-title {
    font-size: .86rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 1rem;
}

.sidebar .widget-title::before {
    content: "";
    position: absolute;
    left: 0; top: .3em;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

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

.sidebar .widget li {
    padding: .55rem 0;
    border-bottom: 1px dashed var(--line);
    font-size: 1rem;
    color: var(--ink);
}

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

.sidebar .widget a { color: var(--ink); text-decoration: none; }
.sidebar .widget a:hover { color: var(--accent-2); box-shadow: inset 0 -1px 0 var(--accent); }
.sidebar .widget p { color: #3A4854; font-size: 1rem; }
.sidebar .post-date, .sidebar .widget .rss-date { color: var(--muted); font-size: .8rem; }

/* ---------- Главная ---------- */
.front-main { position: relative; padding: 0 0 4rem; }

.front-main::after {
    content: "";
    position: absolute;
    left: -40px;
    bottom: 0;
    width: 420px;
    height: 420px;
    max-width: 60vw;
    opacity: .05;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cpath fill='%232C3E50' d='M46 318c22-58 44-104 92-158 33-37 74-70 122-88 20-7 41-11 62-8-14 14-32 24-48 36-40 30-77 65-107 106-24 33-43 70-56 109-6 17-10 35-21 49-13 16-35 22-54 17 4-22 4-42 10-63z'/%3E%3Cpath fill='%232C3E50' d='M118 352c30-46 66-88 110-121 24-18 50-33 78-42-19 24-42 44-64 65-33 31-64 65-88 104-9 15-24 22-40 20 0-9 1-18 4-26z'/%3E%3C/svg%3E");
}

.front-section { position: relative; padding: 4.6rem 0; }
.front-section--alt { background: var(--bg-alt); }

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

/* Блок 1 — hero */
.hero {
    position: relative;
    padding: 5.6rem 0 5.2rem;
    background: linear-gradient(135deg, #1E262E 0%, #2C3E50 100%);
    color: #FFFFFF;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .22;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: cover;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 600' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23B0C4DE' stroke-width='1'%3E%3Cpath d='M-20 470 C 180 400 300 520 520 430 S 900 360 1220 440'/%3E%3Cpath d='M-20 510 C 200 450 340 560 560 470 S 920 400 1220 480'/%3E%3Cpath d='M60 40 L 300 210 M120 20 L 360 190 M180 10 L 420 180'/%3E%3Cpath d='M980 60 L 1160 210 M1020 40 L 1190 180'/%3E%3Cpath d='M-20 300 C 200 250 260 340 480 300'/%3E%3C/g%3E%3Cg fill='%23B0C4DE' opacity='.35'%3E%3Ccircle cx='860' cy='150' r='3'/%3E%3Ccircle cx='900' cy='190' r='2'/%3E%3Ccircle cx='930' cy='120' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-inner { position: relative; }

.hero-kicker {
    font-family: var(--font-head);
    font-size: .78rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.6rem;
}

.hero-title {
    position: relative;
    display: inline-block;
    font-size: clamp(1.9rem, 3.7vw, 3.4rem);
    letter-spacing: .01em;
    color: #FFFFFF;
    margin: 0 0 1.4rem;
    max-width: 20ch;
}

.hero-strike {
    position: absolute;
    left: -.2rem;
    top: .42em;
    width: 46%;
    height: .3em;
    background: var(--accent);
    opacity: .55;
    filter: blur(.6px);
    pointer-events: none;
}

.hero-desc {
    max-width: 60ch;
    color: #D7E0EA;
    font-size: 1.14rem;
    margin-bottom: 2.2rem;
}

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

/* Блок 2 — шаги лесенкой */
.steps { list-style: none; margin: 0; padding: 0; }

.steps li {
    display: flex;
    align-items: flex-start;
    gap: 1.6rem;
    padding: 1.6rem 0;
    border-bottom: 1px dashed var(--line);
    min-width: 0;
}

.steps li:last-child { border-bottom: none; }
.steps li:nth-child(2) { margin-left: 20px; }
.steps li:nth-child(3) { margin-left: 40px; }
.steps li:nth-child(4) { margin-left: 60px; }

.step-num {
    flex: 0 0 auto;
    font-family: var(--font-head);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    color: var(--line);
}

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

.step-text h3 {
    font-size: 1.05rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: .4rem;
}

.step-text p { margin: 0; color: #3D4A57; }

/* Блок последних записей */
.latest-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

/* Блок 3 — глоссарий */
.fs-accent {
    background: var(--paper);
    border-left: 4px solid var(--accent);
    padding: 3.4rem 2.6rem;
}

.glossary { display: grid; gap: 0; }

.glossary-row {
    display: grid;
    grid-template-columns: minmax(0, 30%) minmax(0, 1fr);
    gap: 1.8rem;
    padding: 1.3rem 0;
    border-bottom: 1px dashed var(--line);
    position: relative;
}

.glossary-row:last-child { border-bottom: none; }

.glossary-row::after {
    content: "";
    position: absolute;
    top: .6rem;
    bottom: .6rem;
    left: 30%;
    width: 1px;
    background: var(--accent);
    filter: blur(.35px);
}

.glossary-term {
    min-width: 0;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.glossary-def { min-width: 0; color: #3D4A57; }
.glossary-def p { margin: 0; }

/* Блок 4 — карта тем */
.topic-map {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
}

.topic-tile {
    display: block;
    min-width: 0;
    padding: 1.8rem 1.8rem 2rem;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--paper);
    text-decoration: none;
    color: var(--ink);
    transition: border-color .28s ease, background .28s ease, transform .28s ease;
}

.topic-tile:hover { border-color: var(--accent); background: #EDF1F5; transform: translateY(4px); }

.topic-tile svg { display: block; width: 40px; height: 40px; margin-bottom: 1.2rem; }

.topic-tile h3 {
    font-size: 1.35rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .5rem;
}

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

/* ---------- Записи и страницы ---------- */
.entry-header { margin-bottom: 1.8rem; }

.entry-title {
    font-size: clamp(1.9rem, 3.4vw, 3rem);
    letter-spacing: .01em;
    margin-bottom: .6rem;
}

.entry-meta {
    font-family: var(--font-head);
    font-size: .76rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

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

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

.entry-content h2 {
    position: relative;
    padding-left: 2.2rem;
    margin-top: 2.4rem;
}

.entry-content h2::before {
    content: "";
    position: absolute;
    left: 0; top: .3em;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--accent);
    filter: blur(.4px);
}

.entry-content h3 { margin-top: 2rem; }

.entry-content a {
    color: var(--accent-2);
    text-decoration: none;
    background-image: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 8px);
    background-repeat: no-repeat;
    background-position: 0 1.15em;
    background-size: 0 1px;
    transition: background-size .3s ease;
}

.entry-content a:hover, .entry-content a:focus { background-size: calc(100% - .45em) 1px; }

.entry-content img { display: block; height: auto; }

.entry-tags {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    font-family: var(--font-head);
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.entry-tags a { color: var(--accent-2); text-decoration: none; }

.post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
    margin-top: 2.6rem;
}

.post-nav a {
    display: block;
    padding: 1.1rem 1.3rem;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    transition: border-color .25s ease, transform .25s ease;
}

.post-nav a:hover { border-color: var(--accent); transform: translateY(4px); }

.post-nav span {
    display: block;
    font-family: var(--font-head);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .35rem;
}

/* ---------- Поиск ---------- */
.search-form {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin: 0 0 1.4rem;
}

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

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

/* ---------- Комментарии ---------- */
.comments-area { margin-top: 3rem; }

.comments-title {
    font-size: 1.1rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding-left: 2rem;
    position: relative;
}

.comments-title::before {
    content: "";
    position: absolute;
    left: 0; top: .35em;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--accent);
}

.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list ul.children { list-style: none; margin: 0; padding-left: 1.6rem; }

.comment-item {
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
    background: var(--paper);
    border: 1px solid var(--line);
}

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

.comment-author {
    font-family: var(--font-head);
    font-size: .88rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.comment-date { font-size: .8rem; color: var(--muted); }
.comment-reply a { font-size: .82rem; color: var(--accent-2); text-decoration: none; }

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

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

.comment-form textarea { min-height: 150px; }
.comment-form p { margin-bottom: 1rem; }

.comment-form input[type="submit"] {
    position: relative;
    padding: .78rem 1.7rem;
    border: 1.5px solid var(--accent-2);
    border-radius: 2px;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: .78rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .3s ease, color .3s ease;
}

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

/* ---------- 404 ---------- */
.error-box { padding: 2.4rem 2rem; background: var(--paper); border-left: 4px solid var(--accent); }
.error-code { font-family: var(--font-head); font-size: 4rem; color: var(--line); line-height: 1; margin-bottom: 1rem; }

/* ---------- Подвал ---------- */
.site-footer {
    position: relative;
    background: var(--deep);
    color: #C6D0DA;
    padding: 3.6rem 0 1.6rem;
}

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

.site-footer .widget-title {
    position: relative;
    padding-left: 1.5rem;
    font-size: .84rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.site-footer .widget-title::before {
    content: "";
    position: absolute;
    left: 0; top: .3em;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.site-footer .widget { min-width: 0; }
.site-footer .widget p { color: #C6D0DA; font-size: 1rem; }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }

.site-footer .widget li {
    padding: .45rem 0;
    border-bottom: 1px dashed rgba(176, 196, 222, .25);
    font-size: 1rem;
}

.site-footer .widget li:last-child { border-bottom: none; }
.site-footer .widget a { color: #DDE5EE; text-decoration: none; }
.site-footer .widget a:hover { color: var(--accent); }
.site-footer .post-date { color: #93A3B4; font-size: .8rem; }

.footer-sign {
    display: flex;
    justify-content: flex-end;
    margin-top: 2.4rem;
}

.footer-mail {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: var(--font-head);
    font-size: .82rem;
    letter-spacing: .22em;
    color: var(--accent);
    text-decoration: none;
    padding: .4rem 0;
    border-left: 1px solid rgba(176, 196, 222, .4);
    padding-left: .8rem;
}

.footer-mail:hover { color: #FFFFFF; }

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(176, 196, 222, .18);
    font-family: var(--font-head);
    font-size: .76rem;
    letter-spacing: .1em;
    color: #93A3B4;
}

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

.cookie-banner p { margin: 0; font-size: .98rem; min-width: 0; }
.cookie-banner a { color: var(--accent); }

.cookie-accept {
    flex: 0 0 auto;
    padding: .6rem 1.4rem;
    border: 1.5px solid var(--accent);
    border-radius: 2px;
    background: transparent;
    color: #FFFFFF;
    font-family: var(--font-head);
    font-size: .76rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .3s ease, color .3s ease;
}

.cookie-accept:hover { background: var(--accent); color: var(--deep); }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .sidebar { border-left: none; border-top: 1px dashed var(--accent); }
    .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-single { width: 100%; }
    .fs-inner { width: 92%; }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

    .header-inner { padding: 1.1rem 0; }
    .nav-toggle { display: inline-flex; }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: .9rem;
        width: 100%;
        padding: 1rem 0 .4rem;
    }

    .site-main { padding: 2.4rem 0 3rem; }
    .front-section { padding: 3rem 0; }
    .hero { padding: 3.6rem 0 3.4rem; }
    .fs-accent { padding: 2rem 1.4rem; }
    .fs-inner { width: 90%; }

    .cards-grid { grid-template-columns: minmax(0, 1fr); }
    .footer-cols { grid-template-columns: minmax(0, 1fr); }
    .topic-map { grid-template-columns: minmax(0, 1fr); }
    .post-nav { grid-template-columns: minmax(0, 1fr); }

    .steps li { flex-direction: column; gap: .6rem; }
    .steps li:nth-child(2),
    .steps li:nth-child(3),
    .steps li:nth-child(4) { margin-left: 0; }

    .glossary-row { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
    .glossary-row::after { display: none; }

    .card--row { flex-direction: column; }
    .card--row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card--row .card-thumb-wrap a { position: static; }
    .card--row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .dots-divider { padding-right: 8%; }
    .front-main::after { width: 240px; height: 240px; }
    .cookie-banner { padding: 1rem 1.1rem; }
    .footer-mail { writing-mode: horizontal-tb; border-left: none; border-top: 1px solid rgba(176, 196, 222, .4); padding: .6rem 0 0; }
    .footer-sign { justify-content: flex-start; }
}
