/*
Theme Name: dds_d812.ru
Theme URI: https://d812.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: thermo812
*/

:root {
    --soot: #1E1512;
    --soot-2: #241A16;
    --foot: #120C0A;
    --linen: #F0E6D2;
    --linen-2: #E6D8BD;
    --steam: #C9BFAE;
    --warm-light: #EFE3CE;
    --ink: #2A211C;
    --muted: #8C7A66;
    --muted-dark: #6E5C49;
    --amber: #E08A2B;
    --amber-deep: #8A4A12;
    --birch: #4E6B4A;
    --vapor: #9FB3B8;
    --warn: #8E3B2F;
    --serif: "PT Serif", Georgia, "Times New Roman", serif;
    --sans: "PT Sans Narrow", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
    --hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
    --img: url("images/wood-tile.jpg");
}

/* ---------- [hidden] — до основных блоков ---------- */
.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;
    background-color: var(--soot);
    background-image:
        repeating-linear-gradient(90deg, transparent 0 180px, rgba(10, 6, 4, .35) 180px 183px, transparent 183px 420px),
        url("images/wood-tile.jpg");
    color: var(--warm-light);
    font-family: var(--sans);
    font-size: 1.125rem;
    line-height: 1.55;
    overflow-wrap: break-word;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 .6em;
    hyphens: auto;
    overflow-wrap: break-word;
}
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .2s, text-decoration-color .2s; }
a:hover { color: var(--amber); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px dashed var(--amber); outline-offset: 3px; }
table { border-collapse: collapse; width: 100%; }
p, li, dd, td, th, blockquote { hyphens: auto; overflow-wrap: break-word; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--amber); color: var(--soot); padding: .5rem 1rem; }

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

/* ---------- Кнопка-бирка ---------- */
.tag-btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    gap: .4em;
    padding: .62em 2.1em .62em 1.15em;
    background: var(--amber);
    color: var(--warm-light);
    border: 0;
    border-radius: 0;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%);
    transition: transform .15s, color .15s;
}
.tag-btn::before {
    content: "";
    position: absolute;
    inset: 2px;
    z-index: -1;
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(0, 0, 0, .25)), var(--img) center / 220px, var(--soot-2);
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%);
    transition: background .15s;
}
.tag-btn::after {
    content: "";
    position: absolute;
    right: 24px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
    border: 1.5px solid var(--amber);
}
.tag-btn:hover { color: var(--soot); transform: translateX(3px); }
.tag-btn:hover::before { background: var(--amber); }
.tag-btn:hover::after { border-color: var(--soot); }
.tag-btn-sm { font-size: .85rem; padding: .48em 1.9em .48em .9em; }

/* ---------- Шапка ---------- */
.topbar {
    position: relative;
    background-color: var(--soot);
    background-image: linear-gradient(180deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, .45)), url("images/wood-tile.jpg");
    border-bottom: 1px solid rgba(224, 138, 43, .25);
}
.topbar-in {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 0;
}
.topbar-rail {
    height: 12px;
    background:
        repeating-linear-gradient(90deg, transparent 0 140px, rgba(0, 0, 0, .55) 140px 142px),
        linear-gradient(180deg, #5a4030 0, #3b2a20 45%, #24180f 100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .45);
}
.brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    text-decoration: none;
    min-width: 0;
    flex: 1 1 260px;
}
.brand:hover { color: inherit; }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-svg, .brand-logo { display: block; width: 56px; height: 56px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--serif);
    font-size: 1.08rem;
    line-height: 1.2;
    color: var(--warm-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-desc {
    margin-top: .3rem;
    font-size: .86rem;
    line-height: 1.35;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: transparent;
    color: var(--warm-light);
    border: 1px solid var(--vapor);
    padding: .5rem .9rem;
    font: 700 .9rem var(--sans);
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--amber);
    position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.site-nav { display: none; width: 100%; }
.site-nav.is-open { display: block; }
.nav-list { list-style: none; margin: 0; padding: .5rem 0 0; display: flex; flex-direction: column; gap: .2rem; }
.nav-list a {
    display: block;
    padding: .55rem 0;
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--warm-light);
    text-decoration: none;
    border-bottom: 1px dashed rgba(159, 179, 184, .3);
}
.nav-list a:hover,
.nav-list .current-menu-item > a { color: var(--amber); }

/* ---------- Секции главной ---------- */
.fs { position: relative; padding: 3rem 0; }
.fs-title {
    font-size: clamp(2.1rem, 5.4vw, 3.4rem);
    letter-spacing: -.01em;
    margin-bottom: 1.6rem;
}

/* Блок 1 — карта прогрева */
.fs-heatmap {
    background-color: var(--soot-2);
    background-image:
        radial-gradient(ellipse 50% 60% at 32% 55%, rgba(224, 138, 43, .14), transparent 70%),
        url("images/smoke-tile.jpg");
    color: var(--warm-light);
}
.fs-heatmap .fs-title { color: var(--warm-light); }
.hm-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.hm-stage { position: relative; min-width: 0; }
.hm-figure {
    display: block;
    width: 62%;
    margin-left: 19%;
    height: auto;
    aspect-ratio: 936 / 1428;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%), linear-gradient(180deg, transparent 0, #000 6%, #000 82%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%), linear-gradient(180deg, transparent 0, #000 6%, #000 82%, transparent 100%);
    mask-composite: intersect;
}
.hm-label { display: none; }
.hm-legend {
    list-style: none;
    margin: 0;
    padding: 1.2rem 1.3rem;
    border: 1px solid rgba(159, 179, 184, .35);
    background: rgba(18, 12, 10, .55);
    display: grid;
    gap: .5rem;
    font-size: 1rem;
}
.hm-legend b { color: var(--amber); font-weight: 700; }
.hm-notes { min-width: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.hand {
    font-family: var(--hand);
    font-size: 1.45rem;
    line-height: 1.25;
    color: var(--warm-light);
    margin: 0;
}
.hand-accent { color: var(--amber); }
.hm-notes .hand { padding-left: 1.4rem; position: relative; }
.hm-notes .hand::before {
    content: "↳";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--vapor);
    font-family: var(--sans);
}
.hm-bars { display: flex; gap: 1.6rem; align-items: stretch; padding: .5rem 0 .8rem; }
.hm-bars-h { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 1.9rem; padding-top: 1.1rem; min-width: 0; }
.hm-bar {
    position: relative;
    display: block;
    height: 14px;
    border-radius: 7px;
    background: rgba(224, 138, 43, .18);
}
.hm-bar::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--fill);
    border-radius: 7px;
    background: linear-gradient(90deg, #f4b23c, var(--amber));
    box-shadow: 0 0 14px rgba(244, 178, 60, .75), 0 0 2px #ffd27a;
}
.hm-bar em {
    position: absolute;
    left: 0;
    bottom: calc(100% + 3px);
    font-style: normal;
    font-size: .8rem;
    letter-spacing: .05em;
    color: var(--vapor);
}
.hm-bars-v { display: flex; gap: 1rem; align-items: flex-end; }
.hm-vbar {
    position: relative;
    display: block;
    width: 16px;
    height: 170px;
    border-radius: 8px;
    background: rgba(159, 179, 184, .15);
}
.hm-vbar::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
}
.hm-vbar-cold { height: 130px; }
.hm-vbar-cold::before { height: 100%; background: linear-gradient(180deg, #c9d29a 0 32%, var(--vapor) 32% 100%); box-shadow: 0 0 10px rgba(159, 179, 184, .5); }
.hm-vbar-heat::before { height: 100%; background: #7fa25a; box-shadow: 0 0 14px rgba(127, 162, 90, .7); }
.hm-vbar em {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: .35rem;
    font-style: normal;
    font-size: .78rem;
    color: var(--vapor);
}

/* Блок 2 — протоколы */
.fs-protocols {
    background-color: var(--linen);
    background-image:
        radial-gradient(circle at 96% 8%, rgba(150, 100, 50, .22) 0 34px, transparent 36px),
        radial-gradient(circle at 92% 14%, rgba(150, 100, 50, .12) 0 60px, transparent 62px),
        radial-gradient(circle at 4% 82%, rgba(150, 100, 50, .16) 0 40px, transparent 42px),
        url("images/linen-tile.jpg");
    color: var(--ink);
}
.fs-protocols .fs-title { color: var(--ink); }
.proto-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.proto-note { color: var(--muted-dark); font-size: 1.3rem; }
.proto {
    border: 1.5px solid var(--ink);
    background: rgba(240, 230, 210, .6);
}
.proto th, .proto td {
    border: 1.5px solid var(--birch);
    padding: 1rem 1.1rem;
    vertical-align: middle;
}
.proto th {
    font-family: var(--serif);
    font-weight: 400;
    text-align: left;
    font-size: clamp(1.25rem, 3vw, 2.2rem);
    width: 38%;
}
.proto th small {
    display: block;
    margin-top: .25rem;
    font-family: var(--sans);
    font-size: .95rem;
    color: var(--muted-dark);
}
.proto-ico { width: 27%; text-align: center; }
.proto-ico img { display: block; margin-inline: auto; max-height: 64px; width: auto; max-width: 100%; }
.proto-val {
    font-family: var(--serif);
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    text-align: center;
    color: var(--ink);
}

/* Блок «Свежие записи» */
.fs-latest {
    background-color: var(--steam);
    background-image:
        radial-gradient(ellipse 70% 50% at 20% 0%, rgba(255, 255, 255, .25), transparent 70%),
        radial-gradient(ellipse 60% 40% at 90% 100%, rgba(42, 33, 28, .12), transparent 70%);
    color: var(--ink);
}
.fs-latest .fs-title { color: var(--ink); }
.fs-more { margin: 2rem 0 0; }
.empty-note { font-size: 1.1rem; }

/* ---------- Карточки ---------- */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--linen);
    background-image:
        radial-gradient(circle at 100% 0, rgba(120, 70, 30, .28) 0 12px, transparent 40px),
        radial-gradient(circle at 98% 100%, rgba(120, 70, 30, .2), transparent 50px),
        url("images/linen-tile.jpg");
    color: var(--ink);
    border-left: 18px solid #3a2518;
    box-shadow: 0 3px 0 rgba(42, 33, 28, .35), 0 10px 18px rgba(18, 12, 10, .28);
    overflow: hidden;
    transition: transform .25s;
}
.card::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 10px;
    bottom: 10px;
    width: 6px;
    border-radius: 3px;
    background: linear-gradient(180deg, #ffc65a, var(--amber));
    box-shadow: 0 0 10px rgba(244, 178, 60, .9);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .9rem;
    padding: 1.3rem 1.3rem 1.4rem 1.2rem;
    min-width: 0;
}
.card-top { display: flex; flex-direction: column-reverse; gap: .2rem; }
.card-title { font-size: 1.5rem; line-height: 1.12; margin: 0; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--amber-deep); text-decoration: underline wavy var(--amber) 1px; }
.card-date { font-family: var(--hand); font-size: 1.15rem; color: var(--muted-dark); align-self: flex-end; }
.card-mid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; flex: 1; align-items: start; }
.card-photo {
    position: relative;
    display: block;
    padding: 7px 7px 18px;
    background: #fbf6ec;
    box-shadow: 0 2px 6px rgba(42, 33, 28, .35);
    transform: rotate(-2.5deg);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
    text-decoration: none;
}
.card-photo::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 26%;
    width: 46%;
    height: 18px;
    background: rgba(214, 196, 150, .75);
    transform: rotate(-4deg);
    z-index: 2;
}
.card-photo::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #d9c9a8 50%, transparent 50%);
}
.card-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    filter: sepia(.25) contrast(1.05);
}
.card-excerpt { font-size: 1rem; line-height: 1.45; color: var(--ink); min-width: 0; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more { align-self: flex-start; }
.card:hover { transform: translateY(-4px) rotate(0deg) !important; }

/* ---------- Блок 3 — пар и наука ---------- */
.fs-science {
    background-color: var(--soot-2);
    background-image:
        radial-gradient(ellipse 40% 70% at 70% 50%, rgba(159, 179, 184, .08), transparent 70%),
        url("images/smoke-tile.jpg");
    color: var(--warm-light);
}
.sci-scale { position: relative; padding-top: 2.4rem; }
.sci-scale img {
    display: block;
    width: 100%;
    height: auto;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
}
.sci-pt {
    position: absolute;
    top: 0;
    left: var(--x);
    transform: translateX(-50%);
    max-width: 5.5rem;
    text-align: center;
    font-family: var(--serif);
    font-size: .78rem;
    line-height: 1.1;
    color: var(--warm-light);
}
.sci-end {
    position: absolute;
    bottom: -1.5rem;
    font-size: .8rem;
    color: var(--vapor);
    letter-spacing: .05em;
}
.sci-end-min { left: 9%; }
.sci-end-max { right: 9%; }
.sci-data {
    list-style: none;
    counter-reset: sci;
    margin: 2.6rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}
.sci-data li {
    counter-increment: sci;
    position: relative;
    padding: .9rem 1rem .9rem 2.8rem;
    border-top: 1px dashed var(--amber);
    color: var(--vapor);
    font-size: 1rem;
    line-height: 1.45;
}
.sci-data li::before {
    content: counter(sci);
    position: absolute;
    left: 0;
    top: .9rem;
    width: 1.8rem;
    height: 1.8rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--amber);
    color: var(--soot);
    font-weight: 700;
    box-shadow: 0 0 10px rgba(224, 138, 43, .6);
}
.sci-data b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.25rem; color: var(--warm-light); margin-bottom: .2rem; }

/* ---------- Блок 4 — что нельзя ---------- */
.fs-forbid {
    background-color: var(--warn);
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 0, 0, .25), transparent 70%),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, .05) 0 2px, transparent 2px 7px);
    color: var(--warm-light);
}
.forbid-head { display: grid; gap: .4rem; margin-bottom: 1.8rem; }
.forbid-head .fs-title { margin-bottom: 0; color: var(--warm-light); }
.forbid-lead { max-width: 44rem; margin: 0; font-size: 1.05rem; }
.stamps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem 1.2rem;
}
.stamp { min-width: 0; text-align: center; }
.stamp:nth-child(odd) .stamp-fig { transform: rotate(-1.5deg); }
.stamp:nth-child(even) .stamp-fig { transform: rotate(1.2deg); }
.stamp-fig {
    position: relative;
    margin: 0 0 .9rem;
    container-type: inline-size;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
    transition: transform .2s;
}
.stamp-fig:hover { transform: rotate(0) scale(1.03); }
.stamp-fig img { display: block; width: 100%; height: auto; aspect-ratio: 519 / 546; object-fit: cover; }
.stamp-label {
    position: absolute;
    left: 5.5%;
    right: 5.5%;
    top: 68%;
    height: 26%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 .3rem;
    background: radial-gradient(ellipse at center, #ecd9b6 50%, #dcc398 85%, #c9a77a 100%);
    box-shadow: inset 0 0 6px rgba(90, 50, 20, .35);
    border-radius: 2px;
    color: #4a1a12;
    font-family: var(--serif);
    font-size: 1rem;
    font-size: 10cqi;
    line-height: 1.05;
    letter-spacing: .01em;
}
.stamp:nth-child(4) .stamp-label { font-size: 8.4cqi; }
.stamp p { margin: 0; font-size: .98rem; line-height: 1.4; color: var(--warm-light); }

/* ---------- Внутренние страницы ---------- */
.inner { padding: 2rem 0 3.5rem; }
.crumbs {
    font-size: .95rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
    padding: .55rem .9rem;
    border-left: 3px solid var(--amber);
    background: rgba(18, 12, 10, .45);
}
.crumbs a { color: var(--warm-light); }
.crumbs-sep { color: var(--amber); margin: 0 .2rem; }
.layout-single { display: block; }
.layout-single .content-area { width: 100%; margin-left: auto; margin-right: auto; }
.layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
.content-area { min-width: 0; }
.page-head { margin-bottom: 1.6rem; }
.page-title { font-size: clamp(2rem, 4.6vw, 3rem); color: inherit; }
.page-head .page-title { color: var(--warm-light); }
.archive-desc { color: var(--steam); }
.page-intro {
    background: rgba(240, 230, 210, .08);
    border-left: 3px solid var(--birch);
    padding: 1rem 1.2rem;
}
.cards-list { grid-template-columns: minmax(0, 1fr); }

.entry, .notes, .nf {
    background-color: var(--linen);
    background-image: url("images/linen-tile.jpg");
    color: var(--ink);
    border-left: 12px solid #3a2518;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .4);
    padding: 1.6rem 1.3rem 2rem;
}
.entry .page-title, .nf .page-title { color: var(--ink); }
.entry-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-family: var(--hand); font-size: 1.25rem; color: var(--muted-dark); }
.entry-cat a { color: var(--birch); }
.entry-photo { margin: 1.4rem 0; padding: 8px; background: #fbf6ec; box-shadow: 0 3px 10px rgba(42, 33, 28, .3); transform: rotate(-.6deg); }
.entry-photo img { display: block; width: 100%; height: auto; }
.entry-content { font-size: 1.15rem; line-height: 1.7; }
.entry-content a, .notes a, .nf a:not(.tag-btn) { color: var(--amber-deep); }
.entry-content h2 { font-size: 1.9rem; margin-top: 1.6em; }
.entry-content h3 { font-size: 1.5rem; margin-top: 1.4em; }
.entry-content h4 { font-size: 1.25rem; margin-top: 1.3em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.entry-content li { margin-bottom: .35em; }
.entry-content ul li::marker { color: var(--amber-deep); }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.1rem 1.4rem 1.1rem 1.6rem;
    border-left: 5px solid var(--amber);
    background: rgba(78, 107, 74, .1);
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.25rem;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { margin: 1.4em 0; font-size: 1rem; }
.entry-content table, .entry-content th, .entry-content td { border: 1px solid var(--birch); }
.entry-content th, .entry-content td { padding: .6rem .8rem; text-align: left; vertical-align: top; }
.entry-content th { background: rgba(78, 107, 74, .16); font-family: var(--serif); font-weight: 700; }
.entry-content img { display: block; height: auto; }
.entry-content figure { margin: 1.4em 0; }
.entry-content figcaption { font-family: var(--hand); font-size: 1.15rem; color: var(--muted-dark); }
.entry-content pre { overflow-x: auto; background: var(--soot-2); color: var(--warm-light); padding: 1rem 1.2rem; }
.entry-content hr { border: 0; border-top: 2px dashed var(--amber); margin: 2em 0; }
.entry-tags { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: 1.6rem 0 0; font-size: 1rem; }
.alignleft { float: left; margin: .3em 1.2em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.2em; }
.aligncenter { margin-inline: auto; }

.nf { text-align: left; }
.nf-code { font-family: var(--serif); font-size: clamp(4rem, 14vw, 8rem); line-height: 1; color: var(--warn); margin: 0 0 .3rem; }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2.4rem 0 0; align-items: center; }
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 .9rem;
    border: 1px solid var(--vapor);
    background: rgba(18, 12, 10, .5);
    color: var(--warm-light);
    text-decoration: none;
    font-weight: 700;
}
.pager a.page-numbers:hover { border-color: var(--amber); color: var(--amber); }
.pager .page-numbers.current { background: var(--amber); border-color: var(--amber); color: var(--soot); }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding: 0 .3rem; }

/* ---------- Сайдбар и виджеты ---------- */
.sidebar {
    min-width: 0;
    background-color: var(--soot-2);
    background-image: url("images/smoke-tile.jpg");
    color: var(--warm-light);
    border-top: 3px solid var(--amber);
    padding: 1.5rem 1.4rem;
    align-self: start;
}
.sidebar .wdg { margin-bottom: 1.8rem; }
.sidebar .wdg:last-child { margin-bottom: 0; }
.sidebar .wdg-title { font-size: 1.35rem; color: var(--amber); margin-bottom: .8rem; }
.sidebar, .sidebar p, .sidebar li { color: var(--warm-light); }
.sidebar a { color: var(--warm-light); text-decoration: none; }
.sidebar a:hover { color: var(--amber); text-decoration: underline wavy var(--amber) 1px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .5rem 0; border-bottom: 1px dashed rgba(159, 179, 184, .3); line-height: 1.35; }
.sidebar .post-date, .sidebar .rss-date { display: block; font-size: .85rem; color: var(--vapor); }
.sidebar .find-label { color: var(--warm-light); }

/* ---------- Подвал ---------- */
.foot {
    background-color: var(--foot);
    color: var(--warm-light);
    border-top: 4px solid #2c1f17;
    padding: 2.8rem 0 1.4rem;
}
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.foot-col { min-width: 0; }
.foot .wdg-title { font-size: 1.45rem; color: var(--warm-light); margin-bottom: .7rem; }
.foot .wdg, .foot p, .foot li { color: #d9cbb2; font-size: 1rem; }
.foot a { color: var(--warm-light); text-decoration: none; }
.foot a:hover { color: var(--amber); text-decoration: underline wavy var(--amber) 1px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { padding: .2rem 0; }
.foot .post-date { color: var(--muted); font-size: .85rem; display: block; }
.foot-bottom { margin-top: 2.2rem; padding-top: 1.1rem; border-top: 1px solid rgba(140, 122, 102, .3); }
.foot-copy { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Поиск и формы ---------- */
.find { margin: 1rem 0 1.4rem; }
.find-label { display: block; font-size: .9rem; margin-bottom: .35rem; color: inherit; }
.find-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.find-input, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    flex: 1 1 200px;
    min-width: 0;
    width: 100%;
    padding: .65rem .8rem;
    font: 1rem var(--sans);
    color: var(--ink);
    background: #fbf6ec;
    border: 1px solid var(--muted);
    border-radius: 0;
}
.find-row .find-input { width: auto; }
.find-btn { flex: 0 0 auto; }

/* ---------- Комментарии ---------- */
.notes { margin-top: 2rem; }
.notes-title, .comment-reply-title { font-size: 1.6rem; color: var(--ink); }
.notes-list, .notes-list .children { list-style: none; margin: 0; padding: 0; }
.notes-list .children { padding-left: 1.4rem; border-left: 2px dashed var(--birch); }
.note-body { padding: 1rem 0; border-bottom: 1px dashed var(--muted); }
.note-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; margin-bottom: .5rem; }
.note-head img { display: block; border-radius: 50%; }
.note-author { font-weight: 700; }
.note-date { font-family: var(--hand); font-size: 1.1rem; color: var(--muted-dark); }
.note-wait { color: var(--warn); font-style: italic; }
.note-reply a { font-size: .95rem; font-weight: 700; }
.form-hint { font-size: .95rem; color: var(--muted-dark); }
.comment-form p { margin: 0 0 1rem; }
.comment-form label { display: block; font-size: .95rem; margin-bottom: .3rem; }
.comment-form .comment-form-cookies-consent label { display: inline; }
.comment-form .submit {
    padding: .7rem 1.6rem;
    background: var(--soot-2);
    color: var(--warm-light);
    border: 2px solid var(--amber);
    font: 700 1rem var(--sans);
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
    padding-right: 2rem;
}
.comment-form .submit:hover { background: var(--amber); color: var(--soot); }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .9rem 1.4rem;
    padding: 1rem 1.3rem;
    background: rgba(18, 12, 10, .96);
    color: var(--warm-light);
    border: 1px solid var(--amber);
    border-left-width: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.cookie-text { margin: 0; font-size: .98rem; flex: 1 1 260px; min-width: 0; }

/* ---------- ≥600px ---------- */
@media (min-width: 600px) {
    .brand-svg, .brand-logo { width: 64px; height: 64px; }
    .brand-name { font-size: 1.25rem; }
    .fs { padding: 3.8rem 0; }
    .hm-figure { width: 46%; margin-left: 27%; }
    .hm-legend { display: none; }
    .hm-label {
        display: block;
        position: absolute;
        width: 27%;
        transform: translateY(-100%);
        padding-bottom: .25rem;
        border-bottom: 1px solid rgba(239, 227, 206, .75);
        font-family: var(--hand);
        font-size: clamp(1.1rem, 2.4vw, 1.75rem);
        line-height: 1.05;
        color: var(--warm-light);
        text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
    }
    .hm-label small { display: block; font-size: .78em; color: var(--vapor); }
    .hm-l { left: 0; padding-left: .2rem; }
    .hm-r { left: 73%; text-align: right; padding-right: .2rem; }
    .hm-l::after, .hm-r::after {
        content: "";
        position: absolute;
        bottom: -4px;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--amber);
        box-shadow: 0 0 8px var(--amber);
    }
    .hm-l::after { right: -4px; }
    .hm-r::after { left: -4px; }
    .proto-wrap { grid-template-columns: minmax(0, 1fr) 150px; align-items: start; }
    .proto-note-top { grid-column: 1 / -1; text-align: right; }
    .proto-note-side { transform: rotate(4deg); margin-top: 1rem; }
    .proto-note-bottom { grid-column: 1 / -1; transform: rotate(-2deg); padding-left: 20%; }
    .cards-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-mid.has-thumb { grid-template-columns: minmax(0, 42%) minmax(0, 1fr); }
    .sci-pt { font-size: clamp(.95rem, 2vw, 1.5rem); max-width: none; white-space: nowrap; }
    .sci-scale { padding-top: 3rem; }
    .sci-data { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stamps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .entry, .notes, .nf { padding: 2.2rem 2.4rem 2.6rem; }
    .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cookie-banner { left: 1.5rem; right: auto; max-width: 640px; }
}

/* ---------- ≥960px ---------- */
@media (min-width: 960px) {
    .shell-front { width: min(85%, 1180px); }
    .topbar-in { flex-wrap: nowrap; padding: 1.3rem 0; }
    .brand { flex: 1 1 auto; max-width: 600px; }
    .nav-toggle { display: none; }
    .site-nav { display: block; width: auto; flex: 0 0 auto; }
    .nav-list { flex-direction: row; gap: 1.4rem; padding: 0; }
    .nav-list a { border: 0; padding: .3rem 0; font-size: 1.08rem; border-bottom: 2px solid transparent; }
    .nav-list .current-menu-item > a { border-bottom-color: var(--amber); }
    .nav-list a:hover { border-bottom-color: var(--amber); }
    .fs { padding: 4.6rem 0; }
    .hm-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
    .proto-wrap { grid-template-columns: minmax(0, 1fr) 170px; }
    .proto th, .proto td { padding: 1.3rem 1.6rem; }
    .proto-ico img { max-height: 80px; }
    .cards-front { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
    .cards-front .card:nth-child(1) { transform: rotate(-1deg); }
    .cards-front .card:nth-child(2) { transform: rotate(.8deg); margin-top: 1.2rem; }
    .cards-front .card:nth-child(3) { transform: rotate(-.4deg); margin-top: .4rem; }
    .card-top { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: .8rem; }
    .card-date { align-self: flex-start; white-space: nowrap; }
    .sci-data { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stamps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .layout-single .content-area { width: 85%; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 67fr) minmax(0, 27fr); column-gap: 6%; }
    .layout-with-sidebar .cards-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
