/*
Theme Name: dds_officialchopshoppod.com
Theme URI: https://officialchopshoppod.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: tkontur
*/

/* ---------- Шрифты (локальные) ---------- */
@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: "Roboto Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-condensed-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-condensed-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+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: "Roboto Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/roboto-condensed-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: "Roboto Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/roboto-condensed-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: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/jetbrains-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: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/jetbrains-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: "JetBrains Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/jetbrains-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: "JetBrains Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/jetbrains-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; }

/* ---------- Токены ---------- */
:root {
    --tk-graphite: #14161A;
    --tk-grid: #232830;
    --tk-bone: #D9D4C7;
    --tk-paper: #E8E4D8;
    --tk-paper-light: #F1EEE5;
    --tk-dark: #1B1E24;
    --tk-foot: #0E1013;
    --tk-foot-line: #2A2F38;
    --tk-ink: #16181C;
    --tk-muted: #6E6A5E;
    --tk-light: #EDEAE0;
    --tk-light-muted: #9A968A;
    --tk-yellow: #F2C230;
    --tk-teal: #3FA8A0;
    --tk-teal-deep: #1E6E68;
    --tk-red: #C4483C;
    --tk-line-dark: #3A4048;
    --tk-hazard-grey: #8D8B84;

    --tk-f-head: "Oswald", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
    --tk-f-body: "Roboto Condensed", "Arial Narrow", "Segoe UI", Arial, sans-serif;
    --tk-f-mono: "JetBrains Mono", "Consolas", "Courier New", monospace;

    --tk-pad: clamp(1.25rem, 3vw, 2.6rem);
}

/* ---------- Сброс и база ---------- */
*, *::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;
    color: var(--tk-light);
    font-family: var(--tk-f-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    background-color: var(--tk-graphite);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='640' viewBox='0 0 1200 640'%3E%3Cg fill='none' stroke='%232D333C' stroke-width='1.2'%3E%3Cpath d='M0 160 L60 150 L90 175 L120 120 L150 190 L180 140 L240 165 L300 158 L330 110 L360 205 L390 150 L480 162 L540 155 L570 130 L600 185 L630 160 L720 158 L780 150 L810 120 L840 200 L870 155 L960 160 L1020 152 L1050 135 L1080 180 L1110 158 L1200 160'/%3E%3Cpath d='M0 480 L80 476 L110 455 L140 505 L170 470 L260 478 L320 474 L350 440 L380 520 L410 470 L500 480 L590 476 L620 452 L650 506 L680 474 L760 480 L860 475 L890 445 L920 512 L950 472 L1040 479 L1120 476 L1150 458 L1180 498 L1200 480'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(var(--tk-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--tk-grid) 1px, transparent 1px);
    background-size: 1200px 640px, 15px 15px, 15px 15px;
    background-attachment: fixed, scroll, scroll;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--tk-f-head);
    font-weight: 700;
    line-height: 1.12;
    margin: 0 0 .6em;
    overflow-wrap: break-word;
    hyphens: manual;
}
p, li, dd, dt, td, th, blockquote, figcaption {
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphenate-limit-before: 4;
    -webkit-hyphenate-limit-after: 4;
    hyphenate-limit-chars: 10 4 4;
}
p { margin: 0 0 1em; }

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    text-decoration-color: var(--tk-yellow);
    transition: color .15s, text-decoration-color .15s;
}
a:hover { color: var(--tk-teal); text-decoration-color: var(--tk-teal); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
    outline: 3px solid var(--tk-teal);
    outline-offset: 2px;
}

table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid currentColor; padding: .55rem .75rem; text-align: left; vertical-align: top; }

.tk-vh {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.tk-skip {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--tk-yellow); color: var(--tk-ink);
    padding: .6rem 1rem; font-weight: 600; text-decoration: none;
    border: 2px solid var(--tk-ink);
}
.tk-skip:focus { top: 1rem; }

.tk-shell { width: min(94%, 1320px); margin-inline: auto; }

/* ---------- Кнопки-штампы ---------- */
.tk-stamp,
input[type="submit"].tk-stamp,
.comment-form .submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font-family: var(--tk-f-head);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.2;
    text-align: center;
    color: var(--tk-ink);
    background: var(--tk-paper);
    border: 3px solid var(--tk-ink);
    border-radius: 0;
    padding: .7rem 1.4rem;
    box-shadow: 5px 5px 0 var(--tk-yellow);
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s, box-shadow .12s, background-color .12s, color .12s;
}
.tk-stamp:hover,
.comment-form .submit:hover {
    color: var(--tk-ink);
    background: var(--tk-yellow);
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 var(--tk-ink);
}
.tk-stamp--small {
    font-size: .82rem;
    padding: .38rem .8rem;
    border-width: 2px;
    background: var(--tk-yellow);
    box-shadow: 3px 3px 0 var(--tk-ink);
}
.tk-stamp--small:hover {
    background: var(--tk-teal);
    color: var(--tk-ink);
    transform: translate(3px, 3px);
    box-shadow: 0 0 0 var(--tk-ink);
}

/* ---------- Предупреждающая полоса ---------- */
.tk-hazard {
    height: 12px;
    background: repeating-linear-gradient(-45deg, var(--tk-yellow) 0 12px, var(--tk-hazard-grey) 12px 24px);
}

/* ---------- Шапка ---------- */
.tk-top { background: var(--tk-graphite); border-bottom: 1px solid var(--tk-line-dark); }
.tk-top-row {
    display: flex;
    align-items: center;
    gap: 1.5rem 2rem;
    padding: 1.15rem 0;
    flex-wrap: wrap;
}
.tk-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 420px;
    min-width: 0;
    text-decoration: none;
    color: var(--tk-light);
}
.tk-brand:hover { color: var(--tk-light); }
.tk-brand:hover .tk-brand-name { color: var(--tk-yellow); }
.tk-brand-mark { flex: 0 0 64px; width: 64px; height: 64px; }
.tk-brand-svg, .tk-brand-logo { width: 64px; height: 64px; object-fit: contain; display: block; }
.tk-brand-text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; max-width: 52ch; }
.tk-brand-name {
    font-family: var(--tk-f-head);
    font-weight: 600;
    font-size: clamp(1rem, 1.45vw, 1.28rem);
    line-height: 1.2;
    letter-spacing: .01em;
    color: var(--tk-light);
    overflow-wrap: break-word;
    hyphens: manual;
    transition: color .15s;
}
.tk-brand-desc {
    font-size: .84rem;
    line-height: 1.4;
    color: var(--tk-light-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tk-nav { border-left: 1px solid var(--tk-line-dark); padding-left: 2rem; }
.tk-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.8rem; }
.tk-nav-list a {
    display: inline-block;
    font-family: var(--tk-f-head);
    font-weight: 600;
    font-size: .98rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--tk-light);
    text-decoration: none;
    padding: .35rem 0;
    border-bottom: 3px solid transparent;
}
.tk-nav-list a:hover { color: var(--tk-teal); }
.tk-nav-list .current-menu-item > a,
.tk-nav-list .current_page_item > a,
.tk-nav-list .current-menu-ancestor > a { color: var(--tk-yellow); border-bottom-color: var(--tk-yellow); }
.tk-nav-list .sub-menu { list-style: none; margin: 0; padding: 0; }

.tk-nav-toggle {
    display: none;
    align-items: center;
    gap: .6rem;
    margin-left: auto;
    background: transparent;
    color: var(--tk-light);
    border: 2px solid var(--tk-line-dark);
    padding: .5rem .8rem;
    font-family: var(--tk-f-head);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    cursor: pointer;
}
.tk-nav-toggle:hover { border-color: var(--tk-yellow); }
.tk-nav-toggle-bars, .tk-nav-toggle-bars::before, .tk-nav-toggle-bars::after {
    display: block; width: 20px; height: 2px; background: var(--tk-yellow); position: relative;
}
.tk-nav-toggle-bars::before, .tk-nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.tk-nav-toggle-bars::before { top: -6px; }
.tk-nav-toggle-bars::after { top: 6px; }

.tk-ruler { background: var(--tk-graphite); padding-bottom: .35rem; }
.tk-ruler-row {
    display: flex;
    justify-content: space-between;
    border-top: 3px solid var(--tk-yellow);
    font-family: var(--tk-f-mono);
    font-size: .72rem;
    color: var(--tk-light-muted);
    letter-spacing: .04em;
}
.tk-ruler-row span { position: relative; padding-top: .55rem; }
.tk-ruler-row span::before {
    content: "";
    position: absolute;
    top: -3px; left: 0;
    width: 2px; height: 10px;
    background: var(--tk-yellow);
}
.tk-ruler-row span:last-child::before { left: auto; right: 0; }

.tk-main { padding: 1.4rem 0 3rem; }

/* ---------- Панели главной ---------- */
.tk-panel {
    position: relative;
    padding: var(--tk-pad);
    margin-bottom: 1.1rem;
    border: 2px solid var(--tk-ink);
    min-width: 0;
}
.tk-panel--bone {
    color: var(--tk-ink);
    background-color: var(--tk-bone);
    background-image:
        linear-gradient(rgba(22, 24, 28, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 24, 28, .05) 1px, transparent 1px);
    background-size: 16px 16px;
}
.tk-panel--dark {
    color: var(--tk-light);
    background-color: var(--tk-dark);
    border-color: var(--tk-line-dark);
    background-image:
        linear-gradient(rgba(237, 234, 224, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(237, 234, 224, .025) 1px, transparent 1px);
    background-size: 16px 16px;
}
.tk-panel--bone a:hover { color: var(--tk-teal-deep); text-decoration-color: var(--tk-teal-deep); }
.tk-panel > .tk-hazard { margin: var(--tk-pad) calc(-1 * var(--tk-pad)) calc(-1 * var(--tk-pad)); }

.tk-sec-title {
    font-weight: 700;
    font-size: clamp(1.6rem, 3.2vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: .01em;
    line-height: 1.04;
    margin: 0 0 1.4rem;
}
.tk-sec-num { margin-right: .35em; }
.tk-panel--dark .tk-sec-num { color: var(--tk-yellow); }
.tk-sec-title--stack { font-size: clamp(1.9rem, 3vw, 3.2rem); }
.tk-sec-title--stack .tk-sec-num { display: block; font-size: .6em; margin: 0 0 .25em; }

/* Блок 1 — карта шумов */
.tk-map-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; align-items: center; }
.tk-lead-dark { color: #34363A; font-size: .98rem; max-width: 40ch; margin: 0; }
.tk-map { position: relative; margin: 0; min-width: 0; }
.tk-map-img { width: 100%; height: auto; aspect-ratio: 880 / 436; object-fit: cover; }
.tk-map-tags {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}
.tk-tag {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .5rem;
    font-family: var(--tk-f-mono);
    font-size: .8rem;
    line-height: 1.3;
}
.tk-tag-name { color: var(--tk-ink); }
.tk-tag-db {
    display: inline-block;
    background: var(--tk-ink);
    color: var(--tk-teal);
    border: 2px solid var(--tk-teal);
    font-weight: 600;
    padding: .1rem .4rem;
    white-space: nowrap;
}
.tk-map-cap { font-family: var(--tk-f-mono); font-size: .72rem; line-height: 1.45; color: var(--tk-muted); margin: .8rem 0 0; max-width: 30ch; }

.tk-map-scale { display: flex; align-items: center; gap: 1.6rem; }
.tk-db-scale { display: grid; grid-template-columns: auto auto; grid-template-rows: auto 1fr; column-gap: .55rem; height: 230px; flex: 0 0 auto; }
.tk-db-unit { grid-column: 1 / -1; font-family: var(--tk-f-mono); font-size: .8rem; margin-bottom: .35rem; }
.tk-db-bar {
    width: 14px;
    border: 2px solid var(--tk-ink);
    background: linear-gradient(to top, var(--tk-ink) 0 25%, var(--tk-teal) 25% 60%, var(--tk-yellow) 60% 100%);
}
.tk-db-ticks {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; justify-content: space-between;
    font-family: var(--tk-f-mono); font-size: .78rem; line-height: 1;
}
.tk-db-ticks li { position: relative; padding-left: .55rem; }
.tk-db-ticks li::before { content: ""; position: absolute; left: -.5rem; top: 50%; width: .7rem; height: 2px; background: var(--tk-ink); }
.tk-map-note {
    font-family: var(--tk-f-head);
    font-weight: 600;
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    line-height: 1.2;
    margin: 0;
    max-width: 12ch;
}

/* Блок 2 — слои панели */
.tk-layers-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; align-items: center; }
.tk-layers-motto {
    font-size: 1.15rem;
    display: inline-block;
    border-top: 1px solid var(--tk-line-dark);
    border-bottom: 2px solid var(--tk-teal);
    padding: .9rem 0 .45rem;
    margin: 0 0 1rem;
}
.tk-layers-text { color: var(--tk-light-muted); font-size: .95rem; max-width: 38ch; margin: 0; }
.tk-layers-figure { margin: 0; min-width: 0; }
.tk-layers-figure img { width: 100%; height: auto; aspect-ratio: 792 / 748; object-fit: cover; max-width: 520px; margin-inline: auto; }
.tk-layers-list { margin: 0; display: flex; flex-direction: column; gap: .2rem; }
.tk-layer {
    display: flex;
    align-items: baseline;
    gap: .8rem;
    padding: .7rem 0;
    border-bottom: 1px dashed var(--tk-line-dark);
}
.tk-layer dt { flex: 1 1 auto; min-width: 0; font-size: 1.02rem; position: relative; padding-left: 1.1rem; }
.tk-layer dt::before { content: ""; position: absolute; left: 0; top: .55em; width: .6rem; height: 2px; background: var(--tk-teal); }
.tk-layer dd { margin: 0; font-family: var(--tk-f-mono); font-size: .92rem; white-space: nowrap; color: var(--tk-yellow); }

/* Блок 3 — последние записи */
.tk-latest-more { margin: 2rem 0 .3rem; }

.tk-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 1.6rem;
}
.tk-cards--three { grid-template-columns: minmax(0, 1fr); }

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    color: var(--tk-ink);
    background: var(--tk-paper);
    border: 2px solid var(--tk-ink);
    transition: transform .12s, box-shadow .12s;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--tk-ink); }
.card-thumb { position: relative; border-bottom: 2px solid var(--tk-ink); overflow: hidden; background: var(--tk-bone); }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; transition: transform .3s; }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-num {
    position: absolute; top: 0; left: .9rem;
    background: var(--tk-yellow);
    color: var(--tk-ink);
    font-family: var(--tk-f-mono);
    font-weight: 600;
    font-size: .85rem;
    padding: .2rem .5rem;
    border: 2px solid var(--tk-ink);
    border-top: 0;
}
.card-pin {
    position: absolute; top: .55rem; right: .55rem;
    background: var(--tk-red); color: var(--tk-light);
    font-family: var(--tk-f-mono); font-size: .7rem;
    padding: .15rem .45rem; text-transform: uppercase; letter-spacing: .05em;
}
.card-body { flex: 1; display: flex; flex-direction: column; padding: 1.1rem 1.25rem 1.3rem; min-width: 0; }
.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: .025em;
    line-height: 1.25;
    margin: 0 0 .6rem;
}
.card-title a { text-decoration: none; color: var(--tk-ink); }
.card-title a:hover { color: var(--tk-teal-deep); }
.card-excerpt { font-size: .95rem; line-height: 1.55; color: #2C2E33; flex: 1; overflow-wrap: break-word; hyphens: auto; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-excerpt a { text-decoration-color: var(--tk-ink); }
.card-foot { display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; margin-top: .6rem; }
.tk-date { font-family: var(--tk-f-mono); font-size: .8rem; color: var(--tk-muted); letter-spacing: .02em; }

.tk-empty { font-size: 1.05rem; margin: 0; }

/* Блок 4 — матрица частот */
.tk-matrix-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; align-items: center; }
.tk-matrix-wrap { position: relative; overflow-x: auto; min-width: 0; -webkit-overflow-scrolling: touch; }
.tk-matrix { min-width: 560px; color: var(--tk-light); }
.tk-matrix-cap {
    caption-side: bottom;
    text-align: left;
    font-family: var(--tk-f-mono);
    font-size: .72rem;
    color: var(--tk-light-muted);
    padding-top: .8rem;
}
.tk-matrix th, .tk-matrix td {
    border: 0;
    border-bottom: 1px solid var(--tk-line-dark);
    padding: .65rem .6rem;
    vertical-align: middle;
}
.tk-matrix td, .tk-matrix thead th + th { border-left: 1px solid var(--tk-line-dark); text-align: center; }
.tk-matrix thead th { font-family: var(--tk-f-body); font-weight: 600; font-size: .95rem; border-bottom-width: 2px; white-space: nowrap; }
.tk-matrix tbody th { font-weight: 400; font-size: 1rem; white-space: nowrap; }
.tk-matrix td { height: 3.2rem; }
.tk-dot {
    --a: .5;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    width: calc(.45rem + var(--a) * 1.75rem);
    height: calc(.45rem + var(--a) * 1.75rem);
    border-radius: 50%;
    background: var(--tk-teal);
    background: color-mix(in srgb, var(--tk-yellow) calc(var(--a) * 100%), var(--tk-teal));
}
.tk-matrix-legend p { margin: 0; }
.tk-matrix-legend > p:first-child { font-family: var(--tk-f-head); font-weight: 600; font-size: 1.3rem; line-height: 1.25; max-width: 14ch; }
.tk-legend-dots { display: flex; align-items: center; gap: .8rem; margin: 1.1rem 0; }
.tk-legend-note { color: var(--tk-light-muted); font-size: .88rem; max-width: 30ch; }

/* Блок 5 — перед монтажом */
.tk-before-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; align-items: center; }
.tk-before-sec .tk-sec-title { font-size: clamp(1.35rem, 2.4vw, 1.9rem); margin-bottom: 1rem; }
.tk-before-quote {
    font-family: var(--tk-f-head);
    font-weight: 700;
    font-size: clamp(1.7rem, 3.6vw, 2.9rem);
    line-height: 1.1;
    margin: 0;
    color: var(--tk-light);
}
.tk-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.tk-checklist li { display: flex; align-items: center; gap: .75rem; font-size: 1.02rem; }
.tk-box { position: relative; flex: 0 0 20px; width: 20px; height: 20px; border: 2px solid var(--tk-light-muted); }
.tk-checklist .is-done .tk-box { border-color: var(--tk-yellow); background: rgba(242, 194, 48, .12); }
.tk-checklist .is-done .tk-box::after {
    content: "";
    position: absolute;
    left: 5px; top: 1px;
    width: 6px; height: 11px;
    border: solid var(--tk-yellow);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* ---------- Внутренние страницы ---------- */
.tk-crumbs {
    font-family: var(--tk-f-mono);
    font-size: .78rem;
    color: var(--tk-light-muted);
    margin: .4rem 0 1.4rem;
    overflow-wrap: break-word;
}
.tk-crumbs a { color: var(--tk-light); text-decoration-thickness: 1px; }
.tk-crumbs a:hover { color: var(--tk-teal); }
.tk-crumb-sep { color: var(--tk-yellow); margin: 0 .3rem; }

.layout-with-sidebar { display: block; }
.layout-single { display: block; }
.content-area { min-width: 0; }

.tk-page-head { margin: 0 0 1.8rem; padding-bottom: 1.2rem; border-bottom: 3px solid var(--tk-yellow); }
.tk-kicker { font-family: var(--tk-f-mono); font-size: .8rem; color: var(--tk-yellow); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .4rem; }
.tk-page-title { font-size: clamp(2rem, 4.4vw, 3.2rem); text-transform: uppercase; color: var(--tk-light); margin: 0 0 .5rem; }
.tk-page-intro { color: var(--tk-light-muted); max-width: 62ch; margin: 0; }
.tk-page-intro p:last-child { margin-bottom: 0; }

.tk-sheet {
    color: var(--tk-ink);
    background: var(--tk-paper);
    border: 2px solid var(--tk-ink);
    box-shadow: 8px 8px 0 var(--tk-foot);
    padding: clamp(1.3rem, 4vw, 2.8rem);
    margin-bottom: 1.8rem;
    min-width: 0;
}
.tk-sheet a { text-decoration-color: var(--tk-ink); }
.tk-sheet a:hover { color: var(--tk-teal-deep); text-decoration-color: var(--tk-teal-deep); }

.tk-entry-head { margin-bottom: 1.5rem; }
.tk-entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin-bottom: .9rem; }
.tk-entry-cats { display: flex; flex-wrap: wrap; gap: .4rem; }
.tk-entry-cats a {
    font-family: var(--tk-f-mono);
    font-size: .74rem;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--tk-ink);
    padding: .1rem .45rem;
}
.tk-entry-cats a:hover { background: var(--tk-ink); color: var(--tk-yellow); }
.tk-entry-title { font-size: clamp(1.8rem, 3.6vw, 2.7rem); text-transform: uppercase; color: var(--tk-ink); margin: 0; }
.tk-entry-thumb { margin: 0 0 1.8rem; border: 2px solid var(--tk-ink); }
.tk-entry-thumb img { width: 100%; height: auto; display: block; }

.tk-entry-content { font-size: 1.07rem; line-height: 1.7; overflow-wrap: break-word; hyphens: auto; }
.tk-entry-content > *:last-child { margin-bottom: 0; }
.tk-entry-content h2 {
    font-size: clamp(1.4rem, 2.6vw, 1.85rem);
    text-transform: uppercase;
    margin: 1.9em 0 .7em;
    padding-left: 1rem;
    border-left: 6px solid var(--tk-yellow);
}
.tk-entry-content h3 { font-size: 1.32rem; font-weight: 600; margin: 1.6em 0 .6em; }
.tk-entry-content h4 { font-size: 1.12rem; font-weight: 600; margin: 1.4em 0 .5em; }
.tk-entry-content ul, .tk-entry-content ol { margin: 0 0 1.2em; padding-left: 1.4rem; }
.tk-entry-content li { margin-bottom: .4em; }
.tk-entry-content ul li::marker { content: "■  "; color: var(--tk-teal-deep); font-size: .8em; }
.tk-entry-content ol li::marker { font-family: var(--tk-f-mono); font-weight: 600; }
.tk-entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.3rem 1.6rem;
    background: var(--tk-dark);
    color: var(--tk-light);
    border-left: 6px solid var(--tk-yellow);
    font-family: var(--tk-f-head);
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.35;
}
.tk-entry-content blockquote p:last-child { margin-bottom: 0; }
.tk-entry-content blockquote cite { display: block; margin-top: .6rem; font-family: var(--tk-f-mono); font-size: .78rem; font-style: normal; color: var(--tk-light-muted); }
.tk-entry-content blockquote a { color: var(--tk-light); text-decoration-color: var(--tk-yellow); }
.tk-entry-content table { margin: 1.4em 0; font-size: .95rem; border: 2px solid var(--tk-ink); }
.tk-entry-content th, .tk-entry-content td { border: 1px solid var(--tk-ink); }
.tk-entry-content th { background: var(--tk-ink); color: var(--tk-light); font-weight: 600; }
.tk-entry-content tbody tr:nth-child(even) td { background: rgba(22, 24, 28, .04); }
.tk-entry-content figure { margin: 1.6em 0; }
.tk-entry-content figcaption, .wp-caption-text { font-family: var(--tk-f-mono); font-size: .76rem; color: var(--tk-muted); margin-top: .5rem; }
.tk-entry-content code { font-family: var(--tk-f-mono); font-size: .88em; background: var(--tk-bone); padding: .1em .35em; }
.tk-entry-content pre { font-family: var(--tk-f-mono); font-size: .88rem; background: var(--tk-ink); color: var(--tk-light); padding: 1.1rem 1.3rem; overflow-x: auto; }
.tk-entry-content pre code { background: none; padding: 0; }
.tk-entry-content hr { border: 0; height: 10px; margin: 2em 0; background: repeating-linear-gradient(-45deg, var(--tk-yellow) 0 10px, var(--tk-hazard-grey) 10px 20px); }
.tk-entry-content img { height: auto; }
.alignleft { float: left; margin: .3rem 1.4rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.4rem; }
.aligncenter { margin-inline: auto; }

.tk-page-links { margin-top: 1.5rem; font-family: var(--tk-f-mono); display: flex; gap: .5rem; flex-wrap: wrap; }
.tk-entry-tags { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-top: 2rem; padding-top: 1.1rem; border-top: 2px solid var(--tk-ink); font-family: var(--tk-f-mono); font-size: .82rem; }

.tk-post-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 0 0 1.8rem; }
.tk-post-nav-link {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: 1rem 1.2rem;
    background: var(--tk-dark);
    border: 2px solid var(--tk-line-dark);
    color: var(--tk-light);
    text-decoration: none;
    font-family: var(--tk-f-head);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.25;
}
.tk-post-nav-link span { font-family: var(--tk-f-mono); font-weight: 400; font-size: .74rem; color: var(--tk-yellow); text-transform: uppercase; letter-spacing: .05em; }
.tk-post-nav-link:hover { border-color: var(--tk-teal); color: var(--tk-teal); }
.tk-post-nav-link--next { text-align: right; align-items: flex-end; }

/* Комментарии */
.tk-comments-title, .comment-reply-title { font-size: 1.5rem; text-transform: uppercase; margin: 0 0 1.2rem; }
.comment-reply-title small { font-family: var(--tk-f-mono); font-size: .75rem; margin-left: .6rem; text-transform: none; }
.tk-comment-list, .tk-comment-list .children { list-style: none; margin: 0; padding: 0; }
.tk-comment-list .children { margin-left: clamp(.8rem, 4vw, 2.2rem); }
.tk-comment-body { border-left: 3px solid var(--tk-yellow); padding: .2rem 0 .2rem 1rem; margin-bottom: 1.4rem; }
.tk-comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-bottom: .5rem; }
.tk-comment-head img { width: 44px; height: 44px; border: 2px solid var(--tk-ink); }
.tk-comment-author { font-family: var(--tk-f-head); font-weight: 600; font-size: 1.05rem; }
.tk-comment-moderation { font-family: var(--tk-f-mono); font-size: .8rem; color: var(--tk-red); }
.tk-comment-text p { margin-bottom: .6em; }
.tk-comment-reply a { font-family: var(--tk-f-mono); font-size: .8rem; text-transform: uppercase; }
.comment-respond { margin-top: 1.4rem; }
.comment-form p { margin: 0 0 1rem; }
.comment-form label { display: block; font-family: var(--tk-f-head); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; margin-bottom: .35rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    font: inherit;
    color: var(--tk-ink);
    background: var(--tk-paper-light);
    border: 2px solid var(--tk-ink);
    border-radius: 0;
    padding: .65rem .8rem;
}
.comment-form .comment-form-cookies-consent { display: flex; gap: .55rem; align-items: flex-start; }
.comment-form .comment-form-cookies-consent label { font-family: var(--tk-f-body); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .9rem; margin: 0; }
.comment-form .comment-form-cookies-consent input { margin-top: .3rem; accent-color: var(--tk-ink); }
.tk-form-note { font-size: .9rem; color: var(--tk-muted); }
.comment-navigation .nav-links, .comments-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 1.4rem; font-family: var(--tk-f-mono); font-size: .82rem; }

/* Поиск */
.tk-search { display: flex; gap: .7rem; align-items: stretch; flex-wrap: wrap; margin: 1.2rem 0; }
.tk-search-field {
    flex: 1 1 200px;
    min-width: 0;
    font: inherit;
    color: var(--tk-ink);
    background: var(--tk-paper-light);
    border: 2px solid var(--tk-ink);
    border-radius: 0;
    padding: .55rem .8rem;
}
.tk-empty-box { padding: 1.6rem; background: var(--tk-dark); border: 2px solid var(--tk-line-dark); }
.tk-empty-box .tk-search-field { background: var(--tk-graphite); color: var(--tk-light); border-color: var(--tk-line-dark); }

/* 404 */
.tk-404 { text-align: left; max-width: 820px; margin-inline: auto; }
.tk-404-code {
    font-family: var(--tk-f-head);
    font-weight: 700;
    font-size: clamp(5rem, 16vw, 9.5rem);
    line-height: .9;
    margin: 0 0 .8rem;
    color: transparent;
    -webkit-text-stroke: 3px var(--tk-ink);
    letter-spacing: .02em;
}
.tk-404 .tk-entry-title { margin-bottom: 1rem; }
.tk-404-home { margin: 1.6rem 0 0; }

/* Пагинация (type => plain) */
.tk-pager { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 2.2rem 0 .5rem; }
.tk-pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    height: 2.7rem;
    padding: 0 .85rem;
    font-family: var(--tk-f-head);
    font-weight: 600;
    font-size: .98rem;
    letter-spacing: .03em;
    color: var(--tk-light);
    background: var(--tk-dark);
    border: 2px solid var(--tk-line-dark);
    text-decoration: none;
}
.tk-pager a.page-numbers:hover { border-color: var(--tk-teal); color: var(--tk-teal); }
.tk-pager .page-numbers.current { background: var(--tk-yellow); border-color: var(--tk-yellow); color: var(--tk-ink); }
.tk-pager .page-numbers.dots { background: none; border-color: transparent; min-width: auto; padding: 0 .3rem; }

/* ---------- Сайдбар ---------- */
.sidebar {
    color: var(--tk-light);
    background: var(--tk-dark);
    border: 2px solid var(--tk-line-dark);
    padding: 1.5rem 1.4rem;
    min-width: 0;
    margin-top: 1.8rem;
}
.sidebar .tk-widget + .tk-widget { margin-top: 1.8rem; padding-top: 1.5rem; border-top: 1px dashed var(--tk-line-dark); }
.sidebar .tk-widget-title, .tk-foot .tk-widget-title {
    font-weight: 600;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--tk-light);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: .55rem;
}
.sidebar .tk-widget-title::before { content: ""; width: 10px; height: 10px; background: var(--tk-yellow); flex: 0 0 10px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .55rem 0; border-bottom: 1px solid var(--tk-line-dark); line-height: 1.35; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--tk-light); text-decoration: none; }
.sidebar a:hover { color: var(--tk-teal); text-decoration: underline; text-decoration-color: var(--tk-teal); }
.sidebar .post-date, .sidebar .rss-date { display: block; font-family: var(--tk-f-mono); font-size: .74rem; color: var(--tk-light-muted); margin-top: .2rem; }
.sidebar p, .sidebar .textwidget { color: var(--tk-light-muted); }
.sidebar .tk-search-field { background: var(--tk-graphite); color: var(--tk-light); border-color: var(--tk-line-dark); }
.sidebar select { width: 100%; padding: .5rem; background: var(--tk-graphite); color: var(--tk-light); border: 2px solid var(--tk-line-dark); }

/* ---------- Подвал ---------- */
.tk-foot { background: var(--tk-foot); color: var(--tk-light-muted); }
.tk-foot-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 2.4rem 0 1.4rem; }
.tk-foot-col { min-width: 0; padding: 1rem 0; }
.tk-foot-col + .tk-foot-col { border-top: 1px solid var(--tk-foot-line); }
.tk-foot .tk-widget + .tk-widget { margin-top: 1.4rem; }
.tk-foot .tk-widget-title { color: var(--tk-light); }
.tk-foot p, .tk-foot .textwidget { color: var(--tk-light-muted); font-size: .95rem; line-height: 1.55; }
.tk-foot ul { list-style: none; margin: 0; padding: 0; }
.tk-foot li { margin: 0 0 .45rem; }
.tk-foot a { color: var(--tk-teal); text-decoration-color: var(--tk-teal); text-decoration-thickness: 1px; }
.tk-foot a:hover { color: var(--tk-yellow); text-decoration-color: var(--tk-yellow); }
.tk-foot .post-date { display: block; font-family: var(--tk-f-mono); font-size: .74rem; color: var(--tk-light-muted); }
.tk-foot-base { border-top: 1px solid var(--tk-foot-line); padding: 1.1rem 0 1.3rem; }
.tk-copy { font-family: var(--tk-f-mono); font-size: .78rem; color: var(--tk-light-muted); margin: 0; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: var(--tk-dark);
    color: var(--tk-light);
    border-top: 3px solid var(--tk-yellow);
    box-shadow: 0 -6px 0 rgba(14, 16, 19, .6);
    padding: 1rem 0;
}
.cookie-banner-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.6rem; flex-wrap: wrap; padding-inline: .2rem; }
.cookie-banner-text { margin: 0; font-size: .92rem; line-height: 1.45; flex: 1 1 320px; min-width: 0; }
.cookie-banner-btn { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .tk-nav-toggle { display: inline-flex; }
    .tk-brand { flex: 1 1 0; }
    .tk-nav { display: none; flex: 1 1 100%; border-left: 0; padding-left: 0; border-top: 1px solid var(--tk-line-dark); }
    .tk-nav.is-open { display: block; }
    .tk-nav-list { flex-direction: column; gap: 0; }
    .tk-nav-list li { border-bottom: 1px solid var(--tk-line-dark); }
    .tk-nav-list a { display: block; padding: .8rem 0; border-bottom: 0; }
    .tk-nav-list .current-menu-item > a, .tk-nav-list .current_page_item > a { border-left: 4px solid var(--tk-yellow); padding-left: .7rem; }
    .tk-ruler-row span:nth-child(4) { display: none; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .tk-brand-mark, .tk-brand-svg, .tk-brand-logo { width: 48px; height: 48px; flex-basis: 48px; }
    .tk-brand-desc { display: none; }
    .tk-brand-name { font-size: .92rem; }
    .tk-matrix { min-width: 470px; }
    .tk-matrix th, .tk-matrix td { padding: .5rem .35rem; }
    .tk-matrix thead th { font-size: .82rem; }
    .tk-ruler-row span:nth-child(5) { display: none; }
    .tk-map-tags { grid-template-columns: minmax(0, 1fr); }
    .tk-map-scale { gap: 1.1rem; }
    .tk-db-scale { height: 180px; }
    .tk-panel { padding: var(--tk-pad); }
    .tk-sheet { box-shadow: 4px 4px 0 var(--tk-foot); }
    .tk-stamp { padding: .6rem 1.1rem; }
    .alignleft, .alignright { float: none; margin: 1rem 0; }
}

@media (min-width: 601px) {
    .tk-cards--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tk-post-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tk-post-nav-link--next { grid-column: 2; }
}

@media (min-width: 961px) {
    .tk-front { width: min(85%, 1320px); }
    .tk-cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .tk-map-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
    .tk-map-scale { grid-column: 1 / -1; justify-content: flex-start; }
    .tk-map { padding: 3.2rem 0 3.5rem; }
    .tk-map-tags { margin: 0; display: block; }
    .tk-tag { position: absolute; max-width: 48%; }
    .tk-tag::after { content: ""; position: absolute; background: var(--tk-yellow); }
    .tk-tag--wall { top: .2rem; left: 2%; }
    .tk-tag--window { top: .2rem; right: 2%; justify-content: flex-end; text-align: right; }
    .tk-tag--door { bottom: .3rem; left: 2%; }
    .tk-tag--floor { bottom: .3rem; left: 52%; }
    .tk-tag--wall::after, .tk-tag--window::after { width: 2px; height: 1.1rem; top: 100%; }
    .tk-tag--wall::after { left: 1.2rem; }
    .tk-tag--window::after { right: 1.2rem; }
    .tk-tag--door::after, .tk-tag--floor::after { width: 2px; height: 1.15rem; bottom: 100%; }
    .tk-tag--door::after { left: 1.2rem; }
    .tk-tag--floor::after { left: 1.2rem; }

    .tk-layers-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); }
    .tk-matrix-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
    .tk-matrix-legend { border-left: 1px solid var(--tk-line-dark); padding-left: 1.6rem; }
    .tk-before-grid { grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr); }
    .tk-checklist { border-left: 1px solid var(--tk-line-dark); padding-left: 1.6rem; }

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

    .tk-foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tk-foot-col { padding: .4rem 2rem; }
    .tk-foot-col:first-child { padding-left: 0; }
    .tk-foot-col + .tk-foot-col { border-top: 0; border-left: 1px solid var(--tk-foot-line); }
}

@media (min-width: 1180px) {
    .tk-map-grid { grid-template-columns: minmax(0, .95fr) minmax(0, 2.1fr) minmax(0, .65fr); }
    .tk-map-scale { grid-column: auto; flex-direction: column; align-items: flex-start; border-left: 1px solid rgba(22, 24, 28, .25); padding-left: 1.4rem; }
}
