/*
Theme Name: dds_bradfordsk-9corral.com
Theme URI: https://bradfordsk-9corral.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: zhplan
*/

/* ---------- Шрифты ---------- */
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/caveat-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/caveat-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-condensed-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-condensed-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-condensed-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-condensed-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-condensed-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-condensed-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Палитра ---------- */
:root {
    --paper: #F4EFE4;
    --grid: #D8CFBE;
    --grid-soft: rgba(216, 207, 190, 0.55);
    --board: #2B2D2A;
    --board-line: #3A3D39;
    --forest: #1F3A34;
    --forest-deep: #183029;
    --ink: #23211E;
    --muted: #8A8175;
    --yellow: #F2C230;
    --yellow-soft: #F7D766;
    --coral: #E4573D;
    --blue: #2E5C8A;
    --card: #FBF8F1;
    --sheet: #FFFFFD;
    --sheet-grid: #E2E3E1;
    --tape: rgba(219, 204, 160, 0.9);
    --chalk: #F1ECE0;
    --font-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
    --font-text: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    --shadow-sheet: 0 10px 22px rgba(35, 33, 30, 0.16), 0 2px 4px rgba(35, 33, 30, 0.08);
}

/* ---------- Скрытие по атрибуту hidden ---------- */
.cookie-note[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;
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 1.0625rem;
    line-height: 1.6;
    background-color: var(--paper);
    background-image:
        linear-gradient(var(--grid-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-soft) 1px, transparent 1px);
    background-size: 28px 28px;
}
img { max-width: 100%; height: auto; }
p, li, dd, td, th, blockquote, figcaption, h1, h2, h3, h4, h5, h6, .card-title, .wgt {
    overflow-wrap: break-word;
    hyphens: auto;
}
h1, h2, h3, h4, h5, h6, .card-title, .brand-name, .topnav-list a, .tape-label { hyphens: manual; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { margin: 1.4em 0 0.55em; line-height: 1.15; }
a { color: var(--blue); text-decoration: underline wavy rgba(46, 92, 138, 0.55); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .15s ease, text-decoration-color .15s ease; }
a:hover { color: var(--coral); text-decoration-color: var(--coral); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--yellow); color: var(--ink); padding: .5rem 1rem; border: 2px solid var(--ink); font-weight: 700; }
.skip-link:focus { top: 1rem; }

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

/* ---------- Кнопки ---------- */
.btn,
.comment-form .submit,
.search-submit {
    display: inline-block;
    padding: .6em 1.15em .55em;
    font-family: var(--font-text);
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    color: var(--ink);
    background: var(--yellow);
    border: 2px solid var(--ink);
    border-radius: 2px;
    box-shadow: 3px 3px 0 var(--ink);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn:hover,
.comment-form .submit:hover,
.search-submit:hover { color: var(--ink); background: var(--yellow-soft); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:active,
.comment-form .submit:active,
.search-submit:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }

/* ---------- Ярлыки на скотче и рукописные заголовки ---------- */
.tape-label {
    display: inline-block;
    margin: 0 0 1rem;
    padding: .15em .75em .2em;
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.3rem);
    line-height: 1.15;
    color: var(--ink);
    background: var(--tape);
    transform: rotate(-1.2deg);
    clip-path: polygon(1% 8%, 3% 0, 97% 4%, 100% 0, 99% 50%, 100% 96%, 96% 100%, 4% 94%, 0 100%, 1% 52%);
}
.hand-title {
    margin: 0 0 1.1rem;
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.6rem);
    line-height: 1.1;
    color: var(--ink);
}
.hand-title--plain {
    display: inline-block;
    transform: rotate(-1deg);
    padding-bottom: .3rem;
    background:
        linear-gradient(var(--ink), var(--ink)) left bottom 5px / 100% 2px no-repeat,
        linear-gradient(var(--ink), var(--ink)) left 6px bottom 0 / 92% 2px no-repeat;
}

/* ---------- Шапка ---------- */
.masthead { padding: 1.6rem 0 1.4rem; background: var(--paper); border-bottom: 2px dashed var(--grid); }
.masthead-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem 2rem; }
.brand { display: flex; align-items: flex-start; gap: 1rem; flex: 1 1 520px; min-width: 0; }
.brand-mark { flex: 0 0 auto; display: block; text-decoration: none; }
.brand-svg { display: block; width: 74px; height: auto; }
.brand-logo { display: block; width: auto; max-width: 96px; max-height: 96px; }
.brand-text { min-width: 0; }
.brand-name { margin: 0 0 .5rem; font-family: var(--font-text); font-weight: 700; font-size: clamp(1.45rem, 1rem + 1.8vw, 2.35rem); line-height: 1.08; letter-spacing: -.01em; }
.brand-name a { color: var(--ink); text-decoration: none; }
.brand-name a:hover { color: var(--blue); }
.brand-desc { margin: 0; max-width: 36rem; font-size: .95rem; line-height: 1.45; color: #4A453E; }

.nav-toggle {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .45rem .8rem; font: 700 .9rem var(--font-text); text-transform: uppercase; letter-spacing: .05em;
    color: var(--ink); background: var(--yellow); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; content: ""; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.topnav { display: none; flex: 1 0 100%; }
.topnav.is-open { display: block; }
.topnav-list { list-style: none; margin: 0; padding: .5rem 0 0; display: flex; flex-direction: column; gap: .35rem; }
.topnav-list li { margin: 0; }
.topnav-list a {
    position: relative;
    display: inline-block;
    padding: 0 .15rem .1rem;
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.2;
    color: var(--ink);
    text-decoration: none;
}
.topnav-list a::after {
    content: "";
    position: absolute; left: -2px; right: -6px; bottom: .12em; height: .32em; z-index: -1;
    background: var(--yellow);
    border-radius: 40% 10% 50% 20% / 50% 30% 60% 40%;
    transform: rotate(-1.2deg);
    transition: height .15s ease;
}
.topnav-list li:nth-child(n+3) a::after { background: var(--coral); opacity: .85; }
.topnav-list a { z-index: 0; }
.topnav-list a:hover::after,
.topnav-list .current-menu-item > a::after { height: .62em; }
.topnav-list a:hover { color: var(--ink); }

/* ---------- Главная: полосы ---------- */
.fp-band { padding: 3rem 0 3.2rem; }
.fp-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; }
.fp-block { min-width: 0; }

/* Лист в клетку */
.sheet {
    position: relative;
    padding: 1.8rem 1.6rem 1.6rem;
    background-color: var(--sheet);
    background-image:
        linear-gradient(var(--sheet-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--sheet-grid) 1px, transparent 1px);
    background-size: 22px 22px;
    box-shadow: var(--shadow-sheet);
}
.sheet--tilt-left { transform: rotate(-1.2deg); }
.sheet--tilt-right { transform: rotate(.8deg); }

/* Блок 1 — чек-лист */
.checklist { list-style: none; margin: 0 0 1rem; padding: 0; }
.checklist-item { display: flex; align-items: center; gap: .7rem; margin: 0 0 .25rem; font-family: var(--font-hand); font-weight: 700; font-size: clamp(1.45rem, 1.1rem + 1vw, 1.85rem); line-height: 1.3; }
.checklist-item .mark { flex: 0 0 1.35em; width: 1.35em; height: 1.35em; }
.checklist-item.is-no .checklist-text { text-decoration: line-through rgba(228, 87, 61, .45) 2px; }
.sticky-note {
    margin: 1rem 0 .6rem auto;
    width: 11rem;
    padding: 1rem .9rem 1.1rem;
    font-size: 1.05rem; font-weight: 500; line-height: 1.3; text-align: center;
    color: var(--ink);
    background: linear-gradient(170deg, #F8DA6A 0%, var(--yellow) 85%, #E3B226 100%);
    box-shadow: 2px 6px 10px rgba(35, 33, 30, .18);
    transform: rotate(2.5deg);
}
.coral-note { margin: 0 0 .6rem; font-family: var(--font-hand); font-weight: 700; font-size: 1.55rem; line-height: 1.1; color: var(--coral); transform: rotate(-3deg); }
.checklist-legend { margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .85rem; color: var(--muted); }
.lg-yes { color: var(--blue); }
.lg-no, .lg-maybe { color: var(--coral); }

/* Блок 2 — карта маршрута */
.route-map { position: relative; margin: .5rem 0 0; container-type: inline-size; }
.route-map img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 909; }
.route-labels { position: absolute; inset: 0; pointer-events: none; }
.route-pin { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.route-pin b { font-family: var(--font-hand); font-weight: 700; font-size: 6.4cqw; color: var(--ink); white-space: nowrap; }
.route-pin i { font-style: normal; font-family: var(--font-text); font-size: 5.2cqw; color: var(--muted); letter-spacing: .02em; }
.route-pin--1 { left: 63.5%; top: 4%; }
.route-pin--2 { left: 0; top: 67%; }
.route-pin--3 { left: 60.5%; top: 82%; }
.route-memo { position: absolute; left: 73%; top: 32%; width: 27%; font-family: var(--font-hand); font-weight: 700; font-size: 5.3cqw; line-height: 1.05; text-align: center; color: var(--blue); }
.route-hint { margin: 1rem 0 0; padding-left: .9rem; border-left: 3px solid var(--coral); font-size: .95rem; color: #4A453E; max-width: 34rem; }

/* ---------- Последние записи на доске ---------- */
.fp-board { padding: 3rem 0 3.6rem; background: var(--board); color: var(--chalk); }
.chalk-title {
    margin: 0 0 2.2rem;
    text-align: center;
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: clamp(2.2rem, 1.6rem + 2vw, 3.1rem);
    line-height: 1.1;
    color: var(--chalk);
    text-shadow: 0 0 1px rgba(241, 236, 224, .6), 1px 1px 0 rgba(241, 236, 224, .12);
    letter-spacing: .01em;
}
.board-more { margin: 2.2rem 0 0; text-align: center; }
.board-empty { text-align: center; color: var(--chalk); }

/* ---------- Карточки записей ---------- */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.4rem 1.8rem; }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px 12px 16px;
    color: var(--ink);
    background: var(--card);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .22), 0 1px 2px rgba(0, 0, 0, .12);
    transform: rotate(-1.2deg);
    transition: transform .2s ease, box-shadow .2s ease;
    clip-path: polygon(0 1%, 3% 0, 30% .6%, 62% 0, 100% .8%, 99.6% 30%, 100% 70%, 99.4% 100%, 70% 99.4%, 35% 100%, 0 99.5%, .5% 60%);
}
.cards > .card:nth-child(3n+2) { transform: rotate(1deg); }
.cards > .card:nth-child(3n+3) { transform: rotate(-.6deg); }
.card:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 16px 26px rgba(0, 0, 0, .26), 0 2px 4px rgba(0, 0, 0, .12); }
.card-tape {
    position: absolute; left: 50%; top: -2px; z-index: 2;
    width: 34%; height: 24px;
    background: var(--tape);
    transform: translateX(-50%) rotate(-2deg);
    clip-path: polygon(0 10%, 4% 0, 96% 6%, 100% 0, 98% 100%, 3% 92%);
}
.card-thumb { flex: 0 0 auto; overflow: hidden; background: #DCD3C2; }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-thumb img { transform: scale(1.03); }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: .85rem .45rem 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.card-title { margin: 0 0 .45rem; min-width: 0; font-family: var(--font-hand); font-weight: 700; font-size: 1.65rem; line-height: 1.08; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--blue); }
.card-date { flex: 0 0 auto; padding-top: .3rem; font-size: .82rem; color: var(--muted); letter-spacing: .03em; }
.card-excerpt { margin: 0 0 1rem; font-size: .93rem; line-height: 1.45; color: #4A453E; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt a { color: var(--blue); }
.card-btn { align-self: flex-start; margin-top: auto; margin-left: 2px; margin-bottom: 3px; }

/* ---------- Главная: нижние блоки ---------- */
.fp-pair--bottom { align-items: start; }
.sheet--journal { padding-top: 2.6rem; }
.tape-label--on-sheet { position: absolute; left: 1rem; top: -1.1rem; margin: 0; z-index: 2; }
.flat-plan { position: relative; margin: .6rem 0 0; container-type: inline-size; }
.flat-plan img { display: block; width: 100%; height: auto; aspect-ratio: 1232 / 880; }
.plan-labels { position: absolute; inset: 0; pointer-events: none; }
.plan-tag, .plan-warn { position: absolute; font-family: var(--font-hand); font-weight: 700; line-height: 1.02; }
.plan-tag { font-size: 5.4cqw; color: var(--ink); text-align: center; transform: translate(-50%, -50%); white-space: nowrap; }
.plan-tag--balcony { left: 52.6%; top: 10%; }
.plan-tag--kitchen { left: 32%; top: 37%; }
.plan-tag--bedroom { left: 58%; top: 38%; }
.plan-tag--bath { left: 63.5%; top: 89%; transform: translate(-50%, -50%); }
.plan-warn { font-size: 5.2cqw; color: var(--coral); }
.plan-warn--vent { left: 72%; top: 24%; width: 28%; text-align: center; }
.plan-warn--windows { left: 0; top: 83%; width: 22%; text-align: center; }
.journal-lines { margin: 1.1rem 0 0; padding: 0; font-size: .92rem; }
.journal-lines > div { display: flex; flex-wrap: wrap; gap: .2rem .7rem; padding: .35rem 0; border-bottom: 1px dashed var(--grid); }
.journal-lines dt { flex: 0 0 5.5rem; font-weight: 700; color: var(--blue); }
.journal-lines dd { margin: 0; flex: 1 1 12rem; min-width: 0; color: #4A453E; }

/* Блок 4 — шкала приоритетов */
.fp-scale { padding-top: .5rem; }
.scale { position: relative; height: 9rem; margin: 1.2rem .6rem 0; }
.scale-line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--ink); }
.scale-line::before, .scale-line::after {
    content: ""; position: absolute; top: -6px; width: 12px; height: 12px;
    border-top: 2px solid var(--ink); border-left: 2px solid var(--ink);
}
.scale-line::before { left: 0; transform: rotate(-45deg); }
.scale-line::after { right: 0; transform: rotate(135deg); }
.scale-pt { position: absolute; left: var(--x); top: 50%; width: 0; height: 0; }
.scale-dot { position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); background: var(--yellow); box-shadow: 2px 2px 0 rgba(35, 33, 30, .25); }
.scale-pt--wish .scale-dot { background: var(--coral); }
.scale-name { position: absolute; left: 0; transform: translateX(-50%); font-family: var(--font-hand); font-weight: 700; font-size: 1.5rem; line-height: 1; white-space: nowrap; }
.scale-pt--up .scale-name { bottom: 18px; }
.scale-pt--down .scale-name { top: 18px; }
.scale-ends { display: flex; justify-content: space-between; gap: 1rem; margin-top: .4rem; }
.scale-ends p { margin: 0; max-width: 48%; font-size: .85rem; line-height: 1.35; color: var(--muted); }
.scale-ends p:last-child { text-align: right; }
.scale-ends b { display: block; font-size: 1.02rem; color: var(--ink); }
.scale-motto { margin: 1.8rem 0 1rem; text-align: center; font-family: var(--font-hand); font-weight: 700; font-size: clamp(1.5rem, 1.2rem + .8vw, 1.9rem); line-height: 1.15; }
.scale-legend { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; font-size: .88rem; color: #4A453E; }
.scale-legend li { display: flex; align-items: center; gap: .45rem; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); }
.sw--must { background: var(--yellow); }
.sw--wish { background: var(--coral); }

/* ---------- Внутренние страницы ---------- */
.page-wrap { padding: 1.6rem 0 3.5rem; }
.crumbs { margin: 0 0 1.6rem; font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--blue); }
.crumbs-sep { margin: 0 .3rem; color: var(--coral); font-weight: 700; }
.crumbs-current { color: var(--ink); }

.layout-single .content-area { width: 100%; }
.layout-with-sidebar { display: block; }
.content-area { min-width: 0; }

.page-head { margin-bottom: 2rem; }
.tape-label--page { font-size: clamp(2rem, 1.4rem + 1.8vw, 2.8rem); }
.page-intro { max-width: 46rem; }
.empty-state { padding: 1.6rem 1.8rem; background: var(--card); box-shadow: var(--shadow-sheet); }

.sheet-paper {
    position: relative;
    padding: 2rem 1.4rem;
    background: var(--card);
    box-shadow: var(--shadow-sheet);
}
.sheet-paper::before {
    content: ""; position: absolute; left: 1.4rem; top: -10px; width: 110px; height: 24px;
    background: var(--tape); transform: rotate(-3deg);
    clip-path: polygon(0 10%, 4% 0, 96% 6%, 100% 0, 98% 100%, 3% 92%);
}
.entry-head { margin-bottom: 1.4rem; }
.entry-title { margin: 0 0 .5rem; font-family: var(--font-hand); font-weight: 700; font-size: clamp(2.1rem, 1.5rem + 2vw, 3rem); line-height: 1.05; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 0; font-size: .9rem; color: var(--muted); }
.entry-cat a { color: var(--blue); }
.entry-thumb { margin: 0 0 1.6rem; }
.entry-thumb img { display: block; width: 100%; height: auto; }

.entry-content { font-size: 1.06rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-family: var(--font-hand); font-weight: 700; font-size: 2.1rem; }
.entry-content h2 span, .entry-content mark { background: linear-gradient(transparent 55%, rgba(242, 194, 48, .7) 55%); color: inherit; }
.entry-content h3 { font-size: 1.35rem; font-weight: 700; }
.entry-content h4 { font-size: 1.15rem; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.entry-content li { margin-bottom: .35em; }
.entry-content ul li::marker { color: var(--coral); }
.entry-content ol li::marker { color: var(--blue); font-weight: 700; }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.4rem 1.2rem 1.6rem;
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 1.55rem;
    line-height: 1.25;
    background: #FBEFC2;
    border-left: 5px solid var(--coral);
    box-shadow: 2px 5px 10px rgba(35, 33, 30, .12);
    transform: rotate(-.4deg);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display: block; margin-top: .5rem; font: 400 .9rem var(--font-text); color: var(--muted); }
.entry-content table { width: 100%; margin: 1.5em 0; border-collapse: collapse; border: 2px solid var(--ink); font-size: .95rem; background: var(--sheet); }
.entry-content th, .entry-content td { padding: .55rem .7rem; border: 1px solid #9C9384; text-align: left; vertical-align: top; }
.entry-content th { background: #EFE6CF; font-weight: 700; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content img { display: block; height: auto; }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { font-size: .88rem; color: var(--muted); margin-top: .4rem; }
.entry-content pre { overflow-x: auto; padding: 1rem; background: var(--board); color: var(--chalk); font-size: .9rem; }
.entry-content code { font-size: .92em; background: #EFE6CF; padding: .05em .3em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: 0; border-top: 2px dashed var(--grid); margin: 2em 0; }
.entry-content .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.4em; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.page-links { margin-top: 1.5rem; font-weight: 700; }
.entry-tags { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin: 1.8rem 0 0; font-size: .92rem; }

.entry-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 2rem 0; }
.entry-nav-link { display: block; padding: 1rem 1.2rem; background: var(--card); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); text-decoration: none; font-family: var(--font-hand); font-weight: 700; font-size: 1.35rem; line-height: 1.15; transition: transform .12s ease, box-shadow .12s ease; }
.entry-nav-link span { display: block; margin-bottom: .2rem; font: 700 .78rem var(--font-text); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.entry-nav-link:hover { color: var(--ink); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.entry-nav-link--next { text-align: right; }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 2.6rem 0 0; }
.pager .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.6rem; height: 2.6rem; padding: 0 .75rem;
    font-weight: 700; font-size: .95rem;
    color: var(--ink); text-decoration: none;
    background: var(--card);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.pager a.page-numbers:hover { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); background: var(--yellow-soft); }
.pager .page-numbers.current { background: var(--yellow); }
.pager .page-numbers.dots { min-width: auto; padding: 0 .2rem; background: none; border: 0; box-shadow: none; }

/* ---------- Сайдбар ---------- */
.sidebar { min-width: 0; margin-top: 3rem; }
.sidebar .wgt {
    position: relative;
    margin: 0 0 2.2rem;
    padding: 2.1rem 1.4rem 1.3rem;
    color: var(--ink);
    background-color: var(--sheet);
    background-image:
        linear-gradient(var(--sheet-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--sheet-grid) 1px, transparent 1px);
    background-size: 22px 22px;
    box-shadow: var(--shadow-sheet);
}
.sidebar .wgt-title {
    position: absolute; left: 1rem; top: -1rem; margin: 0;
    padding: .1em .7em .15em;
    font-family: var(--font-hand); font-weight: 700; font-size: 1.55rem; line-height: 1.15;
    color: var(--ink); background: var(--tape); transform: rotate(-1.5deg);
    clip-path: polygon(1% 8%, 3% 0, 97% 4%, 100% 0, 99% 50%, 100% 96%, 96% 100%, 4% 94%, 0 100%, 1% 52%);
}
.sidebar .wgt ul { list-style: none; margin: 0; padding: 0; }
.sidebar .wgt li { padding: .55rem 0; border-bottom: 1px dashed #C9C0AE; line-height: 1.35; }
.sidebar .wgt li:last-child { border-bottom: 0; }
.sidebar .wgt a { color: var(--blue); }
.sidebar .wgt a:hover { color: var(--coral); }
.sidebar .wgt .post-date, .sidebar .wgt .rss-date { display: block; font-size: .82rem; color: var(--muted); }
.sidebar .wgt p { color: var(--ink); }
.sidebar .search-form { margin: 0; }

/* ---------- Поиск ---------- */
.search-form { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 1.4rem; }
.search-field { flex: 1 1 14rem; min-width: 0; padding: .65rem .8rem; font: inherit; font-size: 1rem; color: var(--ink); background: var(--sheet); border: 2px solid var(--ink); border-radius: 2px; }

/* ---------- Комментарии ---------- */
.comments { margin-top: 2.4rem; }
.comments-title, .comment-reply-title { margin: 0 0 1.2rem; font-family: var(--font-hand); font-weight: 700; font-size: 2rem; line-height: 1.1; }
.comment-reply-title small { display: block; font: 400 .9rem var(--font-text); }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 1.4rem; padding-left: 1rem; border-left: 2px dashed var(--grid); }
.note-comment-body { margin: 0 0 1.2rem; padding: 1rem 1.2rem; background: var(--sheet); border: 1px solid #DDD4C2; }
.note-comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; margin-bottom: .5rem; font-size: .9rem; }
.note-comment-head img { display: block; border-radius: 50%; }
.note-comment-author { font-weight: 700; }
.note-comment-head time { color: var(--muted); }
.note-comment-wait { color: var(--coral); font-size: .9rem; }
.note-comment-text p:last-child { margin-bottom: .4rem; }
.note-comment-reply a { font-size: .88rem; font-weight: 700; }
.comment-form p { margin: 0 0 1rem; }
.comment-form label { display: block; margin-bottom: .3rem; font-weight: 700; font-size: .92rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%; padding: .6rem .75rem; font: inherit; font-size: 1rem; color: var(--ink); background: var(--sheet);
    border: 2px solid var(--ink); border-radius: 2px;
}
.comment-form .comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form .comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-notes, .logged-in-as { font-size: .9rem; color: var(--muted); }
.req { color: var(--coral); }
.comments-closed { color: var(--muted); }

/* ---------- 404 ---------- */
.notfound { text-align: left; }
.notfound-code { margin: 0; font-family: var(--font-hand); font-weight: 700; font-size: clamp(5rem, 3rem + 6vw, 8rem); line-height: 1; color: var(--coral); transform: rotate(-3deg); display: inline-block; }

/* ---------- Подвал ---------- */
.sitefoot { padding: 3rem 0 1.6rem; background: var(--forest); color: #E6E2D6; }
.sitefoot-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.sitefoot-col { min-width: 0; }
.sitefoot .wgt { margin: 0 0 1.2rem; color: #E6E2D6; }
.sitefoot .wgt-title { margin: 0 0 .8rem; font-family: var(--font-text); font-weight: 700; font-size: 1.2rem; color: #FFFFFF; }
.sitefoot .wgt p, .sitefoot .wgt .textwidget { color: #E6E2D6; font-size: .98rem; line-height: 1.5; }
.sitefoot .wgt ul { list-style: none; margin: 0; padding: 0; }
.sitefoot .wgt li { margin: 0 0 .45rem; }
.sitefoot a { color: #F4EFE4; text-decoration: underline; text-decoration-color: rgba(244, 239, 228, .55); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.sitefoot a:hover { color: var(--yellow); text-decoration-color: var(--yellow); text-decoration-style: wavy; }
.sitefoot .wgt .post-date { display: block; font-size: .82rem; color: #B9C4BC; }
.sitefoot-copy { margin-top: 2rem; padding-top: 1.3rem; border-top: 1px solid rgba(244, 239, 228, .2); text-align: center; }
.sitefoot-copy p { margin: 0; font-size: .88rem; color: #C9D1CA; }

/* ---------- Cookie-уведомление ---------- */
.cookie-note {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90;
    max-width: 40rem; margin: 0 auto;
    display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem;
    padding: 1.1rem 1.3rem;
    color: var(--ink);
    background: var(--card);
    border: 2px solid var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
}
.cookie-note::before {
    content: ""; position: absolute; left: 50%; top: -12px; width: 96px; height: 22px;
    background: var(--tape); transform: translateX(-50%) rotate(-2deg);
}
.cookie-note-text { flex: 1 1 16rem; margin: 0; font-size: .92rem; line-height: 1.45; color: var(--ink); }
.cookie-note-btn { flex: 0 0 auto; }

/* ---------- Планшет ---------- */
@media (min-width: 600px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sheet { padding: 2rem 2.2rem 1.8rem; }
    .sheet--journal { padding-top: 2.8rem; }
    .sheet-paper { padding: 2.4rem 2.4rem 2.2rem; }
    .entry-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .entry-nav-link--next:only-child { grid-column: 2; }
    .sitefoot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-checklist .sheet { min-height: 22rem; }
    .checklist, .checklist-legend { max-width: calc(100% - 11.5rem); }
    .sticky-note { position: absolute; right: 1.6rem; top: 5.6rem; margin: 0; width: 10rem; }
    .coral-note { position: absolute; right: 1.8rem; top: 14rem; margin: 0; max-width: 9.5rem; }
}

/* ---------- Десктоп ---------- */
@media (min-width: 960px) {
    .masthead { padding: 2rem 0 1.6rem; }
    .brand-svg { width: 110px; }
    .nav-toggle { display: none; }
    .topnav { display: block; flex: 0 0 auto; }
    .topnav-list { padding: 0; gap: .25rem; align-items: flex-start; }

    .fp-pair { width: min(85%, 1180px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; align-items: center; }
    .fp-band--top .fp-pair { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
    .fp-pair--bottom { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; }

    .cards--board { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem 2.6rem; }
    .layout-single .cards--list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
    .layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 67%) minmax(0, 27%); justify-content: space-between; align-items: start; }
    .sidebar { margin-top: 0; padding-top: 1rem; }

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

/* ---------- Узкие экраны ---------- */
@media (max-width: 599px) {
    .fp-band { padding: 2.2rem 0 2.4rem; }
    .sheet { padding: 1.6rem 1.2rem 1.4rem; }
    .sheet--journal { padding-top: 2.6rem; }
    .sheet-paper { padding: 2rem 1.2rem 1.6rem; }
    .scale-name { font-size: 1.2rem; }
    .card-title { font-size: 1.5rem; }
    .cookie-note { padding: 1rem 1.1rem; }
}

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