/*
Theme Name: dds_papsai.com
Theme URI: https://papsai.com/
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: papsai
*/

/* ===== Токены ===== */
:root {
    --navy: #0E2238;
    --paper: #F2EDE3;
    --paper-light: #F8F5EE;
    --paper-deep: #E6DFD1;
    --pine: #173B3F;
    --night: #101A1C;
    --ink: #1A2326;
    --muted: #6B7A7D;
    --muted-ink: #4A5759;
    --orange: #E4572E;
    --mint: #4FB3A6;
    --mint-ink: #23766D;
    --yellow: #F5C542;
    --line: #C9C2B4;
    --line-dark: #2C4A52;
    --font-head: "Oswald", "Roboto Condensed", "Arial Narrow", "Liberation Sans Narrow", sans-serif;
    --font-text: "Fira Sans", "PT Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --grid-dark: linear-gradient(rgba(79, 179, 166, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 179, 166, .08) 1px, transparent 1px),
        linear-gradient(rgba(79, 179, 166, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 179, 166, .035) 1px, transparent 1px);
    --grid-paper: linear-gradient(rgba(201, 194, 180, .42) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 194, 180, .42) 1px, transparent 1px),
        linear-gradient(rgba(201, 194, 180, .2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 194, 180, .2) 1px, transparent 1px);
    --grid-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
    --cut: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

/* ===== Скрытые элементы (до основных стилей) ===== */
.cookie-banner[hidden] { display: none !important; }

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

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

body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--navy);
    background-image: var(--grid-dark);
    background-size: var(--grid-size);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 1rem;
    line-height: 1.6;
}

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

p, li, dd, dt, td, th, h1, h2, h3, h4, h5, h6, blockquote, figcaption {
    overflow-wrap: break-word;
    hyphens: auto;
}
.brand-name, .lost-code { hyphens: manual; }

p { margin: 0 0 1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.15;
    margin: 1.6em 0 .6em;
    color: inherit;
}

a { color: var(--mint-ink); }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

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

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 1000;
    padding: .6rem 1rem;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.shell {
    width: min(92%, 1320px);
    margin-inline: auto;
}

/* ===== Кнопки-ярлыки ===== */
.tag-btn {
    --btn-line: var(--mint-ink);
    --btn-bg: var(--paper-light);
    --btn-inner: var(--mint-ink);
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .62rem 1.5rem .62rem 1.1rem;
    border: 0;
    background: none;
    color: var(--mint-ink);
    font-family: var(--font-head);
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: color .15s ease, transform .15s ease;
}
.tag-btn::before,
.tag-btn::after {
    content: "";
    position: absolute;
    z-index: -1;
    clip-path: var(--cut);
}
.tag-btn::before { inset: 0; background: var(--btn-line); z-index: -2; }
.tag-btn::after {
    inset: 1.5px;
    background: var(--btn-bg);
    box-shadow: inset 0 0 0 2px var(--btn-bg), inset 0 0 0 3px var(--btn-inner);
    opacity: .999;
}
.tag-btn:hover,
.tag-btn:focus-visible {
    color: #fff;
    --btn-bg: var(--mint-ink);
    --btn-inner: rgba(255, 255, 255, .5);
    transform: translate(-2px, -2px);
}
.tag-btn--solid {
    --btn-line: var(--orange);
    --btn-bg: var(--orange);
    --btn-inner: rgba(255, 255, 255, .6);
    color: #fff;
}
.tag-btn--solid:hover,
.tag-btn--solid:focus-visible {
    --btn-line: var(--navy);
    --btn-bg: var(--navy);
}

/* ===== Шапка ===== */
.masthead {
    background-color: var(--navy);
    background-image: var(--grid-dark);
    background-size: var(--grid-size);
    color: var(--paper);
    padding-top: 1.2rem;
}
.masthead-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.1rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
    flex: 1 1 260px;
    color: var(--paper);
    text-decoration: none;
}
.brand-mark { flex: 0 0 auto; display: block; line-height: 0; }
.brand-svg { display: block; width: 56px; height: 56px; }
.brand-logo { display: block; width: auto; max-width: 96px; max-height: 72px; }
.brand-text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .98rem;
    line-height: 1.2;
    letter-spacing: .01em;
    color: var(--paper);
    max-width: 46ch;
}
.brand-desc {
    font-size: .76rem;
    line-height: 1.4;
    color: #A9BABD;
    max-width: 62ch;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .9rem;
    border: 1px solid var(--line-dark);
    background: transparent;
    color: var(--paper);
    font-family: var(--font-head);
    font-size: .95rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--paper);
    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; }

.main-nav { display: none; flex: 1 1 100%; }
.main-nav.is-open { display: block; }
.nav-list {
    list-style: none;
    margin: 0;
    padding: .4rem 0;
    border-top: 1px solid var(--line-dark);
}
.nav-list li { border-bottom: 1px solid var(--line-dark); }
.nav-list a {
    display: block;
    padding: .75rem 0;
    color: var(--paper);
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
}
.nav-list a:hover,
.nav-list a:focus-visible { color: var(--mint); }
.nav-list .current-menu-item > a,
.nav-list .current_page_item > a { color: var(--mint); }

.legend {
    list-style: none;
    margin: 0;
    padding: .85rem 0 1rem;
    border-top: 1px solid var(--line-dark);
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 2.4rem;
    font-size: .92rem;
    color: var(--paper);
}
.legend li { display: inline-flex; align-items: center; gap: .65rem; }
.legend-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .12);
}
.legend-dot--clinic { background: radial-gradient(circle, rgba(255, 255, 255, .5) 0 2px, transparent 3px), #1F8C80; }
.legend-dot--home { background: var(--orange); }
.legend-route {
    width: 52px;
    height: 3px;
    display: inline-block;
    background: repeating-linear-gradient(90deg, var(--mint) 0 12px, transparent 12px 18px);
}

/* ===== Секции главной ===== */
.band { padding: 2.6rem 0; }
.band--paper {
    background-color: var(--paper);
    background-image: var(--grid-paper);
    background-size: var(--grid-size);
    color: var(--ink);
}
.band--pine {
    background-color: var(--pine);
    background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--paper);
}
.band--joined { padding-top: 0; }
.band--joined .band-inner { border-top: 1px solid var(--line); padding-top: 2.6rem; }
.band--pine.band--joined .band-inner { border-top-color: var(--line-dark); }
.band-inner { width: 100%; }

.sec-head { min-width: 0; }
.sec-num {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: .08em;
    margin-bottom: .5rem;
}
.sec-title {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(1.8rem, 3.1vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--ink);
}
.sec-title--sm { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.sec-title::after {
    content: "";
    display: block;
    width: min(220px, 70%);
    height: 9px;
    margin: 1.2rem 0 1.3rem;
    background:
        radial-gradient(circle at 4.5px 4.5px, transparent 2.4px, var(--line) 2.6px 3.6px, transparent 3.8px) left center / 9px 9px no-repeat,
        radial-gradient(circle at 4.5px 4.5px, transparent 2.4px, var(--line) 2.6px 3.6px, transparent 3.8px) right center / 9px 9px no-repeat,
        linear-gradient(var(--line), var(--line)) center / calc(100% - 16px) 1px no-repeat;
}
.sec-head--light .sec-title,
.sec-head--light .sec-num { color: var(--paper); }
.sec-head--light .sec-title::after {
    background:
        radial-gradient(circle at 4.5px 4.5px, transparent 2.4px, #6E9196 2.6px 3.6px, transparent 3.8px) left center / 9px 9px no-repeat,
        radial-gradient(circle at 4.5px 4.5px, transparent 2.4px, #6E9196 2.6px 3.6px, transparent 3.8px) right center / 9px 9px no-repeat,
        linear-gradient(#6E9196, #6E9196) center / calc(100% - 16px) 1px no-repeat;
}

.plate {
    background: var(--paper-light);
    border: 1px solid var(--line);
    box-shadow: 4px 4px 0 rgba(14, 34, 56, .07);
    padding: 1.2rem 1.3rem;
}

/* --- 01 Атлас --- */
.atlas {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
}
.atlas-intro {
    border-left: 1px solid var(--line);
    padding: 1rem 0 .4rem 1.3rem;
}
.atlas-caption { font-size: 1.12rem; margin: 0 0 .8rem; font-weight: 500; }
.atlas-caption strong { color: var(--mint-ink); font-weight: 600; }
.atlas-note { color: var(--muted-ink); font-size: .93rem; margin: 0; }
.atlas-map { margin: 0; padding: 8px; }
.atlas-map img {
    display: block;
    width: 100%;
    aspect-ratio: 1376 / 820;
    object-fit: cover;
}
.atlas-scale {
    display: flex;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
}
.scale-bar {
    flex: 0 0 auto;
    width: 100%;
    max-width: 46px;
    min-height: 240px;
    background:
        repeating-linear-gradient(180deg, transparent 0 calc(100% / 6 - 1px), rgba(255, 255, 255, .55) calc(100% / 6 - 1px) calc(100% / 6)),
        linear-gradient(180deg, #1F8C80 0%, #4FB3A6 20%, #A8C26A 42%, #F5C542 60%, #EE8A3A 80%, #D9472B 100%);
}
.scale-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.2;
}
.scale-list li { padding: .2rem 0; white-space: nowrap; }

/* --- 02 Рейтинг --- */
.rating {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
}
.rating-intro {
    border-left: 1px solid var(--line);
    padding: 1rem 0 .4rem 1.3rem;
}
.rating-note { color: var(--muted-ink); font-size: .93rem; margin: 0; }
.rating-sheet { overflow-x: auto; padding: 1rem 1.3rem 1.2rem; }
.rating-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    border: 1px solid transparent;
    font-size: .98rem;
}
.rating-table th,
.rating-table td {
    padding: .85rem .7rem;
    text-align: center;
    border: 0;
    border-bottom: 1px solid var(--line);
}
.rating-table thead th {
    font-family: var(--font-text);
    font-size: .76rem;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--muted-ink);
    border-bottom: 1px solid var(--muted);
}
.rating-table thead th + th { border-left: 1px solid var(--line); }
.rating-table tbody th {
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}
.rating-table tbody th > * { vertical-align: middle; }
.rating-table tr.is-top th {
    background: var(--yellow);
    box-shadow: 2px 3px 0 rgba(26, 35, 38, .12);
}
.rating-name { margin-left: .7rem; }
.pin {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(26, 35, 38, .2);
}
.pin--teal { background: #1F8C80; }
.pin--orange { background: var(--orange); }
.pin--yellow { background: #EBCB6B; }
.stars { letter-spacing: .12em; white-space: nowrap; color: var(--ink); }
.stars-off { color: var(--line); }

/* --- 03 Свежие записи --- */
.desk {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.6rem;
    padding-top: 1rem;
}
.empty-note { color: var(--muted-ink); }
.empty-note--light { color: #C4D3D3; }

/* ===== Карточка записи ===== */
.card {
    --btn-bg: #F5F0E6;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #F5F0E6;
    border: 1px solid #D6CDBA;
    padding: 14px 14px 18px;
    color: var(--ink);
    transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { box-shadow: 7px 7px 0 rgba(10, 20, 22, .28); }
.card-date {
    position: absolute;
    top: -14px;
    left: 14px;
    z-index: 2;
    padding: .28rem .85rem;
    background: var(--yellow);
    color: var(--ink);
    font-size: .86rem;
    font-weight: 600;
    letter-spacing: .03em;
    transform: rotate(-3deg);
    box-shadow: 1px 2px 0 rgba(0, 0, 0, .16);
}
.card-thumb {
    margin-top: .5rem;
    border: 1px solid var(--line);
    overflow: hidden;
}
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .4s ease;
}
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1rem .4rem 0;
}
.card-title {
    margin: 0 0 .55rem;
    font-family: var(--font-head);
    font-size: 1.18rem;
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--mint-ink); }
.card-excerpt {
    color: var(--muted-ink);
    font-size: .92rem;
    line-height: 1.5;
    padding-bottom: .8rem;
    margin-bottom: 1rem;
    border-bottom: 1px dashed var(--mint);
}
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-excerpt p:last-child { margin-bottom: 0; }
.card-more { align-self: flex-start; margin-top: auto; font-size: .82rem; }

/* --- 04 Квартира --- */
.flat {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
}
.flat-note { color: #BFD0D0; font-size: .93rem; margin: 0; }
.flat-plan { margin: 0; }
.flat-plan img {
    display: block;
    width: 100%;
    aspect-ratio: 932 / 524;
    object-fit: cover;
    border: 1px solid rgba(79, 179, 166, .35);
}
.flat-callouts {
    list-style: none;
    margin: 0;
    padding: 0;
}
.flat-callouts li {
    position: relative;
    padding: .9rem 0 .9rem 1.6rem;
    border-bottom: 1px solid var(--line-dark);
    font-size: 1.05rem;
    color: var(--paper);
}
.flat-callouts li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 9px;
    height: 9px;
    margin-top: -4.5px;
    border-radius: 50%;
    border: 2px solid var(--mint);
}
.flat-card {
    align-self: start;
    justify-self: start;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: 1.1rem 1.6rem 1.2rem 1.3rem;
    background: var(--paper);
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 500;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}

/* --- 05 Дневник --- */
.diary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
}
.diary-pic {
    position: relative;
    margin: 0;
    background: var(--paper-light);
    border: 1px solid var(--line);
    padding: 8px;
}
.diary-pic img {
    display: block;
    width: 100%;
    aspect-ratio: 1156 / 660;
    object-fit: cover;
}
.diary-head {
    padding: 1rem 1.2rem .2rem;
}
.diary-head .sec-title { font-size: clamp(1.5rem, 2.3vw, 2.2rem); }
.diary-head .sec-title::after { margin-bottom: .6rem; }
.diary-quote {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(1.7rem, 3.3vw, 3rem);
    line-height: 1.1;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--ink);
}
.diary-quote::after {
    content: "";
    display: block;
    height: 9px;
    margin: 1.3rem 0 .6rem;
    background:
        radial-gradient(circle at 4.5px 4.5px, transparent 2.4px, var(--muted) 2.6px 3.6px, transparent 3.8px) left center / 9px 9px no-repeat,
        radial-gradient(circle at 4.5px 4.5px, transparent 2.4px, var(--muted) 2.6px 3.6px, transparent 3.8px) right center / 9px 9px no-repeat,
        linear-gradient(var(--muted), var(--muted)) center / calc(100% - 16px) 1px no-repeat;
}
.diary-list {
    list-style: none;
    counter-reset: diary;
    margin: 0;
    padding: 0;
}
.diary-list li {
    counter-increment: diary;
    position: relative;
    padding: .7rem 0 .7rem 2.6rem;
    border-bottom: 1px dotted var(--muted);
    font-size: 1rem;
}
.diary-list li::before {
    content: counter(diary);
    position: absolute;
    left: 0;
    top: .62rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    font-family: var(--font-head);
    font-size: .9rem;
    font-weight: 600;
    line-height: 26px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--orange);
}

/* ===== Внутренние страницы ===== */
.inner-band {
    background-color: var(--paper);
    background-image: var(--grid-paper);
    background-size: var(--grid-size);
    padding: 1.6rem 0 4rem;
    color: var(--ink);
}
.crumbs {
    font-size: .88rem;
    color: var(--muted-ink);
    margin-bottom: 1.6rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--line);
}
.crumbs a { color: var(--mint-ink); text-decoration: underline dotted; text-underline-offset: 3px; }
.crumbs-sep { color: var(--orange); margin: 0 .25rem; }
.crumbs-current { color: var(--ink); }

.layout-with-sidebar,
.layout-single { display: block; }
.content-area { min-width: 0; }
.sidebar { min-width: 0; margin-top: 2.6rem; }

.page-head { margin-bottom: .6rem; }
.page-lead { color: var(--muted-ink); }

.card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.6rem 1.8rem;
    padding-top: 1rem;
}
.card-grid .card:nth-child(odd) { transform: rotate(-.5deg); }
.card-grid .card:nth-child(even) { transform: rotate(.5deg); }
.card-grid .card:hover { transform: rotate(0) translate(-2px, -2px); }

.sheet {
    background: var(--paper-light);
    border: 1px solid var(--line);
    box-shadow: 6px 6px 0 rgba(14, 34, 56, .08);
    padding: 1.5rem 1.3rem 1.8rem;
}
.sheet-head { margin-bottom: 1.4rem; }
.sheet-date {
    display: inline-block;
    padding: .25rem .8rem;
    background: var(--yellow);
    font-size: .86rem;
    font-weight: 600;
    transform: rotate(-2deg);
    box-shadow: 1px 2px 0 rgba(0, 0, 0, .14);
    margin-bottom: .9rem;
}
.sheet-title {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.1;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.sheet-cats { margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.sheet-cats a,
.sheet-tags a {
    display: inline-block;
    padding: .15rem .65rem;
    border: 1px solid var(--line);
    color: var(--mint-ink);
    font-size: .82rem;
    text-decoration: none;
}
.sheet-cats a:hover,
.sheet-tags a:hover { background: var(--mint-ink); color: #fff; border-color: var(--mint-ink); }
.sheet-tags { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.sheet-cover { margin: 0 0 1.6rem; border: 1px solid var(--line); }
.sheet-cover img { display: block; width: 100%; height: auto; }

/* Типографика записи */
.entry { font-size: 1.04rem; line-height: 1.7; }
.entry > *:first-child { margin-top: 0; }
.entry p { margin: 0 0 1.1em; }
.entry h2, .entry h3, .entry h4 { text-transform: uppercase; letter-spacing: .02em; }
.entry h2 { font-size: 1.65rem; }
.entry h3 { font-size: 1.3rem; }
.entry h4 { font-size: 1.1rem; }
.entry a { color: var(--mint-ink); text-decoration: underline dotted; text-underline-offset: 3px; }
.entry a:hover { color: var(--orange); }
.entry ul, .entry ol { margin: 0 0 1.2em; padding-left: 1.4rem; }
.entry li { margin-bottom: .4em; }
.entry ul li::marker { color: var(--mint-ink); }
.entry ol li::marker { color: var(--orange); font-weight: 600; }
.entry blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.5rem;
    background: var(--paper-deep);
    border-left: 4px solid var(--orange);
    font-size: 1.1rem;
    font-style: italic;
}
.entry blockquote p:last-child { margin-bottom: 0; }
.entry table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; border: 1px solid var(--line); font-size: .95rem; }
.entry th, .entry td { border: 1px solid var(--line); padding: .6rem .75rem; text-align: left; vertical-align: top; }
.entry th { background: var(--paper-deep); font-weight: 600; }
.entry pre { overflow-x: auto; background: var(--night); color: var(--paper); padding: 1rem 1.2rem; font-size: .9rem; }
.entry figure { margin: 1.6em 0; }
.entry figcaption { font-size: .85rem; color: var(--muted-ink); margin-top: .4rem; }
.entry img { display: block; height: auto; }
.page-links { margin-top: 1.4rem; display: flex; gap: .5rem; flex-wrap: wrap; }

.post-navigation { margin-top: 2rem; }
.post-navigation .nav-links { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.post-navigation a {
    display: block;
    padding: 1rem 1.2rem;
    background: var(--paper-light);
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}
.post-navigation a:hover { border-color: var(--mint-ink); box-shadow: 4px 4px 0 rgba(35, 118, 109, .25); }
.post-nav-label { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mint-ink); }
.post-nav-title { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; margin-top: .3rem; }
.post-navigation .nav-next { text-align: right; }

/* Сайдбар */
.sidebar {
    background: var(--paper-deep);
    border: 1px solid var(--line);
    padding: 1.4rem 1.4rem 1.2rem;
    color: var(--ink);
}
.sidebar .wdg + .wdg { margin-top: 1.8rem; }
.sidebar .wdg-title {
    margin: 0 0 .9rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li {
    position: relative;
    padding: .55rem 0 .55rem 1.2rem;
    border-bottom: 1px dashed var(--line);
    font-size: .93rem;
    line-height: 1.4;
}
.sidebar li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--orange);
}
.sidebar a { color: var(--ink); text-decoration: none; }
.sidebar a:hover { color: var(--mint-ink); }
.sidebar p, .sidebar .textwidget { color: var(--muted-ink); font-size: .93rem; }
.sidebar .post-date { display: block; color: var(--muted-ink); font-size: .8rem; }

/* Пагинация */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: 2.8rem;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 .85rem;
    border: 1px solid var(--line);
    background: var(--paper-light);
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 600;
    text-decoration: none;
}
.pager a.page-numbers:hover { background: var(--mint-ink); border-color: var(--mint-ink); color: #fff; }
.pager .page-numbers.current { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.pager .page-numbers.dots { border: 0; background: none; min-width: 1.5rem; padding: 0; }

/* Поиск */
.finder { display: flex; gap: .6rem; flex-wrap: wrap; }
.finder-field {
    flex: 1 1 200px;
    min-width: 0;
    padding: .7rem .9rem;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font: inherit;
}
.finder-field:focus { outline: 2px solid var(--mint); outline-offset: 0; border-color: var(--mint); }
.empty-box { margin-top: 1rem; }

/* 404 */
.lost { padding: 2rem 1.6rem; }
.lost-code {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 7rem);
    line-height: 1;
    color: var(--orange);
    margin-bottom: .6rem;
}
.lost p { color: var(--muted-ink); margin: 1rem 0 1.4rem; }
.lost-home { margin-top: 1.6rem; }

/* Комментарии */
.talk {
    margin-top: 2.4rem;
    background: var(--paper-light);
    border: 1px solid var(--line);
    padding: 1.5rem 1.3rem;
}
.talk-title,
.comment-reply-title {
    margin: 0 0 1.2rem;
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.comment-reply-title small { font-size: .8rem; margin-left: .6rem; text-transform: none; }
.talk-list, .talk-list .children { list-style: none; margin: 0; padding: 0; }
.talk-list .children { padding-left: 1.4rem; border-left: 2px solid var(--line); margin-top: 1rem; }
.note { margin-bottom: 1.2rem; }
.note-body { padding: 1rem 1.1rem; background: var(--paper); border: 1px solid var(--line); }
.note-head { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .8rem; margin-bottom: .6rem; }
.note-head img { display: block; border-radius: 50%; }
.note-author { font-weight: 600; }
.note-date { font-size: .82rem; color: var(--muted-ink); }
.note-wait { font-size: .88rem; color: var(--orange); }
.note-text p:last-child { margin-bottom: 0; }
.note-reply { margin-top: .6rem; }
.note-reply a { font-size: .85rem; font-weight: 600; color: var(--mint-ink); }
.comment-respond { margin-top: 1.8rem; }
.comment-form p { margin: 0 0 1rem; }
.comment-form label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: .3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font: inherit;
}
.comment-form-cookies-consent { display: flex; gap: .6rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; margin: 0; }
.form-note { font-size: .86rem; color: var(--muted-ink); }
.comments-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; }

/* ===== Подвал ===== */
.site-foot {
    background-color: var(--night);
    background-image: linear-gradient(rgba(79, 179, 166, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 179, 166, .05) 1px, transparent 1px);
    background-size: 10px 10px;
    color: #A3B3B5;
    padding: 2.8rem 0 1.6rem;
}
.foot-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
}
.foot-col { min-width: 0; }
.site-foot .wdg + .wdg { margin-top: 1.4rem; }
.site-foot .wdg-title {
    margin: 0 0 .9rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--line-dark);
    font-family: var(--font-text);
    font-size: .88rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--paper);
}
.site-foot p,
.site-foot .textwidget { color: #A3B3B5; font-size: .92rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { padding: .28rem 0; font-size: .92rem; }
.site-foot a { color: var(--mint); text-decoration: none; }
.site-foot a:hover { color: var(--yellow); text-decoration: underline dotted; text-underline-offset: 3px; }
.copyright {
    margin: 2.2rem 0 0;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line-dark);
    font-size: .85rem;
    color: #8A9C9F;
}

/* ===== Cookie ===== */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 1rem;
    z-index: 999;
    width: min(92%, 780px);
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.4rem;
    padding: 1.1rem 1.4rem;
    background: var(--paper-light);
    border: 1px solid var(--line);
    border-top: 4px solid var(--orange);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, .3);
    color: var(--ink);
}
.cookie-text { margin: 0; flex: 1 1 280px; min-width: 0; font-size: .9rem; }

/* ===== ≥600px ===== */
@media (min-width: 600px) {
    .brand-svg { width: 64px; height: 64px; }
    .brand-name { font-size: 1.1rem; }
    .desk,
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .atlas { grid-template-columns: minmax(0, 1fr) minmax(0, 170px); }
    .atlas-intro { grid-column: 1 / -1; }
    .diary-head { position: absolute; top: 18px; left: 18px; max-width: 62%; background: rgba(248, 245, 238, .8); padding: .9rem 1.2rem .2rem; }
    .flat { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
    .flat-intro { grid-column: 1 / -1; }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-navigation .nav-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sheet { padding: 2rem 2.2rem 2.4rem; }
    .talk { padding: 1.8rem 2rem; }
}

/* ===== ≥960px ===== */
@media (min-width: 960px) {
    .band { padding: 3.4rem 0; }
    .band--joined { padding-top: 0; }
    .band--joined .band-inner { padding-top: 3rem; }
    .band-inner { width: 85%; margin-inline: auto; }

    .nav-toggle { display: none; }
    .main-nav,
    .main-nav.is-open { display: block; flex: 0 1 auto; }
    .nav-list { display: flex; flex-wrap: wrap; gap: .4rem 2.6rem; border: 0; padding: 0; }
    .nav-list li { border: 0; }
    .nav-list a { padding: .3rem 0; font-size: 1.12rem; position: relative; }
    .nav-list a::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: -4px;
        height: 2px;
        background: var(--mint);
        transform: scaleX(0);
        transition: transform .2s ease;
    }
    .nav-list a:hover::after,
    .nav-list .current-menu-item > a::after,
    .nav-list .current_page_item > a::after { transform: scaleX(1); }

    .atlas { grid-template-columns: minmax(0, .95fr) minmax(0, 1.65fr) minmax(0, .5fr); align-items: start; }
    .atlas-intro { grid-column: auto; }
    .atlas-scale { align-self: stretch; }
    .atlas-intro .sec-title,
    .rating-intro .sec-title { font-size: clamp(1.7rem, 2.5vw, 2.6rem); }
    .rating { grid-template-columns: minmax(0, .9fr) minmax(0, 2.1fr); align-items: start; }

    .desk { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; align-items: start; padding-bottom: 1.6rem; }
    .desk .card:nth-child(3n+1) { transform: rotate(-2deg) translateY(2.2rem); }
    .desk .card:nth-child(3n+2) { transform: rotate(.6deg) translateY(-.4rem); }
    .desk .card:nth-child(3n) { transform: rotate(1.8deg) translateY(1.2rem); }
    .desk .card:hover { transform: rotate(0) translateY(0); z-index: 3; }

    .flat {
        grid-template-columns: minmax(0, .9fr) minmax(0, 1.45fr) minmax(0, .9fr);
        grid-template-areas: "intro plan calls" "intro plan card";
        align-items: center;
        column-gap: 2rem;
    }
    .flat-intro { grid-area: intro; grid-column: auto; }
    .flat-plan { grid-area: plan; }
    .flat-callouts { grid-area: calls; align-self: end; }
    .flat-card { grid-area: card; justify-self: end; transform: rotate(1deg); }
    .flat-callouts li { padding-left: 0; }
    .flat-callouts li::before {
        left: auto;
        right: calc(100% + 4px);
        width: 1.6rem;
        height: 1px;
        margin-top: 0;
        border: 0;
        border-radius: 0;
        background: var(--mint);
    }

    .diary { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 3rem; }

    .layout-with-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
        column-gap: 6%;
        align-items: start;
    }
    .layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
    .sidebar { margin-top: 0; }
    .layout-single .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

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

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

/* Кнопка отправки комментария */
.form-submit { margin: 1.4rem 0 0; }
