/*
Theme Name: dds_webmartin.ru
Theme URI: https://webmartin.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: tvhod
*/

/* ---------- Шрифты ---------- */
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/oswald-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: "Oswald"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/oswald-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: "Oswald"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/oswald-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: "Oswald"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/oswald-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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-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: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; 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-style: normal; font-weight: 500; 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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; 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-style: normal; font-weight: 600; 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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Переменные ---------- */
:root {
    --c-page: #102A4C;
    --c-grid: #3E6FA8;
    --c-blue: #DCE9F5;
    --c-paper: #F2F5F8;
    --c-dark: #0B1E36;
    --c-ink: #102A4C;
    --c-muted: #5B7A9E;
    --c-light: #F2F5F8;
    --c-line: #8FB4D9;
    --c-red: #D9483B;
    --c-desc: #A9C6E4;
    --c-ok: #2F7D5B;
    --c-aside: #E6EEF6;
    --f-head: "Oswald", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
    --f-body: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --f-mono: "IBM Plex Mono", "Consolas", "Courier New", monospace;
    --f-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
    --plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M7 0v14M0 7h14' stroke='%238FB4D9' stroke-width='1.2'/%3E%3C/svg%3E");
    --shadow-sheet: 6px 7px 0 rgba(5, 15, 30, 0.45);
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--c-ink);
    background-color: var(--c-page);
    background-image:
        linear-gradient(rgba(62, 111, 168, 0.32) 1px, transparent 1px),
        linear-gradient(90deg, rgba(62, 111, 168, 0.32) 1px, transparent 1px),
        linear-gradient(rgba(62, 111, 168, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(62, 111, 168, 0.12) 1px, transparent 1px);
    background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
    background-position: -1px -1px;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-weight: 500;
    line-height: 1.2;
    margin: 1.4em 0 0.6em;
    letter-spacing: 0.01em;
    overflow-wrap: break-word;
    hyphens: manual;
}
p { margin: 0 0 1em; }
p, li, td, th, dd, dt, blockquote, figcaption { overflow-wrap: break-word; hyphens: auto; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--c-red); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px dashed var(--c-red);
    outline-offset: 3px;
}

.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(--c-paper);
    color: var(--c-ink);
    font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Единственный контейнер ширины */
.shell { width: min(92%, 1180px); margin-inline: auto; }

/* ---------- Кнопки-штампы ---------- */
.stamp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 0.62em 1.2em;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 0.92rem;
    line-height: 1.25;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    color: var(--c-ink);
    background: var(--c-paper);
    border: 1px solid var(--c-ink);
    border-radius: 0;
    box-shadow: inset 0 0 0 3px var(--c-paper), inset 0 0 0 4px var(--c-ink);
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.stamp-btn:hover {
    color: var(--c-paper);
    background: var(--c-ink);
    box-shadow: inset 0 0 0 3px var(--c-ink), inset 0 0 0 4px var(--c-paper), 4px 4px 0 var(--c-red);
    transform: translate(-2px, -2px);
    text-decoration: none;
}
.stamp-btn:active { transform: translate(0, 0); box-shadow: inset 0 0 0 3px var(--c-ink), inset 0 0 0 4px var(--c-paper); }
.stamp-btn--small { font-size: 0.74rem; padding: 0.45em 0.8em; }
.stamp-btn--light {
    color: var(--c-light);
    background: transparent;
    border-color: var(--c-light);
    box-shadow: inset 0 0 0 3px var(--c-dark), inset 0 0 0 4px var(--c-light);
}
.stamp-btn--light:hover { color: var(--c-dark); background: var(--c-light); box-shadow: inset 0 0 0 3px var(--c-light), inset 0 0 0 4px var(--c-dark), 4px 4px 0 var(--c-red); }

/* ---------- Шапка ---------- */
.masthead {
    background: var(--c-dark);
    color: var(--c-light);
    border-bottom: 2px solid var(--c-light);
    position: relative;
}
.masthead-inner {
    border-left: 1px solid rgba(143, 180, 217, 0.45);
    border-right: 1px solid rgba(143, 180, 217, 0.45);
    padding: 0 1.4rem 2rem;
}
.masthead-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-bottom: 1px solid rgba(143, 180, 217, 0.45);
    min-height: 3.2rem;
    margin: 0 -1.4rem;
    padding: 0 1.4rem;
}
.topnav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1.8rem; }
.topnav-list a {
    display: inline-block;
    padding: 0.7rem 0;
    color: var(--c-light);
    font-size: 0.95rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.topnav-list a:hover, .topnav-list .current-menu-item > a { border-bottom-color: var(--c-red); }

.nav-toggle[hidden] { display: none !important; }
.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    color: var(--c-light);
    border: 1px solid var(--c-line);
    padding: 0.45rem 0.8rem;
    font-family: var(--f-head);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
}
.nav-toggle-lines, .nav-toggle-lines::before, .nav-toggle-lines::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    position: relative;
}
.nav-toggle-lines::before, .nav-toggle-lines::after { content: ""; position: absolute; left: 0; }
.nav-toggle-lines::before { top: -6px; }
.nav-toggle-lines::after { top: 6px; }

.brand { display: flex; align-items: center; gap: 1.6rem; padding-top: 2rem; }
.brand-logo-link { flex: 0 0 auto; color: var(--c-light); display: block; }
.brand-mark { width: 84px; height: 84px; display: block; }
.brand-logo { max-width: 96px; max-height: 96px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    margin: 0;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: clamp(1.7rem, 4.2vw, 3.1rem);
    line-height: 1.08;
    letter-spacing: 0.01em;
}
.brand-name a { color: var(--c-light); text-decoration: none; }
.brand-desc { margin: 0.6rem 0 0; color: var(--c-desc); font-size: 1rem; max-width: 60ch; }

/* ---------- Листы ---------- */
.site-main { padding: 2.6rem 0 3.4rem; }
.front { width: 85%; margin-inline: auto; }

.sheet {
    position: relative;
    padding: 2rem 2.2rem 2.2rem;
    border: 1px solid var(--c-line);
    border-radius: 0;
    box-shadow: var(--shadow-sheet);
    color: var(--c-ink);
}
.sheet::before {
    content: "";
    position: absolute;
    inset: 8px;
    pointer-events: none;
    background-image: var(--plus), var(--plus), var(--plus), var(--plus);
    background-repeat: no-repeat;
    background-position: left top, right top, left bottom, right bottom;
}
.sheet--blue { background: var(--c-blue); }
.sheet--paper { background: var(--c-paper); }
.sheet > * { position: relative; }

.sheet-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: clamp(1.35rem, 2.6vw, 1.9rem);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--c-ink);
}
.sheet-title::after {
    content: "";
    flex: 1 1 2rem;
    min-width: 2rem;
    height: 1px;
    background: currentColor;
    opacity: 0.45;
    align-self: center;
}
.sheet-title-text { min-width: 0; }
.sheet-num {
    flex: 0 0 auto;
    width: 2.1rem;
    height: 2.1rem;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--f-mono);
    font-size: 1rem;
    line-height: 1;
}
.sheet-title--light { color: var(--c-light); }
.sheet-note { margin: 1.4rem 0 0; color: var(--c-ink); font-size: 0.95rem; }

/* ---------- Блок 1: этапы ---------- */
.stages { z-index: 3; }
.stages-chain {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2.2rem;
}
.stage {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 0.85rem 0.95rem;
    background: var(--c-blue);
    border: 1.5px solid var(--c-ink);
    box-shadow: inset 0 0 0 4px var(--c-blue), inset 0 0 0 5.5px var(--c-ink);
    text-align: center;
    transition: transform 0.12s ease, background-color 0.12s ease;
}
.stage:hover { transform: translate(-2px, -3px); background: var(--c-paper); box-shadow: inset 0 0 0 4px var(--c-paper), inset 0 0 0 5.5px var(--c-ink), 4px 4px 0 rgba(16, 42, 76, 0.35); }
.stage + .stage::before {
    content: "";
    position: absolute;
    top: 2.6rem;
    right: calc(100% + 0.35rem);
    width: 1.5rem;
    height: 10px;
    background:
        linear-gradient(var(--c-ink), var(--c-ink)) left center / calc(100% - 4px) 1.5px no-repeat,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='10'%3E%3Cpath d='M0 0 L8 5 L0 10 Z' fill='%23102A4C'/%3E%3C/svg%3E") right center / 8px 10px no-repeat;
}
.stage-no { font-family: var(--f-mono); font-size: 1.25rem; line-height: 1.2; }
.stage-name {
    font-family: var(--f-head);
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.15;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(16, 42, 76, 0.35);
    margin-bottom: 0.35rem;
}
.stage-line { font-size: 0.86rem; line-height: 1.4; }
.stage-doc {
    margin-top: auto;
    padding-top: 0.5rem;
    font-family: var(--f-mono);
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--c-muted);
}

/* ---------- Блок 2: приёмка ---------- */
.accept { margin-top: -0.6rem; z-index: 2; }
.accept-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
}
.accept-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.95rem; min-width: 0; }
.accept-list li { display: flex; gap: 0.8rem; align-items: flex-start; }
.accept-box {
    flex: 0 0 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.25rem;
    border: 1.5px solid var(--c-ink);
    background: var(--c-paper);
    position: relative;
}
.accept-list li:hover .accept-box::after {
    content: "";
    position: absolute;
    left: 3px;
    top: -2px;
    width: 6px;
    height: 11px;
    border: solid var(--c-red);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(40deg);
}
.accept-text { min-width: 0; font-size: 0.97rem; }
.accept-text strong { font-family: var(--f-head); font-weight: 500; font-size: 1.12rem; letter-spacing: 0.02em; display: block; }

.schema { position: relative; margin: 0 9.5rem 0 0; min-width: 0; justify-self: end; width: min(100%, 300px); }
.schema img { width: 100%; height: auto; display: block; }
.schema-labels { position: absolute; inset: 0; pointer-events: none; }
.schema-label {
    position: absolute;
    left: calc(100% + 0.7rem);
    width: 8.6rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.schema-label b { font-family: var(--f-head); font-weight: 500; font-size: 1.3rem; }
.schema-label small { font-size: 0.78rem; color: var(--c-muted); }
.schema-label--top { top: 26.5%; }
.schema-label--mid { top: 52%; }
.schema-label--bottom { top: 86%; }

/* ---------- Блок записей и карточки ---------- */
.latest { margin-top: 1.4rem; z-index: 1; }
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
}
.latest-more { margin: 1.8rem 0 0; text-align: right; }

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    box-shadow: 5px 6px 0 rgba(16, 42, 76, 0.22);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 22px 22px 0;
    border-color: transparent var(--c-blue) #C3D6EA transparent;
}
.card-grid--feed .card::after { border-color: transparent var(--c-page) #C3D6EA transparent; }
.card:hover { transform: translate(-3px, -3px); box-shadow: 9px 10px 0 rgba(16, 42, 76, 0.3); }
.card-thumb { padding: 1rem 1rem 0; }
.card-thumb a { display: block; border: 1px solid rgba(143, 180, 217, 0.8); }
.card-thumb img { width: 100%; height: auto; aspect-ratio: 854 / 602; object-fit: cover; display: block; }
.card-body { flex: 1; display: flex; flex-direction: column; padding: 1rem 1.1rem 1.15rem; min-width: 0; }
.card-title { margin: 0 0 0.5rem; font-size: 1.22rem; line-height: 1.25; }
.card-title a { text-decoration: none; color: var(--c-ink); }
.card-title a:hover { text-decoration: underline; text-decoration-color: var(--c-red); }
.card-excerpt { font-size: 0.9rem; line-height: 1.5; color: var(--c-ink); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}
.card-date { font-family: var(--f-mono); font-size: 0.8rem; color: var(--c-muted); }
.empty-note { margin: 0; font-size: 1rem; }

/* ---------- Блок 4: словарь ---------- */
.lexicon {
    margin-top: 2.6rem;
    background: var(--c-dark);
    color: var(--c-light);
    border-top: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
    padding: 2.4rem 2.2rem 2.6rem;
}
.lexicon-body { display: flex; gap: 1.8rem; align-items: stretch; }
.lexicon-word {
    flex: 0 0 auto;
    margin: 0;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--f-head);
    font-size: clamp(2.6rem, 5vw, 3.6rem);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--c-light);
    text-align: center;
}
.lexicon-table { flex: 1 1 auto; min-width: 0; border-collapse: collapse; width: 100%; margin: 0; color: var(--c-light); border: 1px solid var(--c-line); }
.lexicon-table th, .lexicon-table td { border: 1px solid var(--c-line); padding: 0.85rem 1.1rem; text-align: left; vertical-align: top; }
.lexicon-table thead th { font-family: var(--f-mono); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-desc); }
.lexicon-table tbody th { font-family: var(--f-head); font-weight: 500; font-size: 1.2rem; width: 28%; white-space: nowrap; }
.lexicon-table tbody tr { transition: background-color 0.12s ease; }
.lexicon-table tbody tr:hover { background: rgba(143, 180, 217, 0.12); }

/* ---------- Блок 5: ошибки задания ---------- */
.mistakes { margin-top: 2.6rem; padding: 2.4rem 2.4rem 2.6rem; }
.mistakes-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.4rem; align-items: center; }
.mistakes-intro { min-width: 0; }
.mistakes-intro .sheet-title { margin-bottom: 1rem; }
.mistakes-intro .sheet-title::after { display: none; }
.mistakes-intro p { margin: 0; max-width: 46ch; }
.mistakes-arrow { width: 160px; height: 60px; color: var(--c-red); margin-top: 1rem; display: block; margin-left: auto; }

.redline {
    position: relative;
    min-width: 0;
    background: var(--c-paper);
    border: 1.5px solid var(--c-red);
    padding: 2.6rem 3.2rem 2.6rem 1.8rem;
    box-shadow: 6px 7px 0 rgba(16, 42, 76, 0.28);
    transform: rotate(2deg);
    margin-top: -4.5rem;
    margin-bottom: -4.5rem;
}
.redline-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.redline-list li { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.98rem; line-height: 1.35; }
.redline-mark { flex: 0 0 26px; width: 26px; height: 26px; margin-top: -1px; }
.redline-list .is-wrong .redline-mark { color: var(--c-red); }
.redline-list .is-right .redline-mark { color: var(--c-ok); }
.redline-list .is-right span {
    font-family: var(--f-hand);
    font-weight: 600;
    font-size: 1.45rem;
    line-height: 1.15;
    background: linear-gradient(var(--c-red), var(--c-red)) left bottom / 100% 2px no-repeat;
    padding-bottom: 4px;
}
.redline-loop { position: absolute; right: 0.6rem; top: 2.4rem; width: 40px; height: 60px; color: var(--c-red); }
.redline-stamp {
    position: absolute;
    font-family: var(--f-head);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-red);
    border: 1.5px solid var(--c-red);
    box-shadow: inset 0 0 0 2px var(--c-paper), inset 0 0 0 3px var(--c-red);
    padding: 0.25rem 0.55rem;
    background: var(--c-paper);
}
.redline-stamp--top { top: -0.9rem; right: 1.2rem; transform: rotate(-4deg); }
.redline-stamp--bottom { bottom: -0.9rem; right: 2.2rem; transform: rotate(3deg); }

/* ---------- Внутренние страницы ---------- */
.crumbs {
    color: var(--c-desc);
    font-size: 0.88rem;
    margin: -0.8rem 0 1.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}
.crumbs a { color: var(--c-light); }
.crumbs-sep { color: var(--c-line); padding: 0 0.15rem; }
.crumbs-current { color: var(--c-desc); }

.layout-single { display: block; }
.layout-single > .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
}
.content-area { min-width: 0; }

.page-head { margin-bottom: 1.8rem; }
.page-head .sheet-title { margin-bottom: 0; }
.page-lead { margin-top: 1rem; }
.page-lead p:last-child { margin-bottom: 0; }
.card-grid--feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-single .card-grid--feed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.empty-sheet .empty-note { margin-bottom: 1rem; }

.entry { padding: 2.4rem 2.6rem 2.6rem; }
.entry-head { border-bottom: 1px solid var(--c-line); margin-bottom: 1.6rem; padding-bottom: 1rem; }
.entry-title { margin: 0 0 0.6rem; font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.15; }
.entry-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-family: var(--f-mono); font-size: 0.82rem; color: var(--c-muted); }
.entry-cats { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; }
.entry-cats a { color: var(--c-muted); }
.entry-cover { margin: 0 0 1.6rem; border: 1px solid var(--c-line); padding: 0.5rem; background: var(--c-blue); }
.entry-cover img { width: 100%; }
.entry-content { font-size: 1.05rem; line-height: 1.7; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.02em; border-bottom: 1px solid var(--c-line); padding-bottom: 0.3rem; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: 0.35em; }
.entry-content ul li::marker { color: var(--c-red); }
.entry-content ol li::marker { font-family: var(--f-mono); color: var(--c-muted); }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.6rem;
    background: var(--c-blue);
    border: 1px solid var(--c-line);
    border-left: 4px solid var(--c-ink);
    font-size: 1.08rem;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.95rem; border: 1px solid var(--c-line); }
.entry-content th, .entry-content td { border: 1px solid var(--c-line); padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; }
.entry-content th { background: var(--c-blue); font-family: var(--f-head); font-weight: 500; }
.entry-content img { max-width: 100%; height: auto; }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { font-size: 0.85rem; color: var(--c-muted); margin-top: 0.4rem; }
.entry-content pre { overflow-x: auto; background: var(--c-dark); color: var(--c-light); padding: 1rem 1.2rem; font-family: var(--f-mono); font-size: 0.9rem; }
.entry-content code { font-family: var(--f-mono); font-size: 0.92em; background: var(--c-blue); padding: 0.05em 0.3em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: 0; border-top: 1px dashed var(--c-line); margin: 2em 0; }
.entry-tags { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.entry-tags a { font-family: var(--f-mono); font-size: 0.82rem; border: 1px solid var(--c-line); padding: 0.2rem 0.55rem; text-decoration: none; }
.entry-tags a:hover { background: var(--c-ink); color: var(--c-paper); }
.page-links { margin-top: 1.4rem; font-family: var(--f-mono); }
.alignleft { float: left; margin: 0.3em 1.4em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: 0.85rem; color: var(--c-muted); }

.post-navigation { margin: 1.8rem 0 0; }
.post-navigation .nav-links { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.post-navigation a {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem 1.2rem;
    background: var(--c-blue);
    border: 1px solid var(--c-line);
    color: var(--c-ink);
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.post-navigation a:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--c-red); }
.post-nav-label { font-family: var(--f-mono); font-size: 0.75rem; color: var(--c-muted); text-transform: uppercase; }
.post-nav-title { font-family: var(--f-head); font-size: 1.1rem; }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 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(--c-ink);
    background: var(--c-paper);
    border: 1px solid var(--c-ink);
    box-shadow: inset 0 0 0 2px var(--c-paper), inset 0 0 0 3px var(--c-ink);
    text-decoration: none;
    transition: transform 0.12s ease, background-color 0.12s ease;
}
.pager a.page-numbers:hover { background: var(--c-ink); color: var(--c-paper); box-shadow: inset 0 0 0 2px var(--c-ink), inset 0 0 0 3px var(--c-paper), 3px 3px 0 var(--c-red); transform: translate(-2px, -2px); }
.pager .page-numbers.current { background: var(--c-red); color: var(--c-paper); border-color: var(--c-red); box-shadow: inset 0 0 0 2px var(--c-red), inset 0 0 0 3px var(--c-paper); }
.pager .page-numbers.dots { background: none; border: 0; box-shadow: none; color: var(--c-light); min-width: 1.5rem; padding: 0; }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    background: var(--c-aside);
    border: 1px solid var(--c-line);
    padding: 1.6rem 1.5rem;
    box-shadow: var(--shadow-sheet);
    color: var(--c-ink);
}
.sidebar .widget { margin-bottom: 1.8rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    margin: 0 0 0.9rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--c-ink);
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--c-ink);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.55rem 0; border-bottom: 1px dashed var(--c-line); color: var(--c-ink); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--c-ink); text-decoration: none; }
.sidebar a:hover { text-decoration: underline; text-decoration-color: var(--c-red); }
.sidebar .post-date, .sidebar .rss-date { display: block; font-family: var(--f-mono); font-size: 0.78rem; color: var(--c-muted); }
.sidebar p, .sidebar .textwidget { color: var(--c-ink); }

/* ---------- Поиск ---------- */
.finder { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }
.finder-input {
    flex: 1 1 14rem;
    min-width: 0;
    padding: 0.62rem 0.9rem;
    font: inherit;
    color: var(--c-ink);
    background: #FFFFFF;
    border: 1px solid var(--c-ink);
    border-radius: 0;
}
.finder-btn { flex: 0 0 auto; }

/* ---------- 404 ---------- */
.notfound { text-align: left; padding: 2.6rem; }
.notfound-code { margin: 0; font-family: var(--f-mono); font-size: clamp(3.5rem, 10vw, 6rem); line-height: 1; color: var(--c-red); letter-spacing: 0.06em; }
.notfound .entry-title { margin-top: 0.4rem; }
.notfound-home { margin: 1.4rem 0 0; }

/* ---------- Комментарии ---------- */
.remarks { margin-top: 1.8rem; }
.remarks-title, .comment-reply-title { margin: 0 0 1.2rem; font-size: 1.4rem; text-transform: uppercase; letter-spacing: 0.03em; }
.remarks-list, .remarks-list .children { list-style: none; margin: 0; padding: 0; }
.remarks-list .children { padding-left: 1.6rem; border-left: 1px dashed var(--c-line); margin-top: 1rem; }
.note { margin-bottom: 1rem; }
.note-body { background: var(--c-paper); border: 1px solid var(--c-line); padding: 1rem 1.2rem; }
.note-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin-bottom: 0.5rem; }
.note-avatar { border-radius: 0; border: 1px solid var(--c-line); }
.note-author { font-family: var(--f-head); font-size: 1.05rem; }
.note-date { font-family: var(--f-mono); font-size: 0.78rem; color: var(--c-muted); }
.note-moderation { color: var(--c-red); font-size: 0.9rem; margin: 0 0 0.5rem; }
.note-text p:last-child { margin-bottom: 0.4rem; }
.note-reply a { font-family: var(--f-mono); font-size: 0.8rem; text-transform: uppercase; }
.comment-respond { margin-top: 1.6rem; }
.comment-form p { margin: 0 0 1rem; }
.comment-form label { display: block; font-family: var(--f-head); font-size: 0.95rem; margin-bottom: 0.3rem; }
.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: inherit;
    color: var(--c-ink);
    background: #FFFFFF;
    border: 1px solid var(--c-ink);
    border-radius: 0;
}
.comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-form-cookies-consent label { font-family: var(--f-body); font-size: 0.88rem; margin: 0; }
.comment-notes, .logged-in-as, .must-log-in { font-size: 0.88rem; color: var(--c-muted); }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; }
.remarks-closed { color: var(--c-muted); }

/* ---------- Подвал ---------- */
.colophon {
    background: var(--c-dark);
    color: var(--c-light);
    border-top: 2px solid var(--c-light);
    padding: 2.8rem 0 1.4rem;
}
.colophon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
    padding: 0 0 2rem;
    border-bottom: 1px solid rgba(143, 180, 217, 0.45);
}
.colophon-col { min-width: 0; }
.colophon .widget { margin-bottom: 1.4rem; color: var(--c-light); }
.colophon .widget:last-child { margin-bottom: 0; }
.colophon .widget-title { margin: 0 0 0.8rem; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-light); }
.colophon .widget p, .colophon .textwidget { color: var(--c-light); font-size: 0.93rem; }
.colophon .widget a { color: var(--c-light); }
.colophon .widget a:hover { color: var(--c-desc); text-decoration-color: var(--c-red); }
.colophon .widget ul { list-style: none; margin: 0; padding: 0; }
.colophon .widget li { margin: 0 0 0.35rem; color: var(--c-light); font-size: 0.93rem; }
.colophon .post-date { color: var(--c-desc); font-size: 0.8rem; display: block; }
.colophon-copy { margin: 1.3rem 0 0; text-align: center; font-size: 0.85rem; color: var(--c-desc); }

/* ---------- Cookie ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.6rem;
    max-width: 880px;
    margin: 0 auto;
    padding: 1.1rem 1.4rem;
    background: var(--c-dark);
    color: var(--c-light);
    border: 1px solid var(--c-line);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.45);
}
.cookie-text { margin: 0; flex: 1 1 22rem; min-width: 0; font-size: 0.92rem; }

/* ---------- Наклоны листов (только на широких экранах) ---------- */
@media (min-width: 961px) {
    .sheet--tilt-l { transform: rotate(-0.7deg); }
    .sheet--tilt-r { transform: rotate(0.9deg); }
    .accept { margin-left: 1.5rem; margin-right: -0.5rem; }
}

/* ---------- Планшет ---------- */
@media (max-width: 960px) {
    .front { width: 100%; }
    .layout-single > .content-area { width: 100%; }
    .layout-with-sidebar { display: block; }
    .sidebar { margin-top: 2rem; }
    .stages-chain { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
    .stage + .stage::before { display: none; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-single .card-grid--feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .accept-grid { grid-template-columns: minmax(0, 1fr); }
    .schema { justify-self: start; }
    .mistakes-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .mistakes-arrow { display: none; }
    .redline { margin: 0; transform: rotate(1deg); }
    .accept { margin-top: 1.4rem; }
}

/* ---------- Телефон ---------- */
@media (max-width: 600px) {
    body { font-size: 15px; }
    .masthead-inner { padding: 0 1rem 1.4rem; }
    .masthead-bar { margin: 0 -1rem; padding: 0.5rem 1rem; justify-content: flex-start; 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: 0.4rem 0 0.2rem; }
    .topnav-list a { padding: 0.55rem 0; }
    .brand { gap: 1rem; padding-top: 1.3rem; }
    .brand-mark { width: 56px; height: 56px; }
    .brand-desc { font-size: 0.92rem; }

    .site-main { padding: 1.8rem 0 2.6rem; }
    .sheet { padding: 1.5rem 1.2rem 1.6rem; }
    .entry { padding: 1.6rem 1.2rem 1.8rem; }
    .mistakes { padding: 1.6rem 1.2rem 1.8rem; }
    .lexicon { padding: 1.8rem 1.2rem 2rem; }
    .notfound { padding: 1.6rem 1.2rem; }
    .sidebar { padding: 1.3rem 1.1rem; }
    .sheet-title { font-size: 1.2rem; gap: 0.55rem; }
    .sheet-num { width: 1.8rem; height: 1.8rem; font-size: 0.85rem; }

    .stages-chain { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; }
    .stage { text-align: left; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.9rem; padding: 0.9rem 1rem; }
    .stage-no { grid-row: span 3; align-self: start; }
    .stage-name { padding-bottom: 0.25rem; margin-bottom: 0.15rem; }

    .schema { margin-right: 7.2rem; width: min(100%, 200px); }
    .schema-label { width: 6.8rem; left: calc(100% + 0.5rem); }
    .schema-label b { font-size: 1.05rem; }

    .card-grid, .card-grid--feed, .layout-single .card-grid--feed { grid-template-columns: minmax(0, 1fr); }
    .latest-more { text-align: left; }

    .lexicon-body { flex-direction: column; gap: 1rem; }
    .lexicon-word { writing-mode: horizontal-tb; transform: none; font-size: 2rem; text-align: left; }
    .lexicon-table thead { display: none; }
    .lexicon-table, .lexicon-table tbody, .lexicon-table tr, .lexicon-table th, .lexicon-table td { display: block; width: 100%; }
    .lexicon-table tbody th { white-space: normal; border-bottom: 0; padding-bottom: 0.2rem; }
    .lexicon-table td { border-top: 0; padding-top: 0.2rem; }

    .redline { padding: 2rem 2.6rem 2rem 1.2rem; transform: none; }
    .post-navigation .nav-links { grid-template-columns: minmax(0, 1fr); }
    .post-navigation .nav-next { grid-column: 1; }
    .colophon-grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .cookie-banner { left: 0.6rem; right: 0.6rem; bottom: 0.6rem; padding: 1rem; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
}
