/*
Theme Name: dds_mechtatelnitsa.ru
Theme URI: https://mechtatelnitsa.ru/
Author: Анна Лебедева
Description: Тема издания «Мечтательница» об образовании и науке в России. Лавандовая технологичная эстетика: сливовая шапка, аметистовые акценты, янтарные метки, диагональная сетка и волнистые разделители.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mechta
*/

:root {
    --bg: #F7F5FB;
    --bg-alt: #EDE8F5;
    --head: #2E1A47;
    --foot: #1F1233;
    --aside: #F0EBF7;
    --ink: #2A1F3D;
    --accent: #7C3AED;
    --accent-deep: #6D28D9;
    --amber: #F59E0B;
    --muted: #8B7FA8;
    --line: #D8CCF0;
    --white: #FFFFFF;
    --f-head: "Unbounded", "Montserrat", "Segoe UI", Arial, sans-serif;
    --f-body: "Manrope", "Inter", "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    position: relative;
    overflow-x: hidden;
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        repeating-linear-gradient(45deg, rgba(228, 220, 240, 0.4) 0 1px, transparent 1px 24px),
        repeating-linear-gradient(-45deg, rgba(228, 220, 240, 0.4) 0 1px, transparent 1px 24px);
}

body::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -140px;
    width: 520px;
    height: 460px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath fill='%237C3AED' d='M44 -58C57 -47 67 -31 71 -13C75 5 72 25 61 40C50 55 31 64 11 69C-9 74 -30 74 -46 64C-62 54 -72 33 -74 12C-76 -9 -69 -30 -55 -42C-41 -54 -20 -57 -1 -56C18 -55 31 -69 44 -58Z' transform='translate(100 100)'/%3E%3C/svg%3E") no-repeat center / contain;
    opacity: 0.04;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

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

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink);
    margin: 1.6em 0 0.6em;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.entry h2, .entry h3 {
    position: relative;
    padding-left: 20px;
}
.entry h2::before, .entry h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--amber);
    transition: transform 0.25s ease;
}
.entry h2:hover::before, .entry h3:hover::before { transform: scale(1.5); }

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

.entry a, .crumbs a, .widget a, .talk a, .cookie-text a {
    background-image: linear-gradient(var(--amber), var(--amber));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size 0.3s ease, color 0.2s ease;
}
.entry a:hover, .crumbs a:hover, .widget a:hover, .talk a:hover, .cookie-text a:hover { background-size: 100% 2px; }

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; }
th { background: var(--bg-alt); font-weight: 700; }

blockquote {
    margin: 1.5em 0;
    padding: 1.2em 1.5em;
    background: var(--bg-alt);
    border-left: 4px solid var(--accent);
    border-radius: 0 10px 10px 0;
}
blockquote p:last-child { margin-bottom: 0; }

pre { overflow-x: auto; background: var(--head); color: #EDE8F5; padding: 1em 1.2em; border-radius: 10px; }

.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%, 1180px);
    margin-inline: auto;
    position: relative;
    z-index: 1;
}
.shell.front-wide { width: min(85%, 1180px); }

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

.masthead { background: var(--head); color: #F7F5FB; position: relative; z-index: 2; }
.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; color: #F7F5FB; }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-logo, .brand-svg { display: block; width: 52px; height: 52px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.35;
    color: #FFFFFF;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 44ch;
}
.brand-desc {
    font-size: 0.78rem;
    line-height: 1.4;
    color: #C4B5E0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 60ch;
    margin-top: 0.2rem;
}

.primary-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.5rem 0.9rem;
    border-radius: 10px;
    color: #EDE8F5;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-list a:hover, .nav-list .current-menu-item > a { background: rgba(124, 58, 237, 0.35); color: #FFFFFF; }

.nav-toggle {
    display: none;
    width: 44px; height: 44px;
    border: 1.5px solid rgba(237, 232, 245, 0.4);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    display: block;
    width: 20px; height: 2px;
    background: #F7F5FB;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle-bar { top: 50%; margin-top: -1px; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; left: 0; transform: none; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    padding: 0.72rem 1.5rem;
    border-radius: 10px;
    font-family: var(--f-body);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    cursor: pointer;
    border: 1.5px solid transparent;
    text-align: center;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3); }
.btn-fill { background: var(--accent); color: #FFFFFF; }
.btn-fill:hover { background: var(--accent-deep); color: #FFFFFF; }
.btn-line { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-line:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #FFFFFF; }
.btn-amber { background: var(--amber); color: var(--head); }
.btn-amber:hover { background: #D97706; color: var(--head); }
.btn-ghost-light { background: transparent; color: #FFFFFF; border-color: #FFFFFF; }
.btn-ghost-light:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #FFFFFF; }

/* ---------- Хлебные крошки ---------- */
.crumbs { padding: 1.4rem 0 0; font-size: 0.9rem; color: var(--muted); }
.crumbs a { color: var(--accent); }
.crumbs-sep { margin: 0 0.35rem; color: var(--line); }
.crumbs span:last-child { color: var(--ink); }

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

.page-head { margin-bottom: 2rem; }
.page-title {
    font-size: 2.4rem;
    margin: 0.6rem 0 0;
    padding-left: 18px;
    border-left: 4px solid var(--accent);
    overflow-wrap: anywhere;
}
.page-intro { margin-top: 1rem; color: var(--muted); }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    background: var(--aside);
    border-radius: 14px;
    padding: 1.6rem 1.5rem;
    color: var(--ink);
}
.sidebar .widget + .widget { margin-top: 2rem; padding-top: 1.6rem; border-top: 1px dashed var(--line); }
.sidebar .widget-title {
    font-size: 1rem;
    margin: 0 0 1rem;
    color: var(--ink);
    padding-left: 14px;
    position: relative;
}
.sidebar .widget-title::before {
    content: "";
    position: absolute;
    left: 0; top: 0.45em;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--amber);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.55rem 0; border-bottom: 1px solid rgba(216, 204, 240, 0.7); line-height: 1.45; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink); font-weight: 600; }
.sidebar a:hover { color: var(--accent); }
.sidebar .post-date { display: block; font-size: 0.8rem; color: #6E6290; margin-top: 0.2rem; }
.sidebar p { color: var(--ink); }

/* ---------- Секции главной ---------- */
.front-section { padding: 80px 0; position: relative; }
.sec-base { background: transparent; }
.sec-alt {
    background-color: var(--bg-alt);
    background-image: radial-gradient(circle, rgba(196, 181, 224, 0.3) 1.5px, transparent 1.6px);
    background-size: 20px 20px;
}

.sec-title {
    font-size: 2rem;
    margin: 0 0 1.2rem;
    padding-left: 22px;
    border-left: 4px solid var(--accent);
}
.sec-title--plate {
    display: inline-block;
    background: var(--bg-alt);
    border-radius: 8px;
    padding: 0.55rem 1.3rem 0.55rem 22px;
    box-shadow: 0 2px 12px rgba(46, 26, 71, 0.06);
}
.sec-alt .sec-title--plate { background: #FFFFFF; }
.sec-title--light { color: #FFFFFF; }
.sec-lead { color: var(--muted); max-width: 62ch; margin-bottom: 2.2rem; }

.wave-rule {
    height: 28px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='28' viewBox='0 0 160 28'%3E%3Cpath d='M0 14 C20 0 60 0 80 14 S140 28 160 14' fill='none' stroke='%237C3AED' stroke-width='2' stroke-opacity='0.08'/%3E%3C/svg%3E") repeat-x center / 160px 28px;
    position: relative;
    z-index: 1;
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: center;
    background: var(--head);
}
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-shade { position: absolute; inset: 0; background: rgba(46, 26, 71, 0.75); }
.hero-inner { padding: 5rem 0; }
.hero-copy {
    max-width: 760px;
    padding-left: 28px;
    border-left: 2px solid var(--amber);
}
.hero-title {
    font-size: 3.2rem;
    line-height: 1.15;
    color: #FFFFFF;
    margin: 0 0 1.2rem;
    font-weight: 700;
}
.hero-lead { color: #E4DCF0; font-size: 1.15rem; max-width: 58ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Сетка иконок */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
}
.icon-card {
    min-width: 0;
    background: #FFFFFF;
    border-radius: 14px;
    padding: 1.8rem 1.5rem;
    border: 1px solid transparent;
    box-shadow: 0 2px 12px rgba(46, 26, 71, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.icon-card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: 0 8px 28px rgba(124, 58, 237, 0.15); }
.icon-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--accent);
    margin-bottom: 1.2rem;
}
.icon-card-title {
    font-size: 1.05rem;
    margin: 0 0 0.6rem;
    padding-left: 20px;
    position: relative;
}
.icon-card-title::before {
    content: "";
    position: absolute;
    left: 0; top: 0.42em;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--amber);
    transition: transform 0.25s ease;
}
.icon-card:hover .icon-card-title::before { transform: scale(1.5); }
.icon-card p { margin: 0; font-size: 0.97rem; color: #4A3D60; }

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #FFFFFF;
    border-radius: 14px;
    border: 1px solid transparent;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(46, 26, 71, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: 0 8px 28px rgba(124, 58, 237, 0.15); }
.card-thumb { position: relative; overflow: hidden; background: var(--bg-alt); }
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card:hover .card-thumb img { transform: scale(1.03); }
.card-pin {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--amber);
    color: var(--head);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.3rem 1.4rem 1.5rem;
    min-width: 0;
}
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.7rem; }
.card-title { font-size: 1.1rem; margin: 0 0 0.6rem; line-height: 1.35; overflow-wrap: anywhere; }
.card-title a { color: var(--ink); transition: color 0.2s ease; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { font-size: 0.95rem; color: #4A3D60; flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { align-self: flex-start; margin-top: 0.8rem; padding: 0.5rem 1.1rem; font-size: 0.88rem; }

.latest-all { margin: 2.2rem 0 0; text-align: center; }
.empty-note { color: var(--muted); }

/* Теги рубрик */
.chip {
    display: inline-block;
    padding: 0.18rem 0.6rem;
    border-radius: 6px;
    border: 1px solid;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
    transition: filter 0.2s ease;
}
.chip:hover { filter: brightness(0.94); }
.tone-plum { background: rgba(124, 58, 237, 0.1); border-color: rgba(124, 58, 237, 0.35); color: #6D28D9; }
.tone-amber { background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.45); color: #92400E; }
.tone-lilac { background: rgba(167, 139, 250, 0.16); border-color: rgba(167, 139, 250, 0.5); color: #5B3A9E; }
.tone-grape { background: rgba(46, 26, 71, 0.08); border-color: rgba(46, 26, 71, 0.3); color: #2E1A47; }

/* Статистика */
.sec-stats {
    background-color: var(--head);
    background-image: radial-gradient(circle, rgba(124, 58, 237, 0.1) 1.5px, transparent 1.6px);
    background-size: 20px 20px;
}
.stats-row {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat {
    min-width: 0;
    text-align: center;
    padding: 1rem 1.2rem;
    border-left: 1px solid rgba(124, 58, 237, 0.3);
}
.stat:first-child { border-left: 0; }
.stat-num {
    display: block;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 3rem;
    line-height: 1.1;
    color: var(--amber);
}
.stat-cap { display: block; margin-top: 0.6rem; color: #C4B5E0; font-size: 0.95rem; }

/* Таймлайн */
.chrono {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0 0 0 44px;
    position: relative;
}
.chrono::before {
    content: "";
    position: absolute;
    left: 12px; top: 6px; bottom: 6px;
    width: 2px;
    background: var(--accent);
}
.chrono-step { position: relative; }
.chrono-step + .chrono-step { margin-top: 1.6rem; }
.chrono-step::before {
    content: "";
    position: absolute;
    left: -39px; top: 1.8rem;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 4px var(--bg-alt);
}
.chrono-ghost {
    position: absolute;
    right: 1.4rem; top: 50%;
    transform: translateY(-50%);
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 6rem;
    line-height: 1;
    color: rgba(124, 58, 237, 0.15);
    pointer-events: none;
    z-index: 0;
}
.chrono-card {
    position: relative;
    background: #FFFFFF;
    overflow: hidden;
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    box-shadow: 0 2px 12px rgba(46, 26, 71, 0.06);
    max-width: 760px;
}
.chrono-card > *:not(.chrono-ghost) { position: relative; z-index: 1; }
.chrono-year { font-family: var(--f-head); font-weight: 700; font-size: 1.6rem; color: var(--accent); }
.chrono-title { font-size: 1.1rem; margin: 0.2rem 0 0.5rem; }
.chrono-card p { margin: 0; }

/* ---------- Запись ---------- */
.story-head { margin-bottom: 1.6rem; }
.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-size: 0.88rem; color: var(--muted); }
.story-cover { margin: 0 0 2rem; }
.story-cover img { display: block; width: 100%; height: auto; border-radius: 14px; }
.entry { overflow-wrap: break-word; }
.entry img { border-radius: 10px; }
.entry ul li::marker { color: var(--accent); }
.entry figure { margin: 1.5em 0; }
.entry figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }
.story-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; padding-top: 1.4rem; border-top: 1px dashed var(--line); }

.story-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 2.5rem 0;
}
.story-nav-link {
    min-width: 0;
    display: block;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    color: var(--ink);
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(46, 26, 71, 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.story-nav-link:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(124, 58, 237, 0.15); }
.story-nav-link span { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 500; margin-bottom: 0.2rem; }
.story-nav-link--next { grid-column: 2; text-align: right; }

/* ---------- Комментарии ---------- */
.talk { margin-top: 3rem; padding-top: 2rem; border-top: 1px dashed var(--line); }
.talk-title { margin-top: 0; }
.talk-list, .talk-list .children { list-style: none; margin: 0; padding: 0; }
.talk-list .children { padding-left: 2rem; }
.talk-body { background: #FFFFFF; border-radius: 12px; padding: 1.1rem 1.3rem; margin-bottom: 1rem; box-shadow: 0 2px 12px rgba(46, 26, 71, 0.06); }
.talk-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.talk-head img { border-radius: 50%; display: block; }
.talk-author { display: block; font-weight: 700; }
.talk-date { font-size: 0.8rem; color: var(--muted); }
.talk-wait { color: #92400E; font-size: 0.9rem; }
.comment-reply-link { font-size: 0.85rem; font-weight: 700; }
.comment-respond { margin-top: 2rem; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    font: inherit;
    background: #FFFFFF;
    color: var(--ink);
}

/* ---------- Поиск и 404 ---------- */
.seek { display: flex; gap: 0.6rem; margin: 1.2rem 0; }
.seek-field {
    flex: 1;
    min-width: 0;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    font: inherit;
    background: #FFFFFF;
    color: var(--ink);
}
.empty-box { background: #FFFFFF; border-radius: 14px; padding: 1.8rem 2rem; box-shadow: 0 2px 12px rgba(46, 26, 71, 0.06); }
.lost { text-align: left; }
.lost-code {
    display: block;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 7rem;
    line-height: 1;
    color: rgba(124, 58, 237, 0.15);
}

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 2.5rem 0 0; }
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.85rem;
    border-radius: 10px;
    border: 1.5px solid var(--line);
    background: #FFFFFF;
    color: var(--ink);
    font-weight: 700;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.pager a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pager .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.pager .page-numbers.dots { border-color: transparent; background: transparent; }

/* ---------- Подвал ---------- */
.wave-rule--foot { margin-top: 0; }
.colophon {
    background-color: var(--foot);
    background-image: radial-gradient(circle, rgba(124, 58, 237, 0.08) 1.5px, transparent 1.6px);
    background-size: 20px 20px;
    color: #D9D0EA;
    position: relative;
    z-index: 1;
}
.colophon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    padding: 3.5rem 0 2.5rem;
}
.colophon-col { min-width: 0; }
.colophon .widget + .widget { margin-top: 1.6rem; }
.colophon .widget-title { color: #FFFFFF; font-size: 1rem; margin: 0 0 1rem; padding-bottom: 0.6rem; border-bottom: 1px dashed rgba(216, 204, 240, 0.25); }
.colophon p, .colophon li { color: #D9D0EA; font-size: 0.95rem; }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { padding: 0.3rem 0; }
.colophon a { color: #E4DCF0; }
.colophon a:hover { color: #FFFFFF; }
.colophon .post-date { color: #A99BC7; font-size: 0.8rem; display: block; }
.colophon-bottom { border-top: 1px solid rgba(216, 204, 240, 0.15); padding: 1.2rem 0 1.4rem; }
.colophon-bottom p { margin: 0; font-size: 0.88rem; color: #A99BC7; }

/* ---------- 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: 880px;
    margin: 0 auto;
    background: var(--head);
    color: #EDE8F5;
    border-radius: 14px;
    padding: 1rem 1.4rem;
    box-shadow: 0 8px 28px rgba(31, 18, 51, 0.35);
}
.cookie-text { margin: 0; font-size: 0.9rem; }
.cookie-text a { color: #F59E0B; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .masthead-row { flex-wrap: wrap; }
    .nav-toggle { display: block; }
    .primary-nav { flex-basis: 100%; display: none; }
    .primary-nav.is-open { display: block; }
    .nav-list { flex-direction: column; padding: 0.5rem 0 0.4rem; }
    .brand { flex: 1; }
    .brand-desc { display: none; }

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 2.5rem; }
    .layout-single { width: 100%; }
    .icon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid, .no-aside .card-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.5rem; }
    .stat:nth-child(3) { border-left: 0; }
    .hero-title { font-size: 2.5rem; }
    .colophon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .shell.front-wide { width: min(92%, 1180px); }
    .front-section { padding: 56px 0; }
    .hero { min-height: 480px; }
    .hero-inner { padding: 3.5rem 0; }
    .hero-copy { padding-left: 18px; }
    .hero-title { font-size: 1.9rem; }
    .hero-lead { font-size: 1rem; }
    .sec-title { font-size: 1.45rem; }
    .sec-title--plate { padding: 0.5rem 1rem 0.5rem 18px; }
    .page-title { font-size: 1.7rem; }
    .icon-grid, .card-grid, .card-grid--two, .no-aside .card-grid--two { grid-template-columns: minmax(0, 1fr); }
    .icon-card { padding: 1.5rem 1.3rem; }
    .stats-row { grid-template-columns: minmax(0, 1fr); }
    .stat { border-left: 0; border-top: 1px solid rgba(124, 58, 237, 0.3); padding: 1rem 1rem; }
    .stat:first-child { border-top: 0; }
    .stat-num { font-size: 2.4rem; }
    .chrono { padding-left: 34px; }
    .chrono::before { left: 8px; }
    .chrono-step::before { left: -32px; }
    .chrono-card { padding: 1.2rem 1.2rem; }
    .chrono-ghost { font-size: 4rem; right: 0.8rem; }
    .sidebar { padding: 1.4rem 1.2rem; }
    .story-nav { grid-template-columns: minmax(0, 1fr); }
    .story-nav-link--next { grid-column: auto; }
    .colophon-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem 1.2rem; }
    .seek { flex-direction: column; }
    .empty-box { padding: 1.4rem 1.2rem; }
    .brand-name { font-size: 0.8rem; }
    .brand-logo, .brand-svg { width: 44px; height: 44px; }
}

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