/*
Theme Name: dds_iaberegu.rf
Author: Анна Кедрова
Description: Тема информационного портала о профилактике заболеваний и здоровом образе жизни. Дизайн «полевой дневник наблюдений»: аптечная бумага, гербарий, восковые карандаши и старые ботанические таблицы.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.8
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: yaber
*/

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

/* ---------- Шрифты (локальные, OFL) ---------- */
@font-face {
    font-family: "Oranienbaum";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/oranienbaum-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: "Oranienbaum";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/oranienbaum-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Caveat";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/caveat-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: "Caveat";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/caveat-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "PT Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/pt-sans-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: "PT Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/pt-sans-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "PT Sans";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/pt-sans-cyrillic-400-italic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "PT Sans";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/pt-sans-latin-400-italic.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "PT Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/pt-sans-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: "PT Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/pt-sans-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Переменные ---------- */
:root {
    --paper: #F3E8D8;
    --paper-light: #FBF4E8;
    --card: #F8F0E0;
    --pine: #1F3B2E;
    --plum: #3B2438;
    --ink: #22302A;
    --sage: #7C8A7A;
    --sage-dark: #56625A;
    --terra: #C4482F;
    --mustard: #E2A72E;
    --mint: #A8C7B4;
    --mint-pale: #CFE0D4;
    --kraft: #CFAA74;
    --label: #D9C3A0;
    --side: #EADCC5;
    --graphite: #353336;
    --line: rgba(34, 48, 42, .22);
    --f-display: "Oranienbaum", "Playfair Display", "Times New Roman", Georgia, serif;
    --f-text: "PT Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --f-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
    --tear-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30 L0 5.8 L17 4.1 L34 9.6 L51 3.0 L57 16.5 L70 6.1 L78 5.1 L100 9.5 L117 9.6 L139 15.8 L147 12.2 L164 8.2 L170 12.7 L176 4.6 L193 2.7 L199 15.2 L209 9.6 L231 16.7 L244 13.4 L257 8.3 L274 9.1 L282 16.1 L288 2.6 L301 5.5 L323 9.0 L345 15.7 L358 10.1 L371 11.2 L388 11.4 L405 5.7 L415 12.9 L421 15.7 L438 12.7 L446 13.2 L456 17.4 L473 11.1 L495 12.5 L517 15.3 L534 6.3 L540 3.0 L562 17.8 L568 7.5 L574 8.6 L582 2.3 L600 5.8 L600 30 Z'/%3E%3C/svg%3E");
    --tear-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30 L0 15.5 L17 19.6 L30 15.5 L47 12.9 L64 15.8 L81 18.9 L87 15.5 L95 11.9 L117 17.3 L134 20.8 L147 17.5 L164 17.5 L181 11.2 L198 11.6 L204 12.9 L212 17.0 L225 14.3 L242 19.4 L259 13.3 L269 16.0 L291 11.8 L313 13.8 L330 21.0 L336 18.1 L346 18.6 L363 13.9 L369 16.6 L375 15.0 L385 14.9 L391 19.5 L397 13.1 L403 15.7 L425 15.0 L431 16.7 L439 18.8 L449 14.4 L459 14.3 L472 18.6 L478 12.3 L500 12.0 L506 15.6 L519 12.8 L536 12.9 L553 12.9 L575 18.7 L588 17.4 L600 15.5 L600 30 Z'/%3E%3C/svg%3E");
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-text);
    font-size: 1.05rem;
    line-height: 1.65;
    letter-spacing: .02em;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        radial-gradient(ellipse 260px 180px at 8% 34%, rgba(176, 124, 64, .07), transparent 70%),
        radial-gradient(ellipse 220px 160px at 92% 62%, rgba(176, 124, 64, .06), transparent 70%),
        url("images/paper-fiber.webp");
    background-size: auto, auto, 600px 180px;
    background-attachment: scroll;
}
img { max-width: 100%; height: auto; }
a { color: var(--terra); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pine); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px dashed var(--mustard);
    outline-offset: 3px;
}
p { margin: 0 0 1.1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-display);
    font-weight: 400;
    line-height: 1.12;
    margin: 1.6em 0 .6em;
    overflow-wrap: break-word;
    hyphens: auto;
}
p, li, dd, td, th, blockquote, figcaption { 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;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--mustard);
    color: var(--ink);
    padding: .6rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

/* ---------- Кнопки-ярлычки ---------- */
.yb-tag,
.comment-form .submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .72rem 2.2rem .72rem 1.25rem;
    font-family: var(--f-text);
    font-weight: 700;
    font-size: .9rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    background: #F6EBDA;
    border: 1.5px solid var(--ink);
    border-radius: 0;
    cursor: pointer;
    clip-path: polygon(0 5%, calc(100% - 16px) 0, 100% 16px, 99.4% 100%, .6% 96%);
    transition: background-color .15s, transform .15s;
}
.yb-tag::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background: linear-gradient(225deg, transparent 50%, var(--kraft) 50%);
}
.yb-tag:hover,
.comment-form .submit:hover {
    background: var(--mustard);
    color: var(--ink);
    transform: translateY(-2px);
}
.yb-tag--mustard { background: var(--mustard); }
.yb-tag--mustard:hover { background: var(--mint); }
.yb-tag--sm { padding: .45rem 1.6rem .45rem .85rem; font-size: .76rem; }

/* ---------- Шапка ---------- */
.yb-head {
    position: relative;
    background-color: var(--paper);
    background-image:
        radial-gradient(ellipse at 18% 30%, rgba(196, 160, 110, .14), transparent 45%),
        radial-gradient(ellipse at 70% 80%, rgba(196, 160, 110, .1), transparent 40%),
        url("images/paper-fiber.webp");
    background-size: auto, auto, 600px 180px;
}
.yb-head { border-bottom: 1.5px dashed rgba(124, 138, 122, .5); }
.yb-head__in {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}
.yb-brand {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.6rem 0 2.6rem;
    max-width: 640px;
    min-width: 0;
    text-decoration: none;
    color: var(--ink);
}
.yb-brand:hover { color: var(--ink); }
.yb-brand__mark { flex: 0 0 auto; display: block; }
.yb-brand__svg, .brand-logo { display: block; width: 62px; height: auto; }
.yb-brand__text { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.yb-brand__name {
    font-family: var(--f-display);
    font-size: 1.42rem;
    line-height: 1.18;
    overflow-wrap: break-word;
}
.yb-brand__desc {
    font-size: .82rem;
    line-height: 1.45;
    color: var(--sage-dark);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.yb-nav { flex: 0 0 auto; position: relative; z-index: 7; }
.yb-nav__toggle { display: none; }
.yb-nav__list {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.yb-nav__list li { --tab: var(--label); }
.yb-nav__list li:nth-child(4n+1) { --tab: var(--terra); }
.yb-nav__list li:nth-child(4n+2) { --tab: var(--mustard); }
.yb-nav__list li:nth-child(4n+3) { --tab: var(--mint); }
.yb-nav__list li:nth-child(4n+4) { --tab: var(--label); }
.yb-nav__list a {
    display: block;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    min-height: 186px;
    padding: .45rem .42rem .55rem;
    background: var(--tab);
    text-decoration: none;
    color: var(--ink);
    transition: transform .18s ease;
}
.yb-nav__list li:nth-child(2n) a { min-height: 206px; }
.yb-nav__list a span {
    display: block;
    height: 100%;
    padding: .9rem .38rem;
    background: var(--paper-light);
    border: 1.5px solid rgba(34, 48, 42, .55);
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.62rem;
    line-height: 1.1;
    letter-spacing: .01em;
    white-space: nowrap;
}
.yb-nav__list a:hover,
.yb-nav__list .current-menu-item > a { transform: rotate(180deg) translateY(-10px); color: var(--ink); }
.yb-nav__list .current-menu-item > a span { border-color: var(--terra); }

/* ---------- Рваный край секций ---------- */
.yb-torn { position: relative; }
.yb-torn::before,
.yb-torn::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 2;
}
.yb-torn::before {
    top: -24px;
    height: 26px;
    background: var(--fringe, var(--paper-light));
    -webkit-mask: var(--tear-a) repeat-x left top / 600px 26px;
    mask: var(--tear-a) repeat-x left top / 600px 26px;
}
.yb-torn::after {
    top: -15px;
    height: 17px;
    background: var(--sec, var(--paper));
    -webkit-mask: var(--tear-b) repeat-x 37px top / 540px 17px;
    mask: var(--tear-b) repeat-x 37px top / 540px 17px;
}

/* ---------- Общие элементы главной ---------- */
.yb-display {
    font-family: var(--f-display);
    font-weight: 400;
    font-size: clamp(2.6rem, 6.2vw, 5.4rem);
    line-height: .98;
    letter-spacing: -.005em;
    margin: 0 0 1.4rem;
    color: var(--paper);
    text-shadow: 2px 2px 0 rgba(226, 167, 46, .3);
}
.yb-display--md { font-size: clamp(2.3rem, 5vw, 4.4rem); }
.yb-display--ink { color: var(--ink); text-shadow: 2px 2px 0 rgba(196, 72, 47, .22); }
.yb-kicker {
    font-family: var(--f-hand);
    font-size: 1.45rem;
    color: var(--mustard);
    margin: 0 0 .6rem;
}
.yb-sec-title {
    position: relative;
    font-family: var(--f-display);
    font-variant: small-caps;
    font-size: clamp(1.9rem, 3.4vw, 2.7rem);
    letter-spacing: .07em;
    margin: 0 0 2.4rem;
    padding-bottom: .7rem;
}
.yb-sec-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: min(100%, 560px);
    height: 3px;
    background: var(--terra);
    clip-path: polygon(0 20%, 30% 0, 62% 35%, 100% 10%, 99% 100%, 40% 80%, 1% 100%);
}
.yb-empty { font-family: var(--f-hand); font-size: 1.4rem; color: var(--sage-dark); }

/* ---------- Блок 1: сигналы ---------- */
.yb-signals {
    --sec: var(--pine);
    background: var(--pine);
    color: var(--paper);
    padding: 4.8rem 0 5.4rem;
}
.yb-signals__in {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 3.4rem;
    align-items: start;
}
.yb-signals__text { min-width: 0; padding-top: 1rem; }
.yb-signals__lead { max-width: 44ch; color: #DCE6DF; }
.yb-signals__list { list-style: none; margin: 1.8rem 0 2.2rem; padding: 0; }
.yb-signals__list li {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: .9rem 0;
    border-bottom: 1.5px dashed rgba(168, 199, 180, .35);
    color: #D7E2DA;
}
.yb-signals__list strong { color: var(--paper); }
.yb-crayon { display: block; width: 52px; height: 52px; }
.yb-signals__sheet {
    position: relative;
    margin: 0;
    min-width: 0;
    padding: 1.1rem 1.1rem 2.4rem;
    background: #FBEFDE;
    transform: rotate(1.2deg);
    clip-path: polygon(0 0, 100% 0, 100% 95.5%, 94% 97.5%, 88% 95.8%, 80% 98.6%, 72% 96.4%, 63% 99%, 55% 96.8%, 46% 98.8%, 37% 96.2%, 28% 98.4%, 19% 96.6%, 10% 99%, 4% 96.9%, 0 98.5%);
}
.yb-signals__sheet img { display: block; width: 100%; height: auto; aspect-ratio: 964 / 1088; object-fit: cover; }

/* ---------- Блок 2: сезоны ---------- */
.yb-seasons {
    --sec: var(--plum);
    background: var(--plum);
    color: var(--paper);
    padding: 4.6rem 0 4.4rem;
}
.yb-seasons__lead { max-width: 52ch; color: #E6D8DF; }
.yb-seasons__board { position: relative; padding: 3.4rem 0 3.6rem; }
.yb-seasons__arrows {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.yb-note {
    position: absolute;
    margin: 0;
    font-family: var(--f-hand);
    font-size: 1.35rem;
    line-height: 1.2;
    color: #F0D9A8;
    z-index: 1;
}
.yb-note--top { top: .2rem; right: 4%; transform: rotate(-2deg); }
.yb-note--bottom { bottom: .3rem; left: 14%; transform: rotate(1.5deg); }
.yb-seasons__strip {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .6rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.yb-cell {
    --risk: var(--mustard);
    min-width: 0;
    min-height: 136px;
    padding: .55rem .45rem .8rem;
    background-color: #F6EBDA;
    background-image: url("images/paper-fiber.webp");
    background-size: 600px 180px;
    color: var(--ink);
    text-align: center;
    transform: rotate(var(--tilt, 0deg));
    clip-path: polygon(1% 2%, 50% 0, 99% 3%, 100% 52%, 98% 99%, 52% 97%, 2% 100%, 0 48%);
}
.yb-cell--high { --risk: var(--terra); }
.yb-cell--mid { --risk: var(--mustard); }
.yb-cell--low { --risk: #5E9C78; }
.yb-cell__month {
    display: block;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.22rem;
    line-height: 1.2;
    padding-bottom: .2rem;
    border-bottom: 1.5px solid rgba(34, 48, 42, .55);
    white-space: nowrap;
    hyphens: none;
}
.yb-cell__mark { display: block; width: 74%; height: 34px; margin: .45rem auto .25rem; stroke: var(--risk); }
.yb-cell__risk { display: block; font-size: .76rem; line-height: 1.25; letter-spacing: .01em; color: #3A4740; }
.yb-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem 2rem;
    list-style: none;
    margin: .6rem 0 0;
    padding: 0;
    font-size: .95rem;
    color: #EADFE4;
}
.yb-legend__item { display: inline-flex; align-items: center; gap: .6rem; }
.yb-legend__item::before {
    content: "";
    width: 30px;
    height: 6px;
    border-radius: 3px;
    background: var(--c);
    transform: rotate(-10deg);
}
.yb-legend__item--high { --c: var(--terra); }
.yb-legend__item--mid { --c: var(--mustard); }
.yb-legend__item--low { --c: #6FAE88; }

/* ---------- Последние записи ---------- */
.yb-latest {
    --sec: var(--paper);
    --fringe: #FFF9EF;
    padding: 4.6rem 0 4.4rem;
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(124, 138, 122, .3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 138, 122, .3) 1px, transparent 1px),
        linear-gradient(rgba(124, 138, 122, .14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 138, 122, .14) 1px, transparent 1px);
    background-size: 60px 60px, 60px 60px, 12px 12px, 12px 12px;
}
.yb-latest__more { margin: 2.8rem 0 0; text-align: center; }

/* ---------- Сетка и карточки ---------- */
.yb-grid { display: grid; gap: 2.4rem 2.2rem; }
.yb-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.yb-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; }
.card-body { flex: 1; }
.yb-card {
    position: relative;
    min-width: 0;
    padding: 1.9rem 1.4rem 1.3rem;
    background-color: var(--card);
    background-image: url("images/paper-fiber.webp");
    background-size: 600px 180px;
    border: 1px solid rgba(34, 48, 42, .16);
    box-shadow: 10px 10px 0 -2px var(--kraft);
    transition: transform .2s ease, box-shadow .2s ease;
}
.yb-card::before,
.yb-card::after {
    content: "";
    position: absolute;
    top: 11px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #E0BE86, #8A6436 70%);
    box-shadow: 1px 2px 0 rgba(34, 48, 42, .25);
}
.yb-card::before { left: 13px; }
.yb-card::after { right: 13px; }
.yb-card:hover { transform: translate(-3px, -3px) rotate(-.4deg); box-shadow: 14px 14px 0 -2px var(--kraft); }
.yb-card__no {
    position: absolute;
    top: .35rem;
    right: 2.4rem;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--terra);
    transform: rotate(-4deg);
}
.yb-card__thumb {
    position: relative;
    display: block;
    margin: .5rem 0 1.1rem;
    background: #FBF3E4;
    border: 1px solid rgba(34, 48, 42, .12);
}
.yb-card__thumb img:not(.yb-card__seal) {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.yb-card__thumb--specimen img:not(.yb-card__seal) { object-fit: contain; padding: .5rem 0; }
.yb-card__thumb::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -9px;
    width: 38%;
    height: 18px;
    background: rgba(236, 226, 204, .88);
    border: 1px solid rgba(124, 138, 122, .25);
    transform: translateX(-50%) rotate(-3deg);
}
.yb-card__seal {
    position: absolute;
    left: -.8rem;
    bottom: -.9rem;
    display: block;
    width: 58px;
    height: auto;
    z-index: 1;
}
.yb-card__body { display: flex; flex-direction: column; min-width: 0; }
.yb-card__title {
    margin: .4rem 0 .6rem;
    font-size: 1.55rem;
    line-height: 1.15;
}
.yb-card__title a { color: var(--ink); text-decoration: none; }
.yb-card__title a:hover { color: var(--terra); }
.yb-card__excerpt { font-size: .95rem; line-height: 1.55; color: #3A4740; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.yb-card__foot {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .7rem 1rem;
    padding-top: .9rem;
    border-top: 1.5px dashed rgba(124, 138, 122, .55);
}
.yb-card__date { font-family: var(--f-hand); font-size: 1.2rem; color: var(--sage-dark); }

/* ---------- Блок 3: разбор привычки ---------- */
.yb-habit { position: relative; padding: 4.4rem 0 6.4rem; }
.yb-habit::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(124, 138, 122, .22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 138, 122, .22) 1px, transparent 1px);
    background-size: 12px 12px;
    -webkit-mask-image: radial-gradient(ellipse 45% 60% at 72% 50%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 45% 60% at 72% 50%, #000 0%, transparent 75%);
}
.yb-habit__in { position: relative; }
.yb-habit__in {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 3.4rem;
    align-items: center;
}
.yb-habit__text { min-width: 0; }
.yb-parts { margin: 1.6rem 0 0; }
.yb-parts > div {
    display: grid;
    grid-template-columns: 7.2rem minmax(0, 1fr);
    gap: 1rem;
    padding: .65rem 0;
    border-bottom: 1.5px dashed rgba(124, 138, 122, .5);
}
.yb-parts dt { font-family: var(--f-hand); font-weight: 700; font-size: 1.45rem; line-height: 1.2; color: var(--terra); }
.yb-parts dd { margin: 0; }
.yb-habit__sheet {
    position: relative;
    margin: 0;
    min-width: 0;
    transform: rotate(-1deg);
    filter: drop-shadow(0 12px 16px rgba(34, 48, 42, .2));
}
.yb-habit__sheet img { display: block; width: 100%; height: auto; aspect-ratio: 1132 / 700; }
.yb-callout {
    position: absolute;
    left: var(--x);
    top: var(--y);
    padding: 0 .45rem;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: clamp(1.05rem, 1.9vw, 1.55rem);
    line-height: 1.3;
    color: var(--terra);
    background: rgba(251, 239, 222, .82);
    transform: rotate(-3deg);
    white-space: nowrap;
}

/* ---------- Блок 4: пять правил ---------- */
.yb-rules {
    --sec: var(--pine);
    background: var(--pine);
    color: var(--paper);
    padding: 4.8rem 0 4.6rem;
}
.yb-rules__in {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 3.4rem;
    align-items: center;
}
.yb-rules__text { min-width: 0; }
.yb-rules__text p { color: #DCE6DF; max-width: 42ch; margin-bottom: 1.8rem; }
.yb-rules__shelf {
    display: flex;
    align-items: flex-end;
    gap: .55rem;
    height: 400px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.yb-spine {
    --c: var(--paper);
    --t: var(--ink);
    --h: 100%;
    flex: 1 1 0;
    min-width: 0;
    height: var(--h);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .7rem;
    padding: 1rem .35rem 1.1rem;
    background: var(--c);
    color: var(--t);
    clip-path: polygon(0 1.5%, 48% 0, 100% 1%, 100% 100%, 0 100%);
    transition: transform .2s ease;
}
.yb-spine:hover { transform: translateY(-8px); }
.yb-spine--1 { --c: var(--terra); --t: var(--paper); --h: 100%; }
.yb-spine--2 { --c: var(--mustard); --h: 90%; }
.yb-spine--3 { --c: var(--paper); --h: 84%; }
.yb-spine--4 { --c: var(--mint); --h: 95%; }
.yb-spine--5 { --c: var(--mint-pale); --h: 88%; }
.yb-spine__num { font-family: var(--f-display); font-size: 2.7rem; line-height: 1; }
.yb-spine__text {
    flex: 1;
    min-height: 0;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-weight: 700;
    font-size: .98rem;
    line-height: 1.25;
    letter-spacing: .03em;
    text-align: end;
    hyphens: none;
}
.yb-spine__icon { display: block; width: 30px; height: 30px; }
.yb-spine__icon svg { display: block; width: 100%; height: 100%; }

/* ---------- Внутренние страницы ---------- */
.yb-inner { padding: 2.4rem 0 4.6rem; }
.breadcrumbs {
    margin: 0 0 1.8rem;
    font-size: .9rem;
    color: var(--sage-dark);
}
.breadcrumbs a { color: var(--ink); text-decoration-style: dashed; }
.breadcrumbs a:hover { color: var(--terra); }
.breadcrumbs .sep { color: var(--terra); margin: 0 .3rem; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
}
.layout-single { display: block; }
.layout-single > .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }
.yb-page-head { margin-bottom: 2.2rem; }
.yb-page-title {
    margin: 0 0 .8rem;
    font-size: clamp(2.1rem, 4.6vw, 3.5rem);
    line-height: 1.04;
}
.yb-page-intro { max-width: 60ch; color: #3A4740; }
.yb-sheet {
    position: relative;
    padding: 2.6rem 2.6rem 2.4rem;
    background-color: var(--card);
    background-image: url("images/paper-fiber.webp");
    background-size: 600px 180px;
    border: 1px solid rgba(34, 48, 42, .15);
    box-shadow: 12px 12px 0 -3px var(--kraft);
}
.yb-sheet::before,
.yb-sheet::after {
    content: "";
    position: absolute;
    top: 13px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #E0BE86, #8A6436 70%);
}
.yb-sheet::before { left: 15px; }
.yb-sheet::after { right: 15px; }
.yb-entry-head { margin-bottom: 1.4rem; }
.yb-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.4rem;
    margin: 0;
    font-family: var(--f-hand);
    font-size: 1.25rem;
    color: var(--sage-dark);
}
.yb-entry-cat a { color: var(--terra); }
.yb-entry-thumb { margin: 0 0 1.8rem; }
.yb-entry-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.yb-entry-content h2 { font-size: 2rem; padding-bottom: .35rem; border-bottom: 2px solid rgba(196, 72, 47, .6); }
.yb-entry-content h3 { font-size: 1.55rem; }
.yb-entry-content h4 { font-size: 1.3rem; }
.yb-entry-content ul, .yb-entry-content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.yb-entry-content li { margin-bottom: .35em; }
.yb-entry-content li::marker { color: var(--terra); }
.yb-entry-content blockquote {
    margin: 1.8rem 0;
    padding: 1.4rem 1.7rem;
    background: var(--pine);
    color: var(--paper);
    border-left: 6px solid var(--mustard);
    font-style: italic;
}
.yb-entry-content blockquote p { color: var(--paper); }
.yb-entry-content blockquote p:last-child { margin-bottom: 0; }
.yb-entry-content blockquote cite { font-family: var(--f-hand); font-style: normal; font-size: 1.2rem; color: var(--mustard); }
.yb-entry-content figure { margin: 1.6rem 0; max-width: 100%; }
.yb-entry-content figcaption { font-family: var(--f-hand); font-size: 1.15rem; color: var(--sage-dark); text-align: center; margin-top: .4rem; }
.yb-entry-content img { display: block; }
.yb-entry-content table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: .95rem; border: 1px solid rgba(34, 48, 42, .45); }
.yb-entry-content th, .yb-entry-content td { border: 1px solid rgba(34, 48, 42, .45); padding: .55rem .8rem; text-align: left; vertical-align: top; }
.yb-entry-content th { background: var(--side); font-weight: 700; }
.yb-entry-content pre { overflow: auto; padding: 1rem 1.2rem; background: #EEE3D1; border: 1px solid var(--line); }
.yb-entry-content code { background: #EEE3D1; padding: .1em .3em; }
.yb-entry-content hr { border: 0; border-top: 2px dashed rgba(124, 138, 122, .6); margin: 2rem 0; }
.yb-entry-content .alignleft { float: left; margin: .3rem 1.4rem 1rem 0; }
.yb-entry-content .alignright { float: right; margin: .3rem 0 1rem 1.4rem; }
.yb-entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.yb-entry-content::after { content: ""; display: table; clear: both; }
.yb-entry-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.8rem 0 0; }
.yb-entry-tags a {
    padding: .2rem .7rem;
    background: var(--mint-pale);
    border: 1px solid rgba(34, 48, 42, .3);
    color: var(--ink);
    text-decoration: none;
    font-size: .88rem;
}
.yb-entry-tags a:hover { background: var(--mustard); }
.yb-postnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin: 2.8rem 0 0;
}
.yb-postnav__link {
    display: block;
    padding: 1rem 1.2rem;
    border: 1.5px dashed rgba(34, 48, 42, .45);
    background: rgba(251, 244, 232, .7);
    color: var(--ink);
    text-decoration: none;
    font-family: var(--f-display);
    font-size: 1.15rem;
    line-height: 1.25;
}
.yb-postnav__link span { display: block; font-family: var(--f-hand); font-size: 1.15rem; color: var(--terra); }
.yb-postnav__link--next { grid-column: 2; text-align: right; }
.yb-postnav__link:hover { background: var(--mustard); color: var(--ink); }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    padding: 1.6rem 1.5rem;
    background-color: var(--side);
    background-image: url("images/paper-fiber.webp");
    background-size: 600px 180px;
    border: 1.5px solid rgba(34, 48, 42, .25);
    border-top: 6px solid var(--terra);
    color: var(--ink);
}
.sidebar .widget + .widget { margin-top: 2rem; }
.sidebar .widget-title {
    margin: 0 0 1rem;
    padding-bottom: .4rem;
    font-size: 1.5rem;
    font-variant: small-caps;
    letter-spacing: .05em;
    color: var(--ink);
    border-bottom: 2px solid var(--terra);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .55rem 0; border-bottom: 1.5px dashed rgba(124, 138, 122, .55); line-height: 1.4; }
.sidebar a { color: var(--ink); text-decoration: none; }
.sidebar a:hover { color: var(--terra); text-decoration: underline; }
.sidebar .post-date { display: block; font-size: .85rem; color: var(--sage-dark); }
.sidebar p, .sidebar .textwidget { color: var(--ink); }

/* ---------- Пагинация ---------- */
.yb-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin: 2.8rem 0 0;
}
.yb-pager .page-numbers,
.yb-pager > a,
.yb-pager > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    height: 2.7rem;
    padding: 0 .85rem;
    border: 1.5px solid var(--ink);
    background: #F6EBDA;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}
.yb-pager .page-numbers.current { background: var(--pine); border-color: var(--pine); color: var(--paper); }
.yb-pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding: 0 .3rem; }
.yb-pager a.page-numbers:hover, .yb-pager > a:hover { background: var(--mustard); color: var(--ink); }

/* ---------- Поиск ---------- */
.yb-search { display: flex; gap: .6rem; margin: 1.4rem 0; }
.yb-search__field {
    flex: 1;
    min-width: 0;
    padding: .7rem .9rem;
    font: inherit;
    color: var(--ink);
    background: var(--paper-light);
    border: 1.5px solid rgba(34, 48, 42, .5);
    border-radius: 0;
}
.yb-nothing p { font-size: 1.1rem; }

/* ---------- 404 ---------- */
.yb-404 { text-align: left; }
.yb-404__code {
    margin: 0;
    font-family: var(--f-display);
    font-size: clamp(5rem, 14vw, 9rem);
    line-height: 1;
    color: var(--terra);
    text-shadow: 3px 3px 0 rgba(226, 167, 46, .4);
}

/* ---------- Комментарии ---------- */
.yb-comments { margin-top: 3rem; }
.yb-comments .yb-sec-title { font-size: 1.9rem; margin-bottom: 1.6rem; }
.yb-comment-list, .yb-comment-list .children { list-style: none; margin: 0; padding: 0; }
.yb-comment-list .children { margin-left: 1.8rem; }
.yb-comment__box {
    margin-bottom: 1.2rem;
    padding: 1.1rem 1.3rem;
    background: rgba(251, 244, 232, .85);
    border: 1px solid rgba(34, 48, 42, .2);
    border-left: 4px solid var(--mint);
}
.yb-comment__head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin-bottom: .5rem; }
.yb-comment__head img { display: block; border-radius: 50%; }
.yb-comment__author { font-weight: 700; }
.yb-comment__date { font-family: var(--f-hand); font-size: 1.1rem; color: var(--sage-dark); }
.yb-comment__wait { font-style: italic; color: var(--terra); }
.yb-comment__reply a { font-family: var(--f-hand); font-size: 1.15rem; }
.comment-respond { margin-top: 2rem; padding: 1.6rem 1.6rem 1.4rem; background: var(--side); border: 1.5px solid rgba(34, 48, 42, .25); }
.comment-reply-title { margin: 0 0 1rem; font-size: 1.6rem; }
.comment-reply-title small { font-family: var(--f-text); font-size: .85rem; margin-left: .6rem; }
.comment-form label { display: block; font-family: var(--f-hand); font-size: 1.2rem; color: var(--ink); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .7rem .8rem;
    font: inherit;
    color: var(--ink);
    background: var(--paper-light);
    border: 1.5px solid rgba(34, 48, 42, .45);
    border-radius: 0;
}
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { font-family: var(--f-text); font-size: .9rem; }
.comment-notes, .logged-in-as { font-size: .9rem; color: var(--sage-dark); }

/* ---------- Подвал ---------- */
.yb-foot {
    background: var(--graphite);
    color: #E5DACA;
    padding: 3.6rem 0 1.6rem;
}
.yb-foot__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.6rem;
}
.yb-foot__col { min-width: 0; }
.yb-foot .widget + .widget { margin-top: 1.6rem; }
.yb-foot .widget-title {
    position: relative;
    display: inline-block;
    margin: 0 0 1.1rem;
    padding: .35rem 1.8rem .35rem .95rem;
    font-size: 1.32rem;
    color: var(--ink);
    background: var(--paper);
    clip-path: polygon(0 6%, calc(100% - 14px) 0, 100% 14px, 99% 100%, 1% 94%);
}
.yb-foot .widget-title::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background: linear-gradient(225deg, transparent 50%, var(--kraft) 50%);
}
.yb-foot p, .yb-foot .textwidget, .yb-foot li { color: #E5DACA; }
.yb-foot ul { list-style: none; margin: 0; padding: 0; }
.yb-foot li { padding: .28rem 0; }
.yb-foot a { color: #F3E8D8; text-decoration-style: dashed; }
.yb-foot a:hover { color: var(--mustard); }
.yb-foot__copy {
    margin: 2.6rem 0 0;
    padding-top: 1.2rem;
    border-top: 1px dashed rgba(243, 232, 216, .28);
    font-size: .9rem;
    color: #CFC5B5;
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 1.4rem;
    background: var(--plum);
    color: var(--paper);
    border: 1.5px solid var(--mustard);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, .3);
}
.cookie-banner__text { margin: 0; font-size: .92rem; color: var(--paper); }
.cookie-banner__btn { flex: 0 0 auto; }

/* ---------- Адаптив: десктоп ---------- */
@media (min-width: 1200px) {
    .yb-seasons__strip { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .45rem; }
    .yb-cell__month { font-size: 1.12rem; }
}
@media (min-width: 961px) {
    .yb-signals__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .yb-signals__sheet { align-self: end; z-index: 4; transform: translateY(10rem) rotate(1.2deg); }
    .yb-seasons .yb-display, .yb-seasons__lead { max-width: 56%; }
}

/* ---------- Адаптив: планшет ---------- */
@media (max-width: 960px) {
    .yb-head__in { align-items: center; padding: .9rem 0; }
    .yb-brand { padding: .3rem 0; gap: .8rem; }
    .yb-brand__svg, .brand-logo { width: 46px; }
    .yb-brand__name { font-size: 1.12rem; }
    .yb-brand__desc { -webkit-line-clamp: 2; font-size: .78rem; }
    .yb-nav__toggle {
        display: inline-flex;
        align-items: center;
        gap: .6rem;
        padding: .45rem .9rem;
        font-family: var(--f-hand);
        font-weight: 700;
        font-size: 1.3rem;
        color: var(--ink);
        background: var(--mustard);
        border: 1.5px solid var(--ink);
        border-radius: 0;
        cursor: pointer;
    }
    .yb-nav__bars, .yb-nav__bars::before, .yb-nav__bars::after {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--ink);
        position: relative;
    }
    .yb-nav__bars::before, .yb-nav__bars::after { content: ""; position: absolute; left: 0; }
    .yb-nav__bars::before { top: -6px; }
    .yb-nav__bars::after { top: 6px; }
    .yb-nav__list {
        display: none;
        position: absolute;
        top: 100%;
        left: 4%;
        right: 4%;
        flex-direction: column;
        align-items: stretch;
        gap: .4rem;
        padding: .7rem;
        background: var(--paper-light);
        border: 1.5px solid var(--ink);
        z-index: 20;
    }
    .yb-nav.is-open .yb-nav__list { display: flex; }
    .yb-nav__list a,
    .yb-nav__list li:nth-child(2n) a {
        writing-mode: horizontal-tb;
        transform: none;
        min-height: 0;
        padding: .3rem;
    }
    .yb-nav__list a:hover,
    .yb-nav__list .current-menu-item > a { transform: translateX(6px); }
    .yb-nav__list a span { padding: .35rem .7rem; white-space: normal; }

    .yb-signals__in, .yb-habit__in, .yb-rules__in { grid-template-columns: minmax(0, 1fr); gap: 2.6rem; }
    .yb-signals__sheet { max-width: 560px; justify-self: center; width: 100%; }
    .yb-seasons__strip { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; }
    .yb-seasons__arrows { display: none; }
    .yb-note { position: static; margin: 0 0 1rem; }
    .yb-seasons__board { padding: 1.6rem 0 1.2rem; }
    .yb-habit__sheet { max-width: 680px; justify-self: center; width: 100%; }
    .yb-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-with-sidebar { display: block; }
    .layout-with-sidebar .sidebar { margin-top: 3rem; }
    .layout-single > .content-area { width: 100%; }
    .yb-foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Адаптив: телефон ---------- */
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .shell--front { width: min(92%, 1240px); }
    .yb-brand__desc { display: none; }
    .yb-brand__name { font-size: .98rem; }
    .yb-brand__svg, .brand-logo { width: 40px; }
    .yb-nav__label { display: none; }
    .yb-signals, .yb-seasons, .yb-latest, .yb-rules { padding: 3.2rem 0 3.4rem; }
    .yb-habit { padding: 3rem 0 4rem; }
    .yb-signals__list li { grid-template-columns: 40px minmax(0, 1fr); }
    .yb-crayon { width: 40px; height: 40px; }
    .yb-seasons__strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .yb-grid--3, .yb-grid--2 { grid-template-columns: minmax(0, 1fr); }
    .yb-parts > div { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
    .yb-callout { font-size: .95rem; padding: 0 .3rem; }
    .yb-rules__shelf { flex-direction: column; align-items: stretch; height: auto; gap: .45rem; }
    .yb-spine {
        flex: none;
        height: auto;
        flex-direction: row;
        gap: 1rem;
        padding: .8rem 1rem;
        clip-path: none;
    }
    .yb-spine:hover { transform: translateX(6px); }
    .yb-spine__num { font-size: 2rem; flex: 0 0 auto; }
    .yb-spine__text { writing-mode: horizontal-tb; transform: none; text-align: start; }
    .yb-spine__icon { flex: 0 0 auto; }
    .yb-sheet { padding: 2rem 1.3rem 1.6rem; box-shadow: 7px 7px 0 -2px var(--kraft); }
    .yb-postnav { grid-template-columns: minmax(0, 1fr); }
    .yb-postnav__link--next { grid-column: auto; }
    .yb-foot__cols { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .cookie-banner { flex-direction: column; align-items: flex-start; padding: 1rem 1.2rem; }
    .yb-search { flex-direction: column; }
    .yb-search .yb-tag { align-self: flex-start; }
    .yb-comment-list .children { margin-left: .8rem; }
}
