/*
Theme Name: dds_cm46.ru
Theme URI: https://cm46.ru/
Author: Дорофеев Антон Григорьевич
Description: Тема информационного справочника о профессиональной химии и моющих средствах: подбор состава по загрязнению и материалу, шкала pH, разбор маркировки и таблица условий применения. Тёмный «лабораторный журнал» с бумажными паспортами составов.
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: dblsk
*/

/* ---------- Шрифты ---------- */
@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+0304, U+0308, U+0329, U+2000-206F, 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: 700; font-display: swap; src: url("fonts/oswald-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: "Oswald"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/oswald-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+0304, U+0308, U+0329, 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-style: normal; font-weight: 400; 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-style: normal; font-weight: 400; 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+0304, U+0308, U+0329, 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-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-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 Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-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+0304, U+0308, U+0329, 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 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+0304, U+0308, U+0329, 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 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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Переменные ---------- */
:root {
    --bg: #15181B;
    --grid: #2A2F35;
    --line: #3A4048;
    --foot: #0C0E10;
    --plate: #3F4348;
    --aside: #1F2328;
    --paper: #EDE7DA;
    --paper-deep: #E3DCCB;
    --paper-edge: #C9C0AC;
    --ink: #1B1E22;
    --mute: #6E6A5E;
    --light: #EDE7DA;
    --light-mute: #8A9199;
    --sig: #E8FF3A;
    --chem: #2FD1C0;
    --warn: #E2452F;
    --dot-off: #D2CBBB;
    --f-head: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
    --f-text: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --f-mono: "IBM Plex Mono", "Consolas", "Courier New", monospace;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .22 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

/* ---------- База ---------- */
*, *::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: 1rem;
    line-height: 1.65;
    color: var(--light);
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 38% 26% at 8% 32%, rgba(74, 82, 90, .20), transparent 70%),
        radial-gradient(ellipse 28% 22% at 92% 48%, rgba(74, 82, 90, .17), transparent 70%),
        radial-gradient(ellipse 34% 18% at 72% 86%, rgba(66, 72, 78, .16), transparent 70%),
        radial-gradient(ellipse 22% 14% at 30% 70%, rgba(58, 64, 70, .14), transparent 70%),
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 24px 24px, 24px 24px;
    overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
img { height: auto; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; line-height: 1.2; hyphens: auto; overflow-wrap: break-word; }
a { color: inherit; text-decoration-color: var(--chem); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--sig); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--chem); outline-offset: 2px; }
button { font: inherit; }

.sr {
    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 {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    padding: .6rem 1rem; background: var(--sig); color: var(--ink);
    font-family: var(--f-mono); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 1rem; }

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

/* ---------- Кнопка-ярлык ---------- */
.tag-btn {
    display: inline-block;
    padding: .45rem .95rem;
    font-family: var(--f-mono);
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    background: var(--sig);
    border: 1.5px solid var(--ink);
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease;
}
.tag-btn:hover {
    color: var(--sig);
    background: var(--ink);
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--sig);
}

/* ---------- Шапка ---------- */
.masthead { background: var(--bg); padding-top: 1.7rem; }
.masthead-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex: 1 1 22rem; max-width: 40rem; align-items: center; gap: .95rem; color: var(--light); text-decoration: none; min-width: 0; }
.topnav { flex: 0 1 auto; min-width: 0; }
.brand-mark { flex: 0 0 auto; display: block; width: 58px; height: 58px; }
.brand-drop, .brand-logo { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--f-head); font-weight: 700; font-size: clamp(1.25rem, 1rem + .8vw, 1.6rem); line-height: 1.12; letter-spacing: .01em; }
.brand-desc { margin-top: .3rem; max-width: 30rem; font-family: var(--f-text); font-weight: 600; font-size: .78rem; line-height: 1.35; color: var(--light); opacity: .82; }

.nav-toggle { display: none; }
.topnav-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem 1.8rem; margin: 0; padding: 0; list-style: none; }
.topnav-list a {
    display: inline-block;
    padding: .3rem 0;
    font-family: var(--f-mono);
    font-size: .92rem;
    color: var(--light);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.topnav-list a:hover { border-bottom-color: var(--chem); }
.topnav-list .current-menu-item > a,
.topnav-list .current_page_item > a { color: var(--sig); }

/* ---------- Заголовки секций ---------- */
.sec-title {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.1rem);
    line-height: 1.12;
    letter-spacing: .035em;
    text-transform: uppercase;
    color: var(--light);
}
.paper .sec-title { color: var(--ink); }
.sec-title, .card-title, .entry-title { hyphens: manual; }
.keep-case { text-transform: none; }

/* ---------- Бумажный паспорт ---------- */
.paper {
    position: relative;
    color: var(--ink);
    background-color: var(--paper);
    background-image: var(--grain);
    border: 1px solid var(--paper-edge);
    box-shadow: inset 0 0 0 6px var(--paper), inset 0 0 0 7px rgba(201, 192, 172, .7), 0 12px 26px rgba(0, 0, 0, .45);
    padding: 2rem 2.3rem;
}
.paper a { color: var(--ink); }

/* ---------- Главная ---------- */
.front { padding: 1.9rem 0 3rem; }
.front > section { margin-bottom: 2.6rem; }
.front > section:last-child { margin-bottom: 0; }

/* Точки-коды */
.dot {
    display: inline-block;
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--dot-off);
    vertical-align: middle;
}
.dot-acid.is-on { background: var(--warn); }
.dot-neu.is-on { background: #D8E02C; }
.dot-alk.is-on { background: var(--chem); }
.dot-acid.is-half { background: rgba(226, 69, 47, .38); }
.dot-neu.is-half { background: rgba(216, 224, 44, .45); }
.dot-alk.is-half { background: rgba(47, 209, 192, .4); }
.dots { display: inline-flex; gap: 1.1rem; align-items: center; }

/* Блок 1 — подбор */
.picker .sec-title { margin-bottom: 1rem; }
.picker-head,
.picker-row {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) auto minmax(0, 1fr) auto minmax(0, 1.2fr);
    align-items: center;
    column-gap: clamp(1rem, 3vw, 2.6rem);
}
.picker-head { padding-bottom: .4rem; margin-bottom: .3rem; border-bottom: 1px dashed var(--paper-edge); }
.picker-head span { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.picker-head span:nth-child(1) { grid-column: 1; }
.picker-head span:nth-child(2) { grid-column: 3; }
.picker-head span:nth-child(3) { grid-column: 5; }
.picker-rows { margin: 0; padding: 0; list-style: none; }
.picker-row { padding: .3rem 0; }
.picker-row > * { min-width: 0; }
.picker-pick {
    position: relative;
    justify-self: start;
    padding: .2rem 1.6rem .2rem .55rem;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(1.15rem, .9rem + .9vw, 1.6rem);
    line-height: 1.25;
    text-align: left;
    color: var(--ink);
    background: transparent;
    border: 0;
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
    transition: background-color .12s ease;
}
.picker-mat { padding: .2rem .55rem .2rem 1.6rem; clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%); }
.picker-pick:hover { background: rgba(232, 255, 58, .45); }
.picker-pick.is-active { background: var(--sig); }
.picker-type { font-family: var(--f-mono); font-size: .82rem; font-weight: 600; line-height: 1.3; }
.picker-type::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: .45rem; vertical-align: middle; }
.type-acid::before { background: var(--warn); }
.type-neu::before { background: #D8E02C; }
.type-alk::before { background: var(--chem); }
.picker-foot {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1rem 2rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--paper-edge);
}
.picker-tip {
    margin: 0;
    padding: .7rem .9rem;
    font-size: .92rem;
    line-height: 1.5;
    background: var(--paper-deep);
    border-left: 4px solid var(--ink);
}
.picker-legend { display: flex; flex-wrap: wrap; align-content: flex-start; gap: .4rem 1.1rem; margin: 0; padding: 0; list-style: none; font-family: var(--f-mono); font-size: .78rem; color: var(--mute); }
.picker-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.picker-legend .picker-legend-note { flex-basis: 100%; }

/* Блок 2 — шкала pH */
.phband {
    padding: 1.8rem 2.2rem 1.6rem;
    background-color: var(--plate);
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 12px 12px;
    border: 1px solid var(--line);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .35);
}
.phband .sec-title { margin-bottom: .2rem; }
.ph-marks { position: relative; height: 6.4rem; }
.ph-big,
.ph-flag { position: absolute; left: calc(var(--p) * 1%); }
.ph-big {
    top: 0;
    transform: translateX(-50%);
    font-family: var(--f-mono);
    font-weight: 600;
    font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.8rem);
    line-height: 1;
}
.ph-big-acid { transform: none; color: var(--warn); }
.ph-big-neu { color: var(--sig); }
.ph-big-alk { transform: translateX(-100%); color: var(--chem); }
.ph-flag {
    bottom: 0;
    padding: 0 0 .25rem .9rem;
    border-left: 1.5px solid var(--light-mute);
    font-family: var(--f-mono);
    font-size: .74rem;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--light);
}
.ph-flag::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 9px;
    height: 8px;
}
.ph-flag.flag-row-1 { padding-bottom: 2.15rem; }
.ph-flag.flag-end { padding: 0 .9rem .25rem 0; border-left: 0; border-right: 1.5px solid var(--light-mute); transform: translateX(-100%); }
.ph-flag.flag-end.flag-row-1 { padding-bottom: 2.15rem; }
.ph-flag.flag-end::before { left: auto; right: 0; }
.flag-acid::before { background: var(--warn); }
.flag-neu::before { background: var(--sig); }
.flag-alk::before { background: var(--chem); }
.ph-bar {
    height: 26px;
    background: linear-gradient(90deg, #E2452F 0%, #EE7B2F 20%, #E8FF3A 46%, #A9EE5E 63%, #2FD1C0 84%, #2FD1C0 100%);
    border: 1px solid rgba(0, 0, 0, .35);
}
.ph-ticks { display: flex; justify-content: space-between; margin: .35rem 0 0; padding: 0; list-style: none; }
.ph-ticks li { width: 1.6rem; margin: 0 -.8rem; font-family: var(--f-mono); font-size: .7rem; text-align: center; color: var(--light-mute); }
.ph-ticks li:first-child { margin-left: 0; text-align: left; }
.ph-ticks li:last-child { margin-right: 0; text-align: right; }
.ph-zones { display: flex; justify-content: space-between; gap: 1rem; margin-top: .3rem; font-family: var(--f-head); font-weight: 600; font-size: clamp(1rem, .9rem + .5vw, 1.3rem); letter-spacing: .02em; }
.ph-list { display: none; margin: 1rem 0 0; padding: 0; list-style: none; font-family: var(--f-mono); font-size: .82rem; }
.ph-list li { display: flex; gap: .6rem; align-items: baseline; padding: .2rem 0 .2rem .7rem; border-left: 4px solid var(--light-mute); margin-bottom: .3rem; }
.ph-list li.flag-acid { border-left-color: var(--warn); }
.ph-list li.flag-neu { border-left-color: var(--sig); }
.ph-list li.flag-alk { border-left-color: var(--chem); }
.ph-list-num { color: var(--light-mute); min-width: 4.2rem; }
.ph-note { margin: 1.1rem 0 0; max-width: 46rem; font-size: .9rem; color: #C9CDD2; }

/* Последние записи */
.latest .sec-title { margin-bottom: 1.1rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.layout-with-sidebar .card-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
    --stripe: var(--sig);
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: 1.35rem 1.1rem 1.1rem;
    color: var(--ink);
    background-color: var(--paper);
    background-image: var(--grain);
    border-left: 6px solid var(--stripe);
    clip-path: polygon(0 9px, 5% 3px, 10% 8px, 15% 2px, 21% 7px, 27% 3px, 33% 9px, 39% 1px, 46% 6px, 52% 2px, 58% 8px, 64% 3px, 70% 9px, 76% 2px, 82% 7px, 88% 1px, 94% 6px, 100% 3px, 100% 100%, 0 100%);
    transition: transform .15s ease;
}
.card:nth-child(3n+2) { --stripe: var(--chem); }
.card:nth-child(3n) { --stripe: var(--warn); }
.latest .card-grid .card:nth-child(n+4) { display: none; }
.card:hover { transform: translateY(-4px); }
.card-thumb { display: block; overflow: hidden; background: var(--paper-deep); }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9.2; object-fit: cover; transition: transform .3s ease; }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding-top: 1rem; }
.card-title { margin: 0 0 .45rem; font-family: var(--f-mono); font-weight: 600; font-size: 1.08rem; line-height: 1.3; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-decoration-color: var(--chem); }
.card-excerpt { flex: 1; font-family: var(--f-mono); font-size: .84rem; line-height: 1.55; color: #3B3A33; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .9rem; }
.card-date { font-family: var(--f-mono); font-size: .82rem; color: var(--mute); }
.empty-note { font-family: var(--f-mono); color: var(--light-mute); }
.empty-note-ink { font-family: var(--f-mono); }

/* Блок 3 — канистра */
.canister {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.9fr) auto;
    gap: 1.6rem 2rem;
    align-items: start;
}
.canister > * { min-width: 0; }
.canister-note { margin-top: 1rem; padding: .8rem .95rem; background: var(--paper-deep); border-left: 4px solid var(--ink); }
.canister-note-title {
    display: inline-block;
    margin: 0 0 .4rem;
    padding: .05rem .45rem;
    font-family: var(--f-mono);
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    background: var(--sig);
}
.canister-note-text { margin: 0; font-size: .9rem; line-height: 1.55; }
.canister-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 210px) minmax(0, 1fr);
    align-items: center;
    column-gap: 2.2rem;
}
.callouts { display: flex; flex-direction: column; justify-content: space-around; gap: 1.6rem; margin: 0; padding: 0; list-style: none; }
.callouts-left { align-items: flex-end; padding-top: 2.5rem; }
.callouts-right { align-items: flex-start; padding-top: 1.2rem; }
.callout {
    position: relative;
    padding: .35rem .7rem;
    font-family: var(--f-mono);
    font-weight: 600;
    font-size: .86rem;
    line-height: 1.3;
    color: var(--ink);
    background: #F4F0E6;
    border: 1.5px solid var(--ink);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .12s ease, transform .12s ease;
}
.callout::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 2.2rem;
    height: 1.5px;
    background: var(--ink);
}
.callouts-left .callout::after { left: 100%; }
.callouts-right .callout::after { right: 100%; }
.callout:hover { transform: translateY(-2px); }
.callout.is-active { background: var(--sig); }
.canister-figure { margin: 0; }
.canister-figure img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; }
.pictos { display: grid; grid-template-columns: repeat(2, 2.6rem); gap: .55rem; margin: 0; padding: 0; list-style: none; align-self: center; }
.pictos li { display: flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border: 1.5px solid var(--ink); background: #F4F0E6; }
.pictos li:nth-child(4n+1), .pictos li:nth-child(4n) { background: var(--ink); }
.pictos li:nth-child(4n+1) svg, .pictos li:nth-child(4n) svg { stroke: var(--paper); }
.pictos svg { display: block; width: 1.6rem; height: 1.6rem; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Блок 4 — справочная таблица */
.refsheet .sec-title { margin-bottom: .9rem; }
.ref-scroll { overflow-x: auto; }
.ref-table { width: 100%; min-width: 640px; border-collapse: collapse; font-family: var(--f-mono); font-size: .9rem; color: var(--light); background: rgba(12, 14, 16, .55); border: 1px solid var(--line); }
.ref-table th, .ref-table td { padding: .5rem .8rem; text-align: left; border: 1px solid var(--line); vertical-align: middle; }
.ref-table thead th { font-weight: 600; text-align: center; color: var(--light); background: rgba(58, 64, 72, .45); }
.ref-table tbody th { font-weight: 400; }
.ref-table tbody tr:hover { background: rgba(232, 255, 58, .06); }
.ref-table .dot { width: 9px; height: 9px; margin-right: .6rem; }
.ref-note { margin: .8rem 0 0; font-family: var(--f-mono); font-size: .78rem; color: var(--light-mute); }
.ref-motto { margin: 1.2rem 0 0; font-family: var(--f-mono); font-weight: 600; font-size: clamp(1.4rem, 1rem + 1.8vw, 2.3rem); line-height: 1.2; color: var(--light); }

/* ---------- Внутренние страницы ---------- */
.crumbs { margin: 1.6rem 0 1.3rem; font-family: var(--f-mono); font-size: .8rem; color: var(--light-mute); }
.crumbs a { color: var(--light); }
.crumbs-sep { color: var(--sig); }
.layout-single { display: block; padding-bottom: 3rem; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
    padding-bottom: 3rem;
}
.content-area { min-width: 0; }
.list-head { margin-bottom: 1.3rem; }
.list-head .sec-title { margin-bottom: .3rem; }
.list-lead { color: var(--light-mute); font-size: .95rem; }
.sheet { margin-bottom: 1.6rem; }
.entry-head { margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--paper-edge); }
.entry-title { font-family: var(--f-head); font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.12; letter-spacing: .01em; color: var(--ink); }
.entry-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 0; font-family: var(--f-mono); font-size: .82rem; color: var(--mute); }
.entry-cat a { padding: .1rem .45rem; background: var(--ink); color: var(--sig); text-decoration: none; }
.entry-thumb { margin: 0 0 1.4rem; }
.entry-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.entry-content { font-size: 1.02rem; line-height: 1.72; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.6em 0 .55em; font-family: var(--f-head); font-weight: 600; letter-spacing: .02em; color: var(--ink); }
.entry-content h2 { font-size: 1.6rem; text-transform: uppercase; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content h4 { font-size: 1.1rem; }
.entry-content a { color: var(--ink); text-decoration-color: var(--chem); }
.entry-content ul, .entry-content ol { margin: 0 0 1em; padding-left: 1.4rem; }
.entry-content li { margin-bottom: .35em; }
.entry-content ul li::marker { color: var(--warn); content: "■  "; font-size: .8em; }
.entry-content ol li::marker { font-family: var(--f-mono); font-weight: 600; }
.entry-content blockquote {
    margin: 1.5em 0;
    padding: 1.1rem 1.4rem;
    color: var(--light);
    background: var(--ink);
    border-left: 6px solid var(--sig);
    font-family: var(--f-mono);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { color: var(--sig); font-style: normal; font-size: .85rem; }
.entry-content table { width: 100%; margin: 1.4em 0; border-collapse: collapse; font-size: .92rem; border: 1px solid var(--paper-edge); }
.entry-content th, .entry-content td { padding: .5rem .7rem; border: 1px solid var(--paper-edge); text-align: left; }
.entry-content th { font-family: var(--f-mono); background: var(--paper-deep); }
.entry-content figure { margin: 1.4em 0; }
.entry-content figcaption { font-family: var(--f-mono); font-size: .8rem; color: var(--mute); margin-top: .4rem; }
.entry-content img { display: block; }
.entry-content code, .entry-content pre { font-family: var(--f-mono); background: var(--paper-deep); }
.entry-content code { padding: .05rem .3rem; }
.entry-content pre { padding: 1rem; overflow-x: auto; }
.entry-content hr { border: 0; border-top: 2px dashed var(--paper-edge); margin: 2em 0; }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.entry-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.entry-tags a { display: inline-block; padding: .15rem .55rem; font-family: var(--f-mono); font-size: .8rem; border: 1.5px solid var(--ink); text-decoration: none; }
.entry-tags a:hover { background: var(--sig); }

.neighbors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.neighbor { display: block; min-width: 0; padding: 1rem 1.2rem; color: var(--light); background: var(--aside); border: 1px solid var(--line); text-decoration: none; font-family: var(--f-head); font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.neighbor span { display: block; margin-bottom: .3rem; font-family: var(--f-mono); font-weight: 400; font-size: .75rem; color: var(--sig); }
.neighbor-next { grid-column: 2; text-align: right; }
.neighbor:hover { border-color: var(--sig); }

/* Комментарии */
.discussion-title { font-family: var(--f-head); font-weight: 700; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .03em; }
.notes, .notes .children { margin: 0; padding: 0; list-style: none; }
.notes .children { margin-left: 1.6rem; padding-left: 1rem; border-left: 2px dashed var(--paper-edge); }
.note-body { margin-bottom: 1rem; padding: .9rem 1.1rem; background: var(--paper-deep); border-left: 4px solid var(--chem); }
.note-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-bottom: .4rem; }
.note-ava { display: block; border-radius: 50%; }
.note-author { font-family: var(--f-mono); font-weight: 600; }
.note-date { font-family: var(--f-mono); font-size: .78rem; color: var(--mute); }
.note-wait { font-family: var(--f-mono); font-size: .8rem; color: var(--warn); }
.note-text p:last-child { margin-bottom: .3rem; }
.note-reply a { font-family: var(--f-mono); font-size: .8rem; font-weight: 600; }
.comment-respond { margin-top: 1.4rem; }
.comment-reply-title { font-family: var(--f-head); font-weight: 600; font-size: 1.3rem; text-transform: uppercase; }
.comment-reply-title small { margin-left: .6rem; font-family: var(--f-mono); font-size: .8rem; text-transform: none; }
.comment-form label { display: block; margin-bottom: .25rem; font-family: var(--f-mono); font-size: .82rem; font-weight: 600; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: .55rem .7rem;
    font: inherit;
    color: var(--ink);
    background: #F6F2E9;
    border: 1.5px solid var(--ink);
    border-radius: 0;
}
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; }
.comment-notes, .logged-in-as { font-size: .85rem; color: var(--mute); }
.req { color: var(--warn); }
.form-submit .submit {
    padding: .55rem 1.1rem;
    font-family: var(--f-mono);
    font-weight: 600;
    color: var(--ink);
    background: var(--sig);
    border: 1.5px solid var(--ink);
    border-radius: 0;
    cursor: pointer;
}
.form-submit .submit:hover { color: var(--sig); background: var(--ink); }

/* Поиск */
.finder { display: flex; gap: .5rem; margin: 1rem 0; }
.finder-input {
    flex: 1;
    min-width: 0;
    padding: .5rem .7rem;
    font-family: var(--f-mono);
    font-size: .9rem;
    color: var(--ink);
    background: #F6F2E9;
    border: 1.5px solid var(--ink);
    border-radius: 0;
}
.sidebar .finder-input { border-color: var(--line); }

/* Пагинация */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 2rem 0 0; }
.pager .page-numbers, .pager > a, .pager > span {
    display: inline-block;
    min-width: 2.4rem;
    padding: .45rem .75rem;
    font-family: var(--f-mono);
    font-size: .88rem;
    font-weight: 600;
    text-align: center;
    color: var(--light);
    text-decoration: none;
    border: 1.5px solid var(--line);
    background: rgba(12, 14, 16, .5);
}
.pager a.page-numbers:hover { border-color: var(--sig); color: var(--sig); }
.pager .page-numbers.current { color: var(--ink); background: var(--sig); border-color: var(--sig); }
.pager .page-numbers.dots { border: 0; background: none; min-width: 0; }
.entry-content .pager .post-page-numbers { color: var(--ink); border-color: var(--paper-edge); background: none; }

/* 404 */
.lost { margin-bottom: 3rem; }
.lost-code { margin: 0 0 .3rem; font-family: var(--f-mono); font-weight: 600; font-size: clamp(2.6rem, 2rem + 3vw, 4.6rem); line-height: 1; color: var(--warn); }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    padding: 1.4rem 1.3rem;
    color: var(--light);
    background: var(--aside);
    border: 1px solid var(--line);
    border-top: 4px solid var(--sig);
}
.sidebar .widget { margin-bottom: 1.8rem; color: var(--light); }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    margin-bottom: .9rem;
    padding-bottom: .45rem;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--light);
    border-bottom: 1px solid var(--line);
}
.sidebar ul { margin: 0; padding: 0; list-style: none; }
.sidebar li { padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--light); font-family: var(--f-mono); font-size: .88rem; text-decoration: none; }
.sidebar a:hover { color: var(--sig); }
.sidebar .post-date { display: block; font-family: var(--f-mono); font-size: .75rem; color: var(--light-mute); }
.sidebar p, .sidebar .textwidget { color: #C9CDD2; font-size: .9rem; }

/* ---------- Подвал ---------- */
.colophon { color: var(--light-mute); background: var(--foot); border-top: 1px solid var(--line); }
.colophon-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 2rem 3rem;
    padding: 2.6rem 0 2rem;
}
.colophon-col { min-width: 0; }
.colophon .widget { margin-bottom: 1.2rem; color: var(--light-mute); }
.colophon .widget-title { margin-bottom: .7rem; font-family: var(--f-head); font-weight: 700; font-size: 1.25rem; letter-spacing: .02em; color: var(--light); }
.colophon .textwidget, .colophon p { font-family: var(--f-mono); font-size: .82rem; line-height: 1.6; color: var(--light-mute); }
.colophon ul { margin: 0; padding: 0; list-style: none; }
.colophon li { padding: .18rem 0; }
.colophon a { color: var(--light); font-family: var(--f-mono); font-size: .85rem; text-decoration: none; }
.colophon a:hover { color: var(--sig); text-decoration: underline; text-decoration-color: var(--chem); }
.colophon-base { padding: 1.1rem 0 1.4rem; border-top: 1px solid #1F2328; text-align: center; }
.colophon-base p { margin: 0; font-family: var(--f-mono); font-size: .8rem; color: var(--light-mute); }

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.6rem;
    padding: 1rem 1.6rem;
    color: var(--light);
    background: var(--foot);
    border-top: 3px solid var(--sig);
    box-shadow: 0 -8px 20px rgba(0, 0, 0, .4);
}
.cookie-text { margin: 0; max-width: 48rem; font-family: var(--f-mono); font-size: .82rem; line-height: 1.5; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
    .canister { grid-template-columns: minmax(0, 1fr) auto; }
    .canister-intro { grid-column: 1 / -1; }
    .canister-note { max-width: 40rem; }
}

@media (max-width: 960px) {
    .shell { width: 92%; }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: .55rem;
        padding: .45rem .8rem;
        font-family: var(--f-mono);
        font-size: .85rem;
        font-weight: 600;
        color: var(--light);
        background: transparent;
        border: 1.5px solid var(--line);
        cursor: pointer;
    }
    .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: var(--sig); }
    .nav-toggle-bars { 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; }
    .topnav { display: none; flex-basis: 100%; }
    .topnav.is-open { display: block; }
    .topnav-list { flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
    .topnav-list li { border-bottom: 1px dashed var(--line); }
    .topnav-list a { display: block; padding: .7rem 0; }
    .layout-with-sidebar { display: block; }
    .sidebar { margin-top: 1rem; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .colophon-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .picker-foot { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
    .ph-flag { display: none; }
    .ph-marks { height: 3.2rem; }
    .ph-list { display: block; }
    .canister { grid-template-columns: minmax(0, 1fr); }
    .pictos { grid-template-columns: repeat(5, 2.6rem); justify-content: center; }
    .canister-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "fig fig" "left right"; row-gap: 1.2rem; column-gap: .8rem; }
    .canister-figure { grid-area: fig; width: min(220px, 70%); justify-self: center; }
    .callouts-left { grid-area: left; align-items: stretch; padding-top: 0; gap: .6rem; }
    .callouts-right { grid-area: right; align-items: stretch; padding-top: 0; gap: .6rem; }
    .callout { width: 100%; text-align: left; }
    .callout::after { display: none; }
    .picker-head { display: none; }
    .picker-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "soil sdots" "type type" "mat mdots";
        row-gap: .35rem;
        padding: .7rem 0;
        border-bottom: 1px dashed var(--paper-edge);
    }
    .picker-row > :nth-child(1) { grid-area: soil; }
    .picker-row > :nth-child(2) { grid-area: sdots; }
    .picker-row > :nth-child(3) { grid-area: type; padding-left: .55rem; }
    .picker-row > :nth-child(4) { grid-area: mdots; }
    .picker-row > :nth-child(5) { grid-area: mat; }
    .dots { gap: .7rem; }
}

@media (max-width: 600px) {
    body { font-size: .97rem; }
    .paper { padding: 1.4rem 1.15rem; box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px rgba(201, 192, 172, .7), 0 10px 20px rgba(0, 0, 0, .45); }
    .phband { padding: 1.4rem 1.15rem; }
    .card-grid, .layout-with-sidebar .card-grid-list { grid-template-columns: minmax(0, 1fr); }
    .colophon-cols { grid-template-columns: minmax(0, 1fr); }
    .brand-name { font-size: 1.5rem; }
    .brand-mark { width: 48px; height: 48px; }
    .brand-desc { font-size: .72rem; }
    .neighbors { grid-template-columns: minmax(0, 1fr); }
    .neighbor-next { grid-column: auto; text-align: left; }
    .cookie-banner { flex-direction: column; align-items: flex-start; padding: 1rem 1.15rem; }
    .pictos { grid-template-columns: repeat(5, 2.4rem); }
    .pictos li { width: 2.4rem; height: 2.4rem; }
    .ref-motto { font-size: 1.35rem; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
}
