/*
Theme Name: dds_dugatour.com
Theme URI: https://dugatour.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: dgtour
*/

/* ---------- Шрифты (вложены в тему) ---------- */
@font-face { font-family: "Roboto Condensed"; font-weight: 700; font-style: normal; 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-weight: 700; font-style: normal; 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; }
@font-face { font-family: "Roboto Condensed"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/roboto-condensed-cyrillic-800-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-weight: 800; font-style: normal; font-display: swap; src: url("fonts/roboto-condensed-latin-800-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: "PT Sans Narrow"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/pt-sans-narrow-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Sans Narrow"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/pt-sans-narrow-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: "PT Sans Narrow"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/pt-sans-narrow-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Sans Narrow"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/pt-sans-narrow-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: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-mono-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: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-mono-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: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-mono-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: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-mono-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: "Caveat"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/caveat-cyrillic-600-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-weight: 600; font-style: normal; font-display: swap; src: url("fonts/caveat-latin-600-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 {
    --page: #D9DCD2;
    --page-grid: #C7CBBD;
    --head: #2F3432;
    --paper: #E7E4D8;
    --slate: #3B4741;
    --card-board: #C9C2AE;
    --graphite: #2F3432;
    --foot: #232725;
    --ink: #232725;
    --ink-light: #F2F1E9;
    --mute: #6E7568;
    --mute-dark: #A9B0A0;
    --signal: #E8632A;
    --signal-deep: #C94E1A;
    --teal: #2E6B62;
    --mark: #B33A2B;
    --sheet-line: #B7B6A8;
    --card-paper: #EFEDE4;
    --fold: #D3CFBF;
    --side: #CFD3C6;
    --f-head: "Roboto Condensed", "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif;
    --f-text: "PT Sans Narrow", "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif;
    --f-mono: "IBM Plex Mono", "Courier New", monospace;
    --f-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-text);
    font-size: 1.1875rem;
    line-height: 1.55;
    color: var(--ink);
    background-color: var(--page);
    background-image:
        linear-gradient(var(--page-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--page-grid) 1px, transparent 1px);
    background-size: 18px 18px;
    background-position: -1px -1px;
}
img, svg { max-width: 100%; height: auto; }
img { display: block; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { font-family: var(--f-head); font-weight: 800; line-height: 1.1; margin: 1.4em 0 0.5em; letter-spacing: 0.01em; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--signal-deep); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
p, li, h1, h2, h3, h4, dd, dt, td, th, figcaption, blockquote { overflow-wrap: break-word; hyphens: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.6rem 1rem; background: var(--signal); color: #fff; font-family: var(--f-mono); text-decoration: none; }
.skip-link:focus { top: 1rem; }

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

/* ---------- Кнопки-штампы ---------- */
.stamp-btn {
    display: inline-block;
    padding: 0.45em 1em 0.4em;
    font-family: var(--f-mono);
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--signal-deep);
    background: transparent;
    border: 3px solid var(--signal);
    border-radius: 0;
    box-shadow: 3px 3px 0 rgba(232, 99, 42, 0.35);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.stamp-btn:hover, .stamp-btn:focus-visible { background: var(--signal); color: var(--ink-light); transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(232, 99, 42, 0.35); }
.stamp-btn--tilt { transform: rotate(-4deg); }
.stamp-btn--tilt:hover, .stamp-btn--tilt:focus-visible { transform: rotate(0deg) translate(2px, 2px); }
.stamp-btn--big { font-size: 1rem; padding: 0.7em 1.4em 0.65em; box-shadow: 5px 5px 0 var(--ink); border-color: var(--ink); color: var(--ink); }
.stamp-btn--big:hover, .stamp-btn--big:focus-visible { background: var(--ink); color: var(--ink-light); box-shadow: 2px 2px 0 var(--signal); }
.stamp-btn--light { color: var(--ink-light); border-color: var(--signal); }

/* ---------- Шапка ---------- */
.topbar { background: var(--head); color: var(--ink-light); border-bottom: 4px solid var(--ink); }
.topbar-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: 0.9rem; color: var(--ink-light); text-decoration: none; min-width: 0; flex: 1 1 420px; }
.brand:hover { color: var(--ink-light); }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-svg, .brand-logo { width: 56px; height: 56px; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--f-head); font-weight: 800; font-size: clamp(1.15rem, 2.1vw, 1.6rem); line-height: 1.1; text-transform: uppercase; letter-spacing: 0.02em; }
.brand-desc { margin-top: 0.3rem; font-family: var(--f-mono); font-size: 0.74rem; line-height: 1.35; color: var(--mute-dark); max-width: 58ch; }
.nav-toggle { display: none; }
.site-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.6rem; }
.site-menu a { position: relative; display: inline-block; padding: 0.3rem 0; color: var(--ink-light); text-decoration: none; font-family: var(--f-text); font-size: 1.1rem; }
.site-menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform 0.15s ease; }
.site-menu a:hover::after, .site-menu a:focus-visible::after, .site-menu .current-menu-item > a::after { transform: scaleX(1); }
.site-menu .current-menu-item > a { color: #fff; }

/* ---------- Заголовки листов ---------- */
.sheet-head { display: flex; align-items: flex-end; gap: 1rem; margin-bottom: 1.6rem; }
.sheet-head-text { flex: 1; min-width: 0; }
.sheet-no {
    flex: 0 0 auto;
    display: grid; place-items: center;
    width: 3.1rem; height: 3.1rem;
    border: 2px solid currentColor;
    font-family: var(--f-mono); font-weight: 500; font-size: 1.3rem;
}
.sheet-tag {
    position: relative;
    margin: 0 0 0.35rem;
    padding-left: 1rem;
    font-family: var(--f-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mute);
}
.sheet-tag::before { content: ""; position: absolute; left: 0; top: 50%; width: 7px; height: 7px; margin-top: -4px; background: var(--signal); }
.sheet-tag::after { content: ""; display: block; height: 1px; margin-top: 0.35rem; background: currentColor; opacity: 0.55; margin-left: -1rem; }
.sheet-title {
    margin: 0;
    padding-bottom: 0.3rem;
    font-size: clamp(1.9rem, 4.3vw, 3.3rem);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    border-bottom: 2px solid currentColor;
}
.sheet-title--accent { color: var(--signal); border-bottom-color: var(--ink); }

/* ---------- Главная: общие листы ---------- */
.front { padding: 2.2rem 0 3.5rem; position: relative; }
.front::before, .front::after {
    content: ""; position: absolute; top: 2.2rem; bottom: 3.5rem; width: 9px;
    background:
        linear-gradient(var(--mute), var(--mute)) center / 1px 100% no-repeat,
        repeating-linear-gradient(transparent 0 46px, var(--mute) 46px 47px) center / 9px 100% no-repeat;
    opacity: 0.55; pointer-events: none;
}
.front::before { left: -1.6rem; }
.front::after { right: -1.6rem; }
.front > section { width: 85%; margin-left: auto; margin-right: auto; }
.sheet {
    position: relative;
    margin-bottom: 1.8rem;
    padding: 2rem 2.2rem 2.2rem;
    border: 1px solid rgba(35, 39, 37, 0.35);
    box-shadow: 0 2px 0 rgba(35, 39, 37, 0.12);
}

/* Лист 01 — план */
.sheet--plan { background: var(--paper); }
.plan-grid { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.plan-fig { margin: 0; min-width: 0; }
.plan-canvas { position: relative; container-type: inline-size; }
.plan-canvas img { width: 100%; height: auto; aspect-ratio: 1600 / 872; mix-blend-mode: multiply; }
.plan-pin {
    position: absolute;
    width: 3.4cqw; height: 3.4cqw; min-width: 16px; min-height: 16px;
    transform: translate(-50%, -50%);
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--signal);
    color: #fff;
    font-family: var(--f-mono); font-weight: 500;
    font-size: max(9px, 1.9cqw);
    line-height: 1;
    box-shadow: 0 0 0 2px var(--paper);
}
.plan-label {
    position: absolute;
    padding: 0 0.15em 0.1em;
    font-family: var(--f-text);
    font-weight: 700;
    font-size: 2.55cqw;
    line-height: 1.05;
    color: var(--ink);
    white-space: nowrap;
}
.plan-cap { margin-top: 0.7rem; font-family: var(--f-mono); font-size: 0.75rem; color: var(--mute); }
.checks { min-width: 0; }
.check-group + .check-group { margin-top: 0.8rem; }
.check-title { margin: 0 0 0.4rem; font-family: var(--f-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); padding-bottom: 0.25rem; border-bottom: 1px dashed var(--teal); }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-item {
    display: flex; align-items: flex-start; gap: 0.6rem;
    width: 100%; padding: 0.22rem 0; margin: 0;
    background: none; border: 0; text-align: left; cursor: pointer;
    font: inherit; color: var(--ink);
}
.check-box { position: relative; flex: 0 0 1.45rem; width: 1.45rem; height: 1.45rem; margin-top: 0.1rem; border: 2px solid var(--ink); background: var(--ink-light); }
.check-box::after {
    content: ""; position: absolute; left: 0.28rem; top: -0.45rem;
    width: 0.62rem; height: 1.25rem;
    border-right: 4px solid var(--signal); border-bottom: 4px solid var(--signal);
    transform: rotate(40deg) scale(0); transform-origin: bottom right;
    transition: transform 0.14s ease;
}
.check-item.is-done .check-box::after { transform: rotate(40deg) scale(1); }
.check-num { flex: 0 0 auto; font-family: var(--f-mono); font-size: 0.75rem; color: var(--signal-deep); margin-top: 0.35rem; min-width: 1.2em; }
.check-text { display: flex; flex-direction: column; min-width: 0; }
.check-name { font-size: 1.2rem; line-height: 1.2; font-weight: 700; }
.check-hint { font-family: var(--f-mono); font-size: 0.72rem; line-height: 1.35; color: var(--mute); }
.check-item:hover .check-name { color: var(--signal-deep); }
.check-note { margin: 1.1rem 0 0; padding-top: 0.6rem; border-top: 2px solid var(--ink); font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; }

/* Лист 02 — шкала этапов */
.sheet--steps { background: var(--slate); color: var(--ink-light); border-color: var(--ink); }
.sheet--steps .sheet-tag { color: var(--mute-dark); }
.scale { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--mute-dark); position: relative; }
.scale-cell { position: relative; min-width: 0; padding: 0.8rem 0.7rem 1.1rem; text-align: center; border-left: 1px solid var(--mute-dark); transition: background-color 0.15s ease; }
.scale-cell:first-child { border-left: 0; }
.scale-cell::before, .scale-cell::after { content: ""; position: absolute; bottom: 0; width: 1px; background: var(--mute-dark); }
.scale-cell::before { left: 25%; height: 6px; }
.scale-cell::after { left: 50%; height: 11px; background: var(--signal); }
.scale-cell:hover { background: rgba(242, 241, 233, 0.07); }
.scale-name { display: block; font-size: 1.15rem; line-height: 1.15; }
.scale-n { font-family: var(--f-mono); color: var(--signal); }
.scale-hint { display: block; margin-top: 0.35rem; font-family: var(--f-mono); font-size: 0.68rem; line-height: 1.35; color: var(--mute-dark); }
.scale-total { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin: 1.7rem auto 0.6rem; }
.dim { position: relative; flex: 1 1 0; max-width: 220px; height: 1px; background: var(--mute-dark); }
.dim::before, .dim::after { content: ""; position: absolute; top: -6px; width: 1px; height: 13px; background: var(--mute-dark); }
.dim::before { left: 0; }
.dim::after { right: 0; }
.scale-sum { display: flex; align-items: center; gap: 0.6rem; margin: 0; padding: 0.2rem 0.9rem; border: 1px dashed var(--mute-dark); }
.scale-big { font-family: var(--f-head); font-weight: 800; font-size: clamp(4rem, 9vw, 6.5rem); line-height: 0.9; color: var(--signal); transform: rotate(-3deg); display: inline-block; }
.scale-words { font-family: var(--f-head); font-weight: 700; font-size: clamp(1.5rem, 3.2vw, 2.4rem); line-height: 1; }
.scale-foot { margin: 0.8rem 0 0; text-align: center; font-family: var(--f-mono); font-size: 0.78rem; color: var(--mute-dark); }

/* Картотека записей */
.front-posts { margin: 2.8rem auto 2.6rem; }
.posts-head { margin-bottom: 1.6rem; }
.posts-title { margin: 0; font-size: clamp(2rem, 4.6vw, 3.4rem); text-transform: uppercase; line-height: 1; transform: rotate(-1deg); transform-origin: left; display: inline-block; }
.posts-more { margin: 2rem 0 0; text-align: right; }
.sheet-tag--plain { color: var(--mute); }

/* Карточки-дела */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 2rem 1.8rem; }
.cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1rem 1rem 1.1rem;
    background: var(--card-paper);
    border: 1.5px solid var(--ink);
    box-shadow: 4px 4px 0 -1.5px var(--card-paper), 4px 4px 0 0 var(--ink), 8px 8px 0 -1.5px var(--card-paper), 8px 8px 0 0 var(--ink);
    transition: transform 0.15s ease;
}
.card::before {
    content: "";
    position: absolute; top: -1.5px; right: -1.5px;
    width: 34px; height: 34px;
    background: linear-gradient(225deg, var(--page) 0 calc(50% - 1px), var(--ink) calc(50% - 1px) calc(50% + 0.5px), var(--fold) calc(50% + 0.5px));
    z-index: 2;
}
.card:hover { transform: translate(-2px, -2px); }
.card-thumb { margin-right: 18px; }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1.5px solid var(--ink); filter: saturate(0.85); }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding-top: 0.9rem; }
.card-flag { align-self: flex-start; margin-bottom: 0.4rem; padding: 0.1rem 0.45rem; font-family: var(--f-mono); font-size: 0.68rem; color: var(--mark); border: 1.5px solid var(--mark); transform: rotate(-2deg); }
.card-title { margin: 0 0 0.5rem; font-family: var(--f-mono); font-weight: 500; font-size: 1.18rem; line-height: 1.25; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--signal-deep); }
.card-excerpt { font-family: var(--f-mono); font-size: 0.84rem; line-height: 1.45; color: #3B403D; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot { margin-top: auto; padding-top: 0.8rem; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; border-top: 1px dashed var(--sheet-line); }
.card-date { font-family: var(--f-mono); font-size: 0.85rem; color: var(--mute); }

/* Лист 03 — блокнот */
.sheet--notebook { padding: 0; border: 0; box-shadow: none; background: transparent; }
.notebook {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background-color: var(--card-board);
    background-image:
        linear-gradient(90deg, transparent calc(50% - 22px), rgba(35, 39, 37, 0.18) 50%, transparent calc(50% + 22px)),
        repeating-linear-gradient(transparent 0 37px, rgba(35, 39, 37, 0.22) 37px 38px);
    background-position: 0 0, 0 10.5rem;
    border-radius: 6px 6px 22px 6px;
    box-shadow: 0 6px 14px rgba(35, 39, 37, 0.25), inset 0 0 40px rgba(110, 96, 64, 0.18);
}
.nb-page { position: relative; min-width: 0; padding: 2rem 2.2rem 2.4rem; }
.nb-page--right { padding-top: 7.4rem; padding-right: 4.5rem; }
.notebook .sheet-head { margin-bottom: 1.2rem; }
.notebook .sheet-title { font-size: clamp(1.8rem, 3.3vw, 2.7rem); }
.nb-page--left { padding-left: 3.4rem; }
.notebook .sheet-tag { color: #5D5A4C; }
.nb-list { margin: 0; padding: 0 0 0 0.2rem; list-style: none; counter-reset: q; }
.nb-list li {
    counter-increment: q;
    position: relative;
    padding: 0.15rem 2.4rem 0.15rem 0;
    font-family: var(--f-hand);
    font-weight: 600;
    font-size: 1.65rem;
    line-height: 1.38;
    color: #1F2A44;
    border-bottom: 1px solid rgba(35, 39, 37, 0.32);
}
.nb-list li::before { content: counter(q) ". "; }
.nb-list li.is-ticked::after, .nb-notes li::before {
    content: "";
    position: absolute;
    width: 0.55rem; height: 1.1rem;
    border-right: 3px solid var(--signal); border-bottom: 3px solid var(--signal);
    transform: rotate(40deg);
}
.nb-list li.is-ticked::after { right: 0.6rem; top: 0.35rem; }
.nb-mark { position: absolute; font-family: var(--f-hand); font-weight: 600; font-size: 1.5rem; color: var(--mark); line-height: 1; }
.nb-mark::after { content: ""; display: block; height: 2px; margin-top: 2px; background: var(--mark); transform: rotate(-4deg); }
.nb-mark--left { left: 0.3rem; bottom: 5.6rem; transform: rotate(-16deg); }
.nb-mark--right { right: 3.2rem; top: 3.6rem; transform: rotate(-12deg); }
.nb-sub { margin: 0 0 0.4rem; font-family: var(--f-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: #5D5A4C; }
.nb-notes { list-style: none; margin: 0; padding: 0; }
.nb-notes li { position: relative; padding: 0.15rem 0 0.15rem 2rem; font-family: var(--f-hand); font-weight: 600; font-size: 1.5rem; line-height: 1.45; color: #1F2A44; border-bottom: 1px solid rgba(35, 39, 37, 0.32); }
.nb-notes li::before { left: 0.35rem; top: 0.35rem; }
.nb-notes li.is-flagged { color: var(--mark); }
.nb-tip { margin: 1.3rem 0 0; font-family: var(--f-mono); font-size: 0.78rem; color: #4E4B3F; max-width: 36ch; }
.nb-curl { position: absolute; right: -1px; bottom: -1px; width: 82px; height: auto; pointer-events: none; }

/* Лист 04 — словарь */
.sheet--terms { background: var(--graphite); color: var(--ink-light); border-color: var(--ink); }
.sheet--terms .sheet-tag { color: var(--mute-dark); }
.terms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--mute-dark); border-left: 1px solid var(--mute-dark); }
.term { min-width: 0; border-right: 1px solid var(--mute-dark); border-bottom: 1px solid var(--mute-dark); }
.term-name {
    position: relative;
    display: block;
    padding: 0.6rem 2rem 0.6rem 0.8rem;
    font-size: 1.2rem;
    cursor: pointer;
    list-style: none;
}
.term-name::-webkit-details-marker { display: none; }
.term-name::after { content: "+"; position: absolute; right: 0.7rem; top: 50%; transform: translateY(-50%); font-family: var(--f-mono); color: var(--signal); }
.term[open] .term-name::after { content: "–"; }
.term[open] { background: rgba(242, 241, 233, 0.06); }
.term[open] .term-name { color: var(--signal); }
.term-name:hover { color: var(--signal); }
.term-text { margin: 0; padding: 0 0.8rem 0.8rem; font-family: var(--f-mono); font-size: 0.76rem; line-height: 1.5; color: var(--mute-dark); }

/* ---------- Внутренние страницы ---------- */
.crumbs { padding: 1.4rem 0 0.4rem; font-family: var(--f-mono); font-size: 0.8rem; color: var(--mute); }
.crumbs a { color: var(--teal); }
.crumbs-sep { margin: 0 0.3rem; color: var(--signal); }
.crumbs span[aria-current] { color: var(--ink); }
.layout-single { display: block; padding: 1rem 0 3.5rem; }
.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); gap: 6%; padding: 1rem 0 3.5rem; align-items: start; }
.content-area { min-width: 0; }
.list-head { margin-bottom: 1.8rem; }
.list-title { margin: 0; font-size: clamp(2rem, 4.4vw, 3.2rem); text-transform: uppercase; line-height: 1.02; border-bottom: 2px solid var(--ink); padding-bottom: 0.35rem; }
.list-intro { margin-top: 1rem; }
.empty-note { font-family: var(--f-mono); font-size: 0.9rem; color: var(--mute); }
.empty-box { padding: 1.6rem 1.8rem; background: var(--paper); border: 1.5px solid var(--ink); }

.entry { padding: 2rem 2.2rem 2.2rem; background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 rgba(35, 39, 37, 0.18); }
.entry-head { margin-bottom: 1.4rem; }
.entry-title { margin: 0 0 0.7rem; font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.05; }
.entry-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.7rem; align-items: center; font-family: var(--f-mono); font-size: 0.8rem; color: var(--mute); padding: 0.5rem 0; border-top: 1px solid var(--sheet-line); border-bottom: 1px solid var(--sheet-line); }
.meta-sep { color: var(--signal); font-size: 0.55rem; }
.entry-thumb { margin: 0 0 1.6rem; }
.entry-thumb img { width: 100%; height: auto; border: 1.5px solid var(--ink); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 1.85rem; padding-top: 0.6rem; border-top: 1px solid var(--ink); position: relative; }
.entry-content h2::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; background: var(--signal); }
.entry-content h3 { font-size: 1.45rem; }
.entry-content a:not(.stamp-btn):not(.wp-element-button) { color: var(--teal); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / calc(100% - 6px) 1px no-repeat; padding-right: 8px; position: relative; }
.entry-content a:not(.stamp-btn):not(.wp-element-button)::after { content: ""; position: absolute; right: 0; bottom: -2px; width: 5px; height: 5px; background: var(--signal); }
.entry-content a:not(.stamp-btn):not(.wp-element-button):hover { color: var(--signal-deep); }
.entry-content ul { padding-left: 1.3rem; list-style: none; }
.entry-content ul > li { position: relative; margin-bottom: 0.35rem; }
.entry-content ul > li::before { content: ""; position: absolute; left: -1.1rem; top: 0.55em; width: 7px; height: 7px; background: var(--signal); }
.entry-content ol { padding-left: 1.6rem; }
.entry-content ol > li::marker { font-family: var(--f-mono); color: var(--signal-deep); }
.entry-content blockquote { margin: 1.6rem 0; padding: 1.1rem 1.4rem 1.1rem 1.6rem; background: var(--slate); color: var(--ink-light); border-left: 6px solid var(--signal); font-size: 1.25rem; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display: block; margin-top: 0.5rem; font-family: var(--f-mono); font-size: 0.78rem; font-style: normal; color: var(--mute-dark); }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: 1.02rem; border: 1.5px solid var(--ink); }
.entry-content th, .entry-content td { border: 1px solid var(--ink); padding: 0.5rem 0.7rem; text-align: left; vertical-align: top; }
.entry-content th { background: var(--graphite); color: var(--ink-light); font-family: var(--f-head); font-weight: 700; }
.entry-content tr:nth-child(even) td { background: rgba(201, 194, 174, 0.35); }
.entry-content figure { margin: 1.5rem 0; }
.entry-content figure img { border: 1.5px solid var(--ink); }
.entry-content figcaption { font-family: var(--f-mono); font-size: 0.75rem; color: var(--mute); margin-top: 0.4rem; }
.entry-content pre, .entry-content code { font-family: var(--f-mono); font-size: 0.88em; }
.entry-content pre { overflow-x: auto; padding: 1rem; background: var(--graphite); color: var(--ink-light); }
.entry-content hr { border: 0; border-top: 2px dashed var(--sheet-line); margin: 2rem 0; }
.entry-content .alignleft { float: left; margin: 0.3rem 1.4rem 1rem 0; }
.entry-content .alignright { float: right; margin: 0.3rem 0 1rem 1.4rem; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.page-links { margin-top: 1.4rem; font-family: var(--f-mono); }
.entry-tags { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.entry-tags a { padding: 0.15rem 0.55rem; font-family: var(--f-mono); font-size: 0.8rem; color: var(--teal); text-decoration: none; border: 1.5px solid var(--teal); }
.entry-tags a:hover { background: var(--teal); color: var(--ink-light); }

.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin: 2rem 0; }
.post-nav-link { display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem 1.2rem; background: var(--card-paper); border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.post-nav-link:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--signal); color: var(--ink); }
.post-nav-link--next { grid-column: 2; text-align: right; }
.post-nav-dir { font-family: var(--f-mono); font-size: 0.75rem; color: var(--signal-deep); }
.post-nav-title { font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; line-height: 1.2; }

/* ---------- Сайдбар ---------- */
.sidebar { min-width: 0; padding: 1.4rem 1.4rem 0.6rem; background: var(--side); border: 1.5px solid var(--ink); position: relative; color: var(--ink); }
.sidebar::before { content: "приложение"; position: absolute; top: -0.75rem; left: 1rem; padding: 0 0.5rem; background: var(--page); font-family: var(--f-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.sidebar .widget { margin-bottom: 1.6rem; color: var(--ink); }
.sidebar .widget-title { margin: 0 0 0.7rem; padding-bottom: 0.3rem; font-size: 1.3rem; text-transform: uppercase; color: var(--ink); border-bottom: 2px solid var(--ink); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.45rem 0 0.45rem 1rem; border-bottom: 1px dashed var(--mute); position: relative; color: var(--ink); }
.sidebar li::before { content: ""; position: absolute; left: 0; top: 0.95rem; width: 6px; height: 6px; background: var(--signal); }
.sidebar a { color: var(--ink); text-decoration: none; }
.sidebar a:hover { color: var(--signal-deep); text-decoration: underline; }
.sidebar .post-date, .sidebar .rss-date { display: block; font-family: var(--f-mono); font-size: 0.74rem; color: var(--mute); }
.sidebar p { color: var(--ink); }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 2.4rem 0 0; }
.pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; height: 2.6rem; padding: 0 0.8rem; font-family: var(--f-mono); font-size: 0.9rem; color: var(--ink); text-decoration: none; background: var(--card-paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.pager a.page-numbers:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); color: var(--signal-deep); }
.pager .page-numbers.current { background: var(--signal); border-color: var(--signal); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.pager .page-numbers.dots { background: none; border: 0; box-shadow: none; min-width: 1.4rem; padding: 0; }

/* ---------- Поиск ---------- */
.search-form { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1rem 0; }
.search-field { flex: 1 1 220px; min-width: 0; padding: 0.6rem 0.8rem; font-family: var(--f-mono); font-size: 0.95rem; color: var(--ink); background: var(--ink-light); border: 2px solid var(--ink); border-radius: 0; }
.search-field:focus { outline: 3px solid var(--signal); outline-offset: 0; }

/* ---------- 404 ---------- */
.lost { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2.4rem; align-items: center; padding: 2.4rem; background: var(--paper); border: 1.5px solid var(--ink); }
.lost-code { margin: 0; font-family: var(--f-head); font-weight: 800; font-size: clamp(5rem, 14vw, 10rem); line-height: 0.85; color: var(--signal); transform: rotate(-3deg); -webkit-text-stroke: 2px var(--ink); }
.lost-body { min-width: 0; }
.lost-home { margin-top: 1.4rem; }

/* ---------- Комментарии ---------- */
.comments { margin-top: 2.4rem; padding: 1.8rem 2rem; background: var(--card-paper); border: 1.5px solid var(--ink); }
.comments-title, .comment-reply-title { margin: 0 0 1rem; font-size: 1.6rem; text-transform: uppercase; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-left: 1.6rem; border-left: 2px dashed var(--sheet-line); }
.note-body { padding: 1rem 0; border-bottom: 1px solid var(--sheet-line); }
.note-head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.note-avatar { border: 1.5px solid var(--ink); }
.note-author { font-family: var(--f-head); font-weight: 700; font-size: 1.1rem; }
.note-date { font-family: var(--f-mono); font-size: 0.75rem; color: var(--mute); }
.note-wait { margin: 0.4rem 0; font-family: var(--f-mono); font-size: 0.8rem; color: var(--mark); }
.note-text { margin-top: 0.5rem; }
.note-reply a { font-family: var(--f-mono); font-size: 0.8rem; color: var(--signal-deep); }
.comment-respond { margin-top: 1.6rem; }
.comment-form label { display: block; margin-bottom: 0.25rem; font-family: var(--f-mono); font-size: 0.8rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 0.6rem 0.8rem; font-family: var(--f-text); font-size: 1.05rem; background: var(--ink-light); border: 2px solid var(--ink); border-radius: 0; color: var(--ink); }
.comment-form .comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-form .comment-form-cookies-consent label { display: inline; }
.form-note { font-family: var(--f-mono); font-size: 0.78rem; color: var(--mute); }
.req { color: var(--mark); }
.comment-form .submit { font-size: 1rem; }
#cancel-comment-reply-link { margin-left: 0.6rem; font-family: var(--f-mono); font-size: 0.8rem; }

/* ---------- Подвал ---------- */
.sitefoot { background: var(--foot); color: var(--ink-light); padding: 2.6rem 0 1.4rem; border-top: 4px solid var(--signal); }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
.foot-col { min-width: 0; }
.sitefoot .widget { margin-bottom: 1.2rem; color: var(--ink-light); }
.sitefoot .widget-title { margin: 0 0 0.7rem; font-size: 1.45rem; color: var(--ink-light); }
.sitefoot p, .sitefoot .textwidget { font-family: var(--f-mono); font-size: 0.82rem; line-height: 1.55; color: var(--mute-dark); }
.sitefoot a { color: var(--ink-light); text-decoration: underline; text-decoration-color: var(--mute-dark); text-underline-offset: 3px; }
.sitefoot a:hover { color: var(--signal); text-decoration-color: var(--signal); }
.sitefoot ul { list-style: none; margin: 0; padding: 0; }
.sitefoot li { margin-bottom: 0.35rem; font-family: var(--f-mono); font-size: 0.82rem; color: var(--ink-light); }
.sitefoot .post-date { display: block; color: var(--mute-dark); font-size: 0.72rem; }
.foot-copy { margin: 1.6rem 0 0; padding-top: 1rem; border-top: 1px solid #3D4340; text-align: center; font-family: var(--f-mono); font-size: 0.78rem; color: var(--mute-dark); }

/* ---------- 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: 920px; margin: 0 auto;
    padding: 1rem 1.4rem;
    background: var(--graphite); color: var(--ink-light);
    border: 2px solid var(--signal);
    box-shadow: 6px 6px 0 rgba(35, 39, 37, 0.45);
}
.cookie-text { margin: 0; font-family: var(--f-mono); font-size: 0.8rem; line-height: 1.5; color: var(--ink-light); }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
    .front > section { width: 100%; }
    .front::before, .front::after { display: none; }
}
@media (max-width: 960px) {
    .topbar-row { position: relative; }
    .nav-toggle { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.8rem; background: none; color: var(--ink-light); border: 2px solid var(--ink-light); font-family: var(--f-mono); font-size: 0.85rem; cursor: pointer; }
    .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; 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; }
    .site-nav { display: none; width: 100%; }
    .site-nav.is-open { display: block; }
    .site-menu { flex-direction: column; gap: 0; border-top: 1px solid #4A514D; }
    .site-menu a { display: block; padding: 0.7rem 0; border-bottom: 1px solid #4A514D; }
    .site-menu a::after { display: none; }
    .site-menu .current-menu-item > a { color: var(--signal); }
    .plan-grid { grid-template-columns: minmax(0, 1fr); }
    .checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
    .check-group + .check-group { margin-top: 0; }
    .check-note { grid-column: 1 / -1; }
    .scale { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .scale-cell:nth-child(4) { border-left: 0; }
    .scale-cell:nth-child(n+4) { border-top: 1px solid var(--mute-dark); }
    .cards--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .layout-single .content-area { width: 100%; }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .notebook { grid-template-columns: minmax(0, 1fr); background-image: repeating-linear-gradient(transparent 0 37px, rgba(35, 39, 37, 0.22) 37px 38px); background-position: 0 10.5rem; }
    .nb-page--right { padding-top: 0.8rem; border-top: 2px dashed rgba(35, 39, 37, 0.35); padding-right: 4rem; }
    .nb-mark--right { top: auto; bottom: 4rem; right: 2rem; }
}
@media (max-width: 600px) {
    body { font-size: 1.0625rem; }
    .shell { width: 94%; }
    .brand { flex-basis: auto; }
    .brand-svg, .brand-logo { width: 44px; height: 44px; }
    .brand-desc { display: none; }
    .sheet { padding: 1.4rem 1.2rem 1.5rem; }
    .sheet-head { gap: 0.7rem; }
    .sheet-no { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
    .plan-label { display: none; }
    .checks { grid-template-columns: minmax(0, 1fr); }
    .scale { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .scale-cell:nth-child(odd) { border-left: 0; }
    .scale-cell:nth-child(4) { border-left: 1px solid var(--mute-dark); }
    .scale-cell:nth-child(n+3) { border-top: 1px solid var(--mute-dark); }
    .dim { display: none; }
    .cards--three, .cards { grid-template-columns: minmax(0, 1fr); }
    .nb-page, .nb-page--left { padding: 1.4rem 1.2rem 1.6rem; }
    .nb-page--right { padding: 0.8rem 3.2rem 2.2rem 1.2rem; }
    .nb-list li { font-size: 1.4rem; }
    .nb-mark--left { display: none; }
    .terms { grid-template-columns: minmax(0, 1fr); }
    .entry { padding: 1.4rem 1.2rem 1.6rem; }
    .lost { grid-template-columns: minmax(0, 1fr); padding: 1.6rem 1.2rem; gap: 1rem; }
    .comments { padding: 1.4rem 1.2rem; }
    .post-nav { grid-template-columns: minmax(0, 1fr); }
    .post-nav-link--next { grid-column: auto; }
    .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
    .cookie-banner { flex-direction: column; align-items: flex-start; padding: 1rem 1.1rem; }
    .empty-box { padding: 1.2rem 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
