/*
Theme Name: dds_thespacepilgrim.com
Theme URI: https://thespacepilgrim.com/
Author: Анна Светлова
Description: Тема для информационного портала о творческих пространствах — лофтах, мастерских и студиях. Оформление в духе архитектурного чертежа на миллиметровой бумаге: разрез здания, экспликация помещений, карта кварталов и шкала шагов.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.6
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: spilgrim
*/

/* ===== Служебные правила [hidden] — до основных стилей ===== */
.cookie-banner[hidden] { display: none !important; }

/* ===== Палитра и токены ===== */
:root {
    --paper: #EDE6D6;
    --grid: #A9B4B8;
    --margin: #D9CFB8;
    --graphite: #2B2F33;
    --graphite-2: #363B40;
    --ink: #23282C;
    --muted: #7A7568;
    --brick: #C2452D;
    --brick-dark: #A2361F;
    --blue: #1F4E79;
    --zone: #F6F1E4;
    --side: #E4DAC4;
    --foot-text: #D8D1C1;
    --foot-muted: #A9A291;
    --line: 1.5px solid var(--ink);
    --f-head: "Fira Sans Condensed", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
    --f-body: "Fira Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --f-note: "PT Mono", "Courier New", monospace;
}

/* ===== Сброс и основа ===== */
*, *::before, *::after { box-sizing: border-box; }

html {
    background: var(--margin);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--margin);
    color: var(--ink);
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.65;
}

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

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brick); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px dashed var(--brick);
    outline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 0.6em;
    color: var(--ink);
    overflow-wrap: break-word;
    hyphens: auto;
}
p { margin: 0 0 1em; }
p, li, dd, td, th, figcaption, blockquote { overflow-wrap: break-word; hyphens: auto; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link {
    position: absolute;
    top: -60px;
    left: 12px;
    z-index: 100;
    background: var(--brick);
    color: #fff;
    padding: 0.5rem 1rem;
    font-family: var(--f-note);
}
.skip-link:focus { top: 12px; color: #fff; }

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

/* Лист бумаги с миллиметровой сеткой */
.sheet {
    width: min(96%, 1380px);
    margin-inline: auto;
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(169, 180, 184, 0.55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(169, 180, 184, 0.55) 1px, transparent 1px),
        linear-gradient(rgba(169, 180, 184, 0.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(169, 180, 184, 0.22) 1px, transparent 1px);
    background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
    border-left: 2px solid var(--ink);
    border-right: 2px solid var(--ink);
    padding-bottom: 3rem;
    min-height: 50vh;
}

/* ===== Кнопки-штампы ===== */
.stamp-btn {
    --stamp-c: var(--ink);
    --stamp-bg: var(--zone);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 0.7em 1.6em 0.7em 1.3em;
    font-family: var(--f-note);
    font-size: 0.86rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    color: var(--stamp-c);
    background: var(--stamp-bg);
    border: 1.5px solid var(--stamp-c);
    box-shadow: inset 0 0 0 3px var(--stamp-bg), inset 0 0 0 4px var(--stamp-c);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    cursor: pointer;
    line-height: 1.3;
    transition: transform 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}
.stamp-btn::after {
    content: "";
    position: absolute;
    top: 6px;
    right: -3px;
    width: 20px;
    height: 1.5px;
    background: var(--stamp-c);
    transform: rotate(45deg);
}
.stamp-btn:hover {
    --stamp-bg: var(--ink);
    --stamp-c: var(--zone);
    color: var(--zone);
    transform: translate(-2px, -2px);
}
.stamp-btn--ghost { --stamp-c: var(--blue); --stamp-bg: var(--paper); }
.stamp-btn--ghost:hover { --stamp-bg: var(--blue); --stamp-c: var(--zone); }
.stamp-btn--sm { font-size: 0.74rem; padding: 0.55em 1.3em 0.55em 1em; }
.stamp-btn--light { --stamp-c: var(--zone); --stamp-bg: var(--graphite); }
.stamp-btn--light:hover { --stamp-bg: var(--brick); --stamp-c: #fff; color: #fff; }

/* Штамп статуса */
.stamp {
    display: inline-block;
    padding: 0.2em 0.7em;
    font-family: var(--f-note);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brick);
    border: 2px solid var(--brick);
    box-shadow: inset 0 0 0 2px var(--zone), inset 0 0 0 3px var(--brick);
    transform: rotate(-4deg);
    background: var(--zone);
}
.stamp--mini { font-size: 0.66rem; transform: rotate(-3deg); padding: 0.1em 0.5em; }

/* ===== Шапка ===== */
.masthead {
    background: var(--graphite);
    color: #fff;
    border-bottom: 4px solid var(--ink);
}
.masthead__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding: 1.1rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: 1 1 320px;
    min-width: 0;
}
.brand__mark { color: #fff; flex: 0 0 auto; display: block; }
.brand__mark:hover { color: var(--brick); }
.brand-logo { width: 56px; height: 56px; object-fit: contain; display: block; }
.brand__text { min-width: 0; max-width: 620px; }
.brand__name {
    display: block;
    color: #fff;
    text-decoration: none;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 1.02rem;
    line-height: 1.3;
    letter-spacing: 0.01em;
}
.brand__name:hover { color: #F2D3C9; }
.brand__tagline {
    margin: 0.3rem 0 0;
    color: #B9B4A8;
    font-size: 0.8rem;
    line-height: 1.45;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    padding: 0.5rem 0.9rem;
    font-family: var(--f-note);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    position: relative;
}
.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; }

.mainnav { flex-basis: 100%; display: none; }
.mainnav.is-open { display: block; }
.mainnav__list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.35);
}
.mainnav__list a {
    display: block;
    padding: 0.55rem 0;
    color: #fff;
    text-decoration: none;
    font-family: var(--f-head);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}
.mainnav__list a:hover,
.mainnav__list .current-menu-item > a { color: #F2D3C9; }

@media (min-width: 961px) {
    .nav-toggle { display: none; }
    .mainnav { display: block; flex-basis: auto; }
    .mainnav__list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.2rem 1.6rem;
        border-top: 0;
        padding: 0;
    }
    .mainnav__list a { position: relative; padding: 0.3rem 0; }
    .mainnav__list a::after {
        content: "";
        position: absolute;
        left: 0; right: 0; bottom: 0;
        height: 2px;
        background: var(--brick);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.15s ease;
    }
    .mainnav__list a:hover::after,
    .mainnav__list .current-menu-item > a::after { transform: scaleX(1); }
}

/* ===== Общие секции главной ===== */
.front {
    width: 85%;
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}
.fs {
    position: relative;
    padding: 3.2rem 0 1rem;
    margin-top: 2.6rem;
    border-top: 3px solid var(--ink);
}
.fs::before, .fs::after {
    content: "";
    position: absolute;
    top: -12px;
    width: 3px;
    height: 21px;
    background: var(--ink);
}
.fs::before { left: 0; }
.fs::after { right: 0; }

.fs-head { text-align: center; margin-bottom: 2.2rem; }
.fs-head--start { text-align: left; }
.fs-kicker {
    margin: 0 0 0.6rem;
    font-family: var(--f-note);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue);
}
.fs-title {
    font-size: clamp(1.9rem, 4.2vw, 2.9rem);
    margin-bottom: 0.4em;
}
.fs-lead {
    max-width: 62ch;
    margin: 0 auto;
    color: var(--muted);
}

/* ===== Вступительный разрез ===== */
.intro { padding: 2.4rem 0 0.5rem; text-align: center; }
.intro__annot {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    font-family: var(--f-note);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue);
    border-bottom: 1px solid var(--blue);
    padding-bottom: 0.4rem;
    margin-bottom: 1.6rem;
}
.intro__title {
    font-size: clamp(2.3rem, 6.4vw, 4.3rem);
    font-weight: 500;
    letter-spacing: -0.005em;
    margin: 0 0 0.2em;
}
.intro__lead {
    font-family: var(--f-note);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1.8rem;
}
.intro__plan { margin: 0; }
.intro__canvas {
    position: relative;
    background: var(--zone);
    border: 2px solid var(--ink);
    padding: 1rem;
    box-shadow: 8px 8px 0 rgba(35, 40, 44, 0.12);
}
.intro__canvas img {
    width: 100%;
    aspect-ratio: 1596 / 836;
    object-fit: cover;
    mix-blend-mode: multiply;
}
.intro__tag {
    position: absolute;
    transform: translate(-50%, -50%) rotate(-2deg);
    font-family: var(--f-note);
    font-size: clamp(0.62rem, 1.3vw, 0.9rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brick);
    background: rgba(246, 241, 228, 0.94);
    border: 1.5px solid var(--brick);
    padding: 0.2em 0.7em;
    white-space: nowrap;
}
.intro__dim {
    position: relative;
    margin: 0.9rem 2px 0;
    height: 18px;
    border-left: 1.5px solid var(--ink);
    border-right: 1.5px solid var(--ink);
}
.intro__dim::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 50%;
    border-top: 1px solid var(--ink);
}
.intro__dim span {
    position: relative;
    display: inline-block;
    background: var(--paper);
    padding: 0 0.7em;
    font-family: var(--f-note);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 18px;
}
.intro__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.8rem;
}

/* ===== Блок 1: Разрез вдохновения ===== */
.floors__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
}
.floor { min-width: 0; text-align: center; }
.floor__level {
    font-family: var(--f-note);
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.8rem;
}
.zone-no {
    display: inline-block;
    background: var(--brick);
    color: #fff;
    padding: 0.1em 0.5em;
    margin-right: 0.4em;
}
.floor__room { max-width: 300px; margin: 0 auto 1rem; }
.floor__room img {
    width: 100%;
    aspect-ratio: 810 / 876;
    object-fit: contain;
    transition: transform 0.25s ease;
}
.floor:hover .floor__room img { transform: translateY(-6px); }
.floor__title {
    font-size: 1.5rem;
    display: inline-block;
    border-bottom: 3px solid var(--brick);
    padding-bottom: 0.15em;
}
.floor__text { color: var(--ink); font-size: 0.98rem; max-width: 36ch; margin-inline: auto; }

/* ===== Блок 2: Каталог помещений ===== */
.catalog__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
    align-items: start;
}
.catalog__sheet {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 2px solid var(--ink);
    background: var(--zone);
}
.plan-cell {
    position: relative;
    min-width: 0;
    padding: 1rem 1rem 1.3rem;
    border-right: 1.5px solid var(--ink);
    border-bottom: 1.5px solid var(--ink);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: background-color 0.15s ease;
}
.plan-cell:nth-child(2n) { border-right: 0; }
.plan-cell:nth-last-child(-n+2) { border-bottom: 0; }
.plan-cell:hover { background: #FBF8EF; }
.plan-cell__no {
    margin: 0 0 0.5rem;
    font-family: var(--f-note);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue);
}
.plan-cell__img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    margin-bottom: 0.9rem;
}
.plan-cell__name { font-size: 1.15rem; margin-bottom: 0.4rem; }
.plan-cell__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1rem;
    margin: 0 0 0.9rem;
    font-family: var(--f-note);
    font-size: 0.82rem;
}
.plan-cell__specs div { display: flex; gap: 0.35rem; }
.plan-cell__specs dt { color: var(--blue); font-weight: 700; }
.plan-cell__specs dd { margin: 0; }
.plan-cell .stamp { margin-top: auto; }

.catalog__legend {
    background: var(--zone);
    border: 2px solid var(--ink);
    padding: 1.4rem 1.3rem;
    background-image: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(31, 78, 121, 0.05) 10px 11px);
}
.catalog__legend-title {
    font-family: var(--f-note);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue);
    border-bottom: 1px solid var(--blue);
    padding-bottom: 0.5rem;
}
.legend-list { list-style: none; margin: 0 0 1rem; padding: 0; font-size: 0.92rem; }
.legend-list li { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px dashed rgba(35, 40, 44, 0.25); }
.legend-key {
    flex: 0 0 auto;
    width: 1.9rem; height: 1.9rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--f-note);
    font-weight: 700;
    color: var(--blue);
    border: 1.5px solid var(--blue);
}
.catalog__note { font-size: 0.88rem; color: var(--muted); }

/* ===== Карточки записей ===== */
.cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.8rem;
}
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--zone);
    border: 1.5px solid var(--ink);
    padding: 12px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.card__no {
    position: absolute;
    top: 0; right: 0;
    z-index: 2;
    background: var(--brick);
    color: #fff;
    font-family: var(--f-note);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    padding: 0.25em 0.7em;
}
.card__thumb { border: 1px solid var(--ink); overflow: hidden; background: #fff; }
.card__thumb a { display: block; }
.card__thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    mix-blend-mode: multiply;
    transition: transform 0.3s ease;
}
.card:hover .card__thumb img { transform: scale(1.03); }
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 0.4rem 0.3rem;
    min-width: 0;
}
.card__flag {
    margin: 0 0 0.4rem;
    font-family: var(--f-note);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brick);
}
.card__title { font-size: 1.3rem; margin-bottom: 0.5rem; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--brick); }
.card-excerpt { font-size: 0.94rem; color: #3E4246; flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 1px dashed rgba(35, 40, 44, 0.35);
}
.card__date { font-family: var(--f-note); font-size: 0.78rem; color: var(--muted); }
.latest__more { text-align: center; margin-top: 2rem; }
.empty-note {
    font-family: var(--f-note);
    color: var(--muted);
    text-align: center;
    padding: 1.6rem 1.4rem;
    border: 1.5px dashed var(--muted);
    background: var(--zone);
}

/* ===== Блок 3: Карта кварталов ===== */
.qmap__frame {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    background: var(--zone);
    border: 2px solid var(--ink);
    padding: 1rem;
}
.qmap__canvas {
    position: relative;
    min-width: 0;
    border: 1px solid var(--ink);
    background-color: #FBF8F0;
    background-image:
        linear-gradient(rgba(31, 78, 121, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 78, 121, 0.16) 1px, transparent 1px);
    background-size: 16px 16px;
}
.qmap__canvas img {
    width: 100%;
    aspect-ratio: 1834 / 606;
    object-fit: cover;
}
.qmap__route {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--brick);
    pointer-events: none;
}
.qpin {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.qpin b {
    width: 1.6rem; height: 1.6rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--brick);
    color: #fff;
    font-family: var(--f-note);
    font-size: 0.78rem;
    box-shadow: 0 0 0 3px var(--zone), 0 0 0 4.5px var(--brick);
}
.qpin--dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 0 3px var(--zone);
}
.qpin__label {
    display: none;
    background: rgba(246, 241, 228, 0.95);
    border: 1.5px solid var(--ink);
    padding: 0.15em 0.6em;
    font-family: var(--f-note);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}
.qmap__scale { display: none; }
.qmap__legend {
    list-style: none;
    margin: 1.6rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
}
.qmap__legend li { display: flex; gap: 0.9rem; min-width: 0; }
.qmap__legend b {
    flex: 0 0 auto;
    width: 2.2rem; height: 2.2rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--f-note);
    color: var(--brick);
    border: 2px solid var(--brick);
}
.qmap__legend h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.qmap__legend p { font-size: 0.94rem; margin: 0; }
.qmap__key {
    margin: 1.4rem 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--f-note);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.qmap__key-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.qmap__key-line { width: 34px; border-top: 2px dashed var(--brick); margin-left: 0.8rem; }

/* ===== Блок 4: Пять шагов ===== */
.steps__motto {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 1.4rem;
}
.steps__digit {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(4.5rem, 12vw, 7.5rem);
    line-height: 0.85;
    color: var(--brick);
}
.steps__motto p {
    margin: 0;
    max-width: 16ch;
    font-family: var(--f-head);
    font-size: clamp(1.2rem, 2.6vw, 1.7rem);
    line-height: 1.2;
    text-align: left;
}
.ruler { display: none; }
.steps__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
}
.step {
    min-width: 0;
    position: relative;
    padding: 1.1rem 1.1rem 1.2rem;
    border: 1.5px solid var(--ink);
    background: var(--zone);
}
.step__no {
    width: 2.1rem; height: 2.1rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1.5px solid var(--ink);
    font-family: var(--f-head);
    font-size: 1.15rem;
    background: var(--paper);
}
.step__img {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    margin: 0.6rem 0 0.8rem;
}
.step__title { font-size: 1.2rem; margin-bottom: 0.35rem; }
.step__text { font-size: 0.92rem; margin: 0; color: #3E4246; }

/* ===== Внутренние страницы ===== */
.crumbs {
    padding: 1.3rem 0 0.4rem;
    font-family: var(--f-note);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.crumbs a { color: var(--blue); text-decoration: none; }
.crumbs a:hover { color: var(--brick); text-decoration: underline; }
.crumbs__sep { color: var(--brick); margin: 0 0.25em; }

.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    padding-top: 1.2rem;
}
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
    padding-top: 1.2rem;
}
.content-area { min-width: 0; }

.page-head { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 3px solid var(--ink); }
.page-head__title { font-size: clamp(2rem, 4.6vw, 3rem); margin: 0; }
.page-head__intro { margin-top: 1rem; color: var(--muted); }

.entry-sheet {
    background: var(--zone);
    border: 1.5px solid var(--ink);
    padding: 1.6rem 1.4rem;
    position: relative;
}
.entry-sheet::before {
    content: "";
    position: absolute;
    top: -1.5px; left: 1.4rem;
    width: 64px; height: 5px;
    background: var(--brick);
}
.entry-head { margin-bottom: 1.4rem; }
.entry-meta {
    font-family: var(--f-note);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.6rem;
}
.entry-meta__sep { margin: 0 0.5em; color: var(--brick); }
.entry-title { font-size: clamp(1.9rem, 4.4vw, 2.8rem); margin: 0; }
.entry-cover { margin: 0 0 1.6rem; border: 1px solid var(--ink); }
.entry-cover img { width: 100%; }

.entry { font-size: 1.06rem; }
.entry > *:last-child { margin-bottom: 0; }
.entry h2 { font-size: 1.75rem; margin-top: 1.8em; padding-left: 0.8rem; border-left: 4px solid var(--brick); }
.entry h3 { font-size: 1.4rem; margin-top: 1.6em; }
.entry h4 { font-size: 1.2rem; margin-top: 1.4em; }
.entry ul, .entry ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.entry li { margin-bottom: 0.4em; }
.entry ul li::marker { color: var(--brick); }
.entry ol li::marker { color: var(--blue); font-family: var(--f-note); }
.entry img { border: 1px solid var(--ink); }
.entry figure { margin: 1.6em 0; }
.entry figcaption { font-family: var(--f-note); font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; }
.entry blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.4rem 1.2rem 1.6rem;
    background: var(--paper);
    border-left: 5px solid var(--brick);
    font-family: var(--f-head);
    font-size: 1.25rem;
    line-height: 1.45;
}
.entry blockquote p:last-child { margin-bottom: 0; }
.entry table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    font-size: 0.95rem;
    border: 1.5px solid var(--ink);
}
.entry th, .entry td { border: 1px solid var(--ink); padding: 0.55rem 0.7rem; text-align: left; vertical-align: top; }
.entry th { background: var(--graphite); color: #fff; font-family: var(--f-head); font-weight: 500; }
.entry tr:nth-child(even) td { background: rgba(237, 230, 214, 0.6); }
.entry pre, .entry code { font-family: var(--f-note); font-size: 0.9rem; }
.entry pre { overflow-x: auto; background: var(--graphite); color: #EDE6D6; padding: 1rem 1.2rem; }
.entry hr { border: 0; border-top: 2px dashed var(--muted); margin: 2em 0; }
.entry-pages { margin-top: 1.4rem; font-family: var(--f-note); }
.entry-tags { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.entry-tags a {
    font-family: var(--f-note);
    font-size: 0.78rem;
    text-decoration: none;
    border: 1px solid var(--blue);
    padding: 0.2em 0.6em;
}
.entry-tags a:hover { background: var(--blue); color: #fff; }

.alignleft { float: left; margin: 0.3em 1.4em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-family: var(--f-note); font-size: 0.8rem; color: var(--muted); }

.post-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}
.post-nav__link {
    display: block;
    text-decoration: none;
    border: 1.5px solid var(--ink);
    background: var(--zone);
    padding: 1rem 1.2rem;
    color: var(--ink);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.post-nav__link:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--brick); }
.post-nav__link--next { text-align: right; }
.post-nav__label { display: block; font-family: var(--f-note); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); margin-bottom: 0.3rem; }
.post-nav__title { font-family: var(--f-head); font-size: 1.1rem; }

/* ===== Сайдбар ===== */
.sidebar {
    min-width: 0;
    background: var(--side);
    border: 1.5px solid var(--ink);
    padding: 1.4rem 1.3rem;
    align-self: start;
    color: var(--ink);
}
.sidebar .widget + .widget { margin-top: 1.8rem; }
.sidebar .widget-title {
    font-family: var(--f-note);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
    border-bottom: 2px solid var(--ink);
    padding-bottom: 0.5rem;
    margin-bottom: 0.8rem;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.5rem 0; border-bottom: 1px dashed rgba(35, 40, 44, 0.3); line-height: 1.4; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink); text-decoration: none; }
.sidebar a:hover { color: var(--brick); text-decoration: underline; }
.sidebar .post-date { display: block; font-family: var(--f-note); font-size: 0.74rem; color: #5E594D; }
.sidebar p { color: var(--ink); }

/* ===== Пагинация ===== */
.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.6rem;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 0.8rem;
    font-family: var(--f-note);
    font-size: 0.86rem;
    text-decoration: none;
    color: var(--ink);
    background: var(--zone);
    border: 1.5px solid var(--ink);
}
.pager a.page-numbers:hover { background: var(--ink); color: var(--zone); }
.pager .page-numbers.current { background: var(--brick); border-color: var(--brick); color: #fff; }
.pager .page-numbers.dots { background: none; border-color: transparent; min-width: 1.6rem; }

/* ===== Поиск ===== */
.search-box { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 1.4rem; }
.search-box__field {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    font: inherit;
    font-size: 0.98rem;
    color: var(--ink);
    background: #FBF8F0;
    border: 1.5px solid var(--ink);
    border-radius: 0;
}
.empty-box { text-align: center; }

/* ===== 404 ===== */
.lost {
    text-align: center;
    background: var(--zone);
    border: 2px solid var(--ink);
    padding: 2.6rem 1.6rem;
    margin-top: 1rem;
}
.lost__code {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(5rem, 18vw, 9rem);
    line-height: 1;
    margin: 0;
    color: transparent;
    -webkit-text-stroke: 2px var(--brick);
}
.lost__title { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.lost__text { max-width: 52ch; margin-inline: auto; color: var(--muted); }
.lost .search-box { max-width: 480px; margin-inline: auto; }

/* ===== Комментарии ===== */
.talk {
    margin-top: 2.4rem;
    background: var(--zone);
    border: 1.5px solid var(--ink);
    padding: 1.6rem 1.4rem;
}
.talk__title, .comment-reply-title { font-size: 1.5rem; }
.talk__list, .talk__list .children { list-style: none; margin: 0; padding: 0; }
.talk__list .children { padding-left: 1.4rem; border-left: 2px dashed var(--muted); margin-left: 0.6rem; }
.remark__body { padding: 1rem 0; border-bottom: 1px dashed rgba(35, 40, 44, 0.3); }
.remark__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin-bottom: 0.5rem; }
.remark__head img { border: 1px solid var(--ink); }
.remark__author { font-family: var(--f-head); font-weight: 600; }
.remark__date { font-family: var(--f-note); font-size: 0.76rem; color: var(--muted); }
.remark__moderation { font-family: var(--f-note); font-size: 0.82rem; color: var(--brick); }
.remark__reply a { font-family: var(--f-note); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.talk__closed { font-family: var(--f-note); color: var(--muted); }
.comment-respond { margin-top: 1.6rem; }
.comment-form label { display: block; font-family: var(--f-note); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    font: inherit;
    color: var(--ink);
    background: #FBF8F0;
    border: 1.5px solid var(--ink);
    border-radius: 0;
}
.comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-form-cookies-consent label { text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: 0.9rem; }
.comment-notes, .logged-in-as { font-size: 0.9rem; color: var(--muted); }
.comment-form .submit { border-radius: 0; }

/* ===== Подвал ===== */
.colophon {
    background: var(--graphite);
    color: var(--foot-text);
    border-top: 4px solid var(--ink);
    padding: 3rem 0 1.4rem;
    font-size: 0.94rem;
}
.colophon__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
}
.colophon__col { min-width: 0; }
.colophon .widget-title {
    color: #FFFFFF;
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
.colophon p, .colophon li, .colophon .textwidget { color: var(--foot-text); }
.colophon a { color: #EDE6D6; }
.colophon a:hover { color: #F2A896; }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { padding: 0.3rem 0; }
.colophon li a { text-decoration: none; }
.colophon li a::before { content: "— "; color: var(--brick); }
.colophon li a:hover { text-decoration: underline; }
.colophon .post-date { color: var(--foot-muted); }
.colophon__copy {
    margin: 2.4rem 0 0;
    padding-top: 1rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.25);
    font-family: var(--f-note);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--foot-muted);
}

/* ===== Cookie-баннер ===== */
.cookie-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem 1.4rem;
    background: var(--graphite);
    color: var(--foot-text);
    border: 2px solid var(--zone);
    box-shadow: 0 0 0 2px var(--graphite), 6px 6px 0 rgba(0, 0, 0, 0.25);
    padding: 1rem 1.2rem;
}
.cookie-banner__text { margin: 0; flex: 1 1 280px; font-size: 0.9rem; color: var(--foot-text); }

/* ===== Брейкпоинт ~600px ===== */
@media (min-width: 601px) {
    .floors__row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
    .cards--two, .cards--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qpin__label { display: inline-block; }
    .qmap__legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .steps__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-nav__link--next { grid-column: 2; }
    .colophon__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .entry-sheet { padding: 2.2rem 2.2rem; }
    .talk { padding: 2rem 2.2rem; }
    .cookie-banner { left: 24px; right: 24px; bottom: 20px; padding: 1rem 1.6rem; }
}

/* ===== Брейкпоинт ~960px ===== */
@media (min-width: 961px) {
    .cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .catalog__layout { grid-template-columns: minmax(0, 1fr) 230px; }
    .catalog__sheet { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .plan-cell { border-bottom: 0; }
    .plan-cell:nth-child(2n) { border-right: 1.5px solid var(--ink); }
    .plan-cell:last-child { border-right: 0; }
    .qmap__frame { grid-template-columns: minmax(0, 1fr) 64px; }
    .qmap__scale {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-end;
        padding: 0 0 0 0;
        font-family: var(--f-note);
        font-size: 0.66rem;
        color: var(--blue);
        background:
            linear-gradient(var(--ink), var(--ink)) left top / 2px 100% no-repeat,
            repeating-linear-gradient(to bottom, var(--ink) 0 1px, transparent 1px 25%) left top / 18px 100% no-repeat,
            repeating-linear-gradient(to bottom, var(--ink) 0 1px, transparent 1px 5%) left top / 9px 100% no-repeat;
    }
    .qmap__scale span { line-height: 1; transform: translateY(-50%); }
    .qmap__scale span:first-child { transform: none; }
    .qmap__scale span:last-child { transform: translateY(0); }
    .ruler { display: block; margin-bottom: 1rem; }
    .ruler__scale {
        height: 30px;
        border: 1.5px solid var(--ink);
        background:
            repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 10%) left top / 100% 100% no-repeat,
            repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 5%) left top / 100% 55% no-repeat,
            repeating-linear-gradient(90deg, rgba(35, 40, 44, 0.7) 0 1px, transparent 1px 1%) left top / 100% 30% no-repeat,
            var(--zone);
    }
    .ruler__nums {
        display: flex;
        justify-content: space-between;
        font-family: var(--f-note);
        font-size: 0.8rem;
        margin-top: 0.2rem;
    }
    .ruler__nums span { width: 0; display: flex; justify-content: center; }
    .ruler__nums span:first-child { justify-content: flex-start; }
    .ruler__nums span:last-child { justify-content: flex-end; }
    .steps__list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
    .step { border: 0; background: none; padding: 0.4rem 1.2rem 0 0; }
    .step::before {
        content: "";
        position: absolute;
        top: -1.6rem;
        left: 0;
        width: 2px;
        height: 1.6rem;
        background: var(--brick);
    }
    .layout-with-sidebar { grid-template-columns: minmax(0, 67fr) minmax(0, 27fr); column-gap: 6%; }
    .colophon__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 3rem; }
}

/* ===== Мобильные уточнения ===== */
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .front { width: 92%; }
    .layout-single { width: 100%; }
    .intro__canvas { padding: 0.5rem; }
    .intro__annot span:nth-child(2) { display: none; }
    .fs { padding: 2.4rem 0 0.5rem; }
    .catalog__legend { padding: 1.2rem 1rem; }
    .entry-sheet { padding: 1.3rem 1.1rem; }
    .talk { padding: 1.3rem 1.1rem; }
    .lost { padding: 2rem 1.1rem; }
    .qmap__frame { padding: 0.6rem; }
    .qpin b { width: 1.3rem; height: 1.3rem; font-size: 0.68rem; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
}
