/*
Theme Name: dds_digitaljournalist.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: djfin
*/

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

/* ---------- Палитра ---------- */
:root {
    --grid-bg: #DDE4E8;
    --grid-line: #B9C6CE;
    --paper: #F7F5EF;
    --ink: #23282E;
    --muted: #6B7A86;
    --red: #E03B2F;
    --blue: #1F5FD0;
    --yellow: #F2C438;
    --foot: #23282E;
    --foot-text: #F7F5EF;
    --paper-edge: #8E9BA5;
    --kraft: #E9DFC2;
    --green: #3E9A57;
    --orange: #EE8A3A;
    --violet: #9A7CC2;
    --pink: #E27D9C;
    --head: "Oswald", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
    --mono: "IBM Plex Mono", "PT Mono", "Courier New", monospace;
    --hard: 3px 3px 0 rgba(35, 40, 46, .16);
}

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

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--grid-bg);
    background-image:
        linear-gradient(rgba(150, 168, 180, .55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(150, 168, 180, .55) 1px, transparent 1px),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--head);
    font-weight: 700;
    line-height: 1.12;
    margin: 1.4em 0 .55em;
    color: var(--ink);
}
h1, h2, h3, h4, h5, h6, p, li, td, th, .card-title, .brand-name, .folder-name { overflow-wrap: break-word; hyphens: auto; }
.brand-name, .fs-title, .page-title, .entry-title, .folder-name { hyphens: manual; }
.brand-name { max-width: 30ch; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--yellow); color: var(--ink); padding: .6rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

.shell { width: min(92%, 1180px); margin-left: auto; margin-right: auto; }
@media (min-width: 961px) { .shell { width: min(85%, 1180px); } }

/* ---------- Общие «листы» ---------- */
.sheet {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--paper-edge);
    box-shadow: var(--hard);
    padding: 1.6rem 1.6rem;
}
.sheet-clip, .card-clip {
    position: absolute;
    top: -16px;
    left: 26px;
    width: 22px;
    height: 54px;
    z-index: 3;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 54'%3E%3Cpath d='M15 18V44a6 6 0 0 1-12 0V8a5 5 0 0 1 10 0v32a2 2 0 0 1-4 0V14' fill='none' stroke='%236B7A86' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- Кнопка-штамп ---------- */
.stamp-btn {
    display: inline-block;
    font-family: var(--head);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.2;
    color: #fff;
    background: var(--red);
    border: 2px solid var(--red);
    box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--red);
    padding: .55rem 1.1rem;
    transform: rotate(-2deg);
    cursor: pointer;
    transition: transform .15s, background-color .15s, color .15s;
}
.stamp-btn:hover, .stamp-btn:focus-visible { color: var(--red); background: var(--paper); transform: rotate(0deg) translate(2px, 2px); }

/* ---------- Шапка ---------- */
.masthead { margin: 1.6rem 0 2.6rem; position: relative; }
.masthead-tabs { display: flex; gap: 4px; padding: 0 1.4rem; height: 16px; }
.mt { flex: 1; border: 1px solid rgba(35, 40, 46, .45); border-bottom: 0; border-radius: 6px 6px 0 0; }
.mt-1 { background: var(--kraft); }
.mt-2 { background: var(--red); }
.mt-3 { background: var(--orange); }
.mt-4 { background: var(--violet); }
.mt-5 { background: var(--blue); }
.mt-6 { background: var(--green); }
.mt-7 { background: var(--yellow); }
.mt-8 { background: var(--pink); }
.masthead-sheet {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.4rem 2rem;
    flex-wrap: wrap;
    background: var(--paper);
    border: 1px solid var(--paper-edge);
    border-top: 8px solid var(--kraft);
    box-shadow: var(--hard);
    padding: 1.4rem 1.6rem 1.5rem;
}
.brand { display: flex; align-items: flex-start; gap: 1rem; flex: 1 1 520px; min-width: 0; }
.brand-mark { flex: 0 0 auto; display: block; line-height: 0; }
.brand-stamp { width: 64px; height: 64px; display: block; }
.brand-logo { display: block; max-width: 84px; max-height: 84px; width: auto; height: auto; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: var(--head);
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(1.6rem, 3.2vw, 2.5rem);
    line-height: 1.05;
    margin: 0 0 .45rem;
    letter-spacing: .01em;
}
.brand-name a { color: var(--ink); text-decoration: none; }
.brand-name a:hover { color: var(--red); }
.brand-desc { margin: 0; font-size: .82rem; line-height: 1.5; color: var(--ink); max-width: 46ch; }

.top-nav { flex: 0 1 auto; min-width: 0; }
.top-nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1.3rem; margin: .3rem 0 0; padding: 0; }
.top-nav-list a {
    font-family: var(--head);
    font-weight: 500;
    font-size: .92rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    padding: .2rem 0;
    border-bottom: 2px solid transparent;
}
.top-nav-list a:hover { color: var(--blue); border-bottom-color: var(--blue); }
.top-nav-list .current-menu-item > a, .top-nav-list .current_page_item > a { color: var(--blue); border-bottom-color: var(--blue); }
.nav-toggle { display: none; }

/* ---------- Секции главной ---------- */
.fs { margin: 0 0 3.6rem; min-width: 0; }
.fs-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.fs-title {
    margin: 0;
    font-size: clamp(1.7rem, 3.6vw, 2.75rem);
    text-transform: uppercase;
    letter-spacing: .01em;
    line-height: 1.05;
    position: relative;
    padding-bottom: .5rem;
    min-width: 0;
}
.fs-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 72px; height: 4px; background: var(--blue); }
.fs-num { font-family: var(--head); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2rem); color: var(--muted); line-height: 1; }
.fs-pair .fs-title { font-size: clamp(1.6rem, 2.7vw, 2.3rem); }
.fs-note { font-size: .8rem; color: var(--muted); margin: 1.2rem 0 0; max-width: 60ch; }

/* Блок 1 — требования */
.reqs-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 2.4rem; align-items: center; }
.reqs-sheet { transform: rotate(-.8deg); padding: 1.8rem 1.8rem 1.4rem; box-shadow: 7px 8px 0 -1px var(--paper), 7px 8px 0 0 var(--paper-edge), 11px 12px 0 0 rgba(35, 40, 46, .14); }
.reqs-sheet::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #E4E1D8 0 50%, var(--grid-bg) 50%);
    border-top: 1px solid var(--paper-edge);
    border-left: 1px solid var(--paper-edge);
}
.reqs-list { list-style: none; margin: 0; padding: 0; }
.req { border-bottom: 1px dashed #C7CFD5; }
.req:last-child { border-bottom: 0; }
.req summary {
    display: flex;
    align-items: center;
    gap: .7rem;
    list-style: none;
    cursor: pointer;
    padding: .7rem 0;
}
.req summary::-webkit-details-marker { display: none; }
.req-no { font-family: var(--head); font-weight: 700; color: var(--blue); font-size: 1.15rem; min-width: 2.1rem; }
.req-tick {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: 2px solid var(--red);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12l5 6L21 3' fill='none' stroke='%23E03B2F' stroke-width='3.4' stroke-linecap='square'/%3E%3C/svg%3E") no-repeat 3px -3px / 22px 22px;
}
.req-name { font-family: var(--head); font-weight: 700; text-transform: uppercase; font-size: 1.12rem; letter-spacing: .02em; line-height: 1.2; min-width: 0; }
.req summary::after { content: "+"; margin-left: auto; font-family: var(--head); font-size: 1.3rem; color: var(--blue); }
.req details[open] summary::after { content: "–"; color: var(--red); }
.req-text { margin: 0 0 .9rem 2.8rem; font-size: .84rem; line-height: 1.6; color: var(--ink); }

.photo-print { margin: 0; position: relative; padding: 12px; background: #fff; border: 1px solid var(--paper-edge); box-shadow: -8px 7px 0 -1px var(--paper), -8px 7px 0 0 var(--paper-edge), -4px 11px 0 0 rgba(35, 40, 46, .14); transform: rotate(1.6deg); }
.photo-print img { display: block; width: 100%; aspect-ratio: 246 / 161; object-fit: cover; }

/* Блок 2 — папки-форматы */
.folders { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; padding-top: 18px; }
.folder {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    min-height: 150px;
    margin-top: 18px;
    padding: 1.4rem 1rem 1.3rem;
    font: inherit;
    color: var(--ink);
    text-align: center;
    background: var(--kraft);
    border: 1.5px solid var(--ink);
    border-radius: 0 6px 6px 6px;
    box-shadow: 5px 5px 0 rgba(35, 40, 46, .2);
    cursor: pointer;
    transition: transform .18s, box-shadow .18s;
    min-width: 0;
}
.folder::before {
    content: "";
    position: absolute;
    left: -1.5px;
    top: -19px;
    width: 46%;
    height: 19px;
    background: inherit;
    border: 1.5px solid var(--ink);
    border-bottom: 0;
    border-radius: 8px 14px 0 0;
}
.folder-text { background-color: #EDE3C8; }
.folder-photo { background-color: var(--blue); color: #fff; }
.folder-video { background-color: var(--green); color: #fff; }
.folder-media { background-color: var(--yellow); }
.folder:hover { transform: translateY(-4px); }
.folder.is-picked { transform: translateY(-10px) rotate(-1deg); box-shadow: 0 0 0 3px var(--red), 7px 9px 0 rgba(35, 40, 46, .22); }
.folder-icon { line-height: 0; margin-bottom: .3rem; }
.folder-name { font-family: var(--head); font-weight: 700; font-size: 1.45rem; text-transform: uppercase; letter-spacing: .03em; line-height: 1.1; }
.folder-sub { font-size: .8rem; line-height: 1.35; }
.folder-stamp {
    position: absolute;
    top: -6px;
    right: 10px;
    font-family: var(--head);
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--red);
    border: 2px solid var(--red);
    box-shadow: inset 0 0 0 1.5px #fff;
    padding: .15rem .55rem;
    transform: rotate(-7deg) scale(.6);
    opacity: 0;
    transition: opacity .18s, transform .18s;
}
.folder.is-picked .folder-stamp { opacity: 1; transform: rotate(-7deg) scale(1); }
.folder-panel {
    margin-top: 1.6rem;
    background: var(--paper);
    border: 1px solid var(--paper-edge);
    border-left: 6px solid var(--red);
    box-shadow: var(--hard);
    padding: 1.1rem 1.5rem;
    font-size: .88rem;
}
.folder-panel p { margin: 0; }
.folder-panel strong { font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 1rem; color: var(--red); }

/* ---------- Карточки записей ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem 1.8rem; padding-top: 14px; }
.cards-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-single .cards-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1.5px solid var(--blue);
    box-shadow: 6px 7px 0 -1px var(--paper), 6px 7px 0 0 var(--paper-edge), 9px 10px 0 0 rgba(35, 40, 46, .14);
    padding: 14px 14px 0;
    min-width: 0;
    transition: transform .18s;
}
.cards > .card:nth-child(3n+1) { transform: rotate(-1deg); }
.cards > .card:nth-child(3n+2) { transform: rotate(.6deg); }
.cards > .card:nth-child(3n) { transform: rotate(-.4deg); }
.cards > .card:hover { transform: rotate(0) translateY(-4px); }
.card-clip { top: -18px; left: 22px; }
.card-thumb { position: relative; border: 1px solid var(--ink); }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: cover; }
.card-sticker {
    position: absolute;
    top: -16px;
    right: -12px;
    z-index: 2;
    font-family: var(--head);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: .02em;
    color: var(--ink);
    background: var(--yellow);
    border: 1px solid rgba(35, 40, 46, .5);
    box-shadow: 2px 2px 0 rgba(35, 40, 46, .2);
    padding: .5rem .8rem;
    transform: rotate(3deg);
}
.card-body { flex: 1; display: flex; flex-direction: column; padding: 1rem .4rem 1.4rem; min-width: 0; }
.card-title { font-size: 1.32rem; margin: 0 0 .5rem; line-height: 1.18; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--blue); text-decoration: underline; }
.card-excerpt { font-size: .8rem; line-height: 1.55; color: var(--ink); margin-bottom: 1.1rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { align-self: flex-start; margin-top: auto; font-size: .88rem; }
.empty-note { font-size: .9rem; color: var(--muted); }

/* ---------- Пара блоков: чек-лист + календарь ---------- */
.fs-pair { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); gap: 2.4rem; align-items: start; }
.check-sheet {
    display: flex;
    gap: 1.4rem;
    padding: 1.8rem 1.6rem;
    transform: rotate(-.6deg);
    background-color: #FBFAF6;
    background-image:
        linear-gradient(rgba(31, 95, 208, .14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 95, 208, .14) 1px, transparent 1px);
    background-size: 12px 12px;
}
.check-list { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; }
.check-list li { margin: 0 0 .9rem; }
.check-item {
    display: flex;
    align-items: center;
    gap: .9rem;
    width: 100%;
    background: none;
    border: 0;
    padding: .2rem 0;
    font: inherit;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}
.check-box { position: relative; flex: 0 0 30px; width: 30px; height: 30px; border: 2.5px solid var(--ink); background: #fff; }
.check-item.is-done .check-box::after {
    content: "";
    position: absolute;
    left: 2px;
    top: -14px;
    width: 34px;
    height: 36px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 36'%3E%3Cpath d='M3 22c3 2 6 6 8 10C15 20 22 9 32 2' fill='none' stroke='%23E03B2F' stroke-width='4.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.check-name { font-family: var(--head); font-weight: 500; font-size: 1.25rem; line-height: 1.2; min-width: 0; }
.check-item.is-done .check-name { color: var(--ink); }
.check-item:not(.is-done) .check-name { color: var(--muted); }
.check-item:hover .check-name { color: var(--blue); }
.ready-scale { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.ready-label { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); writing-mode: vertical-rl; transform: rotate(180deg); }
.ready-track {
    position: relative;
    width: 26px;
    flex: 1;
    min-height: 190px;
    border-left: 3px solid var(--red);
    background: repeating-linear-gradient(to top, var(--ink) 0 1px, transparent 1px 10px) left / 10px 100% no-repeat,
                repeating-linear-gradient(to top, var(--ink) 0 2px, transparent 2px 50px) left / 18px 100% no-repeat;
}
.ready-marker {
    position: absolute;
    left: -10px;
    width: 17px;
    height: 17px;
    margin-bottom: -8px;
    border-radius: 50%;
    background: var(--red);
    border: 2px solid var(--paper);
    box-shadow: 0 0 0 1px var(--red);
    transition: bottom .3s;
}

.cal-sheet { padding: 1.4rem 1.4rem 3.6rem; transform: rotate(.5deg); }
.cal-sheet::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -9px;
    height: 9px;
    background: radial-gradient(circle at 8px 9px, var(--grid-bg) 3px, var(--ink) 3.5px, var(--ink) 4.5px, transparent 5px) 0 0 / 22px 9px repeat-x;
}
.cal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem .9rem; }
.cal-month { min-width: 0; }
.cal-name { font-family: var(--head); font-weight: 700; font-size: .92rem; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .25rem; }
.cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: .58rem; line-height: 1.75; text-align: center; color: var(--ink); }
.cal-days span.is-mark { color: var(--red); font-weight: 600; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--red); }
.cal-cap { margin: .25rem 0 0; font-size: .64rem; color: var(--red); text-transform: uppercase; letter-spacing: .05em; line-height: 1.3; }
.cal-sticker {
    position: absolute;
    right: -16px;
    bottom: -30px;
    margin: 0;
    max-width: 130px;
    font-family: var(--head);
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.1;
    text-transform: uppercase;
    text-align: center;
    color: var(--ink);
    background: var(--yellow);
    border: 1px solid rgba(35, 40, 46, .5);
    box-shadow: 3px 3px 0 rgba(35, 40, 46, .22);
    padding: .9rem .8rem;
    transform: rotate(-8deg);
}

/* ---------- Внутренние страницы ---------- */
.crumbs {
    display: inline-block;
    max-width: 100%;
    font-size: .76rem;
    background: var(--paper);
    border: 1px solid var(--paper-edge);
    border-left: 5px solid var(--yellow);
    padding: .4rem .9rem;
    margin: 0 0 1.8rem;
}
.crumbs a { color: var(--blue); }
.crumbs-sep { color: var(--red); margin: 0 .2rem; }
.crumbs span:last-child { color: var(--muted); }

.layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 67fr) minmax(0, 27fr); gap: 6%; align-items: start; margin-bottom: 3.6rem; }
.layout-single { display: block; width: 100%; margin-bottom: 3.6rem; }
.content-area { min-width: 0; }

.page-head { margin-bottom: 2.2rem; padding: 1.4rem 1.6rem; }
.page-title { margin: 0; font-size: clamp(1.8rem, 3.6vw, 2.6rem); text-transform: uppercase; }
.page-lead { margin: .6rem 0 0; font-size: .86rem; color: var(--muted); }

.entry { padding: 2.2rem 2.2rem 1.8rem; margin-bottom: 2rem; }
.entry-head { margin-bottom: 1.4rem; }
.entry-title { margin: 0 0 .8rem; font-size: clamp(1.8rem, 3.8vw, 2.7rem); text-transform: uppercase; line-height: 1.08; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin: 0; font-size: .8rem; }
.entry-sticker { font-family: var(--head); font-weight: 700; background: var(--yellow); padding: .2rem .6rem; transform: rotate(-2deg); display: inline-block; border: 1px solid rgba(35, 40, 46, .4); }
.entry-cat { font-family: var(--head); text-transform: uppercase; letter-spacing: .05em; }
.entry-thumb { margin: 0 0 1.6rem; border: 1px solid var(--ink); padding: 8px; background: #fff; }
.entry-thumb img { display: block; width: 100%; height: auto; }
.entry-content { font-size: .94rem; }
.entry-content h2 { font-size: 1.75rem; text-transform: uppercase; padding-left: .8rem; border-left: 5px solid var(--red); }
.entry-content h3 { font-size: 1.35rem; }
.entry-content ul { padding-left: 0; list-style: none; }
.entry-content ul li { position: relative; padding-left: 1.8rem; margin-bottom: .45rem; }
.entry-content ul li::before { content: ""; position: absolute; left: 0; top: .32em; width: 15px; height: 15px; border: 2px solid var(--red); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12l5 6L21 3' fill='none' stroke='%23E03B2F' stroke-width='3.6'/%3E%3C/svg%3E") no-repeat center / 12px; }
.entry-content ol { padding-left: 1.6rem; }
.entry-content ol li::marker { color: var(--blue); font-family: var(--head); font-weight: 700; }
.entry-content blockquote {
    margin: 1.6rem 0;
    padding: 1.2rem 1.4rem 1.2rem 1.6rem;
    background: rgba(242, 196, 56, .28);
    border-left: 6px solid var(--red);
    font-size: 1rem;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .84rem; border: 1.5px solid var(--ink); }
.entry-content th, .entry-content td { border: 1px solid var(--ink); padding: .55rem .7rem; text-align: left; vertical-align: top; }
.entry-content th { background: var(--grid-bg); font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.entry-content img { display: block; }
.entry-content figure { margin: 1.4rem 0; }
.entry-content figcaption { font-size: .76rem; color: var(--muted); margin-top: .4rem; }
.entry-content pre { overflow-x: auto; background: var(--ink); color: var(--paper); padding: 1rem; font-size: .82rem; }
.entry-tags { margin: 1.4rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; font-size: .8rem; }
.page-links { margin-top: 1rem; font-size: .85rem; }

.post-navigation { margin: 0 0 2rem; }
.post-navigation .nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.post-navigation a { display: block; background: var(--paper); border: 1px solid var(--paper-edge); box-shadow: var(--hard); padding: 1rem 1.2rem; text-decoration: none; color: var(--ink); height: auto; }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.post-navigation .nav-dir { display: block; font-size: .72rem; color: var(--red); text-transform: uppercase; letter-spacing: .06em; }
.post-navigation .nav-name { display: block; font-family: var(--head); font-weight: 700; font-size: 1.05rem; }
.post-navigation a:hover .nav-name { color: var(--blue); }

/* Пагинация */
.pager { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2.6rem 0 0; align-items: center; }
.pager .page-numbers {
    display: inline-block;
    min-width: 2.6rem;
    padding: .45rem .75rem;
    text-align: center;
    font-family: var(--head);
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    text-decoration: none;
    background: var(--paper);
    border: 1.5px solid var(--ink);
    box-shadow: 2px 2px 0 rgba(35, 40, 46, .2);
}
.pager a.page-numbers:hover { background: var(--yellow); }
.pager .page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; transform: rotate(-3deg); }
.pager .page-numbers.dots { background: none; border: 0; box-shadow: none; min-width: 0; }

/* Сайдбар */
.sidebar { min-width: 0; }
.sidebar .widget {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--paper-edge);
    border-top: 6px solid var(--blue);
    box-shadow: var(--hard);
    padding: 1.3rem 1.3rem 1.1rem;
    margin-bottom: 1.8rem;
    color: var(--ink);
    font-size: .84rem;
}
.sidebar .widget-title { margin: 0 0 .8rem; font-size: 1.2rem; text-transform: uppercase; color: var(--ink); }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: .5rem 0; border-bottom: 1px dashed #C7CFD5; }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--blue); }
.sidebar .widget a:hover { color: var(--red); }
.sidebar .widget .post-date { display: block; font-size: .72rem; color: var(--muted); }

/* Поиск */
.search-form { margin: 1rem 0; }
.search-label { display: block; font-family: var(--head); text-transform: uppercase; font-size: .9rem; margin-bottom: .4rem; }
.search-row { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.search-field { flex: 1 1 220px; min-width: 0; font: inherit; font-size: .9rem; padding: .6rem .8rem; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); }
.search-submit { flex: 0 0 auto; }

/* 404 */
.lost { padding: 2.4rem 2rem; max-width: 760px; }
.lost-stamp { display: inline-block; font-family: var(--head); font-weight: 700; font-size: 4rem; line-height: 1; color: var(--red); border: 4px double var(--red); padding: .2rem 1rem; transform: rotate(-6deg); margin: 0 0 1.2rem; }
.empty-sheet { padding: 1.6rem; }

/* Комментарии */
.comments { padding: 1.8rem 2rem; margin-bottom: 2rem; }
.comments-title, .comment-reply-title { font-size: 1.5rem; text-transform: uppercase; margin: 0 0 1rem; }
.comment-list { list-style: none; margin: 0 0 1.6rem; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.6rem; border-left: 2px solid var(--grid-line); }
.note-body { padding: 1rem 0; border-bottom: 1px dashed #C7CFD5; }
.note-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .5rem; }
.note-head img { display: block; border: 1px solid var(--ink); }
.note-author { font-family: var(--head); font-weight: 700; }
.note-date { font-size: .72rem; color: var(--muted); }
.note-wait { font-size: .8rem; color: var(--red); }
.note-text { font-size: .88rem; }
.note-reply a { font-size: .78rem; font-family: var(--head); text-transform: uppercase; letter-spacing: .05em; }
.comment-form label { display: block; font-family: var(--head); font-size: .9rem; text-transform: uppercase; margin-bottom: .3rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%; font: inherit; font-size: .9rem; padding: .6rem .8rem; border: 1.5px solid var(--ink); background: #fff; color: var(--ink);
}
.comment-form .comment-form-cookies-consent label { display: inline; text-transform: none; font-family: var(--mono); font-size: .78rem; }
.comment-form .submit {
    font-family: var(--head); font-weight: 700; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase;
    color: #fff; background: var(--red); border: 2px solid var(--red); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--red);
    padding: .6rem 1.3rem; cursor: pointer; transform: rotate(-2deg);
}
.comment-form .submit:hover { background: var(--paper); color: var(--red); }
.comment-notes, .logged-in-as { font-size: .8rem; color: var(--muted); }

/* ---------- Подвал ---------- */
.site-foot { background: var(--foot); color: var(--foot-text); padding: 3rem 0 1.4rem; margin-top: 1rem; border-top: 6px solid var(--yellow); }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
.foot-col { min-width: 0; }
.site-foot .widget { color: var(--foot-text); font-size: .82rem; line-height: 1.6; }
.site-foot .widget-title { margin: 0 0 .9rem; font-size: 1.25rem; text-transform: uppercase; color: var(--foot-text); letter-spacing: .03em; }
.site-foot .widget p { color: var(--foot-text); }
.site-foot .widget a { color: var(--foot-text); text-decoration-color: rgba(247, 245, 239, .5); }
.site-foot .widget a:hover { color: var(--yellow); text-decoration-color: var(--yellow); }
.site-foot .widget ul { list-style: none; margin: 0; padding: 0; }
.site-foot .widget li { margin: 0 0 .35rem; }
.site-foot .widget .post-date { color: #B9C6CE; }
.foot-copy { margin: 2.4rem 0 0; padding-top: 1.2rem; border-top: 1px solid rgba(247, 245, 239, .2); text-align: center; font-size: .74rem; color: #C9D2D8; }

/* ---------- Cookie ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.6rem;
    flex-wrap: wrap;
    max-width: 920px;
    margin: 0 auto;
    background: var(--paper);
    color: var(--ink);
    border: 1.5px solid var(--ink);
    border-top: 6px solid var(--yellow);
    box-shadow: 5px 5px 0 rgba(35, 40, 46, .3);
    padding: 1.1rem 1.4rem;
}
.cookie-text { margin: 0; font-size: .8rem; flex: 1 1 360px; min-width: 0; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .masthead-sheet { align-items: center; }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
        font-family: var(--head);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
        font-size: .9rem;
        background: var(--paper);
        color: var(--ink);
        border: 1.5px solid var(--ink);
        padding: .5rem .8rem;
        cursor: pointer;
    }
    .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; content: ""; }
    .nav-toggle-bars::before { position: absolute; top: -6px; }
    .nav-toggle-bars::after { position: absolute; top: 6px; }
    .top-nav { display: none; flex-basis: 100%; }
    .top-nav.is-open { display: block; }
    .top-nav-list { flex-direction: column; gap: 0; border-top: 1px dashed var(--paper-edge); }
    .top-nav-list a { display: block; padding: .7rem 0; border-bottom: 1px dashed var(--paper-edge); }
    .reqs-grid { grid-template-columns: minmax(0, 1fr); }
    .photo-print { max-width: 620px; justify-self: center; }
    .folders { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
    .cards, .layout-single .cards-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fs-pair { grid-template-columns: minmax(0, 1fr); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    body { font-size: 14px; }
    .masthead { margin-top: 1rem; }
    .masthead-sheet { padding: 1.1rem 1.1rem 1.2rem; }
    .masthead-tabs { padding: 0 .8rem; }
    .brand { flex-basis: 100%; }
    .brand-stamp { width: 48px; height: 48px; }
    .sheet { padding: 1.2rem 1.1rem; }
    .reqs-sheet { padding: 1.4rem 1.1rem 1rem; }
    .req-text { margin-left: 0; }
    .folders { grid-template-columns: minmax(0, 1fr); }
    .folder { min-height: 120px; }
    .folder-panel { padding: 1rem 1.1rem; }
    .cards, .cards-list, .layout-single .cards-list { grid-template-columns: minmax(0, 1fr); }
    .card-sticker { right: -6px; }
    .check-sheet { padding: 1.3rem 1.1rem; }
    .check-name { font-size: 1.1rem; }
    .cal-sheet { padding: 1.2rem 1rem 1.4rem; }
    .cal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cal-sticker { position: static; display: inline-block; margin-top: 1.2rem; transform: rotate(-4deg); max-width: none; }
    .page-head { padding: 1.1rem 1.1rem; }
    .entry { padding: 1.5rem 1.1rem 1.3rem; }
    .comments { padding: 1.3rem 1.1rem; }
    .lost { padding: 1.6rem 1.1rem; }
    .post-navigation .nav-links { grid-template-columns: minmax(0, 1fr); }
    .post-navigation .nav-next { grid-column: 1; }
    .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
    .cookie-banner { padding: 1rem 1.1rem; left: .5rem; right: .5rem; bottom: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
.nowrap { white-space: nowrap; }
