/*
Theme Name: dds_tutorsmart.ru
Theme URI: https://tutorsmart.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: tsmart
*/

/* ---------- Шрифты ---------- */
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/caveat-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: "Caveat"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/caveat-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+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/unbounded-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: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/unbounded-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+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-condensed-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-condensed-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Condensed"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/roboto-condensed-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: "Roboto Condensed"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/roboto-condensed-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+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-condensed-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: "Roboto Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-condensed-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+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Палитра ---------- */
:root {
    --paper: #DCE8F2;
    --grid: #B9CFE3;
    --margin: #E4572E;
    --ink: #1F2A44;
    --muted: #6B7A90;
    --marker: #F2C230;
    --green: #2E9E6B;
    --coral: #E4572E;
    --insert: #FBFCFE;
    --night: #1F2A44;
    --night-text: #DCE8F2;
    --head-paper: #D1E0EE;
    --head-grid: #A6C0DA;
    --side-paper: #EEF4FA;
    --fold: #E5EDF5;
    --hatch: #7E9CC9;
    --cell: 22px;
    --f-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
    --f-head: "Unbounded", "Arial Black", "Segoe UI", sans-serif;
    --f-text: "Roboto Condensed", "Arial Narrow", "Segoe UI", Arial, sans-serif;
}

/* Элементы, управляемые атрибутом hidden (до основных стилей) */
.cookie-banner[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(--f-text);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: var(--cell) var(--cell);
}
p, li, dd, td, th, blockquote, figcaption, .card-title, .entry-title, .page-title, .brand-text {
    overflow-wrap: break-word;
    hyphens: auto;
}
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--coral); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px dashed var(--coral);
    outline-offset: 3px;
}
h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; line-height: 1.2; color: var(--ink); }

.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(--marker);
    border: 1.5px solid var(--ink);
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus { top: 1rem; }

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

/* Лист с полем */
.sheet { position: relative; }
.sheet::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: max(10px, calc((100% - 1180px) / 2 - 34px));
    width: 2px;
    background: var(--margin);
    opacity: .85;
    pointer-events: none;
    z-index: 0;
}
.masthead, main, .backcover { position: relative; z-index: 1; }

/* ---------- Кнопки и ссылки ---------- */
.sticker-btn {
    display: inline-block;
    padding: .35rem 1.1rem .4rem;
    background: var(--marker);
    color: #111;
    border: 1.5px solid #111;
    border-radius: 0;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.15;
    text-decoration: none;
    cursor: pointer;
    transform: rotate(-3deg);
    box-shadow: 2px 2px 0 rgba(31, 42, 68, .25);
    transition: transform .15s ease, box-shadow .15s ease;
}
.sticker-btn:hover {
    color: #111;
    transform: rotate(0deg) translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--ink);
}
.hand-link {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--ink);
    text-decoration: underline wavy var(--coral);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}
.hand-link::after { content: " →"; color: var(--coral); }
.hand-link:hover { color: var(--coral); }

/* ---------- Шапка ---------- */
.masthead {
    background-color: var(--head-paper);
    background-image:
        linear-gradient(var(--head-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--head-grid) 1px, transparent 1px);
    background-size: var(--cell) var(--cell);
    border-bottom: 2px solid var(--ink);
    padding: 1.6rem 0 1.4rem;
}
.masthead-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-decoration: none;
    color: var(--ink);
    min-width: 0;
    flex: 1 1 520px;
}
.brand:hover { color: var(--ink); }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-svg { display: block; width: 76px; height: auto; }
.brand-logo { display: block; max-width: 96px; max-height: 96px; width: auto; height: auto; }
.brand-text { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.brand-name {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: clamp(1.35rem, 2.6vw, 2.15rem);
    line-height: 1.12;
    letter-spacing: -.02em;
    }
.brand-sub {
    font-family: var(--f-text);
    font-weight: 700;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.3;
}
.brand-tagline {
    font-size: 1rem;
    line-height: 1.4;
    color: var(--muted);
    max-width: 52ch;
}

.toc { flex: 0 0 auto; min-width: 0; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { margin: 0; }
.toc-list a {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    min-width: 250px;
    padding: .18rem 0;
    font-size: 1.18rem;
    color: var(--ink);
    text-decoration: none;
}
.toc-list a::before {
    content: "";
    flex: 0 0 auto;
    width: 6px; height: 6px;
    margin-right: .35rem;
    border-radius: 50%;
    background: var(--ink);
    transform: translateY(-3px);
}
.toc-label { flex: 0 1 auto; }
.toc-dots {
    flex: 1 1 auto;
    min-width: 40px;
    border-bottom: 2px dotted var(--ink);
    transform: translateY(-5px);
}
.toc-list a:hover .toc-label {
    color: var(--coral);
    text-decoration: underline var(--coral) 2px;
    text-underline-offset: 4px;
}
.toc-list .current-menu-item > a .toc-label,
.toc-list .current_page_item > a .toc-label {
    background: linear-gradient(transparent 45%, rgba(242, 194, 48, .85) 45%, rgba(242, 194, 48, .85) 90%, transparent 90%);
}
.toc-toggle {
    display: none;
    align-items: center;
    gap: .6rem;
    padding: .45rem .9rem;
    background: var(--insert);
    border: 1.5px solid var(--ink);
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--ink);
    cursor: pointer;
}
.toc-toggle-bars,
.toc-toggle-bars::before,
.toc-toggle-bars::after {
    display: block;
    width: 22px; height: 2px;
    background: var(--ink);
    position: relative;
}
.toc-toggle-bars::before, .toc-toggle-bars::after { content: ""; position: absolute; left: 0; }
.toc-toggle-bars::before { top: -7px; }
.toc-toggle-bars::after { top: 7px; }

/* ---------- Заголовки секций ---------- */
.sec-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1.6rem;
}
.sec-title {
    margin: 0;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.1;
}
.sec-title span {
    padding: 0 .35em 0 .2em;
    margin-left: -.2em;
    background: linear-gradient(176deg, transparent 38%, rgba(242, 194, 48, .9) 40%, rgba(242, 194, 48, .9) 86%, transparent 88%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.sec-arrow { flex: 0 0 auto; width: 58px; height: auto; display: block; }
.sec-intro { max-width: 70ch; color: var(--muted); font-size: 1.1rem; margin-bottom: 2rem; }

/* ---------- Главная ---------- */
.front.shell { width: min(85%, 1180px); }
.front { padding: 2.6rem 0 3rem; }
.front-sec { position: relative; padding: 2.4rem 0; }
.front-sec > * { position: relative; z-index: 1; }

/* Блок 1 — цель ученика */
.front-sec > .goal-blot {
    position: absolute;
    z-index: 0;
    right: 0;
    top: -2%;
    width: clamp(110px, 15%, 200px);
    opacity: .85;
    height: auto;
    display: block;
    pointer-events: none;
}
.goal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}
.goal-map { margin: 0; min-width: 0; }
.goal-figure { position: relative; width: 62%; }
.goal-figure img { display: block; width: 100%; height: auto; }
.goal-ring {
    position: absolute;
    left: calc(100% + .35rem);
    transform: translateY(-50%);
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: clamp(1.25rem, 2.4vw, 2rem);
    line-height: 1;
    white-space: nowrap;
}
.goal-ring-1 { top: 13%; }
.goal-ring-2 { top: 35.5%; }
.goal-ring-3 { top: 56%; }
.goal-ring-4 { top: 78%; }
.goal-caption {
    margin-top: 1rem;
    max-width: 34ch;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.3rem;
    line-height: 1.2;
    color: var(--muted);
    transform: rotate(-1.5deg);
}
.goal-text { min-width: 0; }
.goal-lead {
    font-size: clamp(1.35rem, 2.3vw, 1.7rem);
    line-height: 1.3;
    margin-bottom: .8rem;
}
.checks { list-style: none; margin: 1.4rem 0 0; padding: 0; }
.checks li {
    position: relative;
    padding-left: 2.4rem;
    margin-bottom: .9rem;
}
.checks li::before {
    content: "";
    position: absolute;
    left: 0; top: .35rem;
    width: 1.6rem; height: 1.6rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M4 17 C8 20 10 23 12 27 C16 17 22 9 29 4' fill='none' stroke='%231F2A44' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.checks strong {
    display: block;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.8rem;
    line-height: 1.15;
}
.checks span { display: block; color: var(--muted); }

/* Блок 2 — картотека */
.drawer {
    list-style: none;
    margin: 0;
    padding: 0 8px 0 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem 1.8rem;
}
.drawer-item {
    position: relative;
    min-width: 0;
    padding-top: 20px;
}
.drawer-item::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: -6px; right: 18px;
    top: 6px; bottom: 26px;
    background: var(--folder, var(--marker));
    clip-path: polygon(0 0, 46% 0, 54% 16px, 100% 16px, 100% 100%, 0 100%);
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .08);
}
.drawer-item::after {
    content: "";
    position: absolute;
    z-index: 1;
    right: 30px; top: 0;
    width: 26px; height: 40px;
    background: var(--flag, var(--coral));
    border: 2px solid var(--ink);
}
.index-card {
    position: relative;
    z-index: 2;
    margin-top: 12px;
    padding: 1.1rem 1.1rem 1rem;
    background: var(--insert);
    border: 1.5px solid var(--ink);
    box-shadow: 7px 7px 0 -1.5px #F1F4F8, 7px 7px 0 0 var(--ink);
    transform: rotate(-1.4deg);
    transition: transform .2s ease;
}
.drawer-item:nth-child(even) .index-card { transform: rotate(1.2deg); }
.drawer-item:hover .index-card { transform: rotate(0deg) translateY(-4px); }
.index-card p { margin: 0; }
.index-subject {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.85rem;
    line-height: 1.05;
    text-align: center;
}
.index-focus {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.1;
    text-align: center;
    color: var(--muted);
    margin-bottom: .7rem !important;
}
.index-focus::before { content: "("; }
.index-focus::after { content: ")"; }
.index-line {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.2;
}
.index-line b { font-weight: 700; color: var(--muted); }
.index-scale {
    display: flex;
    justify-content: center;
    margin: .85rem 0 .3rem;
}
.index-scale span {
    width: 20%;
    max-width: 30px;
    height: 18px;
    border: 1.5px solid var(--ink);
    margin-left: -1.5px;
    background: var(--insert);
}
.index-scale span.on {
    background: repeating-linear-gradient(45deg, var(--hatch) 0 2px, #CBD9EC 2px 5px);
}
.index-note {
    text-align: center;
    font-size: .8rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Блок записей */
.cards {
    display: grid;
    gap: 2.2rem 2rem;
}
.cards-front { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.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;
    min-width: 0;
    overflow: hidden;
    background: var(--insert);
    border: 2px solid var(--grid);
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%);
    transform: rotate(-1deg);
    transition: transform .2s ease;
}
.card::after {
    content: "";
    position: absolute;
    top: -2px; right: -2px;
    width: 32px; height: 32px;
    background: linear-gradient(225deg, transparent calc(50% - 1px), var(--grid) calc(50% - 1px), var(--grid) calc(50% + 1px), var(--fold) calc(50% + 1px));
    border-left: 2px solid var(--grid);
    border-bottom: 2px solid var(--grid);
    pointer-events: none;
}
.cards .card:nth-child(3n+2) { transform: rotate(.8deg); }
.cards .card:nth-child(3n) { transform: rotate(-.5deg); }
.cards .card:hover { transform: rotate(0deg) translateY(-4px); }
.card-thumb { padding: 14px 14px 0; }
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1rem 1.3rem 1.3rem;
}
.card-pin {
    align-self: flex-start;
    margin-bottom: .4rem;
    padding: .1rem .5rem;
    background: var(--green);
    color: #fff;
    font-size: .8rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    transform: rotate(-2deg);
}
.card-title {
    margin: 0 0 .45rem;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1.08;
}
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--coral); }
.card-excerpt { color: var(--muted); font-size: 1rem; line-height: 1.5; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-foot {
    margin-top: auto;
    padding-top: .9rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: .8rem;
    flex-wrap: wrap;
}
.card-date {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--muted);
}
.latest-more { margin: 2.2rem 0 0; text-align: right; }
.empty-note {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--muted);
}

/* Блок 3 — неделя */
.week-wrap {
    display: flex;
    align-items: stretch;
    gap: 1.2rem;
}
.week-board {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border: 2px solid var(--ink);
    background: rgba(251, 252, 254, .3);
}
.week-day { min-width: 0; border-right: 2px solid var(--ink); display: flex; flex-direction: column; }
.week-day:last-child { border-right: 0; }
.week-name {
    margin: 0;
    padding: .35rem .5rem;
    border-bottom: 2px solid var(--ink);
    text-align: center;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.95rem;
    line-height: 1.2;
}
.week-cell {
    flex: 1;
    min-height: 190px;
    padding: 1rem .9rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: .7rem;
}
.lesson {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: .55rem .75rem .6rem;
    background: var(--sticky, var(--marker));
    border-radius: 4px;
    box-shadow: 2px 3px 0 rgba(31, 42, 68, .2);
    transform: rotate(-1deg);
}
.week-day:nth-child(even) .lesson { transform: rotate(.9deg); }
.lesson-time, .lesson-subj {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.1;
}
.lesson-note { font-size: .88rem; line-height: 1.3; margin-top: .2rem; }
.lesson-moved .lesson-time { text-decoration: line-through 2px; }
.lesson-moved { outline: 2px dashed rgba(31, 42, 68, .55); outline-offset: -5px; }
.lesson-arrow {
    position: absolute;
    right: -30px;
    bottom: -26px;
    width: 52px;
    height: auto;
    display: block;
    z-index: 2;
}
.week-margin {
    flex: 0 0 auto;
    margin: 0;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    align-self: center;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.45rem;
    line-height: 1.1;
    max-height: 260px;
    padding: 0 .3rem;
    border-right: 2px solid var(--coral);
}
.week-tip { max-width: 72ch; margin: 1.6rem 0 0; color: var(--muted); font-size: 1.05rem; }

/* Блок 4 — прогресс */
.progress { overflow: hidden; }
.progress::before {
    content: "";
    position: absolute;
    z-index: 0;
    right: 1%;
    top: 4%;
    width: clamp(110px, 16%, 200px);
    aspect-ratio: 480 / 568;
    background: url("images/marker-blot.webp") no-repeat center / contain;
    transform: scaleX(-1) rotate(-25deg);
    opacity: .5;
    pointer-events: none;
}
.progress-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}
.progress-chart { margin: 0; min-width: 0; }
.progress-chart img { display: block; width: 100%; height: auto; aspect-ratio: 1146 / 549; }
.progress-chart figcaption {
    margin-top: .6rem;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--muted);
}
.progress-facts { min-width: 0; }
.facts-label {
    display: inline-block;
    margin-bottom: .6rem;
    padding: .1rem .6rem;
    border: 1.5px solid var(--ink);
    background: var(--insert);
    font-size: .85rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    transform: rotate(-2deg);
}
.facts { list-style: none; margin: 0 0 .6rem; padding: 0; }
.facts li {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: clamp(2.1rem, 3.8vw, 3.1rem);
    line-height: 1.12;
}
.facts b { font-size: 1.2em; margin-right: .15em; }
.facts-sign {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.55rem;
    line-height: 1.15;
    margin-bottom: .8rem;
}
.facts-text { color: var(--muted); font-size: 1rem; max-width: 42ch; }

/* ---------- Внутренние страницы ---------- */
.page-wrap { padding: 2rem 0 3.5rem; }
.crumbs {
    margin: 0 0 1.6rem;
    font-size: .98rem;
    color: var(--muted);
}
.crumbs a { color: var(--ink); text-decoration-color: var(--coral); text-underline-offset: 3px; }
.crumbs-sep { color: var(--coral); margin: 0 .25rem; font-weight: 700; }
.crumbs-current { color: var(--muted); }

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

.page-head { margin-bottom: 2rem; }
.page-title, .entry-title {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1.18;
    letter-spacing: -.015em;
    margin: 0 0 .6rem;
}
.page-intro { color: var(--muted); max-width: 70ch; }

.entry {
    position: relative;
    padding: 2.2rem 2.4rem 2.4rem;
    background: var(--insert);
    border: 2px solid var(--grid);
    box-shadow: 5px 6px 0 rgba(31, 42, 68, .12);
}
.entry::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 50%;
    width: 110px;
    height: 28px;
    margin-left: -55px;
    background: rgba(242, 194, 48, .55);
    transform: rotate(-3deg);
}
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    align-items: baseline;
    margin: 0;
    color: var(--muted);
}
.entry-cats a {
    margin-right: .5rem;
    font-size: .95rem;
    color: var(--ink);
    text-decoration: underline var(--coral) 2px;
    text-underline-offset: 3px;
}
.entry-cover { margin: 1.6rem 0 0; }
.entry-cover img { display: block; width: 100%; height: auto; }
.entry-content { margin-top: 1.6rem; }
.entry-content h2, .entry-content h3 {
    font-family: var(--f-hand);
    font-weight: 700;
    line-height: 1.1;
    margin-top: 1.6em;
}
.entry-content h2 { font-size: 2.1rem; }
.entry-content h2::after {
    content: "";
    display: block;
    width: 90px;
    height: 10px;
    margin-top: .1rem;
    background: rgba(242, 194, 48, .9);
    transform: skewX(-20deg);
}
.entry-content h3 { font-size: 1.75rem; }
.entry-content h4 { font-size: 1.15rem; margin-top: 1.4em; }
.entry-content a {
    color: var(--ink);
    text-decoration: underline var(--coral) 2px;
    text-underline-offset: 3px;
}
.entry-content a:hover { color: var(--coral); }
.entry-content ul, .entry-content ol { padding-left: 1.6rem; margin: 0 0 1.2em; }
.entry-content ul { list-style: none; padding-left: 1.6rem; }
.entry-content ul li { position: relative; margin-bottom: .35em; }
.entry-content ul li::before {
    content: "";
    position: absolute;
    left: -1.25rem; top: .62em;
    width: .7rem; height: 2px;
    background: var(--coral);
}
.entry-content ol li { margin-bottom: .35em; }
.entry-content ol li::marker { font-family: var(--f-hand); font-weight: 700; font-size: 1.2em; color: var(--coral); }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.5rem;
    background: #FFF6CF;
    border: 1.5px solid #D8B637;
    border-left: 6px solid var(--marker);
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.3;
    transform: rotate(-.6deg);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; border: 1.5px solid var(--ink); font-size: .98rem; }
.entry-content th, .entry-content td { border: 1px solid var(--ink); padding: .55rem .7rem; text-align: left; vertical-align: top; }
.entry-content th { background: #E7EFF7; font-weight: 700; }
.entry-content img { display: block; height: auto; }
.entry-content figure { margin: 1.5em 0; max-width: 100%; }
.entry-content figcaption { font-size: .9rem; color: var(--muted); margin-top: .4rem; }
.entry-content pre {
    overflow-x: auto;
    padding: 1rem;
    background: var(--night);
    color: var(--night-text);
    font-size: .92rem;
}
.entry-content code { font-size: .92em; background: #E7EFF7; padding: .05em .3em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: 0; border-top: 2px dashed var(--grid); margin: 2em 0; }
.entry-tags { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.entry-tags a {
    padding: .1rem .55rem;
    border: 1.5px solid var(--ink);
    background: var(--paper);
    font-size: .92rem;
    text-decoration: none;
    color: var(--ink);
}
.entry-tags a:hover { background: var(--marker); color: var(--ink); }

.entry-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}
.entry-nav a {
    display: block;
    min-width: 0;
    padding: .9rem 1.1rem;
    background: var(--insert);
    border: 1.5px solid var(--grid);
    color: var(--ink);
    text-decoration: none;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.15;
}
.entry-nav a span { display: block; font-family: var(--f-text); font-weight: 400; font-size: .85rem; color: var(--muted); margin-bottom: .25rem; }
.entry-nav a:hover { border-color: var(--ink); color: var(--coral); }
.entry-nav-next { grid-column: 2; text-align: right; }

/* Сайдбар */
.sidebar { min-width: 0; }
.sidebar .widget {
    position: relative;
    margin-bottom: 2rem;
    padding: 1.5rem 1.3rem 1.2rem;
    background: var(--side-paper);
    border: 1.5px solid var(--ink);
    color: var(--ink);
    box-shadow: 4px 4px 0 rgba(31, 42, 68, .18);
}
.sidebar .widget::before {
    content: "";
    position: absolute;
    top: -12px; left: 1.2rem;
    width: 74px; height: 22px;
    background: rgba(46, 158, 107, .45);
    transform: rotate(-4deg);
}
.sidebar .widget-title {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1.1;
    color: var(--ink);
    margin: 0 0 .8rem;
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li {
    padding: .5rem 0;
    border-bottom: 1px solid var(--grid);
    line-height: 1.35;
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--ink); text-decoration: none; }
.sidebar .widget a:hover { color: var(--coral); text-decoration: underline var(--coral) 2px; text-underline-offset: 3px; }
.sidebar .widget .post-date, .sidebar .widget .rss-date { display: block; color: var(--muted); font-size: .88rem; }
.sidebar .widget p { color: var(--ink); }

/* Пагинация */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
    margin: 2.8rem 0 0;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    padding: .25rem .8rem;
    background: var(--insert);
    border: 1.5px solid var(--ink);
    color: var(--ink);
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.3;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.pager a.page-numbers:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); }
.pager .page-numbers.current { background: var(--marker); transform: rotate(-3deg); }
.pager .page-numbers.dots { background: none; border: 0; min-width: 0; padding: 0 .2rem; }

/* Поиск */
.find-form { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin: 1.2rem 0; }
.find-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: .6rem .8rem;
    font: inherit;
    color: var(--ink);
    background: var(--insert);
    border: 1.5px solid var(--ink);
    border-radius: 0;
}
.find-btn { font-size: 1.3rem; }
.empty-sheet, .lost-page {
    padding: 2rem 2.2rem;
    background: var(--insert);
    border: 2px solid var(--grid);
}
.lost-code {
    margin: 0;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 7rem);
    line-height: 1;
    color: var(--coral);
    letter-spacing: -.04em;
}

/* Комментарии */
.comments { margin-top: 2.6rem; }
.comments-title, .comment-reply-title {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.1;
}
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-left: 2rem; }
.note-comment-body {
    margin-bottom: 1.2rem;
    padding: 1rem 1.2rem;
    background: var(--insert);
    border: 1.5px solid var(--grid);
}
.note-comment-meta { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .5rem; }
.note-comment-meta img { display: block; border-radius: 50%; }
.note-comment-author { font-weight: 700; }
.note-comment-meta time { color: var(--muted); font-size: .9rem; }
.note-comment-wait { color: var(--coral); font-size: .95rem; }
.comment-reply-link { font-family: var(--f-hand); font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: underline var(--coral) 2px; text-underline-offset: 3px; }
.comment-respond { margin-top: 1.6rem; padding: 1.4rem 1.6rem; background: var(--side-paper); border: 1.5px solid var(--ink); }
.comment-form label { display: block; font-weight: 700; margin-bottom: .25rem; }
.comment-form .comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: .6rem .8rem;
    font: inherit;
    color: var(--ink);
    background: var(--insert);
    border: 1.5px solid var(--ink);
    border-radius: 0;
}
.comment-form .submit {
    padding: .35rem 1.2rem .4rem;
    background: var(--marker);
    color: #111;
    border: 1.5px solid #111;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.4rem;
    cursor: pointer;
    transform: rotate(-2deg);
}
.comment-form .submit:hover { transform: rotate(0) translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.comment-notes, .logged-in-as { color: var(--muted); font-size: .95rem; }
.req { color: var(--coral); }

/* ---------- Подвал ---------- */
.backcover {
    background-color: var(--night);
    background-image:
        linear-gradient(rgba(220, 232, 242, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 232, 242, .06) 1px, transparent 1px);
    background-size: var(--cell) var(--cell);
    color: var(--night-text);
    padding: 3rem 0 1.4rem;
    border-top: 4px solid var(--marker);
}
.backcover-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
}
.backcover-col { min-width: 0; }
.backcover .widget { margin-bottom: 1.4rem; color: #C9D7E5; font-size: .98rem; }
.backcover .widget-title {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -.01em;
    color: var(--night-text);
    margin: 0 0 .9rem;
}
.backcover .widget p, .backcover .widget .textwidget { color: #C9D7E5; }
.backcover .widget ul { list-style: none; margin: 0; padding: 0; }
.backcover .widget li { margin-bottom: .45rem; }
.backcover .widget a { color: var(--night-text); text-decoration: none; }
.backcover .widget a:hover { color: var(--marker); text-decoration: underline var(--marker) 2px; text-underline-offset: 3px; }
.backcover .widget .post-date { color: #9FB2C8; }
.backcover-copy {
    margin: 2rem 0 0;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(220, 232, 242, .2);
    text-align: center;
    font-size: .92rem;
    color: #A9BBCF;
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    z-index: 90;
    left: 1rem; right: 1rem; bottom: 1rem;
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 1.3rem;
    background: var(--insert);
    color: var(--ink);
    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
}
.cookie-text { margin: 0; font-size: .98rem; line-height: 1.45; flex: 1 1 auto; min-width: 0; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .masthead-inner { align-items: center; }
    .toc-toggle { display: inline-flex; }
    .toc { display: none; flex: 1 1 100%; }
    .toc.is-open { display: block; }
    .toc-list a { min-width: 0; }
    .brand { flex-basis: 0; flex-grow: 1; }
    .goal-grid, .progress-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .goal-figure { width: 60%; }
    .front-sec > .goal-blot { top: 0; width: 90px; }
    .drawer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cards-front, .cards-list, .layout-single .cards-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-with-sidebar { display: block; }
    .sidebar { margin-top: 3rem; }
    .layout-single > .content-area { width: 100%; }
    .week-wrap { flex-direction: column; }
    .week-board { grid-template-columns: minmax(0, 1fr); }
    .week-day { border-right: 0; border-bottom: 2px solid var(--ink); display: grid; grid-template-columns: 70px minmax(0, 1fr); }
    .week-day:last-child { border-bottom: 0; }
    .week-name { border-bottom: 0; border-right: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; }
    .week-cell { min-height: 0; padding: .9rem; flex-direction: row; flex-wrap: wrap; }
    .lesson { flex: 1 1 180px; }
    .lesson-arrow { display: none; }
    .week-margin { writing-mode: horizontal-tb; transform: rotate(-1.5deg); align-self: flex-start; border-right: 0; border-left: 4px solid var(--coral); padding: 0 0 0 .7rem; max-height: none; }
    .backcover-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .front.shell { width: 92%; }
    .front-sec { padding: 1.8rem 0; }
    .brand-svg { width: 56px; }
    .brand-sub {
    font-family: var(--f-text);
    font-weight: 700;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.3;
}
.brand-tagline { display: none; }
    .toc-toggle-label { display: none; }
    .goal-figure { width: 62%; }
    .drawer { grid-template-columns: minmax(0, 1fr); padding: 0 12px; }
    .cards-front, .cards-list, .layout-single .cards-list { grid-template-columns: minmax(0, 1fr); }
    .entry { padding: 1.6rem 1.2rem 1.8rem; }
    .empty-sheet, .lost-page { padding: 1.5rem 1.2rem; }
    .entry-nav { grid-template-columns: minmax(0, 1fr); }
    .entry-nav-next { grid-column: 1; }
    .backcover-cols { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .cookie-banner { flex-direction: column; align-items: flex-start; padding: 1rem 1.1rem; box-shadow: 4px 4px 0 var(--ink); }
    .comment-respond { padding: 1.2rem 1rem; }
    .comment-list .children { padding-left: 1rem; }
    .sheet::before { left: 6px; }
    .progress::before { width: 90px; top: 0; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
