/*
Theme Name: dds_artgk-cms.ru
Theme URI: https://artgk-cms.ru/
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: pkirp
*/

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

/* ---------- Палитра ---------- */
:root {
    --clay: #D9B99B;
    --clay-deep: #CDAA88;
    --brick-red: #8C3B2A;
    --brick: #B86C48;
    --brick-light: #D27A50;
    --graphite: #2B2724;
    --muted: #6E5D4F;
    --yellow: #F2C230;
    --mortar: #E8E1D3;
    --mortar-light: #F3EEE4;
    --seam: #4A3B32;
    --font-head: "Russo One", "Arial Black", "Segoe UI", system-ui, sans-serif;
    --font-text: "Roboto Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
    --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='12' viewBox='0 0 240 12'%3E%3Cpath d='M0 6 C20 3 34 8 58 6 S96 2 122 6 S160 9 184 5 S222 4 240 6' fill='none' stroke='%234A3B32' stroke-width='2.6'/%3E%3C/svg%3E");
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--clay);
    color: var(--graphite);
    font-family: var(--font-text);
    font-size: 1.0625rem;
    line-height: 1.6;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--graphite); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--brick-red); text-decoration-color: var(--brick-red); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 400; line-height: 1.2; margin: 1.4em 0 .6em; overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }
p, li, td, th, dd, figcaption, .card-title, .brand-name { 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: 1rem; top: -60px; z-index: 100; background: var(--yellow); color: var(--graphite); padding: .6rem 1rem; font-weight: 700; }
.skip-link:focus { top: 1rem; }

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

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    font-family: var(--font-text);
    font-weight: 700;
    font-size: .98rem;
    line-height: 1.2;
    text-decoration: none;
    padding: .55rem 1rem;
    border: 2px solid var(--graphite);
    cursor: pointer;
    transition: transform .12s, box-shadow .12s, background-color .12s;
}
.btn-yellow { background: var(--yellow); color: #000; box-shadow: 4px 4px 0 var(--graphite); }
.btn-yellow:hover { color: #000; background: #FFD34A; transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--graphite); }
.btn-yellow:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--graphite); }

/* ---------- Шапка ---------- */
.masthead {
    position: relative;
    background-color: var(--brick-red);
    background-image: linear-gradient(rgba(140, 59, 42, .25), rgba(140, 59, 42, .25)), url("images/header-bricks.jpg");
    background-size: auto, 614px 75px;
    color: #FFF8EC;
    padding: 1.4rem 0 1.9rem;
    z-index: 2;
}
.masthead::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -11px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='14' viewBox='0 0 240 14'%3E%3Cpath d='M0 0 H240 V5 C222 4 206 9 184 6 S146 2 122 7 S84 9 58 5 S20 4 0 6 Z' fill='%238C3B2A'/%3E%3Cpath d='M0 6 C20 4 34 9 58 5 S96 9 122 7 S160 2 184 6 S222 4 240 5' fill='none' stroke='%232B2724' stroke-width='2.4'/%3E%3C/svg%3E") repeat-x;
    background-size: 240px 14px;
    pointer-events: none;
}
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: flex-start; gap: .9rem; color: #FFF8EC; text-decoration: none; min-width: 0; }
.brand:hover { color: #FFFFFF; }
.brand-mark { flex: 0 0 auto; margin-top: .2rem; }
.brand-svg { width: 64px; height: 44px; display: block; }
.brand-logo { max-height: 56px; width: auto; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { hyphens: manual; font-family: var(--font-text); font-weight: 700; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.2; max-width: 30ch; }
.brand-desc { margin-top: .35rem; font-size: .92rem; line-height: 1.35; color: #F1DCCB; max-width: 48ch; }

.topnav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; }
.topnav-list a { color: #FFF8EC; text-decoration: none; font-weight: 500; font-size: 1.02rem; padding: .25rem 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.topnav-list a:hover { color: var(--yellow); border-bottom-color: var(--yellow); }
.topnav-list .current-menu-item > a, .topnav-list a[aria-current="page"] { color: var(--yellow); border-bottom-color: var(--yellow); }

.nav-toggle { display: none; align-items: center; gap: .55rem; background: var(--yellow); color: #000; border: 2px solid var(--graphite); box-shadow: 3px 3px 0 var(--graphite); padding: .45rem .8rem; font: 700 .95rem/1 var(--font-text); cursor: pointer; flex: 0 0 auto; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: #000; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* ---------- Главная: общие секции ---------- */
.zone { position: relative; padding: 3rem 0 3.2rem; }
.zone + .zone::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: -6px;
    height: 12px;
    background: var(--wave) repeat-x;
    background-size: 240px 12px;
}
.zone-title {
    position: relative;
    hyphens: manual;
    margin: 0 0 1.8rem;
    padding-bottom: .55rem;
    text-transform: uppercase;
    font-size: clamp(1.55rem, 3.2vw, 2.35rem);
    letter-spacing: .01em;
    color: var(--graphite);
}
.zone-title::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--yellow); }

/* Блок 1 — фундамент */
.zone-found { overflow: hidden; }
.zone-found::after {
    content: "";
    position: absolute;
    right: 0; bottom: 1rem;
    width: min(46%, 600px);
    aspect-ratio: 596 / 296;
    background: url("images/wall-pattern.png") no-repeat right bottom / contain;
    opacity: .85;
    pointer-events: none;
}
.found-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2.5rem; align-items: start; }
.found-scheme { position: relative; margin: 0; width: min(100%, 300px); margin-right: 120px; }
.found-scheme img { width: 100%; }
.scheme-labels { position: absolute; inset: 0; pointer-events: none; }
.scheme-label { position: absolute; left: calc(100% + 8px); top: var(--y); transform: translateY(-50%); font-weight: 500; font-size: 1.12rem; white-space: nowrap; }
.found-text { min-width: 0; padding-top: .4rem; }
.found-lead { font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.25; margin-bottom: .9rem; }
.found-text p:not(.found-lead) { color: #3A332E; max-width: 52ch; }

/* Блок 2 — кладка страниц */
.zone-lay { overflow: hidden; }
.lay-row { display: flex; align-items: stretch; gap: 14px; }
.lay-stub, .lay-brick {
    background: var(--brick);
    border: 2px solid var(--graphite);
    box-shadow: 4px 4px 0 var(--graphite);
    clip-path: polygon(0 0, 68% 0, 72% 5px, 84% 5px, 88% 0, 100% 0, calc(100% + 8px) 0, calc(100% + 8px) calc(100% + 8px), 0 calc(100% + 8px));
}
.lay-stub { flex: 1 1 0; min-width: 24px; margin: 1.1rem 0; }
.lay-stub-left { margin-left: -4px; }
.lay-stub-right { margin-right: -4px; }
.lay-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; width: min(85%, 1180px); flex: 0 0 auto; }
.lay-brick {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-width: 0;
    padding: 1.1rem .7rem 1rem;
    color: var(--graphite);
    text-align: center;
    transition: transform .15s, background-color .15s;
}
.lay-brick:hover { transform: translateY(-4px); background: var(--brick-light); }
.lay-ico { width: 44px; height: 44px; display: block; }
.lay-label { font-weight: 700; font-size: 1.06rem; line-height: 1.2; }

/* Блок записей */
.zone-fresh { background: rgba(160, 120, 88, .14); }
.card-grid { display: grid; gap: 1.6rem; }
.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fresh-more { margin: 2.2rem 0 0; text-align: center; }
.empty-note { padding: 1.2rem 1.4rem; background: var(--mortar); border: 2px solid var(--seam); }

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #D6B592;
    border: 2px solid var(--seam);
    padding: 10px;
    clip-path: polygon(0 3px, 18% 0, 41% 4px, 63% 1px, 86% 4px, 100% 1px, 100% 100%, 0 100%);
    transition: transform .15s, background-color .15s;
}
.card:hover { transform: translateY(-3px); background: #DDBE9D; }
.card-num {
    position: absolute;
    left: 6px; top: 6px;
    z-index: 2;
    min-width: 2.1rem;
    padding: .1rem .5rem;
    background: var(--yellow);
    border: 2px solid var(--graphite);
    font-family: var(--font-head);
    font-size: 1.25rem;
    line-height: 1.5;
    text-align: center;
    color: #000;
}
.card-thumb { border: 2px solid var(--graphite); overflow: hidden; background: var(--seam); }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; aspect-ratio: 2 / 1; 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: .8rem .3rem .2rem; }
.card-title { font-family: var(--font-text); font-weight: 700; font-size: 1.28rem; line-height: 1.25; margin: 0 0 .4rem; }
.card-title a { color: var(--graphite); text-decoration: none; }
.card-title a:hover { color: var(--brick-red); }
.card-excerpt { flex: 1; font-size: .98rem; line-height: 1.45; color: #34302C; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-top: .8rem; padding-bottom: .3rem; }
.card-date { color: var(--muted); font-size: .95rem; }

/* Блоки 3 и 4 */
.zone-duo { overflow: hidden; padding-top: 0; padding-bottom: 0; }
.duo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.duo-cell { position: relative; min-width: 0; padding: 3rem 0 3.4rem; }
.duo-cell.levels { padding-right: 2.4rem; }
.duo-cell.tools { padding-left: 2.4rem; border-left: 2px solid var(--seam); }
.duo-cell.levels::before {
    content: "";
    position: absolute;
    left: -14%; top: 7.5rem;
    width: 260px;
    aspect-ratio: 596 / 296;
    background: url("images/wall-pattern.png") no-repeat left top / contain;
    opacity: .55;
    pointer-events: none;
}
.duo-cell.tools::before {
    content: "";
    position: absolute;
    right: -18%; top: .8rem;
    width: 300px;
    aspect-ratio: 596 / 296;
    background: url("images/wall-pattern.png") no-repeat right top / contain;
    opacity: .6;
    pointer-events: none;
}
.duo-cell > * { position: relative; }
.levels-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1rem; align-items: center; }
.ruler { position: relative; margin: 0; width: 60px; }
.ruler img { width: 100%; }
.ruler-marks { position: absolute; inset: 0; }
.ruler-mark { position: absolute; left: calc(100% + 14px); top: var(--y); transform: translateY(-50%); font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.ruler-mark.is-now { box-shadow: inset 0 -3px 0 var(--yellow); }
.levels-text { min-width: 0; }
.levels-lead { font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.25; margin-bottom: .8rem; }
.levels-text p:not(.levels-lead) { font-size: .98rem; color: #3A332E; }

.tools-plate { background: var(--mortar); padding: 1rem 1.2rem 1.1rem; box-shadow: 0 3px 0 rgba(74, 59, 50, .35); }
.tools-table { width: 100%; border-collapse: collapse; border: 1px solid rgba(74, 59, 50, .5); font-size: .93rem; line-height: 1.3; }
.tools-table th, .tools-table td { border: 1px solid rgba(74, 59, 50, .35); border-left: 0; border-right: 0; padding: .6rem .5rem; text-align: left; vertical-align: middle; }
.tools-table thead th { hyphens: manual; font-size: 1.08rem; font-weight: 700; border-top: 0; border-bottom: 2px solid var(--seam); padding-top: .2rem; }
.tools-table tbody th { font-weight: 700; white-space: nowrap; }
.tools-table tbody tr { transition: background-color .15s; }
.tools-table tbody tr:hover { background: var(--mortar-light); }
.tool-ico { width: 22px; height: 22px; display: inline-block; vertical-align: middle; margin-right: .5rem; color: var(--graphite); }
.tool-where { color: var(--muted); border-bottom: 2px solid var(--yellow); }

/* ---------- Внутренние страницы ---------- */
.inner-wrap { padding: 2.2rem 0 3.5rem; }
.crumbs { font-size: .95rem; color: var(--muted); margin-bottom: 1.6rem; padding: .5rem .9rem; background: rgba(232, 225, 211, .55); border-left: 4px solid var(--yellow); }
.crumbs a { color: var(--graphite); }
.crumbs-sep { margin: 0 .35rem; color: var(--brick-red); }

.layout-single { display: block; }
.layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 67fr) minmax(0, 27fr); justify-content: space-between; column-gap: 6%; align-items: start; }
.content-area { min-width: 0; }

.page-head { margin-bottom: 1.6rem; }
.page-title { position: relative; hyphens: manual; margin: 0; padding-bottom: .55rem; text-transform: uppercase; }
.page-title::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--yellow); }
.page-intro { margin-top: 1rem; }

.entry { background: var(--mortar-light); border: 2px solid var(--seam); box-shadow: 6px 6px 0 var(--seam); padding: 2rem 2.2rem 2.2rem; }
.entry-head { margin-bottom: 1.4rem; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: .8rem; color: var(--muted); font-size: .95rem; }
.entry-cat a { color: var(--muted); }
.entry-cover { margin: 0 0 1.6rem; border: 2px solid var(--graphite); }
.entry-cover img { width: 100%; }
.entry-content { overflow-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 1.55rem; }
.entry-content h3 { font-size: 1.25rem; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .35em; }
.entry-content ul li::marker { color: var(--brick); }
.entry-content blockquote { margin: 1.6em 0; padding: 1.1rem 1.4rem; background: var(--mortar); border-left: 6px solid var(--yellow); font-size: 1.12rem; }
.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(--seam); font-size: .96rem; }
.entry-content th, .entry-content td { border: 1px solid var(--seam); padding: .55rem .7rem; text-align: left; vertical-align: top; }
.entry-content th { background: var(--mortar); }
.entry-content img { border: 2px solid var(--graphite); }
.entry-content figure { margin: 1.4em 0; }
.entry-content figcaption { font-size: .9rem; color: var(--muted); margin-top: .4rem; }
.entry-content pre { overflow-x: auto; background: var(--graphite); color: var(--mortar); padding: 1rem 1.2rem; font-size: .9rem; }
.entry-content code { background: var(--mortar); padding: .05em .3em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: 0; height: 12px; background: var(--wave) repeat-x; background-size: 240px 12px; margin: 2em 0; }
.entry-tags { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.entry-tags a { background: var(--mortar); border: 1px solid var(--seam); padding: .15rem .55rem; text-decoration: none; font-size: .92rem; }

.entry-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.entry-nav-link { display: block; background: var(--mortar); border: 2px solid var(--seam); padding: .9rem 1.1rem; text-decoration: none; font-weight: 700; transition: transform .12s, box-shadow .12s; }
.entry-nav-link:hover { color: var(--graphite); box-shadow: 4px 4px 0 var(--seam); transform: translate(-2px, -2px); }
.entry-nav-link span { display: block; font-weight: 400; font-size: .88rem; color: var(--muted); }
.entry-nav-link.is-next { text-align: right; grid-column: 2; }

/* Сайдбар */
.sidebar { min-width: 0; background: var(--mortar); border: 2px solid var(--seam); box-shadow: 5px 5px 0 var(--seam); padding: 1.4rem 1.4rem 1rem; color: var(--graphite); }
.sidebar .widget { margin-bottom: 1.6rem; }
.sidebar .widget-title { position: relative; margin: 0 0 .9rem; padding-bottom: .45rem; font-size: 1.12rem; text-transform: uppercase; color: var(--graphite); }
.sidebar .widget-title::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--yellow); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .5rem 0 .5rem 1.1rem; border-bottom: 1px dashed rgba(74, 59, 50, .45); position: relative; }
.sidebar li::before { content: ""; position: absolute; left: 0; top: 1rem; width: 8px; height: 5px; background: var(--brick); border: 1px solid var(--graphite); }
.sidebar a { color: var(--graphite); text-decoration: none; }
.sidebar a:hover { color: var(--brick-red); text-decoration: underline; text-decoration-color: var(--yellow); }
.sidebar .post-date { display: block; color: var(--muted); font-size: .88rem; }
.sidebar p { color: var(--graphite); }

/* Поиск */
.find-form { display: flex; gap: .6rem; max-width: 520px; margin: 1.2rem 0; }
.find-input { flex: 1; min-width: 0; padding: .55rem .8rem; border: 2px solid var(--graphite); background: var(--mortar-light); color: var(--graphite); font: 1rem var(--font-text); }
.find-btn { flex: 0 0 auto; }

/* Пагинация */
.pager { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.4rem; }
.pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; padding: .45rem .8rem; background: var(--mortar); border: 2px solid var(--graphite); color: var(--graphite); font-weight: 700; text-decoration: none; transition: transform .12s, box-shadow .12s, background-color .12s; }
.pager a.page-numbers:hover { background: var(--yellow); box-shadow: 3px 3px 0 var(--graphite); transform: translate(-2px, -2px); }
.pager .page-numbers.current { background: var(--yellow); box-shadow: 3px 3px 0 var(--graphite); }
.pager .page-numbers.dots { background: none; border-color: transparent; }

/* 404 */
.lost { text-align: left; }
.lost-code { font-family: var(--font-head); font-size: clamp(5rem, 16vw, 9rem); line-height: 1; margin: 0 0 .5rem; color: var(--brick); -webkit-text-stroke: 3px var(--graphite); }
.lost .page-title { margin-bottom: 1.2rem; }
.lost-home { margin-top: 1.6rem; }

/* Комментарии */
.talk { margin-top: 2.4rem; background: var(--mortar); border: 2px solid var(--seam); padding: 1.6rem 1.8rem; }
.talk-title, .talk .comment-reply-title { font-size: 1.3rem; text-transform: uppercase; margin: 0 0 1rem; }
.talk-list, .talk-list .children { list-style: none; margin: 0; padding: 0; }
.talk-list .children { padding-left: 1.6rem; border-left: 2px solid var(--yellow); }
.note-body { padding: 1rem 0; border-bottom: 1px dashed rgba(74, 59, 50, .5); }
.note-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .5rem; }
.note-head img { border: 2px solid var(--graphite); }
.note-author { font-weight: 700; }
.note-head time { color: var(--muted); font-size: .9rem; }
.note-wait { color: var(--brick-red); font-size: .92rem; }
.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: .55rem .75rem; border: 2px solid var(--graphite); background: var(--mortar-light); color: var(--graphite); font: 1rem var(--font-text); }
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-form .submit { font: 700 1rem var(--font-text); background: var(--yellow); color: #000; border: 2px solid var(--graphite); box-shadow: 4px 4px 0 var(--graphite); padding: .6rem 1.2rem; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.comment-form .submit:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--graphite); }
.form-note { font-size: .92rem; color: var(--muted); }
.req { color: var(--brick-red); }

/* ---------- Подвал ---------- */
.basement {
    position: relative;
    margin-top: 0;
    background-color: var(--graphite);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='176' height='80' viewBox='0 0 176 80'%3E%3Cg stroke='%234A3B32' stroke-width='2' fill='none'%3E%3Cpath d='M0 1H176M0 41H176M1 0V40M89 40V80'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 176px 80px;
    color: #DDD3C6;
    padding: 3.2rem 0 1.4rem;
}
.basement::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: -8px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='14' viewBox='0 0 240 14'%3E%3Cpath d='M0 7 C20 5 34 10 58 6 S96 4 122 8 S160 9 184 5 S222 6 240 7 V14 H0 Z' fill='%232B2724'/%3E%3C/svg%3E") repeat-x;
    background-size: 240px 14px;
}
.basement-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
.basement-col { min-width: 0; }
.basement .widget { margin-bottom: 1.2rem; color: #DDD3C6; }
.basement .widget-title { font-family: var(--font-text); font-weight: 700; font-size: 1.3rem; margin: 0 0 .7rem; color: #FFF8EC; }
.basement p, .basement .textwidget { color: #DDD3C6; font-size: 1rem; line-height: 1.45; }
.basement a { color: #FFF8EC; text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; }
.basement a:hover { color: var(--yellow); }
.basement ul { list-style: none; margin: 0; padding: 0; }
.basement li { margin-bottom: .45rem; }
.basement-copy { margin: 2rem 0 0; padding-top: 1.1rem; border-top: 2px solid var(--seam); font-size: .95rem; color: #CFC4B6; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 1.4rem;
    background: var(--graphite);
    color: #F3EEE4;
    border: 2px solid var(--yellow);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, .35);
}
.cookie-text { margin: 0; font-size: .95rem; line-height: 1.4; }
.cookie-accept { flex: 0 0 auto; box-shadow: 3px 3px 0 #000; }

/* ---------- Адаптив ---------- */
@media (min-width: 961px) {
    .shell { width: min(85%, 1180px); }
}
@media (max-width: 1100px) {
    .lay-label { font-size: .96rem; }
    .levels-body { grid-template-columns: 170px minmax(0, 1fr); }
}
@media (max-width: 960px) {
    .masthead-row { flex-wrap: wrap; }
    .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; border-top: 2px solid rgba(43, 39, 36, .5); }
    .topnav-list a { display: block; padding: .55rem 0; border-bottom: 1px solid rgba(255, 248, 236, .18); }
    .found-grid { grid-template-columns: minmax(0, 1fr); }
    .zone-found::after { width: 70%; opacity: .5; }
    .lay-list { width: 92%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .card-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .duo-grid { grid-template-columns: minmax(0, 1fr); }
    .duo-cell.levels { padding-right: 0; }
    .duo-cell.tools { padding-left: 0; border-left: 0; }
    .duo-cell.tools::after { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 12px; background: var(--wave) repeat-x; background-size: 240px 12px; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 2.4rem; }
    .basement-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .masthead { padding: 1rem 0 1.5rem; }
    .brand-svg { width: 48px; height: 33px; }
    .brand-desc { font-size: .85rem; }
    .zone { padding: 2.3rem 0 2.5rem; }
    .duo-cell { padding: 2.3rem 0 2.5rem; }
    .found-scheme { width: 62%; margin-right: 0; }
    .scheme-label { font-size: .95rem; }
    .lay-stub { display: none; }
    .lay-row { justify-content: center; }
    .lay-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lay-brick:last-child { grid-column: 1 / -1; }
    .card-grid-3, .card-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .levels-body { grid-template-columns: minmax(0, 1fr); }
    .ruler { width: 46px; }
    .tools-plate { padding: .8rem .8rem .9rem; }
    .tools-table { font-size: .86rem; }
    .tools-table th, .tools-table td { padding: .5rem .3rem; }
    .tools-table tbody th { white-space: normal; }
    .tool-ico { display: block; margin: 0 0 .25rem; }
    .entry { padding: 1.3rem 1.2rem 1.5rem; box-shadow: 4px 4px 0 var(--seam); }
    .talk { padding: 1.2rem 1.1rem; }
    .sidebar { padding: 1.2rem 1.1rem .8rem; }
    .entry-nav { grid-template-columns: minmax(0, 1fr); }
    .entry-nav-link.is-next { grid-column: auto; }
    .basement-cols { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
    .cookie-banner { flex-direction: column; align-items: flex-start; padding: 1rem 1.1rem; }
    .find-form { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
