/*
Theme Name: dds_ulaeinstein.com
Theme URI: https://ulaeinstein.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: ulaart
*/

/* ---------- Шрифты ---------- */
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 900; font-display: swap; src: url("fonts/roboto-cyrillic-900-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 900; font-display: swap; src: url("fonts/roboto-latin-900-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+2074, 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+2074, 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+2074, 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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Переменные ---------- */
:root {
    --graphite: #1C1B1F;
    --ink: #121115;
    --plate: #141317;
    --plate-2: #26252A;
    --lime: #C6F24E;
    --blue: #2E4BE0;
    --red: #F0522A;
    --pink: #E8A6B8;
    --lilac: #BFA9BD;
    --text: #F2EFE9;
    --muted: #9A968F;
    --paper: #F2EFE8;
    --paper-2: #F2F1EC;
    --dark: #1C1B1F;
    --line: #3A393F;
    --font-head: "Roboto", "Arial Black", "Helvetica Neue", Arial, sans-serif;
    --font-text: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

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

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background-color: var(--graphite);
    background-image:
        radial-gradient(circle at 12% 38%, rgba(242, 239, 233, .05) 0 2px, transparent 3px),
        radial-gradient(circle at 74% 64%, rgba(242, 239, 233, .04) 0 1.5px, transparent 2.5px);
    background-size: 140px 140px, 210px 210px;
    color: var(--text);
    font-family: var(--font-text);
    font-size: 1.0625rem;
    line-height: 1.6;
    overflow-x: hidden;
    overflow-wrap: break-word;
    hyphens: auto;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--lime); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 900; line-height: 1.08; margin: 0 0 .6em; letter-spacing: -.01em; overflow-wrap: break-word; hyphens: manual; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
ul, ol { padding-left: 1.3em; }
@media (min-width: 961px) { .nowrap { white-space: nowrap; } }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--lime); color: var(--dark); padding: .6rem 1rem; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 1rem; }

.shell { width: min(92%, 1180px); margin-inline: auto; }
@media (min-width: 961px) { .shell { width: min(85%, 1180px); } }

/* ---------- Кнопки ---------- */
.btn, .search-form__btn, .form-submit .submit, .cookie-banner__btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .55em 1.35em;
    border: 2px solid var(--dark);
    border-radius: 999px;
    background: var(--lime);
    color: var(--dark);
    font-family: var(--font-text); font-weight: 700; font-size: .95rem; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    transition: transform .15s, background-color .15s, box-shadow .15s;
}
.btn:hover, .search-form__btn:hover, .form-submit .submit:hover, .cookie-banner__btn:hover {
    color: var(--dark); background: #d7ff63; transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--dark);
}
.btn--ghost { background: #fff; }
.btn--ghost:hover { background: var(--lime); }

/* ---------- Шапка ---------- */
.masthead { position: relative; padding: 1.6rem 0 1.4rem; }
.masthead__stroke { position: absolute; top: 0; right: 0; width: min(62%, 560px); height: auto; pointer-events: none; opacity: .95; }
.masthead__inner { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; }
.brand { display: flex; align-items: center; gap: .9rem; color: var(--text); text-decoration: none; min-width: 0; flex: 1 1 280px; }
.brand:hover { color: var(--text); }
.brand__mark { flex: 0 0 auto; width: 56px; height: 56px; }
.brand__mark svg, .brand__mark img { width: 100%; height: 100%; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.brand__name { hyphens: manual; font-family: var(--font-head); font-weight: 900; font-size: 1.05rem; line-height: 1.15; text-transform: uppercase; letter-spacing: .01em; }
.brand__desc { color: var(--text); opacity: .82; font-size: .86rem; line-height: 1.35; max-width: 34em; }

.nav-toggle { display: inline-flex; align-items: center; gap: .55rem; padding: .55rem 1rem; border: 2px solid var(--lime); border-radius: 999px; background: var(--plate); color: var(--text); font: 700 .95rem/1 var(--font-text); cursor: pointer; position: relative; z-index: 2; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 18px; height: 2px; background: var(--lime); position: relative; content: ""; }
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }

.mainnav { display: none; width: 100%; position: relative; z-index: 2; }
.mainnav.is-open { display: block; }
.mainnav__list { list-style: none; margin: 0; padding: .6rem 1rem; background: var(--plate); border: 1px solid var(--text); }
.mainnav__list a { display: block; padding: .55rem .2rem; color: var(--text); text-decoration: none; font-weight: 500; font-size: 1.02rem; border-bottom: 1px solid var(--line); }
.mainnav__list li:last-child a { border-bottom: 0; }
.mainnav__list a:hover, .mainnav__list .current-menu-item > a, .mainnav__list .current_page_item > a { color: var(--lime); }

@media (min-width: 961px) {
    .masthead { padding: 2.4rem 0 2.2rem; }
    .masthead__stroke { width: min(50%, 760px); top: 50%; transform: translateY(-56%); }
    .brand__mark { width: 66px; height: 66px; }
    .brand__name { font-size: 1.2rem; }
    .nav-toggle { display: none; }
    .mainnav { display: block; width: auto; flex: 0 1 auto; }
    .mainnav__list { display: flex; flex-wrap: wrap; gap: .2rem 1.5rem; padding: .95rem 1.6rem; border: 0; background: var(--plate); }
    .mainnav__list a { border: 0; padding: .2rem 0; font-size: 1rem; }
}

/* ---------- Полосы главной ---------- */
.band { position: relative; padding: 2rem 0; }
.band__deco { position: absolute; pointer-events: none; z-index: 0; height: auto; }
.band > .shell { position: relative; z-index: 1; }
.band__deco--left { left: 0; top: 4%; width: 5%; min-width: 34px; max-width: 90px; }
.band__deco--right { right: 0; top: 8%; width: 5%; min-width: 34px; max-width: 90px; }
@media (max-width: 600px) { .band__deco { opacity: .55; } }

.section-title { position: relative; display: inline-block; text-transform: uppercase; color: var(--text); margin-bottom: 1.4rem; padding-bottom: .35rem; }
.section-title::after { content: ""; position: absolute; left: 0; right: 18%; bottom: -4px; height: 6px; background: var(--lime); border-radius: 6px 2px 6px 3px; transform: rotate(-.6deg); }

/* ---------- Блок 1: разбор техники ---------- */
.tech { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
.tech__paper { background: var(--paper); color: var(--dark); padding: 1.6rem 1.4rem 1.8rem; }
.tech__title { text-transform: uppercase; font-size: clamp(1.8rem, 5.2vw, 3.3rem); margin: 0; display: inline; background-image: linear-gradient(var(--lime), var(--lime)); background-repeat: no-repeat; background-size: 100% .22em; background-position: 0 100%; padding-bottom: .1em; line-height: 1.22; }
.tech__sample { position: relative; margin: 0; background: var(--paper); padding: .7rem; border: 1px solid var(--text); }
.tech__sample img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.tech__sample::before { content: ""; position: absolute; z-index: 2; top: -14px; right: 10%; width: 46%; height: 30px; background: var(--pink); transform: rotate(-4deg); clip-path: polygon(2% 10%, 30% 0, 60% 8%, 98% 0, 100% 85%, 70% 100%, 35% 92%, 0 100%); opacity: .95; }
.tech__sample::after { content: ""; position: absolute; z-index: -1; right: -18px; bottom: -20px; width: 60%; height: 42%; background: var(--lime); transform: rotate(3deg); clip-path: polygon(0 6%, 40% 0, 100% 4%, 97% 100%, 55% 94%, 3% 100%); }
.tech__layers { list-style: none; margin: 0; padding: 0; border: 1px solid var(--dark); background: var(--dark); display: flex; flex-direction: column; gap: 1px; }
.layer { display: block; width: 100%; border: 0; padding: .55rem 1rem; font: 900 clamp(1.05rem, 2.2vw, 1.4rem)/1.15 var(--font-head); text-transform: uppercase; text-align: center; cursor: pointer; color: var(--dark); transition: transform .15s, filter .15s; }
.layer--ground { background: var(--lime); }
.layer--texture { background: var(--blue); color: #fff; }
.layer--color { background: var(--red); color: #fff; }
.layer--light { background: var(--pink); }
.layer--fix { background: var(--lilac); }
.layer:hover { filter: brightness(1.06); transform: translateX(6px); }
.layer[aria-pressed="true"] { transform: translateX(12px); box-shadow: -8px 0 0 var(--text); }
.tech__aside { color: var(--text); font-size: .98rem; }
.tech__lead { font-weight: 500; margin-bottom: .7rem; max-width: 22em; }
.tech__note { color: var(--muted); font-size: .92rem; margin: 0; max-width: 26em; border-left: 3px solid var(--lime); padding-left: .8rem; min-height: 3.2em; }

@media (min-width: 961px) {
    .tech { grid-template-columns: minmax(0, 3.2fr) minmax(0, 3.8fr) minmax(0, 3.6fr); grid-template-rows: auto auto; gap: 0; }
    .tech__paper { grid-column: 1 / 4; grid-row: 1; padding: 2.4rem 40% 6.5rem 2.2rem; }
    .tech__sample { grid-column: 3; grid-row: 1 / 3; align-self: start; margin: 0; }
    .tech__layers { grid-column: 2; grid-row: 2; margin: -5.2rem -1.6rem 0 0; z-index: 3; align-self: start; }
    .tech__aside { grid-column: 1; grid-row: 2; align-self: end; padding: 1.5rem 1.8rem 1.4rem 2.2rem; }
}

/* ---------- Блок 2: полевой дневник ---------- */
.diary { background: var(--paper); color: var(--dark); padding: 1.5rem 1.3rem 1.3rem; border: 1px solid var(--text); }
.diary__title { text-transform: uppercase; font-size: clamp(1.6rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.diary__strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.diary__frame { position: relative; min-width: 0; }
.diary__frame figure { margin: 0; }
.diary__frame img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 7px solid #111; background: #fff; }
.diary__frame figcaption { text-align: center; font-weight: 500; font-size: .95rem; margin-top: .55rem; line-height: 1.25; }
@media (min-width: 961px) {
    .diary { padding: 2rem 2.2rem 1.6rem; }
    .diary__strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3.4rem; }
    .diary__frame:not(:last-child)::after {
        content: ""; position: absolute; top: 42%; right: -3rem; width: 2.6rem; height: 1.2rem;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 24'%3E%3Cpath d='M2 13c9-2 18 1 28-1 6-1 11-1 18-1' fill='none' stroke='%23111' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M38 3c4 3 8 6 11 8-4 3-8 6-12 10' fill='none' stroke='%23111' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    }
}

/* ---------- Последние записи / карточки ---------- */
.band--latest { padding-top: 2.6rem; }
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.2rem 1.8rem; }
.cards--front { padding: .6rem .4rem 1rem; }
@media (min-width: 601px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 961px) {
    .cards--front { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
    .layout-single .cards--list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.card {
    position: relative; z-index: 0; display: flex; flex-direction: column; min-width: 0;
    background: transparent; color: var(--dark);
    padding: .8rem .8rem 1rem;
    transform: rotate(-1.6deg);
    transition: transform .2s;
}
.cards > .card:nth-child(3n+2) { transform: rotate(1.4deg); }
.cards > .card:nth-child(3n) { transform: rotate(-1deg); }
.card::before {
    content: ""; position: absolute; z-index: -1; left: -14px; top: 14%; width: calc(100% + 28px); height: 78%;
    background: var(--lime);
    clip-path: polygon(0 3%, 12% 0, 46% 4%, 80% 0, 100% 6%, 98% 52%, 100% 96%, 60% 100%, 22% 96%, 2% 100%, 3% 50%);
    transform: rotate(2.4deg);
}
.card::after { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--paper-2); border: 1px solid #111; }
.cards > .card:nth-child(3n+2)::before { display: none; }
.cards { isolation: isolate; }
.card:hover { transform: rotate(0deg) translateY(-4px); }
.card-thumb { display: block; overflow: hidden; text-decoration: none; }
.card-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s; }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: .85rem .2rem 0; }
.card-title { font-size: 1.2rem; line-height: 1.18; margin: 0 0 .45rem; }
.card-title a { color: var(--dark); text-decoration: none; }
.card-title a:hover { color: var(--dark); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; }
.card-excerpt { flex: 1; font-size: .95rem; line-height: 1.45; color: #34323A; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt a { color: var(--dark); }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .7rem; }
.card-date { font-size: .9rem; color: #55525A; }
.btn--card { padding: .45em 1.1em; font-size: .88rem; }
.cards > .card:nth-child(3n+2) .btn--card { background: #fff; }
.cards > .card:nth-child(3n+2) .btn--card:hover { background: var(--lime); }
.empty-state { color: var(--muted); font-size: 1.05rem; }

/* ---------- Палитра + инструменты ---------- */
.band--duo { padding-bottom: 3rem; }
.duo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; align-items: stretch; }
@media (min-width: 961px) { .duo { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 1.4rem; } }

.palette { background: var(--paper); color: var(--dark); padding: 1.4rem 1.3rem 1.3rem; border: 1px solid var(--text); min-width: 0; }
.palette__title { text-transform: uppercase; font-size: clamp(1.5rem, 3.3vw, 2.2rem); margin-bottom: 1rem; }
.palette__body { display: flex; gap: 1rem; align-items: stretch; }
.palette__grid { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem .55rem; }
@media (min-width: 601px) { .palette__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.swatch { display: flex; flex-direction: column; align-items: stretch; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; color: var(--dark); font: inherit; text-align: center; }
.swatch__chip {
    display: block; aspect-ratio: 1 / 1; background-color: var(--sw);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .14), transparent 45%, rgba(0, 0, 0, .1));
    border: 1px solid #2a2a2a; transition: transform .15s, box-shadow .15s;
}
.swatch__name { display: block; margin-top: .3rem; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.15; hyphens: auto; }
.swatch:hover .swatch__chip, .swatch.is-active .swatch__chip { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--dark); }
.swatch.is-active .swatch__name { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; }
.palette__scale { flex: 0 0 34px; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.palette__scale-label { font-size: .62rem; text-transform: uppercase; font-weight: 700; color: #55525A; writing-mode: vertical-rl; transform: rotate(180deg); }
.palette__steps { flex: 1; width: 100%; display: flex; flex-direction: column; border: 1px solid #2a2a2a; }
.palette__steps i { flex: 1; min-height: 22px; display: block; }
.palette__steps i:nth-child(1) { background: #EDEBE4; }
.palette__steps i:nth-child(2) { background: #BCBBB6; }
.palette__steps i:nth-child(3) { background: #ADABA6; }
.palette__steps i:nth-child(4) { background: #9D9C97; }
.palette__steps i:nth-child(5) { background: #84847F; }
.palette__steps i:nth-child(6) { background: #6A6864; }
.palette__steps i:nth-child(7) { background: #4B4A46; }
.palette__steps i:nth-child(8) { background: #2F2E2A; }
.palette__hint { margin: 1rem 0 0; padding: .7rem .9rem; background: #fff; border: 1px solid var(--dark); font-size: .92rem; line-height: 1.4; min-height: 3.6em; }

.tools { background: var(--red); color: #fff; padding: 1.6rem 1.4rem 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.tools__title { text-transform: uppercase; color: #fff; font-size: clamp(1.8rem, 4vw, 2.7rem); margin-bottom: .4rem; }
.tools__lead { max-width: 24em; font-size: 1.02rem; line-height: 1.5; color: #fff; margin: 0 0 1rem; }
.tools__figure { position: relative; margin: auto -1.4rem 0; }
.tools__figure img { width: 100%; height: auto; }
.tools__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tools__lines line { stroke: var(--dark); stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.callout { position: absolute; color: var(--dark); font-size: clamp(.78rem, 1.4vw, .98rem); line-height: 1.2; max-width: 9.5em; font-weight: 500; }
.callout b { display: block; font-weight: 700; }
.callout--knife { left: 4%; top: 6%; }
.callout--round { left: 73%; top: 0; }
.callout--flat { left: 69%; top: 72%; }
@media (max-width: 600px) {
    .tools__lines { display: none; }
    .tools__callouts { display: grid; gap: .5rem; padding: 1rem 1.4rem 1.4rem; }
    .callout { position: static; max-width: none; color: var(--dark); background: #fff; padding: .5rem .7rem; border: 1px solid var(--dark); }
    .callout b { display: inline; }
}

/* ---------- Внутренние страницы ---------- */
.page-wrap { padding: 1.4rem 0 3rem; }
.crumbs { font-size: .92rem; color: var(--muted); margin-bottom: 1.4rem; }
.crumbs a { color: var(--text); }
.crumbs__sep { color: var(--lime); margin: 0 .3rem; }
.layout-single, .layout-with-sidebar { display: block; }
.layout-single > .content-area { display: block; }
@media (min-width: 961px) {
    .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.8rem; }
.page-title { text-transform: uppercase; display: inline; background-image: linear-gradient(var(--lime), var(--lime)); background-repeat: no-repeat; background-size: 100% .16em; background-position: 0 98%; line-height: 1.25; }
.page-intro { margin-top: 1rem; color: var(--text); max-width: 46em; }

.sheet { background: var(--paper); color: var(--dark); border: 1px solid #111; padding: 1.6rem 1.3rem; }
@media (min-width: 601px) { .sheet { padding: 2.2rem 2.4rem; } }
.sheet a { color: var(--dark); text-decoration-color: #7da11f; }
.sheet a:hover { color: var(--blue); }
.entry__title { text-transform: uppercase; font-size: clamp(1.8rem, 4.4vw, 2.8rem); }
.entry__meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: #55525A; font-size: .95rem; margin-top: -.2rem; }
.entry__cats a { margin-right: .5rem; }
.entry__cover { margin: 1.2rem 0 1.6rem; border: 1px solid #111; }
.entry__cover img { width: 100%; height: auto; }
.entry__content { font-size: 1.08rem; line-height: 1.7; }
.entry__content > * + h2, .entry__content > * + h3 { margin-top: 1.6em; }
.entry__content h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.entry__content img { max-width: 100%; height: auto; }
.entry__content figure { margin: 1.5em 0; }
.entry__content figcaption { font-size: .9rem; color: #55525A; margin-top: .4rem; }
.entry__content blockquote { margin: 1.6em 0; padding: 1.1rem 1.4rem; background: var(--dark); color: var(--text); border-left: 8px solid var(--lime); font-size: 1.15rem; }
.entry__content blockquote p:last-child { margin: 0; }
.entry__content blockquote a { color: var(--lime); }
.entry__content ul li::marker { color: var(--red); }
.entry__content ol li::marker { color: var(--blue); font-weight: 700; }
.entry__content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .98rem; border: 1px solid #111; }
.entry__content th, .entry__content td { border: 1px solid #111; padding: .55rem .7rem; text-align: left; vertical-align: top; }
.entry__content th { background: var(--lime); }
.entry__content tr:nth-child(even) td { background: #E9E5DB; }
.entry__content pre { overflow-x: auto; background: var(--dark); color: var(--text); padding: 1rem; }
.entry__content code { font-size: .92em; }
.entry__content hr { border: 0; height: 4px; background: var(--dark); margin: 2em 0; }
.entry__tags { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.entry__tags a { padding: .2rem .7rem; border: 1px solid #111; border-radius: 999px; text-decoration: none; font-size: .9rem; }
.entry__tags a:hover { background: var(--lime); color: var(--dark); }
.page-links { margin-top: 1.4rem; font-weight: 700; }
.wp-block-table { overflow-x: auto; }
.alignleft { float: left; margin: 0 1.2rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.2rem; }
.aligncenter { margin-left: auto; margin-right: auto; }

.post-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 1.8rem 0; }
@media (min-width: 601px) { .post-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.post-nav__link { display: block; padding: 1rem 1.2rem; border: 1px solid var(--text); background: var(--plate); text-decoration: none; font-weight: 700; color: var(--text); }
.post-nav__link span { display: block; color: var(--lime); font-weight: 500; font-size: .88rem; margin-bottom: .2rem; }
.post-nav__link--next { text-align: right; }
.post-nav__link:hover { background: var(--plate-2); color: var(--text); }

/* ---------- Сайдбар ---------- */
.sidebar { min-width: 0; margin-top: 2.4rem; }
@media (min-width: 961px) { .sidebar { margin-top: 0; } }
.sidebar .widget { background: var(--plate); color: var(--text); border-top: 5px solid var(--lime); padding: 1.3rem 1.3rem 1.1rem; margin-bottom: 1.6rem; }
.sidebar .widget-title { color: var(--text); text-transform: uppercase; font-size: 1.25rem; margin-bottom: .9rem; }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--text); text-decoration: none; }
.sidebar .widget a:hover { color: var(--lime); }
.sidebar .widget .post-date, .sidebar .widget .rss-date { display: block; color: var(--muted); font-size: .85rem; }
.sidebar .widget p { color: var(--text); }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.6rem; align-items: center; }
.pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; height: 2.6rem; padding: 0 .8rem; border: 1px solid var(--text); background: var(--plate); color: var(--text); text-decoration: none; font-weight: 700; }
.pager a.page-numbers:hover { background: var(--lime); color: var(--dark); border-color: var(--lime); }
.pager .page-numbers.current { background: var(--lime); color: var(--dark); border-color: var(--lime); }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding: 0 .2rem; }

/* ---------- Поиск, 404 ---------- */
.search-form { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.search-form__field { flex: 1 1 220px; min-width: 0; padding: .7rem .9rem; border: 2px solid var(--dark); background: #fff; color: var(--dark); font: 1rem var(--font-text); border-radius: 0; }
.lost__code { font-family: var(--font-head); font-weight: 900; font-size: clamp(5rem, 16vw, 9rem); line-height: .9; margin: 0 0 .6rem; color: var(--red); -webkit-text-stroke: 2px var(--dark); }
.empty-sheet .empty-state { color: var(--dark); }

/* ---------- Комментарии ---------- */
.comments { margin-top: 2rem; }
.comments__title, .comment-reply-title { text-transform: uppercase; font-size: 1.5rem; }
.comments__list, .comments__list .children { list-style: none; margin: 0; padding: 0; }
.comments__list .children { margin-left: 1.4rem; border-left: 3px solid var(--lime); padding-left: 1rem; }
.note__body { padding: 1rem 0; border-bottom: 1px solid #CFCAC0; }
.note__head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; }
.note__head img { border-radius: 50%; border: 2px solid var(--dark); }
.note__author { font-weight: 700; }
.note__date { color: #55525A; font-size: .88rem; }
.note__wait { color: var(--red); font-weight: 700; }
.note__reply a { font-weight: 700; font-size: .92rem; }
.comment-respond { margin-top: 1.6rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-weight: 700; margin-bottom: .3rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: .65rem .8rem; border: 2px solid var(--dark); background: #fff; color: var(--dark); font: 1rem var(--font-text); border-radius: 0; }
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; display: inline; }
.comment-notes, .logged-in-as { color: #55525A; font-size: .92rem; }
.req { color: var(--red); }

/* ---------- Подвал ---------- */
.colophon { position: relative; background: #1D1D1F; color: var(--text); border-top: 2px solid var(--lime); padding: 2.6rem 0 1.4rem; margin-top: 2rem; }
.colophon__stroke { position: absolute; left: 30%; top: -24px; width: min(38%, 420px); height: auto; pointer-events: none; }
.colophon__cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
@media (min-width: 761px) { .colophon__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; } }
.colophon .widget { color: var(--text); }
.colophon .widget-title { color: var(--text); text-transform: uppercase; font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: .6rem; }
.colophon .widget p, .colophon .textwidget { color: var(--text); font-size: .98rem; line-height: 1.5; }
.colophon .widget ul { list-style: none; margin: 0; padding: 0; }
.colophon .widget li { padding: .18rem 0; }
.colophon .widget a { color: var(--text); text-decoration: none; font-size: .98rem; }
.colophon .widget a:hover { color: var(--lime); text-decoration: underline; text-decoration-color: var(--lime); }
.colophon__col--two .widget-title { font-size: 1rem; color: var(--muted); letter-spacing: .04em; }
.colophon__copy { margin: 2.2rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .9rem; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed; z-index: 60; left: 1rem; right: 1rem; bottom: 1rem;
    display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem;
    max-width: 760px; margin-inline: auto;
    background: var(--paper); color: var(--dark); border: 1px solid #111;
    padding: 1rem 1.3rem; box-shadow: 6px 6px 0 var(--lime);
}
.cookie-banner__text { flex: 1 1 300px; margin: 0; font-size: .95rem; line-height: 1.45; }

/* ---------- Мобильные правки ---------- */
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .band { padding: 1.5rem 0; }
    .tech__paper { padding: 1.3rem 1.1rem 1.5rem; }
    .diary { padding: 1.2rem 1rem 1rem; }
    .palette { padding: 1.2rem 1rem 1rem; }
    .tools { padding: 1.3rem 1.1rem 0; }
    .tools__figure { margin: .6rem -1.1rem 0; }
    .sheet { padding: 1.4rem 1.1rem; }
    .card { transform: rotate(-.8deg); }
    .cards > .card:nth-child(3n+2), .cards > .card:nth-child(3n) { transform: rotate(.6deg); }
    .masthead__stroke { display: none; }
    .masthead { border-bottom: 6px solid var(--lime); }
}

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