/*
Theme Name: dds_robertsworldmoneyblog.com
Theme URI: https://robertsworldmoneyblog.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: nmkat
*/

/* ---------- Шрифты ---------- */
@font-face { font-family: "Prata"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/prata-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: "Prata"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/prata-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: "PT Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/pt-serif-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 Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/pt-serif-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: "PT Serif"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/pt-serif-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 Serif"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/pt-serif-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: "PT Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/pt-serif-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 Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/pt-serif-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+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: "Caveat"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/caveat-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/caveat-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+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 {
    --felt: #1E3A2F;
    --felt-deep: #162B23;
    --felt-night: #10211A;
    --paper: #EFE6D2;
    --paper-shade: #E4D8BE;
    --ink: #2A211A;
    --muted: #7A6A55;
    --brass: #B08D45;
    --brass-light: #D2B472;
    --wine: #6B2C2C;
    --mist: #9FB8B0;
    --f-head: "Prata", "PT Serif", Georgia, "Times New Roman", serif;
    --f-body: "PT Serif", Georgia, "Times New Roman", serif;
    --f-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
}

/* ---------- Скрытые элементы (до основных стилей) ---------- */
.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%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--paper);
    background-color: var(--felt);
    background-image: url("images/felt.png"), linear-gradient(180deg, var(--felt) 0%, #1A3329 45%, var(--felt-deep) 100%);
    background-repeat: repeat, no-repeat;
    background-size: 240px 112px, 100% 100%;
    background-attachment: scroll, scroll;
    overflow-wrap: break-word;
    hyphens: auto;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--brass-light); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--paper); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px dashed var(--brass-light); outline-offset: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { hyphens: manual; font-family: var(--f-head); font-weight: 400; line-height: 1.22; margin: 0 0 .6em; letter-spacing: .01em; }
h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.5rem); }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
table { border-collapse: collapse; width: 100%; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; background: var(--brass); color: var(--felt); text-decoration: none; }
.skip-link:focus { top: 1rem; }

/* ---------- Контейнер ---------- */
.shell { width: min(92%, 1180px); margin-inline: auto; }

/* ---------- Бумага и кнопки ---------- */
.paper {
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--brass);
    box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px rgba(176, 141, 69, .75);
    background-image: radial-gradient(rgba(122, 106, 85, .07) 1px, transparent 1.2px);
    background-size: 5px 5px;
}
.paper a { color: var(--wine); }
.paper a:hover { color: var(--ink); }

.brass-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    padding: .5em 1.15em;
    font-family: var(--f-body);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .02em;
    color: var(--felt);
    background: var(--brass);
    border: 1px solid var(--felt);
    outline: 1px solid var(--brass);
    outline-offset: 2px;
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.brass-btn:hover, .brass-btn:focus-visible { background: var(--felt); color: var(--brass-light); }
.paper .brass-btn, .paper a.brass-btn { color: var(--felt); }
.paper .brass-btn:hover, .paper a.brass-btn:hover { color: var(--brass-light); }
.brass-btn-sm { padding: .38em .85em; font-size: .86rem; }

/* ---------- Шапка ---------- */
.masthead {
    position: relative;
    border-bottom: 1px solid var(--brass);
    box-shadow: 0 3px 0 -2px rgba(176, 141, 69, .45);
    padding: 1.6rem 0 1.4rem;
}
.masthead-in { display: flex; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; }
.brand { display: flex; align-items: flex-start; gap: 1rem; flex: 1 1 520px; min-width: 0; color: var(--paper); text-decoration: none; }
.brand:hover { color: var(--paper); }
.brand-mark { flex: 0 0 auto; width: 72px; }
.brand-coin, .brand-logo { width: 72px; height: 72px; display: block; border-radius: 50%; object-fit: cover; }
.brand-text { min-width: 0; }
.brand-name { display: block; hyphens: manual; font-family: var(--f-head); font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.15rem); line-height: 1.15; color: var(--brass-light); letter-spacing: .015em; }
.brand-desc { display: block; margin-top: .5rem; font-size: .95rem; line-height: 1.5; color: rgba(239, 230, 210, .88); max-width: 62ch; }

.nav-toggle { display: none; }
.site-nav { flex: 0 1 auto; min-width: 0; padding-top: .55rem; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }
.nav-list a { display: inline-block; padding: .2rem 0; color: var(--paper); text-decoration: none; font-size: .98rem; border-bottom: 1px solid transparent; }
.nav-list a:hover, .nav-list a:focus-visible { color: var(--brass-light); border-bottom-color: var(--brass); }
.nav-list .current-menu-item > a, .nav-list .current_page_item > a { color: var(--brass-light); border-bottom-color: var(--brass); }

/* ---------- Заголовки секций ---------- */
.leaf-title {
    font-variant: small-caps;
    font-size: clamp(1.4rem, 1.15rem + .9vw, 1.8rem);
    color: var(--paper);
    letter-spacing: .03em;
    margin: 0 0 1.1rem;
    padding-bottom: .45rem;
    border-bottom: 1px solid var(--brass);
    position: relative;
}
.leaf-title::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 64px; height: 3px; background: var(--brass); }

/* ---------- Главная ---------- */
.front { width: min(85%, 1180px); padding: 2.6rem 0 3.2rem; }
.leaf { margin: 0 0 3rem; min-width: 0; }

/* Блок 1: паспорт */
.passport { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.6rem; align-items: stretch; }
.passport-card { position: relative; padding: 2rem 2.1rem 1.6rem; min-width: 0; }
.passport-card::before { content: ""; position: absolute; top: 9px; right: 9px; width: 22px; height: 22px; border-top: 2px solid var(--brass); border-right: 2px solid var(--brass); }
.passport-mark { position: absolute; top: 1rem; right: 2.6rem; font-size: .72rem; letter-spacing: .14em; color: var(--muted); }
.passport-head { text-align: center; font-size: 1.45rem; margin: 0 0 1.1rem; color: var(--ink); }
.passport-fields { margin: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 1.4rem; }
.pf { display: flex; align-items: baseline; gap: .5rem; border-bottom: 1px solid rgba(122, 106, 85, .55); padding: .4rem 0 .1rem; min-width: 0; }
.pf-wide { grid-column: 1 / -1; }
.pf dt { font-size: 1rem; color: var(--ink); flex: 0 0 auto; }
.pf dd { margin: 0; font-family: var(--f-hand); font-weight: 600; font-size: 1.45rem; line-height: 1.1; color: #2C3B52; min-width: 0; }
.passport-note { margin: 1.1rem 0 0; font-size: .86rem; line-height: 1.5; color: var(--muted); font-style: italic; }

.coin-frame { position: relative; margin: 0; padding: 14px; background: var(--felt-night); border: 1px solid rgba(176, 141, 69, .5); min-width: 0; display: flex; align-items: center; }
.coin-frame::before, .coin-frame::after { content: ""; position: absolute; width: 18px; height: 18px; border-color: var(--brass); border-style: solid; z-index: 2; pointer-events: none; }
.coin-frame::before { top: 7px; left: 7px; border-width: 2px 0 0 2px; }
.coin-frame::after { bottom: 7px; right: 7px; border-width: 0 2px 2px 0; }
.coin-corners::before, .coin-corners::after { content: ""; position: absolute; width: 18px; height: 18px; border-color: var(--brass); border-style: solid; z-index: 2; pointer-events: none; }
.coin-corners::before { top: 7px; right: 7px; border-width: 2px 2px 0 0; }
.coin-corners::after { bottom: 7px; left: 7px; border-width: 0 0 2px 2px; }
.coin-frame img { width: 100%; aspect-ratio: 903 / 510; object-fit: cover; }
.coin-arrow { position: absolute; left: 45%; top: 79%; width: 10%; height: auto; pointer-events: none; }
.coin-caption { position: absolute; right: 22px; bottom: 16px; font-size: .9rem; color: var(--paper); background: rgba(16, 33, 26, .72); padding: .15rem .55rem; }

/* Блок 2: шкала */
.grades { display: grid; grid-template-columns: minmax(0, 23%) minmax(0, 1fr); gap: 1.4rem; padding: 1.3rem; align-items: stretch; }
.grades-lead { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 1.4rem 1.3rem; border: 1px solid var(--mist); background: rgba(159, 184, 176, .12); min-width: 0; }
.grades-code { position: absolute; top: .45rem; right: .6rem; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mist); filter: brightness(.7); }
.grades-lead p { margin: 0; font-family: var(--f-head); font-size: 1.22rem; line-height: 1.35; color: var(--ink); }
.grades-scale { list-style: none; margin: 0; padding: .9rem 1rem 1rem; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; border: 1px solid rgba(176, 141, 69, .6); min-width: 0; }
.grades-scale::before { content: ""; position: absolute; left: 1.4rem; right: 1.4rem; top: 2.85rem; height: 2px; background: var(--brass); }
.grades-scale::after { content: ""; position: absolute; right: .9rem; top: calc(2.85rem - 5px); border-left: 11px solid var(--brass); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.grade { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; padding: 0 .25rem; }
.grade::before { content: ""; position: absolute; left: 0; top: 1.75rem; width: 2px; height: 1.1rem; background: var(--brass); }
.grade:first-child::before { left: -.55rem; width: 0; height: 0; top: calc(1.95rem - 5px); background: none; border-right: 11px solid var(--brass); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.grade-name { font-size: .9rem; line-height: 1.2; min-height: 2.4em; display: flex; align-items: flex-start; color: var(--ink); }
.grade img { width: min(100%, 104px); aspect-ratio: 1; object-fit: contain; margin: .6rem 0 .4rem; transition: transform .2s; }
.grade:hover img { transform: scale(1.06); }
.grade-code { font-weight: 700; font-size: .8rem; letter-spacing: .1em; color: var(--brass); filter: brightness(.8); }
.grade-hint { font-size: .74rem; line-height: 1.3; color: var(--muted); margin-top: .15rem; }

/* Блок записей */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--brass);
    box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px rgba(176, 141, 69, .7);
    clip-path: polygon(0 0, 100% 0, 100% 99.2%, 96% 100%, 88% 99.4%, 74% 100%, 61% 99.3%, 47% 100%, 33% 99.4%, 19% 100%, 7% 99.3%, 0 100%);
    transition: transform .18s;
}
.card::after { content: ""; position: absolute; top: 0; right: 0; width: 0; height: 0; border-top: 22px solid var(--brass); border-left: 22px solid transparent; z-index: 2; }
.card:hover { transform: translateY(-3px); }
.card-thumb { display: block; padding: 10px 10px 0; }
.card-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.card-body { flex: 1; display: flex; flex-direction: column; padding: 1rem 1.25rem 1.25rem; min-width: 0; }
.card-title { font-size: 1.22rem; margin: 0 0 .5rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--wine); text-decoration: underline; text-decoration-thickness: 1px; }
.card-excerpt { flex: 1; font-size: .93rem; line-height: 1.5; color: #4A3D30; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt a { color: var(--wine); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-top: .8rem; padding-top: .7rem; border-top: 1px dotted rgba(122, 106, 85, .6); }
.card-date { font-size: .86rem; color: var(--muted); }
.card .brass-btn { color: var(--felt); }
.card .brass-btn:hover { color: var(--brass-light); }
.leaf-latest .card-grid > .card:nth-child(n+4) { display: none; }
.empty-note { padding: 1.4rem 1.6rem; }

/* Нижние два блока */
.leaf-duo { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; }

/* Блок 3: хранение */
.storage { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: .9rem; padding: .9rem; align-items: center; }
.tray { position: relative; min-width: 0; }
.tray img { width: 100%; aspect-ratio: 940 / 636; object-fit: cover; border: 1px solid #6E5424; }
.tray-tag {
    position: absolute;
    transform: translate(-50%, -50%);
    padding: .22rem .7rem;
    font-size: clamp(.68rem, .55rem + .35vw, .86rem);
    line-height: 1.2;
    white-space: nowrap;
    color: #2A211A;
    background: linear-gradient(180deg, #D9BE7E 0%, #B08D45 55%, #8F6F32 100%);
    border: 1px solid #5E4720;
    box-shadow: inset 0 0 0 2px rgba(239, 230, 210, .35), 0 2px 3px rgba(0, 0, 0, .45);
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}
.tray-tag-1 { left: 27.7%; top: 23.9%; }
.tray-tag-2 { left: 71.1%; top: 23.9%; }
.tray-tag-3 { left: 27.7%; top: 78.6%; }
.tray-tag-4 { left: 71.1%; top: 78.6%; }
.storage-rules { list-style: none; counter-reset: rule; margin: 0; padding: .8rem 1rem; border: 1px solid rgba(176, 141, 69, .6); position: relative; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.storage-rules::before, .storage-rules::after { content: ""; position: absolute; width: 12px; height: 12px; border-color: var(--brass); border-style: solid; }
.storage-rules::before { top: 5px; left: 5px; border-width: 1px 0 0 1px; }
.storage-rules::after { bottom: 5px; right: 5px; border-width: 0 1px 1px 0; }
.storage-rules li { counter-increment: rule; position: relative; padding: .55rem 0 .55rem 1.9rem; border-bottom: 1px solid rgba(176, 141, 69, .45); }
.storage-rules li:last-child { border-bottom: 0; }
.storage-rules li::before { content: counter(rule) "."; position: absolute; left: 0; top: .5rem; font-family: var(--f-head); font-size: 1.15rem; color: var(--brass); }
.storage-rules b { display: block; font-family: var(--f-head); font-weight: 400; font-size: 1.12rem; line-height: 1.25; color: var(--ink); }
.storage-rules span { display: block; font-size: .8rem; line-height: 1.35; color: var(--muted); margin-top: .2rem; }

/* Блок 4: оценка */
.valuation { position: relative; padding: 1.2rem 1.2rem 3.6rem; }
.value-scroll { overflow-x: auto; }
.value-table { font-size: .9rem; background: rgba(255, 255, 255, .18); }
.value-table th, .value-table td { border: 1px solid rgba(122, 106, 85, .6); padding: .5rem .6rem; text-align: left; vertical-align: top; }
.value-table thead th { background: var(--paper-shade); font-family: var(--f-body); font-weight: 700; color: var(--ink); }
.value-table tbody th { hyphens: manual; font-weight: 400; font-family: var(--f-head); color: var(--ink); }
.value-table td { color: #4A3D30; }
.seal { position: absolute; right: -14px; bottom: -26px; width: 118px; height: 118px; transform: rotate(-12deg); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .4)); }

/* ---------- Внутренние страницы ---------- */
.site-main > .shell { padding: 1.6rem 0 3rem; }
.site-main > .shell.front { padding: 2.6rem 0 3.2rem; }
.crumbs { font-size: .9rem; margin: 0 0 1.4rem; color: var(--mist); }
.crumbs a { color: var(--brass-light); }
.crumbs span:last-child { color: var(--paper); }
.crumbs-sep { color: var(--brass); margin: 0 .2rem; }

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

.list-head { margin-bottom: 1.4rem; }
.list-intro { padding: 1.2rem 1.4rem; margin-top: 1rem; }
.card-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-single .card-grid-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.sheet {
    position: relative;
    padding: 2.2rem 2.4rem;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--brass);
    box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px rgba(176, 141, 69, .7);
}
.sheet::after { content: ""; position: absolute; top: 0; right: 0; border-top: 26px solid var(--brass); border-left: 26px solid transparent; }
.sheet a { color: var(--wine); }
.sheet a:hover { color: var(--ink); }
.sheet-title { color: var(--ink); margin-bottom: .5rem; }
.sheet-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .9rem; color: var(--muted); padding-bottom: .9rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--brass); }
.sheet-cats a { margin-right: .5rem; }
.sheet-cover { margin: 0 0 1.5rem; }
.sheet-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--brass); }
.sheet-tags { margin-top: 1.6rem; font-size: .9rem; }
.sheet-tags a { margin-right: .7rem; }

.entry-content { font-size: 1.04rem; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--ink); margin-top: 1.6em; }
.entry-content h2 { padding-bottom: .3rem; border-bottom: 1px solid rgba(176, 141, 69, .7); }
.entry-content img { max-width: 100%; height: auto; }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { font-size: .86rem; color: var(--muted); margin-top: .4rem; }
.entry-content blockquote { margin: 1.6em 0; padding: 1.1rem 1.4rem 1.1rem 1.6rem; background: var(--paper-shade); border-left: 4px solid var(--wine); font-style: italic; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { margin: 1.4em 0; font-size: .95rem; border: 1px solid rgba(122, 106, 85, .8); }
.entry-content th, .entry-content td { border: 1px solid rgba(122, 106, 85, .7); padding: .55rem .7rem; text-align: left; }
.entry-content th { background: var(--paper-shade); }
.entry-content ul li::marker { color: var(--brass); }
.entry-content ol li::marker { color: var(--wine); font-weight: 700; }
.entry-content pre, .entry-content code { font-family: "Courier New", monospace; font-size: .9em; background: rgba(122, 106, 85, .15); }
.entry-content pre { padding: 1rem; overflow-x: auto; }
.entry-content hr { border: 0; border-top: 1px solid var(--brass); margin: 2em 0; }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: .86rem; color: var(--muted); }

.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.6rem 0; }
.post-nav a { display: block; padding: .9rem 1.1rem; border: 1px solid var(--brass); color: var(--paper); text-decoration: none; background: rgba(16, 33, 26, .55); min-width: 0; }
.post-nav a:hover { background: var(--brass); color: var(--felt); }
.post-nav span { display: block; font-size: .8rem; color: var(--mist); margin-bottom: .2rem; }
.post-nav a:hover span { color: var(--felt); }
.post-nav-next { grid-column: 2; text-align: right; }

/* ---------- Сайдбар ---------- */
.sidebar { min-width: 0; padding: 1.4rem 1.4rem .6rem; background: var(--felt-night); border: 1px solid var(--brass); box-shadow: inset 0 0 0 4px var(--felt-night), inset 0 0 0 5px rgba(176, 141, 69, .45); color: var(--paper); }
.sidebar .widget { margin-bottom: 1.6rem; }
.sidebar .widget-title { font-variant: small-caps; font-size: 1.2rem; color: var(--brass-light); padding-bottom: .35rem; border-bottom: 1px solid var(--brass); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .5rem 0; border-bottom: 1px dotted rgba(159, 184, 176, .35); }
.sidebar a { color: var(--paper); text-decoration: none; }
.sidebar a:hover { color: var(--brass-light); text-decoration: underline; }
.sidebar .post-date { display: block; font-size: .8rem; color: var(--mist); }
.sidebar p, .sidebar .textwidget { color: rgba(239, 230, 210, .9); }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: 2rem 0 .5rem; }
.pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.4rem; height: 2.4rem; padding: 0 .75rem; border: 1px solid var(--brass); color: var(--paper); text-decoration: none; background: rgba(16, 33, 26, .6); font-size: .95rem; }
.pager a.page-numbers:hover { background: var(--brass); color: var(--felt); }
.pager .page-numbers.current { background: var(--brass); color: var(--felt); font-weight: 700; outline: 1px solid var(--brass); outline-offset: 2px; }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding: 0 .2rem; }
.sheet .pager .page-numbers { color: var(--ink); background: transparent; }
.sheet .pager .page-numbers.current { color: var(--felt); background: var(--brass); }

/* ---------- Поиск ---------- */
.find { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1rem 0; }
.find-field { flex: 1 1 200px; min-width: 0; padding: .55rem .8rem; font: inherit; font-size: .95rem; color: var(--ink); background: #F8F3E7; border: 1px solid var(--brass); border-radius: 0; }
.sidebar .find-field { background: var(--paper); }

/* ---------- 404 ---------- */
.lost { text-align: center; }
.lost .find { justify-content: center; max-width: 520px; margin: 1.4rem auto; }
.lost-code { font-family: var(--f-head); font-size: clamp(4rem, 3rem + 5vw, 7rem); line-height: 1; margin: 0 0 .5rem; color: var(--wine); }

/* ---------- Комментарии ---------- */
.notes { margin-top: 2rem; padding: 1.8rem 2rem; background: var(--paper); color: var(--ink); border: 1px solid var(--brass); box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px rgba(176, 141, 69, .6); }
.notes a { color: var(--wine); }
.notes-title, .comment-reply-title { font-size: 1.4rem; color: var(--ink); }
.notes-list, .notes-list .children { list-style: none; margin: 0; padding: 0; }
.notes-list .children { padding-left: 1.6rem; border-left: 1px solid rgba(176, 141, 69, .6); }
.note-body { padding: 1rem 0; border-bottom: 1px dotted rgba(122, 106, 85, .55); }
.note-head { display: flex; gap: .8rem; align-items: center; margin-bottom: .5rem; }
.note-head img { border-radius: 50%; border: 1px solid var(--brass); }
.note-author { display: block; }
.note-date { font-size: .82rem; color: var(--muted); }
.note-wait { font-style: italic; color: var(--wine); }
.note-reply { font-size: .88rem; }
.form-row { margin: 0 0 1rem; }
.form-row label { display: block; font-size: .9rem; margin-bottom: .3rem; }
.form-row input, .form-row textarea { width: 100%; padding: .55rem .7rem; font: inherit; font-size: .95rem; color: var(--ink); background: #F8F3E7; border: 1px solid rgba(122, 106, 85, .8); border-radius: 0; }
.form-check { font-size: .88rem; }
.form-note { font-size: .88rem; color: var(--muted); }
.req { color: var(--wine); }
.form-submit { margin: 0; }

/* ---------- Подвал ---------- */
.colophon { background: var(--felt-night); border-top: 1px solid var(--brass); box-shadow: inset 0 3px 0 -1px rgba(176, 141, 69, .4); color: rgba(239, 230, 210, .88); padding: 2.6rem 0 1.4rem; font-size: .93rem; }
.colophon-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.colophon-col { min-width: 0; }
.colophon .widget { margin-bottom: 1rem; }
.colophon .widget-title { font-size: 1.25rem; color: var(--paper); margin-bottom: .6rem; }
.colophon p, .colophon .textwidget { color: rgba(239, 230, 210, .82); }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { padding: .2rem 0; }
.colophon a { color: rgba(239, 230, 210, .9); text-decoration: none; }
.colophon a:hover { color: var(--brass-light); text-decoration: underline; }
.colophon-copy { margin: 1.8rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(176, 141, 69, .45); font-size: .86rem; color: var(--mist); }
.colophon-copy span { color: var(--brass-light); }

/* ---------- Cookie ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 1rem 1.4rem;
    flex-wrap: wrap;
    max-width: 860px;
    margin-inline: auto;
    padding: 1rem 1.4rem;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--brass);
    box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px rgba(176, 141, 69, .7), 0 8px 24px rgba(0, 0, 0, .45);
}
.cookie-text { margin: 0; flex: 1 1 320px; font-size: .9rem; line-height: 1.5; min-width: 0; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .front { width: 92%; }
    .passport { grid-template-columns: minmax(0, 1fr); }
    .grades { grid-template-columns: minmax(0, 1fr); }
    .grades-lead { padding: 1rem 1.2rem; }
    .grades-scale { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1.2rem; }
    .grades-scale::before, .grades-scale::after, .grade::before { display: none; }
    .grade-name { min-height: 0; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .leaf-duo { grid-template-columns: minmax(0, 1fr); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 2rem; }
    .layout-single > .content-area { width: 100%; }
    .layout-single .card-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .colophon-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .masthead-in { align-items: center; }
    .brand { flex-basis: calc(100% - 7rem); }
    .brand-mark, .brand-coin, .brand-logo { width: 56px; height: 56px; }
    .brand-desc { font-size: .86rem; }
    .nav-toggle { display: inline-flex; align-items: center; gap: .5rem; margin-left: auto; padding: .45rem .8rem; font: inherit; font-size: .9rem; color: var(--paper); background: transparent; border: 1px solid var(--brass); outline: 1px solid rgba(176, 141, 69, .5); outline-offset: 2px; cursor: pointer; }
    .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: var(--brass-light); 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; flex-basis: 100%; padding-top: 0; }
    .site-nav.is-open { display: block; }
    .nav-list { flex-direction: column; gap: 0; border-top: 1px solid rgba(176, 141, 69, .5); }
    .nav-list a { display: block; padding: .65rem 0; border-bottom: 1px solid rgba(176, 141, 69, .25); }
}
@media (max-width: 600px) {
    body { font-size: 16px; }
    .front { padding: 1.8rem 0 2.4rem; }
    .passport-card { padding: 1.6rem 1.3rem 1.3rem; }
    .passport-fields { grid-template-columns: minmax(0, 1fr); }
    .grades { padding: .9rem; }
    .grades-scale { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .9rem .6rem; }
    .card-grid, .card-grid-list, .layout-single .card-grid-list { grid-template-columns: minmax(0, 1fr); }
    .storage { grid-template-columns: minmax(0, 1fr); padding: .8rem; }
    .valuation { padding: 1rem .9rem 4.4rem; }
    .value-table { font-size: .82rem; }
    .value-table th, .value-table td { padding: .4rem .45rem; }
    .seal { right: 6px; bottom: -18px; width: 92px; height: 92px; }
    .sheet { padding: 1.5rem 1.2rem; }
    .notes { padding: 1.4rem 1.1rem; }
    .post-nav { grid-template-columns: minmax(0, 1fr); }
    .post-nav-next { grid-column: 1; text-align: left; }
    .colophon-cols { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
    .cookie-banner { padding: 1rem 1.1rem; left: .6rem; right: .6rem; bottom: .6rem; }
}
