/*
Theme Name: dds_indiyskiy-pasyans-online.ru
Author: Анна Белова
Description: Тема для образовательно-развлекательного портала о пасьянсах, логических играх и тренировке памяти. Японский минимализм с лавандово-аметистовой гаммой.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: ipasy
License: GNU General Public License v2 or later
*/

/* ---------- Токены ---------- */
:root {
    --bg: #F7F5FB;
    --bg-alt: #EDE9F6;
    --line: #D8D0E8;
    --plum: #2E2A3D;
    --side: #F2EFF9;
    --ink: #2E2A3D;
    --amethyst: #7C3AED;
    --amethyst-deep: #6428D6;
    --amber: #F59E0B;
    --muted: #8B84A3;
    --lavender: #C9B8F0;
    --white: #FFFFFF;
    --shadow-soft: 0 10px 30px rgba(124, 58, 237, 0.08), 0 2px 6px rgba(46, 42, 61, 0.04);
    --shadow-lift: 0 18px 42px rgba(124, 58, 237, 0.16), 0 4px 10px rgba(46, 42, 61, 0.06);
    --font-head: "Noto Sans JP", "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Noto Sans", "Source Sans 3", "PT Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --font-serif: "Cormorant Garamond", "PT Serif", Georgia, "Times New Roman", serif;
}

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

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

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.8;
    background-color: var(--bg);
    background-image: repeating-linear-gradient(45deg, rgba(237, 233, 246, 0.3) 0, rgba(237, 233, 246, 0.3) 1px, transparent 1px, transparent 16px);
    position: relative;
}

body::after {
    content: "";
    position: fixed;
    right: 2vmin;
    bottom: 2vmin;
    width: 260px;
    height: 300px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 116'%3E%3Cpath d='M50 2C38 20 6 36 6 62c0 13 10 23 22 23 8 0 14-4 18-9-1 13-6 23-14 30h36c-8-7-13-17-14-30 4 5 10 9 18 9 12 0 22-10 22-23C94 36 62 20 50 2z' fill='%237C3AED'/%3E%3C/svg%3E") no-repeat center / contain;
}

.site-main, .masthead, .colophon { position: relative; z-index: 1; }

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

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.3;
    font-weight: 700;
    margin: 1.6em 0 0.6em;
    letter-spacing: -0.005em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

a { color: var(--amethyst); text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; border: 1px solid var(--line); }
th, td { border: 1px solid var(--line); padding: 0.6em 0.8em; text-align: left; vertical-align: top; }
th { background: var(--bg-alt); font-family: var(--font-head); font-weight: 600; }

blockquote { margin: 1.6em 0; }

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

.shell { width: min(92%, 1240px); margin-left: auto; margin-right: auto; }

/* Анимированное подчёркивание текстовых ссылок */
.prose a, .widget a, .crumbs a, .card-more, .talk a {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size 0.3s ease, color 0.2s ease;
}
.prose a:hover, .widget a:hover, .crumbs a:hover, .card-more:hover, .talk a:hover { background-size: 100% 1px; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 0.78em 1.5em;
    border-radius: 10px;
    border: 1px solid transparent;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
}
.btn-fill { background: var(--amethyst); color: var(--white); }
.btn-fill:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(167, 139, 250, 0.45); color: var(--white); }
.btn-ghost { background: transparent; color: var(--amethyst); border-color: var(--amethyst); }
.btn-ghost:hover { transform: translateY(-2px); background: rgba(196, 181, 253, 0.35); box-shadow: 0 10px 24px rgba(167, 139, 250, 0.3); }
.btn-ghost-light { color: var(--white); border-color: rgba(255, 255, 255, 0.8); }
.btn-ghost-light:hover { color: var(--white); background: rgba(196, 181, 253, 0.28); }

/* ---------- Полоса сверху и шапка ---------- */
.topline { height: 3px; background: linear-gradient(90deg, var(--amethyst), var(--amber)); position: relative; z-index: 2; }

.masthead { background: var(--white); border-bottom: 1px solid var(--line); }
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
}
.brand { display: flex; align-items: center; gap: 0.9rem; min-width: 0; flex: 1 1 auto; color: var(--ink); }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-logo, .brand-svg { display: block; width: 48px; height: 48px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; max-width: 640px; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-desc {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--muted);
    margin-top: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-nav { flex: 0 0 auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.3rem; }
.nav-list a {
    display: block;
    padding: 0.5em 0.9em;
    border-radius: 10px;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 0.93rem;
    font-weight: 500;
    position: relative;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-list a::after {
    content: "";
    position: absolute;
    left: 0.9em; right: 0.9em; bottom: 0.3em;
    height: 1px;
    background: var(--amethyst);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.nav-list a:hover { color: var(--amethyst); }
.nav-list a:hover::after,
.nav-list .current-menu-item > a::after { transform: scaleX(1); }
.nav-list .current-menu-item > a { color: var(--amethyst); }

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.55em 0.9em;
    font: 600 0.9rem var(--font-head);
    color: var(--ink);
    cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--amethyst);
    border-radius: 2px;
    position: relative;
    transition: transform 0.2s ease;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* ---------- Общие отступы страниц ---------- */
.page-pad { padding: 2rem 0 5rem; }

.crumbs {
    font-size: 0.86rem;
    color: var(--muted);
    margin: 0 0 2rem;
    line-height: 1.6;
}
.crumbs a { color: var(--amethyst); }
.crumbs .sep { margin: 0 0.35em; color: var(--line); }
.crumbs span:last-child { color: var(--muted); }

/* Раскладки */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
}
.layout-single { display: block; width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }

/* Заголовки страниц */
.page-head, .entry-head { margin-bottom: 2.2rem; position: relative; }
.page-title, .entry-title {
    font-size: 2.1rem;
    margin: 0 0 0.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--amethyst);
}
.page-lead { color: var(--muted); margin: 0.6rem 0 0; max-width: 46rem; }
.head-dot {
    display: block;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--amber);
    margin: 0 0 0.55rem 1rem;
}

.empty-note {
    background: var(--side);
    border-radius: 14px;
    padding: 1.4rem 1.6rem;
    color: var(--muted);
}

/* ---------- Главная ---------- */
.fp-body { width: 85%; margin-left: auto; margin-right: auto; }

.fp-section { padding: 5rem 0; }
.fp-alt { background: var(--bg-alt); }

.sec-head { margin-bottom: 2.8rem; max-width: 44rem; }
.sec-head-row {
    max-width: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.sec-title {
    font-size: 1.95rem;
    margin: 0;
    padding-left: 1rem;
    border-left: 3px solid var(--amethyst);
    line-height: 1.25;
}
.sec-lead { color: var(--muted); margin: 0.9rem 0 0 1.2rem; }

.suit-divider, .suit-dots { display: flex; justify-content: center; gap: 0.55rem; }
.suit-divider { padding: 2.2rem 0 0; position: relative; }
.suit-divider i, .suit-dots i { display: block; width: 8px; height: 8px; border-radius: 50%; }
.suit-divider i:nth-child(1), .suit-dots i:nth-child(1) { background: var(--amethyst); }
.suit-divider i:nth-child(2), .suit-dots i:nth-child(2) { background: var(--amber); }
.suit-divider i:nth-child(3), .suit-dots i:nth-child(3) { background: var(--lavender); }

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: center;
    background: var(--plum);
    isolation: isolate;
}
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: -2;
}
.hero-veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(95deg, rgba(46, 42, 61, 0.86) 0%, rgba(46, 42, 61, 0.62) 42%, rgba(46, 42, 61, 0.12) 78%);
}
.hero > .shell { width: min(92%, 1240px); padding: 5.5rem 0; }
.hero-copy { max-width: 36rem; color: var(--white); }
.hero-kicker {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #E4DBF7;
    margin: 0 0 1.2rem;
}
.hero-kicker .suit-dots { gap: 0.35rem; }
.hero-title {
    color: var(--white);
    font-size: 2.8rem;
    line-height: 1.18;
    margin: 0 0 1.2rem;
    font-weight: 700;
}
.hero-sub { font-size: 1.08rem; color: #E9E4F5; margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* Таймлайн */
.chrono {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}
.chrono::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background: linear-gradient(var(--amethyst), rgba(124, 58, 237, 0.25));
}
.chrono-item {
    position: relative;
    width: 50%;
    padding: 0 3rem 2.4rem 0;
    min-width: 0;
}
.chrono-item:nth-child(even) { margin-left: 50%; padding: 0 0 2.4rem 3rem; }
.chrono-item::before {
    content: "";
    position: absolute;
    top: 1.6rem;
    right: -8px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--amethyst);
    z-index: 1;
}
.chrono-item:nth-child(even)::before { right: auto; left: -8px; }
.chrono-item:nth-child(3n)::before { border-color: var(--amber); }
.chrono-card {
    background: var(--white);
    border-radius: 14px;
    padding: 1.5rem 1.7rem;
    box-shadow: var(--shadow-soft);
    border-top: 2px solid var(--line);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.chrono-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-top-color: var(--amber); }
.chrono-date {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #B45309;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 6px;
    padding: 0.2em 0.6em;
}
.chrono-title { font-size: 1.2rem; margin: 0.7rem 0 0.5rem; }
.chrono-card p { margin: 0; color: #4A4560; font-size: 0.98rem; line-height: 1.7; }

/* Цитата */
.fp-quote-wrap { padding: 5rem 0; }
.accent-quote {
    margin: 0;
    background: var(--plum);
    color: #F2EEFA;
    border-radius: 14px;
    padding: 4.5rem 4rem 4rem 5rem;
    position: relative;
    overflow: hidden;
}
.accent-quote::before {
    content: "";
    position: absolute;
    left: 3rem;
    top: 4.6rem;
    bottom: 4.2rem;
    width: 3px;
    background: var(--amber);
}
.accent-quote::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 220px;
    height: 250px;
    opacity: 0.06;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 116'%3E%3Cpath d='M50 2C38 20 6 36 6 62c0 13 10 23 22 23 8 0 14-4 18-9-1 13-6 23-14 30h36c-8-7-13-17-14-30 4 5 10 9 18 9 12 0 22-10 22-23C94 36 62 20 50 2z' fill='%23FFFFFF'/%3E%3C/svg%3E") no-repeat center / contain;
}
.accent-quote blockquote { margin: 0; max-width: 46rem; }
.accent-quote blockquote p {
    font-family: var(--font-head);
    font-size: 1.85rem;
    line-height: 1.5;
    font-weight: 500;
    margin: 0;
    color: #F7F5FB;
}
.accent-quote figcaption {
    margin-top: 2rem;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #C9B8F0;
}
.accent-quote figcaption::before { content: "— "; color: var(--amber); }

/* Рубрикатор */
.topic-map {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}
.topic-tile {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    background: var(--white);
    border-radius: 14px;
    padding: 1.8rem 1.7rem;
    box-shadow: var(--shadow-soft);
    color: var(--ink);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.topic-tile:nth-child(3n+2) { transform: translateY(1.2rem); }
.topic-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.topic-tile:nth-child(3n+2):hover { transform: translateY(calc(1.2rem - 3px)); }
.topic-ico {
    width: 44px; height: 44px;
    color: var(--amethyst);
    margin-bottom: 0.6rem;
    display: block;
    transition: color 0.25s ease;
}
.topic-tile:hover .topic-ico { color: var(--amber); }
.topic-name { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.topic-note { color: var(--muted); font-size: 0.93rem; line-height: 1.55; }

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border-top: 2px solid var(--line);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-top-color: var(--amber); }

.card-thumb-wrap { position: relative; overflow: hidden; background: var(--bg-alt); }
.card-thumb-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 40px rgba(46, 42, 61, 0.28);
}
.card-thumb-wrap a { display: block; }
.card-thumb-wrap img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.03); }
.card-thumb-blank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 10;
    color: rgba(124, 58, 237, 0.35);
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.7), transparent 60%),
        repeating-linear-gradient(45deg, #EDE9F6 0 8px, #F2EFF9 8px 16px);
}
.card-thumb-blank svg { display: block; }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.3rem 1.4rem 1.5rem;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.7rem; }
.tag-chip {
    display: inline-block;
    font-size: 0.76rem;
    line-height: 1.3;
    font-weight: 600;
    color: var(--ink);
    background: #E2D9F5;
    border-radius: 6px;
    padding: 0.3em 0.65em;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.tag-chip:hover { background: var(--amethyst); color: var(--white); }
.card-title { font-size: 1.14rem; line-height: 1.4; margin: 0 0 0.4rem; overflow-wrap: anywhere; }
.card-title a { color: var(--ink); transition: color 0.2s ease; }
.card-title a:hover { color: var(--amethyst); }
.card-date { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.7rem; display: block; }
.card-excerpt { flex: 1; color: #4A4560; font-size: 0.95rem; line-height: 1.65; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { align-self: flex-start; margin-top: 0.8rem; font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; }

/* ---------- Пагинация ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin: 3rem 0 0;
}
.pager .page-numbers, .pager > span, .pager > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 0.85rem;
    border-radius: 10px;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.pager a.page-numbers:hover { transform: translateY(-2px); color: var(--amethyst); box-shadow: 0 8px 18px rgba(167, 139, 250, 0.3); }
.pager .page-numbers.current { background: var(--amethyst); color: var(--white); }
.pager .page-numbers.dots { background: transparent; box-shadow: none; min-width: auto; padding: 0 0.3rem; }

/* ---------- Сайдбар и виджеты ---------- */
.sidebar {
    min-width: 0;
    background: var(--side);
    border-radius: 14px;
    padding: 1.8rem 1.6rem;
    color: var(--ink);
}
.sidebar .widget { margin-bottom: 2.2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    font-size: 1.05rem;
    margin: 0 0 1rem;
    padding-left: 0.8rem;
    border-left: 3px solid var(--amethyst);
    color: var(--ink);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.65rem 0; border-bottom: 1px dashed var(--line); line-height: 1.5; color: var(--ink); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink); }
.sidebar a:hover { color: var(--amethyst); }
.sidebar .post-date { display: block; font-size: 0.78rem; color: #6F6888; margin-top: 0.2rem; }
.sidebar p, .sidebar .textwidget { color: var(--ink); }

/* ---------- Запись ---------- */
.entry { min-width: 0; }
.entry-title { font-size: 2.8rem; line-height: 1.2; }
.entry-meta { color: var(--muted); font-size: 0.9rem; margin-top: 0.8rem; padding-left: 1rem; }
.meta-sep { margin: 0 0.4em; }
.entry-cover { margin: 0 0 2.2rem; border-radius: 14px; overflow: hidden; }
.entry-cover img { display: block; width: 100%; height: auto; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 2.2rem 0 0; }

.prose { overflow-wrap: break-word; }
.prose > *:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.35em; }
.prose ul li::marker { color: var(--amethyst); }
.prose img { border-radius: 10px; }
.prose figure { margin: 1.8em 0; }
.prose figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.5em; text-align: center; }
.prose pre { overflow-x: auto; background: var(--plum); color: #F2EEFA; padding: 1rem 1.2rem; border-radius: 10px; }
.prose blockquote {
    background: var(--bg-alt);
    border-left: 3px solid var(--amethyst);
    border-radius: 0 14px 14px 0;
    padding: 1.2rem 1.6rem;
    font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose .wp-block-table { overflow-x: auto; }
.entry:not(.entry-page) .entry-content > p:first-of-type::first-letter {
    float: left;
    font-family: var(--font-serif);
    font-size: 3.6em;
    line-height: 0.85;
    font-weight: 700;
    color: var(--amethyst);
    padding: 0.08em 0.12em 0 0;
    margin-top: 0.05em;
}

/* ---------- Комментарии ---------- */
.talk { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px dashed var(--line); }
.talk-title { margin-top: 0; font-size: 1.5rem; }
.talk-list, .talk-list .children { list-style: none; margin: 0; padding: 0; }
.talk-list .children { padding-left: 2rem; }
.talk-body {
    background: var(--white);
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-soft);
}
.talk-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.talk-head img { border-radius: 50%; display: block; }
.talk-who { display: flex; flex-direction: column; line-height: 1.3; }
.talk-author { font-weight: 700; font-family: var(--font-head); }
.talk-date { font-size: 0.8rem; color: var(--muted); }
.talk-wait { color: #B45309; font-size: 0.9rem; }
.talk-reply a { font-size: 0.88rem; font-weight: 600; }
.comment-respond { margin-top: 2rem; }
.comment-form label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.3rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.7em 0.9em;
    font: inherit;
    background: var(--white);
    color: var(--ink);
}
.comment-form .comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-form .comment-form-cookies-consent label { font-weight: 400; }
.talk-note, .logged-in-as { font-size: 0.88rem; color: var(--muted); }

/* ---------- Поиск ---------- */
.seek { margin: 1.5rem 0; }
.seek-label { display: block; font-size: 0.88rem; color: var(--muted); margin-bottom: 0.4rem; }
.seek-row { display: flex; gap: 0.5rem; }
.seek-field {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.7em 1em;
    font: inherit;
    background: var(--white);
    color: var(--ink);
}

/* ---------- 404 ---------- */
.lost { text-align: left; max-width: 44rem; }
.lost-code {
    font-family: var(--font-head);
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    margin: 0 0 1rem;
    color: transparent;
    -webkit-text-stroke: 2px var(--amethyst);
}
.lost-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }

/* ---------- Подвал ---------- */
.colophon {
    background: var(--plum);
    color: #D9D3E8;
    padding: 4rem 0 2rem;
    margin-top: 0;
}
.colophon-suits { display: flex; gap: 0.5rem; margin-bottom: 2.5rem; }
.colophon-suits span { width: 8px; height: 8px; border-radius: 50%; display: block; }
.colophon-suits span:nth-child(1) { background: var(--amethyst); }
.colophon-suits span:nth-child(2) { background: var(--amber); }
.colophon-suits span:nth-child(3) { background: var(--lavender); }
.colophon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem;
}
.colophon-col { min-width: 0; }
.colophon .widget { margin-bottom: 1.8rem; color: #D9D3E8; }
.colophon .widget-title {
    color: #FFFFFF;
    font-size: 1rem;
    margin: 0 0 1rem;
    padding-left: 0.8rem;
    border-left: 3px solid var(--amber);
}
.colophon .widget p, .colophon .textwidget { color: #CFC8E0; font-size: 0.93rem; line-height: 1.7; }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { padding: 0.35rem 0; color: #CFC8E0; }
.colophon a { color: #E4DBF7; }
.colophon a:hover { color: var(--amber); }
.colophon .post-date { display: block; font-size: 0.78rem; color: #A9A1C0; }
.colophon-copy {
    margin: 2rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(216, 208, 232, 0.18);
    font-size: 0.85rem;
    color: #A9A1C0;
}

/* ---------- Cookie ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    background: var(--white);
    color: var(--ink);
    border-radius: 14px;
    border-top: 2px solid var(--amethyst);
    box-shadow: 0 18px 50px rgba(46, 42, 61, 0.22);
    padding: 1.1rem 1.4rem;
}
.cookie-text { margin: 0; font-size: 0.9rem; line-height: 1.55; min-width: 0; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .masthead-row { flex-wrap: wrap; }
    .nav-toggle { display: inline-flex; }
    .site-nav { flex-basis: 100%; display: none; }
    .site-nav.is-open { display: block; }
    .nav-list { flex-direction: column; gap: 0; padding: 0.5rem 0; border-top: 1px solid var(--line); }
    .nav-list a { padding: 0.75em 0.2em; }
    .nav-list a::after { left: 0.2em; right: auto; width: 2rem; }

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 3rem; }
    .layout-single, .fp-body { width: 100%; }

    .card-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topic-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topic-tile:nth-child(3n+2) { transform: none; }
    .topic-tile:nth-child(3n+2):hover { transform: translateY(-3px); }

    .chrono::before { left: 8px; margin-left: 0; }
    .chrono-item, .chrono-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 2rem 2.6rem; }
    .chrono-item::before, .chrono-item:nth-child(even)::before { left: 1px; right: auto; }

    .colophon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
    .accent-quote { padding: 3.5rem 3rem 3rem 4rem; }
    .accent-quote::before { left: 2.2rem; top: 3.6rem; bottom: 3.2rem; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .brand-desc { display: none; }
    .brand-name { font-size: 0.85rem; }
    .brand-logo, .brand-svg { width: 40px; height: 40px; }

    .fp-section, .fp-quote-wrap { padding: 3.2rem 0; }
    .hero { min-height: 480px; }
    .hero > .shell { padding: 3.5rem 0; }
    .hero-veil { background: linear-gradient(180deg, rgba(46, 42, 61, 0.78), rgba(46, 42, 61, 0.88)); }
    .hero-title { font-size: 2rem; }
    .sec-title { font-size: 1.5rem; }
    .page-title, .entry-title { font-size: 1.75rem; }

    .card-grid-3, .topic-map, .colophon-grid { grid-template-columns: minmax(0, 1fr); }
    .card-thumb-wrap a { position: static; }
    .card-thumb-wrap img { width: 100%; height: auto; aspect-ratio: 16 / 9; }

    .accent-quote { padding: 2.6rem 1.6rem 2.4rem 2.6rem; }
    .accent-quote::before { left: 1.3rem; top: 2.7rem; bottom: 2.5rem; }
    .accent-quote blockquote p { font-size: 1.35rem; }

    .sidebar { padding: 1.5rem 1.3rem; }
    .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem 1.2rem; }
    .seek-row { flex-direction: column; }
    .talk-list .children { padding-left: 1rem; }
    body::after { width: 150px; height: 175px; }
}

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