/*
Theme Name: dds_elnoorpress.com
Theme URI: https://elnoorpress.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: elnoor
*/

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

/* ---------- Палитра ---------- */
:root {
    --desk: #101A24;
    --desk-cell: #1C2A38;
    --bar: #0B121A;
    --rule: #3E5A6E;
    --rule-dark: #2A3A48;
    --rail: #142130;
    --green: #12312B;
    --cream: #E8DFC8;
    --wine: #3A1420;
    --sand: #C9C3B2;
    --paper: #F2EEE3;
    --ink: #1A222B;
    --mute-d: #8FA3B0;
    --mute-l: #6B6455;
    --rust: #E4572E;
    --rust-deep: #B8401F;
    --teal: #7FD1C1;
    --slate: #5E7A8C;
    --tab-sage: #C8D9C3;
    --tab-cream: #ECE4CF;
    --tab-sand: #DCCFBB;
    --tab-sky: #BDD2D8;
    --tab-taupe: #C6B4A3;
    --f-head: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
    --f-body: "PT Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --f-mono: "IBM Plex Mono", "Consolas", "Courier New", monospace;
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--paper);
    background-color: var(--desk);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"),
        linear-gradient(var(--desk-cell) 1px, transparent 1px),
        linear-gradient(90deg, var(--desk-cell) 1px, transparent 1px);
    background-size: 180px 180px, 28px 28px, 28px 28px;
}
img, svg, video { max-width: 100%; }
img { height: auto; display: block; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 .6em;
    letter-spacing: .01em;
}
p, li, td, th, h1, h2, h3, h4, dd, dt, figcaption, blockquote {
    overflow-wrap: break-word;
    hyphens: auto;
}
a {
    color: inherit;
    text-decoration: underline dotted 1px;
    text-underline-offset: 3px;
    transition: color .2s, text-decoration-color .2s;
}
a:hover { color: var(--rust); text-decoration-style: solid; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
}
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute;
    left: 1rem; top: -4rem;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--rust);
    color: #fff;
    text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #fff; }

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

/* ---------- Кнопка-бланк ---------- */
.stamp-btn {
    display: inline-block;
    padding: .62em 1.35em .58em;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: .95rem;
    line-height: 1.2;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--paper);
    background: var(--desk);
    border: 1.5px solid var(--paper);
    border-radius: 0;
    box-shadow: 5px 5px 0 var(--rust);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.stamp-btn:hover {
    color: var(--paper);
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 var(--rust);
}
.stamp-btn--ghost {
    color: var(--rust);
    background: transparent;
    border: 1.5px solid var(--rust);
    box-shadow: 3px 3px 0 rgba(228, 87, 46, .32);
    font-size: .85rem;
    padding: .45em .9em .42em;
}
.stamp-btn--ghost:hover {
    color: var(--paper);
    background: var(--rust);
    box-shadow: 1px 1px 0 rgba(228, 87, 46, .32);
    transform: translate(2px, 2px);
}

/* ---------- Шапка ---------- */
.masthead {
    background: var(--bar);
    border-bottom: 1px solid var(--rule);
    position: relative;
    z-index: 20;
}
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    text-decoration: none;
    min-width: 0;
    flex: 1 1 auto;
}
.brand:hover { color: inherit; }
.brand-mark { flex: 0 0 auto; }
.brand-seal {
    width: 58px;
    height: 58px;
    display: block;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45));
    transition: transform .3s;
}
.brand:hover .brand-seal { transform: rotate(-8deg); }
.brand-logo { max-height: 64px; width: auto; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.2;
    color: var(--paper);
    max-width: 38ch;
}
.brand-desc {
    margin-top: .3rem;
    font-size: .78rem;
    line-height: 1.4;
    color: var(--mute-d);
    max-width: 62ch;
    display: none;
}
.nav-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .8rem;
    font-family: var(--f-head);
    font-size: .85rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--paper);
    background: transparent;
    border: 1.5px solid var(--rule);
    cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--paper);
    position: relative;
    content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.primary-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--bar);
    border-bottom: 2px solid var(--rust);
    padding: .5rem 4%;
}
.primary-nav.is-open { display: block; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list a {
    display: block;
    padding: .7rem 0;
    font-family: var(--f-body);
    font-size: 1.02rem;
    color: var(--paper);
    text-decoration: none;
    border-bottom: 1px solid var(--rule-dark);
}
.nav-list a:hover { color: var(--teal); }
.nav-list .current-menu-item > a,
.nav-list .current_page_item > a { color: var(--rust); }

/* ---------- Заголовки секций ---------- */
.ledger-title {
    display: inline-block;
    margin: 0 0 1.6rem;
    padding-bottom: .4rem;
    font-size: clamp(1.25rem, 3.2vw, 1.75rem);
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--ink);
    border-bottom: 4px double currentColor;
}
.ledger-title--light { color: var(--paper); }
.sheet--green .ledger-title { color: var(--paper); }
.sheet-lead {
    max-width: 62ch;
    margin: -.6rem 0 2rem;
    font-size: .95rem;
    color: #B9CCC2;
}
.sheet-lead--dark { color: var(--mute-l); }
.footnote {
    margin: 1rem 0 0;
    font-size: .8rem;
    line-height: 1.5;
    color: var(--mute-l);
}
.footnote--dark { color: #5D574A; }

/* ---------- Обложка досье ---------- */
.cover {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    background: linear-gradient(180deg, #0D1720 0%, #0F1C27 100%);
    border-bottom: 1px solid var(--rule);
    position: relative;
}
.cover-photo { position: relative; min-height: 220px; }
.cover-photo img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.cover-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(13, 23, 32, .85) 0%, transparent 45%);
}
.cover-text {
    padding: 2rem 4% 1.5rem;
    min-width: 0;
}
.cover-title {
    margin: 0 0 1rem;
    font-size: clamp(1.9rem, 8.4vw, 3.7rem);
    line-height: 1.04;
    text-transform: uppercase;
    color: var(--paper);
    letter-spacing: .005em;
    hyphens: manual;
    overflow-wrap: normal;
}
.cover-sub {
    margin: 0 0 1.6rem;
    font-size: 1.15rem;
    color: #D7D2C5;
}
.cover-chart {
    margin: 0;
    padding: 1.4rem 3.4rem 2rem 4%;
    position: relative;
    min-width: 0;
}
.cover-chart svg {
    display: block;
    width: 100%;
    height: 220px;
    border: 1px solid var(--rule-dark);
}
.cover-legend {
    display: flex;
    gap: 2rem;
    margin-bottom: .8rem;
    font-size: .95rem;
    color: #D7D2C5;
}
.legend-item { display: inline-flex; align-items: center; gap: .6rem; }
.legend-solid, .legend-dash { display: inline-block; width: 44px; height: 0; }
.legend-solid { border-top: 3px solid var(--teal); }
.legend-dash { border-top: 2px dashed var(--teal); }
.cover-bookmark {
    position: absolute;
    right: 1rem;
    top: 0;
    bottom: 1rem;
    width: 22px;
    background: var(--rust);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 12px), 0 100%);
}

/* ---------- Листы-секции ---------- */
.sheet {
    padding: 3rem 0 3.2rem;
    position: relative;
}
.sheet--green {
    background: var(--green);
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 28px 28px;
    color: var(--paper);
}
.sheet--cream {
    background: var(--cream);
    color: var(--ink);
    box-shadow: inset 0 6px 10px -6px rgba(0, 0, 0, .35);
}
.sheet--base { background: transparent; }
.sheet--wine {
    background: var(--wine);
    background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1.4px);
    background-size: 14px 14px;
    color: var(--paper);
}
.sheet--sand {
    background: var(--sand);
    color: var(--ink);
    background-image:
        linear-gradient(rgba(26, 34, 43, .05) 1px, transparent 1px);
    background-size: 100% 26px;
}

/* ---------- Блок 1: вкладки-папки ---------- */
.tabs-strip {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
    counter-reset: none;
}
.folder-tab {
    position: relative;
    min-width: 0;
    padding: 1.3rem 1.3rem 1.4rem;
    color: var(--ink);
    background: var(--tab-cream);
    box-shadow: 0 8px 14px -8px rgba(0, 0, 0, .55);
    margin-top: 16px;
    transition: transform .25s;
}
.folder-tab::before {
    content: "";
    position: absolute;
    left: 0;
    top: -15px;
    width: 46%;
    height: 16px;
    background: inherit;
    clip-path: polygon(0 100%, 6% 0, 88% 0, 100% 100%);
}
.folder-tab:hover { transform: translateY(-6px); }
.folder-tab--sage { background: var(--tab-sage); }
.folder-tab--cream { background: var(--tab-cream); }
.folder-tab--sand { background: var(--tab-sand); }
.folder-tab--sky { background: var(--tab-sky); }
.folder-tab--taupe { background: var(--tab-taupe); }
.folder-num {
    display: block;
    font-family: var(--f-head);
    font-size: 2.3rem;
    font-weight: 500;
    line-height: 1;
    color: #4B6272;
    margin-bottom: .5rem;
}
.folder-name {
    display: block;
    font-family: var(--f-head);
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.2;
    color: #22323E;
    margin-bottom: .45rem;
}
.folder-note {
    display: block;
    font-size: .92rem;
    line-height: 1.4;
    color: #5D6468;
}

/* ---------- Блок 2: калькулятор ---------- */
.calc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}
.calc-main { min-width: 0; }
.table-scroll { overflow-x: auto; }
.ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
    background: rgba(255, 255, 255, .28);
    border: 1px solid #9C9584;
}
.ledger-table caption {
    caption-side: bottom;
    text-align: left;
    padding-top: .6rem;
    font-size: .8rem;
    color: var(--mute-l);
}
.ledger-table th, .ledger-table td {
    padding: .7rem .9rem;
    border: 1px solid #B6AE9B;
    text-align: center;
    font-family: var(--f-mono);
    font-weight: 500;
    font-size: .88rem;
}
.ledger-table tbody th, .ledger-table tfoot th {
    text-align: left;
    font-family: var(--f-body);
    font-weight: 400;
    font-size: .95rem;
}
.ledger-table thead th {
    background: var(--slate);
    color: var(--paper);
    font-family: var(--f-head);
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .85rem;
    border-color: #4C6474;
}
.ledger-table thead th:first-child { text-align: left; }
.ledger-table tfoot th, .ledger-table tfoot td {
    background: #9FD9CE;
    font-weight: 500;
    border-color: #7FBDB1;
}
.ledger-table tbody tr:hover { background: rgba(127, 209, 193, .15); }

.calc-gauge {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 1rem;
    padding: 1.4rem 1.2rem 1.5rem;
    border: 1.5px solid #B6AE9B;
    background: rgba(255, 255, 255, .25);
    text-align: center;
}
.gauge-label {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--rust);
}
.gauge-ruler {
    position: relative;
    width: 80px;
    height: 180px;
    background:
        repeating-linear-gradient(180deg, #7D7564 0 1px, transparent 1px 9px) left top / 16px 100% no-repeat,
        repeating-linear-gradient(180deg, #7D7564 0 1.5px, transparent 1.5px 45px) left top / 28px 100% no-repeat;
    border-left: 2px solid #7D7564;
}
.gauge-arrow {
    position: absolute;
    left: 46px;
    top: 0;
    bottom: 0;
    width: 14px;
    background: linear-gradient(180deg, #D9CDB2 0 18%, var(--rust) 18% 100%);
    clip-path: polygon(25% 0, 75% 0, 75% 86%, 100% 86%, 50% 100%, 0 86%, 25% 86%);
}
.gauge-value {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    line-height: 1.1;
    color: var(--rust);
    white-space: nowrap;
}
.calc-photo {
    margin: 0;
    min-width: 0;
    box-shadow: -10px 12px 0 -4px rgba(26, 34, 43, .18);
}
.calc-photo img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* ---------- Карточки-вырезки ---------- */
.latest { padding-top: 3rem; }
.card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.2rem 1.8rem;
}
.card {
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    padding: 22px 1.1rem 1.2rem;
    color: var(--ink);
    background: var(--cream);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(0, 0, 0, .03));
    clip-path: polygon(0 14px, 1.5% 3px, 6% 0, 34% 0, 37% 14px, 97% 14px, 100% 22px, 100% 100%, 0 100%);
    transition: transform .25s;
}
.card:hover { transform: translateY(-5px); }
.card-thumb {
    position: relative;
    overflow: hidden;
    border: 1px solid #B6AE9B;
}
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 19 / 7;
    object-fit: cover;
    filter: saturate(.85);
    transition: transform .4s, filter .4s;
}
.card:hover .card-thumb img { transform: scale(1.04); filter: saturate(1); }
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-top: 1rem;
}
.card-pin {
    align-self: flex-start;
    margin-bottom: .5rem;
    padding: .1rem .5rem;
    font-family: var(--f-head);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--rust);
    border: 1.5px solid var(--rust);
    transform: rotate(-3deg);
}
.card-title {
    margin: 0 0 .55rem;
    font-family: var(--f-body);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.3;
}
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--rust-deep); }
.card-excerpt {
    flex: 1;
    font-size: .93rem;
    line-height: 1.5;
    color: var(--mute-l);
}
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-excerpt a { color: var(--rust-deep); }
.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: .9rem;
}
.card-date {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-family: var(--f-mono);
    font-size: .82rem;
    color: #4E4A40;
}
.card-date::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ink);
}
.latest-more { margin: 2.4rem 0 0; }
.empty-note { color: var(--mute-d); font-size: 1rem; }

/* ---------- Блок 3: штампы ---------- */
.stamp-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem 2.4rem;
}
.stamp {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    min-width: 0;
    padding: 1.1rem 1.4rem;
    border: 1.5px solid #9A4535;
    background: rgba(0, 0, 0, .14);
    box-shadow: inset 0 0 0 4px rgba(58, 20, 32, .9), inset 0 0 0 5px rgba(154, 69, 53, .45);
    transition: transform .2s, border-color .2s;
}
.stamp:hover { border-color: var(--rust); transform: rotate(0deg) translateY(-3px); }
.stamp p { margin: 0; font-size: .97rem; line-height: 1.45; color: #EDE3DA; }
.stamp-ico {
    flex: 0 0 38px;
    height: 34px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 34'%3E%3Cpath d='M19 1.5 37 32.5H1z' fill='%23E4572E'/%3E%3Cpath d='M19 11v11' stroke='%23F2EEE3' stroke-width='3.2' stroke-linecap='round'/%3E%3Ccircle cx='19' cy='27' r='2' fill='%23F2EEE3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.stamp--outline .stamp-ico {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 34'%3E%3Cpath d='M19 2.5 36 32H2z' fill='none' stroke='%23E4572E' stroke-width='2.2' stroke-linejoin='round'/%3E%3Cpath d='M19 12v10' stroke='%23E4572E' stroke-width='2.6' stroke-linecap='round'/%3E%3Ccircle cx='19' cy='27' r='1.8' fill='%23E4572E'/%3E%3C/svg%3E");
}
.stamp--tilt-r { transform: rotate(-2.2deg); border-color: #B2503C; }
.stamp--tilt-l { transform: rotate(1.6deg); border-color: #B2503C; }

/* ---------- Блок 4: атлас ---------- */
.atlas {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
    align-items: start;
}
.atlas-chart {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    min-width: 0;
}
.atlas-axis {
    position: relative;
    height: 220px;
    font-family: var(--f-mono);
    font-size: .72rem;
    color: #4E4A40;
}
.atlas-axis span {
    position: absolute;
    right: .5rem;
    bottom: var(--y);
    transform: translateY(50%);
    line-height: 1;
}
.atlas-plot {
    display: flex;
    gap: 2.5%;
    min-width: 0;
    position: relative;
    border-left: 1.5px solid #4E4A40;
}
.atlas-group {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.atlas-bars {
    height: 220px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding: 0 3px;
    border-bottom: 1.5px solid #4E4A40;
    background: repeating-linear-gradient(to top, transparent 0 calc(31.25% - 1px), rgba(26, 34, 43, .18) calc(31.25% - 1px) 31.25%);
}
.atlas-bar {
    flex: 1;
    height: var(--h);
    min-height: 2px;
    position: relative;
    transition: filter .2s, transform .2s;
    transform-origin: bottom;
}
.atlas-bar:hover { filter: brightness(1.15); transform: scaleY(1.03); }
.atlas-bar--t0 { background: #9ED3CB; }
.atlas-bar--t1 { background: #8EA4B2; }
.atlas-bar--t2 { background: #2F4555; }
.atlas-bar--t3 { background: #6F8796; }
.atlas-bar--hot { background: var(--rust); }
.atlas-tag {
    display: block;
    padding-top: .5rem;
    text-align: center;
    font-size: .82rem;
    color: #3E3A31;
    white-space: nowrap;
}
.atlas-tag-word { display: none; }
.atlas-note {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: 1.2rem 1.4rem;
    text-align: center;
    border: 1.5px solid #8C8574;
    background: rgba(255, 255, 255, .22);
    box-shadow: 5px 5px 0 rgba(26, 34, 43, .12);
}
.atlas-note-cap { font-size: .82rem; line-height: 1.35; color: var(--mute-l); }
.atlas-note-num {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 2.8rem;
    line-height: 1;
    color: var(--rust);
}
.atlas-legend {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.6rem;
    margin: 1.4rem 0 0;
    padding: 0;
    font-size: .85rem;
    color: #3E3A31;
}
.atlas-legend li { display: inline-flex; align-items: center; gap: .5rem; }
.atlas-swatch { display: inline-block; width: 14px; height: 14px; }

/* ---------- Внутренние страницы ---------- */
.inner-page { padding: 1.6rem 0 3.5rem; }
.crumbs {
    margin-bottom: 1.6rem;
    font-size: .86rem;
    color: var(--mute-d);
}
.crumbs a { color: var(--paper); }
.crumbs a:hover { color: var(--teal); }
.crumbs-sep { margin: 0 .35rem; color: var(--rust); }
.layout-single { display: block; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
}
.content-area { min-width: 0; }
.page-head { margin-bottom: 2rem; }
.page-title {
    display: inline-block;
    margin: 0 0 .6rem;
    padding-bottom: .4rem;
    font-size: clamp(1.7rem, 4.5vw, 2.6rem);
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--paper);
    border-bottom: 4px double var(--rule);
}
.page-intro { color: #D3CEC1; max-width: 70ch; }
.card-grid--two { grid-template-columns: minmax(0, 1fr); }

.doc-sheet {
    position: relative;
    padding: 2rem 1.4rem 2.2rem;
    color: var(--ink);
    background: var(--paper);
    border-top: 6px solid var(--rust);
    box-shadow: 8px 8px 0 rgba(0, 0, 0, .35);
}
.doc-head { margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 3px double #C5BDA9; }
.doc-title {
    margin: 0 0 .7rem;
    font-size: clamp(1.7rem, 4.2vw, 2.5rem);
    line-height: 1.15;
    color: var(--ink);
}
.doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.2rem;
    align-items: center;
    font-family: var(--f-mono);
    font-size: .85rem;
    color: var(--mute-l);
}
.doc-cat {
    padding: .1rem .55rem;
    font-family: var(--f-head);
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--rust-deep);
    border: 1.5px solid currentColor;
}
.doc-cover { margin: 0 0 1.6rem; }
.doc-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.doc-tags { margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem .9rem; font-size: .9rem; }
.doc-tags a { color: var(--slate); }

/* ---------- Текст записи ---------- */
.entry-content { font-size: 1.04rem; line-height: 1.7; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.8em 0 .6em; color: var(--ink); }
.entry-content h2 { font-size: 1.6rem; padding-bottom: .3rem; border-bottom: 1px solid #C5BDA9; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content h4 { font-size: 1.1rem; }
.entry-content a { color: var(--rust-deep); }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry-content li { margin-bottom: .4em; }
.entry-content ul li::marker { color: var(--rust); }
.entry-content ol li::marker { color: var(--rust-deep); font-family: var(--f-mono); }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.1rem 1.4rem;
    background: var(--cream);
    border-left: 5px solid var(--rust);
    font-style: italic;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table {
    width: 100%;
    margin: 1.4em 0;
    border-collapse: collapse;
    font-size: .95rem;
    border: 1px solid #A39B87;
}
.entry-content th, .entry-content td { padding: .6rem .8rem; border: 1px solid #A39B87; text-align: left; }
.entry-content th { background: var(--slate); color: var(--paper); font-family: var(--f-head); font-weight: 500; letter-spacing: .05em; }
.entry-content tr:nth-child(even) td { background: rgba(232, 223, 200, .5); }
.entry-content img { max-width: 100%; height: auto; }
.entry-content figure { margin: 1.4em 0; }
.entry-content figcaption { font-size: .85rem; color: var(--mute-l); margin-top: .4rem; }
.entry-content code, .entry-content pre { font-family: var(--f-mono); font-size: .9em; background: #E3DCCB; }
.entry-content code { padding: .1em .35em; }
.entry-content pre { padding: 1rem; overflow-x: auto; }
.entry-content hr { border: 0; border-top: 3px double #C5BDA9; margin: 2em 0; }
.page-links { margin-top: 1.4rem; font-family: var(--f-mono); }
.alignleft { float: left; margin: 0 1.2rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.2rem; }
.aligncenter { margin-inline: auto; }
.wp-caption-text { font-size: .85rem; color: var(--mute-l); }

/* ---------- Сайдбар ---------- */
.sidebar { min-width: 0; }
.sidebar .widget {
    margin-bottom: 1.8rem;
    padding: 1.3rem 1.3rem 1.2rem;
    background: var(--rail);
    border: 1px solid var(--rule);
    border-top: 4px solid var(--teal);
    color: #DCD7CA;
}
.sidebar .widget-title {
    margin: 0 0 1rem;
    padding-bottom: .35rem;
    font-size: 1.05rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--paper);
    border-bottom: 3px double var(--rule);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .55rem 0; border-bottom: 1px dashed var(--rule-dark); font-size: .95rem; line-height: 1.4; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--paper); }
.sidebar a:hover { color: var(--teal); }
.sidebar .post-date { display: block; color: var(--mute-d); font-size: .8rem; }
.sidebar .widget p { color: #DCD7CA; }

/* ---------- Поиск ---------- */
.seek { display: flex; gap: 0; max-width: 520px; margin: 1rem 0 1.6rem; }
.seek-field {
    flex: 1;
    min-width: 0;
    padding: .7rem .9rem;
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 1.5px solid var(--rule);
    border-right: 0;
    border-radius: 0;
}
.seek-btn {
    padding: .7rem 1.2rem;
    font-family: var(--f-head);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--paper);
    background: var(--rust);
    border: 1.5px solid var(--rust);
    border-radius: 0;
    cursor: pointer;
}
.seek-btn:hover { background: var(--rust-deep); }
.empty-sheet { padding: 1.6rem; border: 1px dashed var(--rule); }

/* ---------- 404 ---------- */
.lost-sheet {
    position: relative;
    padding: 2.4rem 1.6rem;
    background: var(--rail);
    border: 1px solid var(--rule);
    border-left: 6px solid var(--rust);
    color: #DCD7CA;
}
.lost-code {
    display: block;
    font-family: var(--f-head);
    font-size: clamp(4rem, 14vw, 8rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--rust);
    margin-bottom: .6rem;
}

/* ---------- Пагинация ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2.6rem;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    padding: .45rem .8rem;
    font-family: var(--f-mono);
    font-size: .9rem;
    color: var(--paper);
    text-decoration: none;
    border: 1.5px solid var(--rule);
    background: var(--desk);
    transition: border-color .15s, color .15s, transform .15s;
}
.pager a.page-numbers:hover { border-color: var(--rust); color: var(--rust); transform: translateY(-2px); }
.pager .page-numbers.current {
    background: var(--rust);
    border-color: var(--rust);
    color: #fff;
    box-shadow: 3px 3px 0 var(--paper);
}
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; }

/* ---------- Комментарии ---------- */
.notes {
    margin-top: 2.4rem;
    padding: 1.8rem 1.4rem;
    background: var(--cream);
    color: var(--ink);
    box-shadow: 8px 8px 0 rgba(0, 0, 0, .3);
}
.notes-title, .comment-reply-title {
    font-size: 1.3rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding-bottom: .3rem;
    border-bottom: 3px double #B6AE9B;
}
.notes-list, .notes-list .children { list-style: none; margin: 0; padding: 0; }
.notes-list .children { margin-left: 1.4rem; padding-left: 1rem; border-left: 2px solid #C5BDA9; }
.note-body { padding: 1rem 0; border-bottom: 1px dashed #B6AE9B; }
.note-head { display: flex; gap: .8rem; align-items: center; margin-bottom: .5rem; }
.note-head img { border-radius: 0; border: 1px solid #B6AE9B; }
.note-author { display: block; font-weight: 700; }
.note-date { font-family: var(--f-mono); font-size: .8rem; color: var(--mute-l); }
.note-wait { color: var(--rust-deep); font-style: italic; }
.note-reply a {
    font-family: var(--f-head);
    font-size: .85rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--rust-deep);
}
.notes-closed { color: var(--mute-l); }
.comment-respond { margin-top: 1.6rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; margin-bottom: .3rem; font-size: .9rem; font-weight: 700; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .65rem .8rem;
    font: inherit;
    color: var(--ink);
    background: #FBF8F0;
    border: 1.5px solid #A39B87;
    border-radius: 0;
}
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-form .submit {
    padding: .65rem 1.4rem;
    font-family: var(--f-head);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--paper);
    background: var(--ink);
    border: 1.5px solid var(--ink);
    box-shadow: 4px 4px 0 var(--rust);
    border-radius: 0;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.comment-form .submit:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--rust); }
.comment-notes, .logged-in-as, .must-log-in { font-size: .88rem; color: var(--mute-l); }
.comments-navigation, .comment-navigation { display: flex; justify-content: space-between; margin: 1rem 0; }

/* ---------- Подвал ---------- */
.colophon {
    background: var(--bar);
    border-top: 1px solid var(--rule);
    color: #C9CFD2;
    padding: 2.8rem 0 1.6rem;
}
.colophon-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.8rem;
}
.colophon-col { min-width: 0; padding-bottom: 1.6rem; border-bottom: 1px solid var(--rule-dark); }
.colophon .widget { margin-bottom: 1rem; color: #C9CFD2; }
.colophon .widget-title {
    margin: 0 0 .9rem;
    font-size: 1.1rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--paper);
}
.colophon .widget p, .colophon .textwidget { font-size: .9rem; line-height: 1.6; color: #C9CFD2; }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin-bottom: .45rem; font-size: .95rem; }
.colophon li a {
    display: inline-flex;
    gap: .6rem;
    color: var(--paper);
    text-decoration: none;
}
.colophon li a::before { content: "›"; color: var(--mute-d); }
.colophon a:hover { color: var(--teal); }
.colophon-copy {
    margin: 1.6rem 0 0;
    padding-top: 1.2rem;
    border-top: 1px solid var(--rule-dark);
    text-align: center;
    font-size: .85rem;
    color: var(--mute-d);
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .9rem 1.6rem;
    padding: 1rem 1.4rem;
    background: var(--bar);
    border-top: 3px solid var(--rust);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .45);
}
.cookie-text { margin: 0; max-width: 70ch; font-size: .9rem; color: #D7D2C5; }

/* ---------- ≥600px ---------- */
@media (min-width: 600px) {
    .brand-seal { width: 70px; height: 70px; }
    .brand-name { font-size: 1.2rem; }
    .brand-desc { display: block; }
    .tabs-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stamp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .atlas-plot { gap: 3%; }
    .calc-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .calc-main { grid-column: 1 / -1; }
    .colophon-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
    .colophon-col { padding: 0 1.6rem; border-bottom: 0; border-left: 1px solid var(--rule-dark); }
    .colophon-col:first-child { padding-left: 0; border-left: 0; }
    .doc-sheet { padding: 2.4rem 2.4rem 2.6rem; }
    .notes { padding: 2rem 2.2rem; }
    .lost-sheet { padding: 3rem 2.6rem; }
}

/* ---------- ≥960px ---------- */
@media (min-width: 960px) {
    .shell { width: min(85%, 1240px); }
    .masthead-row { padding: 1.3rem 0; }
    .nav-toggle { display: none; }
    .primary-nav {
        display: block;
        position: static;
        padding: 0;
        background: none;
        border: 0;
        flex: 0 1 auto;
    }
    .nav-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem 2rem; }
    .nav-list a {
        padding: .35rem 0;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
    }
    .nav-list a:hover { color: var(--paper); border-bottom-color: var(--teal); }
    .nav-list .current-menu-item > a,
    .nav-list .current_page_item > a { color: var(--paper); border-bottom-color: var(--rust); }

    .cover {
        grid-template-columns: minmax(0, 24%) minmax(0, 1fr) minmax(0, 34%);
        align-items: center;
        min-height: 340px;
    }
    .cover-photo { align-self: stretch; }
    .cover-photo img { aspect-ratio: auto; height: 100%; min-height: 340px; }
    .cover-photo::after { background: linear-gradient(90deg, transparent 60%, rgba(13, 23, 32, .7) 100%); }
    .cover-text { padding: 2.4rem 2.2rem 2.4rem 3rem; }
    .cover-title { font-size: clamp(1.9rem, 3.1vw, 3.3rem); }
    .cover-chart { padding: 2rem 4.6rem 2rem 1rem; }
    .cover-bookmark { right: 2.4rem; bottom: 1.6rem; }

    .sheet { padding: 3.6rem 0 4rem; }
    .tabs-strip {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 1rem;
        margin-inline: -2.2rem;
        align-items: end;
    }
    .folder-tab { margin-top: 0; }
    .folder-tab--sage { transform: rotate(-1.5deg); min-height: 200px; }
    .folder-tab--sage:hover { transform: rotate(-1.5deg) translateY(-6px); }
    .folder-tab--cream { min-height: 180px; }
    .folder-tab--sand { min-height: 186px; }
    .folder-tab--sky { min-height: 176px; }
    .folder-tab--taupe { min-height: 192px; transform: rotate(1deg); }
    .folder-tab--taupe:hover { transform: rotate(1deg) translateY(-6px); }

    .calc-layout { grid-template-columns: minmax(0, 1.55fr) minmax(0, .5fr) minmax(0, 1fr); gap: 2.2rem; align-items: stretch; }
    .calc-main { grid-column: auto; }
    .calc-gauge { align-content: center; }
    .gauge-ruler { height: 200px; }
    .calc-photo img { height: 100%; aspect-ratio: auto; min-height: 340px; }

    .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .card-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-single .card-grid--two { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stamp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .atlas { grid-template-columns: minmax(0, 1fr) minmax(0, 190px); align-items: center; }
    .atlas-tag-word { display: inline; }

    .layout-with-sidebar {
        grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
        column-gap: 6%;
    }
}

/* ---------- ≤600px поправки для плашек ---------- */
@media (max-width: 600px) {
    .sheet { padding: 2.4rem 0 2.6rem; }
    .stamp { padding: 1rem 1.1rem; }
    .stamp--tilt-r, .stamp--tilt-l { transform: none; }
    .calc-gauge { padding: 1.2rem 1rem; }
    .atlas-note { padding: 1rem 1.1rem; }
    .doc-sheet { padding: 1.6rem 1.1rem 1.8rem; }
    .notes { padding: 1.4rem 1.1rem; }
    .lost-sheet { padding: 2rem 1.2rem; }
    .cookie-banner { padding: 1rem 1.1rem; }
    .cover-chart { padding-right: 3.2rem; }
    .cover-chart svg { height: 180px; }
}

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