/*
Theme Name: dds_chasinghappyatwork.com
Theme URI: https://chasinghappyatwork.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: chhappy
*/

/* ---------- Шрифты ---------- */
@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: 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: #F3EBDD;
    --paper-2: #EDE3D1;
    --graphite: #2E2C2A;
    --graphite-2: #3A3835;
    --ink: #4A5A6A;
    --lime: #C6E03C;
    --orange: #E8663C;
    --orange-dark: #C9502A;
    --card: #D9E4EA;
    --card-fold: #B5C6D0;
    --margin-red: #C4523E;
    --tape: rgba(222, 210, 165, 0.78);
    --grid-line: rgba(74, 90, 106, 0.075);
    --grid-line-strong: rgba(74, 90, 106, 0.14);
    --hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
    --type: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    --shell: min(92%, 1280px);
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--type);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--graphite);
    background-color: var(--paper);
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 14px 14px;
}
img { max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; line-height: 1.15; }
p, li, dd, td, th, h1, h2, h3, h4, blockquote, figcaption, summary, .card-title, .brand-name, .brand-desc {
    overflow-wrap: break-word;
    hyphens: auto;
}
a { color: var(--graphite); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--lime);
    outline-offset: 2px;
}
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-to {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 200;
    background: var(--lime);
    color: var(--graphite);
    padding: .5em 1em;
    font-weight: 700;
    text-decoration: none;
}
.skip-to:focus { top: 12px; }

.shell { width: var(--shell); margin-inline: auto; }

/* ---------- Кнопки-ярлыки ---------- */
.btn-tag {
    display: inline-block;
    font-family: var(--type);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    color: #fff;
    background: var(--orange);
    border: 1.5px solid var(--graphite);
    border-radius: 2px;
    padding: .6em 1.25em;
    text-decoration: none;
    transform: rotate(-1.5deg);
    box-shadow: 2px 2px 0 var(--graphite);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-tag:hover {
    background: var(--orange-dark);
    color: #fff;
    transform: rotate(0deg) translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--graphite);
}
.btn-tag:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--graphite); }
.btn-small { font-size: .9rem; padding: .45em .95em; }

/* ---------- Шапка ---------- */
.cover {
    background: var(--graphite);
    color: var(--paper);
    border-bottom: 4px solid #1F1E1C;
}
.cover-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    text-decoration: none;
    color: var(--paper);
    min-width: 0;
    flex: 1 1 420px;
}
.brand-mark { flex: 0 0 auto; display: block; line-height: 0; }
.brand-logo { max-height: 64px; width: auto; display: block; }
.brand-svg { display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.25;
    color: #FBF6EC;
    max-width: 30ch;
}
.brand-desc {
    font-size: .82rem;
    line-height: 1.4;
    color: #BDB6A9;
    max-width: 52ch;
    margin-top: .25rem;
}
.topnav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .3rem 1.6rem;
}
.topnav-list a {
    color: #F3EBDD;
    text-decoration: none;
    font-size: 1rem;
    padding: .25em 0;
    background-image: linear-gradient(var(--lime), var(--lime));
    background-size: 0 3px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size .2s ease, color .2s ease;
}
.topnav-list a:hover { background-size: 100% 3px; }
.topnav-list .current-menu-item > a,
.topnav-list .current_page_item > a { color: var(--lime); }
.nav-toggle {
    display: none;
    align-items: center;
    gap: .5rem;
    background: transparent;
    color: var(--paper);
    border: 1.5px solid var(--paper);
    padding: .45em .8em;
    font: 700 .95rem var(--type);
    cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    position: relative;
    content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

/* ---------- Бумага и поле ---------- */
.paper { position: relative; padding-bottom: 4rem; }
.paper::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: max(6px, calc((100% - min(92%, 1280px)) / 2 - 18px));
    width: 2px;
    background: var(--margin-red);
    opacity: .7;
    pointer-events: none;
}
.paper::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: max(10px, calc((100% - min(92%, 1280px)) / 2 - 13px));
    width: 1px;
    background: var(--margin-red);
    opacity: .35;
    pointer-events: none;
}
.site-main { position: relative; z-index: 1; padding-top: 2.2rem; }

/* ---------- Заголовки секций ---------- */
.section-title {
    font-family: var(--hand);
    font-weight: 700;
    font-size: clamp(2.6rem, 6.2vw, 5rem);
    line-height: .95;
    letter-spacing: .005em;
    color: var(--graphite);
    display: inline-block;
    position: relative;
    margin: 0 0 1.6rem;
    padding-bottom: .12em;
}
.section-title::after,
.marked::after {
    content: "";
    position: absolute;
    left: -.08em;
    right: -.12em;
    bottom: -.06em;
    height: .13em;
    background: var(--lime);
    border-radius: 60% 40% 55% 45% / 100%;
    transform: rotate(-.8deg);
    transform-origin: left center;
}
.hand-note {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--graphite);
    margin: 0;
}

/* ---------- Главная ---------- */
.front-wrap { width: 85%; margin-left: auto; margin-right: auto; }
.front-section { position: relative; padding: 2.6rem 0; }

/* Открывашка */
.opener {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, .72fr) minmax(0, .85fr);
    gap: 2rem;
    align-items: center;
    padding: 1rem 0 2rem;
}
.opener-title {
    font-family: var(--hand);
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 5.6rem);
    line-height: 1;
    margin: 0;
    min-width: 0;
}
.opener-title span { display: inline-block; white-space: nowrap; }
.marked { position: relative; }
.marked::after { height: .1em; bottom: -.1em; }
.opener-scheme { position: relative; margin: 0; min-width: 0; container-type: inline-size; }
.opener-scheme img { display: block; width: 100%; height: auto; }
.scheme-word {
    position: absolute;
    transform: translate(-50%, -50%);
    font-family: var(--hand);
    font-weight: 700;
    font-size: 8.5cqw;
    line-height: 1;
    white-space: nowrap;
}
.sw-1 { left: 25.2%; top: 21%; }
.sw-2 { left: 77.2%; top: 57%; }
.sw-3 { left: 29.2%; top: 77.5%; }
.opener-photo { margin: 0; min-width: 0; }
.opener-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 576 / 488;
    object-fit: cover;
    box-shadow: 0 6px 16px rgba(46, 44, 42, .18);
}

/* Карта мотивации */
.motive::before {
    content: "";
    position: absolute;
    top: 1.4rem;
    right: 0;
    bottom: 1rem;
    width: 34%;
    background-image:
        linear-gradient(var(--grid-line-strong) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line-strong) 1px, transparent 1px);
    background-size: 9px 9px;
    pointer-events: none;
}
.motive > * { position: relative; }
.route { position: relative; margin: .5rem 0 4.2rem; }
.route-img { display: block; width: 100%; height: auto; }
.route-stops { list-style: none; margin: 0; padding: 0; }
.stop {
    position: absolute;
    display: flex;
    flex-direction: column;
    max-width: 17%;
    line-height: 1.15;
}
.stop b {
    font-family: var(--hand);
    font-weight: 700;
    font-size: clamp(1.2rem, 2vw, 1.75rem);
}
.stop span {
    font-family: var(--hand);
    font-weight: 700;
    font-size: clamp(.95rem, 1.35vw, 1.15rem);
    color: var(--ink);
}
.stop-1 { left: 0; top: 66%; }
.stop-2 { left: 22%; top: 69%; }
.stop-3 { left: 42%; top: 59%; }
.stop-4 { left: 65.5%; top: 76%; }
.stop-5 { left: 85%; top: 45%; }
.route-note { text-align: right; padding-right: 3%; }

/* Разбор недели */
.week-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .42fr) minmax(0, .8fr);
    gap: 2rem;
    align-items: center;
}
.week-table-wrap { min-width: 0; overflow-x: auto; }
.week-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.3rem;
    border: 2px solid var(--graphite);
}
.week-table th,
.week-table td {
    border: 2px solid var(--graphite);
    padding: .3em .7em;
    text-align: left;
    height: 2.3em;
}
.week-table th { font-size: 1.45rem; text-align: center; font-weight: 700; }
.week-table td:first-child { text-align: center; width: 3.2em; }
.week-table td:last-child { color: var(--ink); width: 30%; }
.week-table tbody tr:nth-child(odd) td { background: rgba(255, 255, 255, .25); }
.thermo { margin: 0; min-width: 0; }
.thermo-title {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.35rem;
    margin-bottom: .4rem;
    white-space: nowrap;
}
.thermo-scale { position: relative; width: 42%; min-width: 46px; }
.thermo-scale img { display: block; width: 100%; height: auto; }
.thermo-mark {
    position: absolute;
    left: calc(100% + 8px);
    transform: translateY(-50%);
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.35rem;
    white-space: nowrap;
}
.tm-1 { top: 12.4%; }
.tm-2 { top: 43.4%; }
.tm-3 { top: 73.7%; }
.week-photo { margin: 0; min-width: 0; }
.week-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 628 / 496;
    object-fit: cover;
    box-shadow: 0 6px 16px rgba(46, 44, 42, .18);
}

/* Свежие записи и карточки */
.card-grid {
    display: grid;
    gap: 2.6rem 2.2rem;
    padding-top: 1rem;
}
.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pin {
    position: relative;
    min-width: 0;
    display: flex;
    filter: drop-shadow(0 6px 7px rgba(46, 44, 42, .22));
    transform: rotate(-2deg);
    transition: transform .25s ease;
}
.card-grid > .pin:nth-child(3n+2) { transform: rotate(1deg); }
.card-grid > .pin:nth-child(3n+3) { transform: rotate(2.2deg); }
.card-grid > .pin:hover { transform: rotate(0deg) translateY(-4px); }
.pin::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: -13px;
    left: 50%;
    width: 30%;
    height: 28px;
    background: var(--tape);
    transform: translateX(-50%) rotate(-3deg);
    clip-path: polygon(2% 8%, 98% 0, 100% 90%, 4% 100%, 0 55%);
}
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--card);
    padding: 14px 14px 16px;
    overflow: hidden;
    clip-path: polygon(0% 1%, 8% 0%, 20% .6%, 33% 0%, 47% .8%, 60% .2%, 74% .9%, 88% 0%, 100% .7%, 99.4% 12%, 100% 27%, 99.3% 41%, 100% 56%, 99.5% 70%, 100% 85%, 99.4% 99%, 86% 100%, 72% 99.3%, 58% 100%, 44% 99.2%, 30% 100%, 16% 99.4%, 2% 100%, .6% 86%, 0% 71%, .7% 57%, 0% 42%, .6% 27%, 0% 13%);
}
.card-thumb { flex: 0 0 auto; }
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 592 / 290;
    object-fit: cover;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: .9rem .2rem 0;
}
.card-flag {
    align-self: flex-start;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: var(--lime);
    padding: .15em .55em;
    margin-bottom: .5rem;
}
.card-title {
    font-family: var(--type);
    font-weight: 700;
    font-size: 1.22rem;
    line-height: 1.25;
    margin: 0 0 .45rem;
}
.card-title a { text-decoration: none; color: var(--graphite); }
.card-title a:hover { text-decoration: underline wavy var(--orange) 1px; text-underline-offset: 4px; }
.card-excerpt { font-size: .96rem; line-height: 1.45; color: var(--graphite-2); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot {
    margin-top: auto;
    padding-top: .7rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    flex-wrap: wrap;
}
.card-date { font-size: .9rem; color: var(--ink); }
.fresh-more { margin: 2.6rem 0 0; text-align: center; }
.empty-note { font-size: 1.1rem; color: var(--ink); }

/* Пять вопросов себе */
.five {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}
.five-head { position: relative; min-width: 0; }
.five-title { max-width: 7.5em; }
.five-digit {
    display: block;
    font-family: var(--hand);
    font-weight: 700;
    font-size: clamp(7rem, 14vw, 11rem);
    line-height: .8;
    text-align: right;
    margin-top: -.25em;
    padding-right: 12%;
    position: relative;
}
.five-digit::before {
    content: "";
    position: absolute;
    z-index: -1;
    right: 2%;
    top: -18%;
    width: 52%;
    height: 120%;
    background-image:
        linear-gradient(var(--grid-line-strong) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line-strong) 1px, transparent 1px);
    background-size: 9px 9px;
}
.five-list { display: flex; flex-direction: column; gap: .9rem; min-width: 0; padding-top: .6rem; }
.strip {
    position: relative;
    background: linear-gradient(315deg, transparent 13px, var(--card) 13px);
    padding: 0;
    filter: drop-shadow(0 2px 2px rgba(46, 44, 42, .15));
}
.strip::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    background: linear-gradient(315deg, transparent 50%, var(--card-fold) 50%);
}
.strip:nth-child(even) { transform: translateX(6px); }
.strip summary {
    list-style: none;
    cursor: pointer;
    padding: .7rem 2.6rem .7rem 1.1rem;
    font-weight: 700;
    font-size: 1.08rem;
    position: relative;
}
.strip summary::-webkit-details-marker { display: none; }
.strip summary::after {
    content: "+";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--hand);
    font-size: 1.7rem;
    line-height: 1;
    color: var(--orange);
}
.strip[open] summary::after { content: "−"; }
.strip p {
    margin: 0;
    padding: 0 1.4rem 1rem 1.1rem;
    font-size: .98rem;
    color: var(--graphite-2);
}
.strip[open]::before {
    content: "";
    position: absolute;
    inset: -10px -16px -9px -14px;
    border: 3px solid var(--lime);
    border-radius: 50% 46% 52% 48% / 60% 55% 62% 58%;
    transform: rotate(-1.2deg);
    pointer-events: none;
}

/* Полка материалов */
.shelf {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 2.5rem;
    align-items: center;
}
.shelf-text { min-width: 0; }
.shelf-text p { max-width: 44ch; margin-bottom: 1.4rem; }
.shelf-figure { margin: 0; min-width: 0; text-align: right; }
.shelf-art {
    position: relative;
    container-type: inline-size;
    background: #F3ECD9;
}
.shelf-art img { display: block; width: 100%; height: auto; }
.spine {
    position: absolute;
    transform: translate(-50%, -50%) rotate(-90deg);
    font-family: var(--hand);
    font-weight: 700;
    font-size: 3.2cqw;
    line-height: 1;
    white-space: nowrap;
    color: var(--graphite);
    text-decoration: none;
}
.spine:hover { color: var(--orange-dark); }
.spine-1 { left: 13%; top: 58%; transform: translate(-50%, -50%) rotate(-74deg); }
.spine-2 { left: 25.2%; top: 54%; }
.spine-3 { left: 43.4%; top: 51%; font-size: 2.8cqw; }
.spine-4 { left: 55%; top: 59%; transform: translate(-50%, -50%) rotate(-102deg); }
.shelf-figure .hand-note { margin-top: .4rem; padding-right: 6%; font-size: 1.5rem; }

/* ---------- Внутренние страницы ---------- */
.crumbs {
    font-size: .92rem;
    color: var(--ink);
    margin: 0 0 1.8rem;
    padding: .4rem .9rem;
    display: inline-block;
    background: rgba(217, 228, 234, .55);
    border-left: 3px solid var(--lime);
}
.crumbs a { color: var(--ink); text-decoration: underline wavy rgba(232, 102, 60, .7) 1px; text-underline-offset: 3px; }
.crumbs a:hover { color: var(--graphite); }
.crumbs-sep { margin: 0 .25em; }

.layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
}
.content-area { min-width: 0; }
.page-head { margin-bottom: 1.5rem; }
.page-sub, .page-lead { color: var(--ink); max-width: 64ch; }

.entry {
    position: relative;
    background: rgba(251, 247, 239, .88);
    padding: 2.4rem 2.6rem;
    box-shadow: 0 6px 18px rgba(46, 44, 42, .12);
}
.entry::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 2.4rem;
    width: 120px;
    height: 26px;
    background: var(--tape);
    transform: rotate(-3deg);
}
.entry-title {
    font-family: var(--hand);
    font-weight: 700;
    font-size: clamp(2.3rem, 5vw, 3.8rem);
    line-height: 1;
    margin-bottom: .6rem;
}
.entry-meta { color: var(--ink); font-size: .95rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.entry-cat a { color: var(--ink); }
.entry-photo { margin: 0 0 1.8rem; }
.entry-photo img { display: block; width: 100%; height: auto; }
.entry-content { font-size: 1.08rem; line-height: 1.7; }
.entry-content > * { max-width: 100%; }
.entry-content h2,
.entry-content h3 {
    font-family: var(--hand);
    font-weight: 700;
    line-height: 1.05;
    margin: 1.6em 0 .5em;
}
.entry-content h2 { font-size: 2.3rem; }
.entry-content h3 { font-size: 1.9rem; }
.entry-content h4 { font-size: 1.2rem; margin: 1.4em 0 .5em; }
.entry-content a { color: var(--graphite); text-decoration: underline wavy var(--orange) 1px; text-underline-offset: 4px; }
.entry-content a:hover { color: var(--orange-dark); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .35em; }
.entry-content ul li::marker { color: var(--orange); }
.entry-content ol li::marker { font-weight: 700; color: var(--ink); }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.6rem 1.2rem 1.8rem;
    background: var(--card);
    border-left: 6px solid var(--lime);
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.55rem;
    line-height: 1.3;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 2px solid var(--graphite);
    font-size: .98rem;
}
.entry-content th,
.entry-content td { border: 1px solid var(--graphite); padding: .55em .8em; text-align: left; vertical-align: top; }
.entry-content th { background: var(--card); }
.entry-content img { display: block; height: auto; }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { font-size: .9rem; color: var(--ink); margin-top: .4rem; }
.entry-content pre {
    overflow-x: auto;
    background: var(--graphite);
    color: var(--paper);
    padding: 1rem 1.2rem;
}
.entry-tags { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.entry-tags a {
    font-size: .9rem;
    text-decoration: none;
    background: var(--card);
    padding: .2em .7em;
    border: 1px solid var(--graphite);
}
.entry-tags a:hover { background: var(--lime); }
.entry-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.4rem;
    border-top: 2px dashed rgba(74, 90, 106, .4);
}
.entry-nav a { text-decoration: none; font-weight: 700; display: flex; flex-direction: column; min-width: 0; }
.entry-nav a span { font-weight: 400; font-size: .88rem; color: var(--ink); }
.entry-nav a:hover { color: var(--orange-dark); }
.entry-nav-next { grid-column: 2; text-align: right; }

/* ---------- Сайдбар ---------- */
.sidebar { min-width: 0; padding-top: .6rem; }
.sidebar .widget {
    position: relative;
    background: var(--card);
    color: var(--graphite);
    padding: 1.6rem 1.5rem 1.3rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 12px rgba(46, 44, 42, .16);
    transform: rotate(.8deg);
}
.sidebar .widget::before {
    content: "";
    position: absolute;
    top: -11px;
    left: 50%;
    width: 90px;
    height: 24px;
    background: var(--tape);
    transform: translateX(-50%) rotate(2deg);
}
.sidebar .widget-title {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.9rem;
    line-height: 1;
    color: var(--graphite);
    margin-bottom: .8rem;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .45rem 0; border-bottom: 1px dashed rgba(46, 44, 42, .3); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--graphite); text-decoration: none; }
.sidebar a:hover { text-decoration: underline wavy var(--orange) 1px; text-underline-offset: 3px; }
.sidebar .post-date { display: block; font-size: .85rem; color: var(--ink); }
.sidebar p { color: var(--graphite); }

/* ---------- Пагинация ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    justify-content: center;
    margin: 3rem 0 1rem;
}
.pager .page-numbers {
    display: inline-block;
    min-width: 2.5rem;
    text-align: center;
    padding: .4em .8em;
    border: 1.5px solid var(--graphite);
    background: var(--card);
    color: var(--graphite);
    text-decoration: none;
    font-weight: 700;
    box-shadow: 2px 2px 0 var(--graphite);
}
.pager a.page-numbers:hover { background: var(--lime); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--graphite); }
.pager .page-numbers.current { background: var(--lime); transform: rotate(-3deg); }
.pager .page-numbers.dots { border: 0; background: none; box-shadow: none; min-width: 0; }

/* ---------- Поиск ---------- */
.find { margin: 1rem 0 1.6rem; max-width: 520px; }
.find-label { display: block; font-family: var(--hand); font-weight: 700; font-size: 1.4rem; margin-bottom: .3rem; }
.find-row { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.find-input {
    flex: 1 1 220px;
    min-width: 0;
    font: inherit;
    padding: .6em .8em;
    border: 1.5px solid var(--graphite);
    background: #FBF7EF;
    color: var(--graphite);
}
.find-btn { font-size: .98rem; }
.sidebar .find-label { display: none; }

/* ---------- 404 ---------- */
.lost { text-align: left; padding: 1rem 0 2rem; }
.lost-code {
    font-family: var(--hand);
    font-weight: 700;
    font-size: clamp(6rem, 18vw, 12rem);
    line-height: .8;
    margin: 0 0 .5rem;
    color: var(--orange);
}
.lost-text { max-width: 52ch; }
.empty-box { padding: 1rem 0; }

/* ---------- Комментарии ---------- */
.talk { margin-top: 3rem; }
.talk-title,
.comment-reply-title {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 1rem;
}
.talk-list, .talk-list .children { list-style: none; margin: 0; padding: 0; }
.talk-list .children { margin-left: 2rem; }
.note-comment-body {
    background: var(--card);
    padding: 1rem 1.3rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--lime);
}
.note-comment-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .4rem; }
.note-comment-head img { border-radius: 50%; display: block; }
.note-comment-author { font-weight: 700; }
.note-comment-head time { color: var(--ink); font-size: .88rem; }
.note-comment-wait { color: var(--orange-dark); font-size: .92rem; }
.comment-reply-link { font-size: .9rem; color: var(--ink); }
.comment-respond { background: rgba(251, 247, 239, .9); padding: 1.6rem 1.8rem; margin-top: 1.6rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-weight: 700; margin-bottom: .25rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    font: inherit;
    padding: .6em .8em;
    border: 1.5px solid var(--graphite);
    background: #FBF7EF;
}
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; display: inline; }
.comment-form .submit {
    font: 700 1rem var(--type);
    color: #fff;
    background: var(--orange);
    border: 1.5px solid var(--graphite);
    padding: .6em 1.3em;
    box-shadow: 2px 2px 0 var(--graphite);
    transform: rotate(-1.5deg);
    cursor: pointer;
}
.comment-form .submit:hover { background: var(--orange-dark); transform: none; }
.comments-pagination, .comment-navigation { margin: 1rem 0; }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; }

/* ---------- Подвал ---------- */
.backcover {
    background: var(--graphite);
    color: #DDD5C7;
    padding: 3rem 0 1.4rem;
    border-top: 4px solid #1F1E1C;
}
.backcover-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
}
.backcover-col { min-width: 0; }
.backcover .widget { margin-bottom: 1.2rem; color: #DDD5C7; }
.backcover .widget-title {
    font-family: var(--type);
    font-weight: 700;
    font-size: 1.25rem;
    color: #FBF6EC;
    margin-bottom: .7rem;
}
.backcover p, .backcover .textwidget { color: #DDD5C7; font-size: .98rem; }
.backcover ul { list-style: none; margin: 0; padding: 0; }
.backcover li { margin-bottom: .35rem; }
.backcover a { color: #F3EBDD; text-decoration: underline; text-decoration-color: rgba(198, 224, 60, .7); text-underline-offset: 3px; }
.backcover a:hover { color: var(--lime); }
.backcover .post-date { color: #B5AE9F; font-size: .85rem; display: block; }
.copyline {
    margin: 2rem 0 0;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(243, 235, 221, .15);
    text-align: center;
    font-size: .9rem;
    color: #B5AE9F;
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    z-index: 150;
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.1rem 1.4rem;
    background: var(--graphite);
    color: #EDE5D6;
    border: 2px solid var(--lime);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}
.cookie-text { margin: 0; font-size: .94rem; line-height: 1.45; flex: 1; min-width: 0; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .front-wrap,
    .layout-single .content-area { width: 100%; }
    .opener { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .opener-title { grid-column: 1 / -1; }
    .week-grid { grid-template-columns: minmax(0, .5fr) minmax(0, 1fr); }
    .week-table-wrap { grid-column: 1 / -1; }
    .thermo { justify-self: center; }
    .card-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .five, .shelf { grid-template-columns: minmax(0, 1fr); }
    .five-digit { text-align: left; padding-left: 30%; }
    .shelf-figure { text-align: left; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .sidebar { margin-top: 3rem; }
    .backcover-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stop span { display: none; }
}
@media (max-width: 760px) {
    .route { margin-bottom: 1.5rem; }
    .route-stops {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: .8rem 1rem;
        margin-top: 1rem;
    }
    .stop { position: static; max-width: none; }
    .stop span { display: block; }
    .stop b::before { content: "⚑ "; color: #9DB52A; }
    .route-note { text-align: left; }
    .card-grid-3, .card-grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .cover-row { padding: .9rem 0; }
    .brand { flex-basis: calc(100% - 110px); }
    .brand-desc { display: none; }
    .nav-toggle { display: inline-flex; }
    .topnav { display: none; width: 100%; }
    .topnav.is-open { display: block; }
    .topnav-list { flex-direction: column; gap: 0; padding: .6rem 0 .2rem; }
    .topnav-list a { display: block; padding: .55em 0; border-top: 1px solid rgba(243, 235, 221, .12); }
    .front-section { padding: 2rem 0; }
    .opener { grid-template-columns: minmax(0, 1fr); }
    .opener-scheme { max-width: 300px; justify-self: center; width: 100%; }
    .week-grid { grid-template-columns: minmax(0, 1fr); }
    .thermo { justify-self: start; }
    .thermo-scale { width: 70px; }
    .week-table { font-size: 1.15rem; }
    .week-table th, .week-table td { padding: .25em .45em; }
    .entry { padding: 1.6rem 1.2rem; }
    .comment-respond { padding: 1.2rem 1rem; }
    .entry-nav { grid-template-columns: minmax(0, 1fr); }
    .entry-nav-next { grid-column: 1; }
    .backcover-cols { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .cookie-banner { flex-direction: column; align-items: flex-start; padding: 1rem 1.1rem; }
    .talk-list .children { margin-left: 1rem; }
    .five-digit { padding-left: 20%; }
}
@media (max-width: 600px) {
    .strip[open]::before { inset: -6px -6px -6px -6px; }
}
