/* =========================================================
   draw24.ru — детский современный дизайн
   Шрифт Nunito (самохостинг), чистый CSS, без сборщиков
   ========================================================= */

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("/fonts/nunito-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("/fonts/nunito-latin.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 {
    --bg: #fffaf3;
    --bg-soft: #fff4e6;
    --surface: #ffffff;
    --ink: #22314c;
    --muted: #5c6a80;
    --line: #ece2d4;

    --coral: #ff6b6b;
    --coral-dark: #cf3d3d;
    --coral-ink: #c0392b;
    --sun: #ffc93c;
    --mint: #44c2b5;
    --sky: #4d9fff;
    --grape: #9b7bff;
    --leaf: #63c86e;

    --radius: 24px;
    --radius-sm: 16px;
    --shadow: 0 2px 0 rgba(34, 49, 76, .04), 0 12px 28px rgba(34, 49, 76, .07);
    --shadow-hover: 0 4px 0 rgba(34, 49, 76, .05), 0 18px 36px rgba(34, 49, 76, .12);
    --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font: 400 17px/1.65 var(--font);
    color: var(--ink);
    background: var(--bg);
}

a { color: #2f7fd1; text-decoration: none; }
a:hover { color: #1f68b3; }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; letter-spacing: -.015em; }

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 22px;
}

/* ---------------- header ---------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 250, 243, .94);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 2px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.02em;
}
.logo img {
    width: 36px; height: 36px;
    border-radius: 11px;
    background: #fff;
    border: 2px solid var(--line);
    object-fit: cover;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.logo-tagline {
    margin-top: 2px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}

/* поиск в шапке */
.search-mini {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 14px;
}
.search-mini input {
    width: 220px;
    padding: 10px 42px 10px 16px;
    font: 600 15px/1.2 var(--font);
    color: var(--ink);
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 999px;
    outline: none;
}
.search-mini input:focus { border-color: #cfd8e3; }
.search-mini button {
    position: absolute;
    right: 5px;
    width: 32px; height: 32px;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    background: var(--sun);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.search-mobile { display: none; }
.logo:hover { color: var(--ink); }
.logo em { font-style: normal; color: inherit; }
.logo-mark {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    font-size: 20px;
    background: var(--sun);
    border-radius: 12px;
    box-shadow: 0 3px 0 #e0ac1f;
    transform: rotate(-6deg);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
}
.main-nav > a,
.nav-dropdown summary {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 999px;
    color: var(--ink);
    cursor: pointer;
}
.main-nav > a:hover,
.nav-dropdown summary:hover { background: var(--bg-soft); color: var(--ink); }
.main-nav > a.is-active { background: var(--sun); box-shadow: 0 3px 0 #e0ac1f; }

.nav-dropdown { position: relative; }
.nav-dropdown summary { list-style: none; }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after {
    content: "";
    display: inline-block;
    margin-left: 7px;
    width: 7px; height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
}
.dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 20px;
    min-width: 380px;
    padding: 16px 20px;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    font-weight: 700;
}
.dropdown-panel a { padding: 6px 0; color: var(--ink); }
.dropdown-panel a:hover { color: var(--coral-dark); }

.nav-toggle, .nav-burger { display: none; }

/* ---------------- hero ---------------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 54px 0 46px;
    background:
        radial-gradient(680px 340px at 88% -10%, rgba(255, 201, 60, .35), transparent 70%),
        radial-gradient(520px 300px at 6% 110%, rgba(68, 194, 181, .22), transparent 70%),
        var(--bg);
    border-bottom: 2px solid var(--line);
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-text { flex: 1 1 auto; min-width: 0; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    margin-bottom: 18px;
    font-size: 15px;
    font-weight: 800;
    color: #8a5a00;
    background: #fff2cc;
    border-radius: 999px;
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 4.6vw, 54px);
}
.hero h1 .hl {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    color: var(--coral-dark);
}
.hero h1 .hl::after {
    content: "";
    position: absolute;
    left: -4px; right: -4px;
    bottom: 4px;
    height: 12px;
    background: rgba(255, 201, 60, .55);
    border-radius: 8px;
    z-index: -1;
}

.hero-lead {
    max-width: 560px;
    margin: 0 0 22px;
    font-size: 18px;
    color: var(--muted);
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}
.hero-chips span {
    padding: 8px 15px;
    font-size: 15px;
    font-weight: 700;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 999px;
}
.hero-chips strong { color: var(--coral-ink); }

.hero-art {
    flex: 0 0 320px;
    position: relative;
    height: 300px;
}
.hero-art .blob {
    position: absolute;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 3px solid var(--line);
    border-radius: 34px;
    box-shadow: var(--shadow);
    font-size: 54px;
    line-height: 1;
}
.hero-art .b1 { width: 130px; height: 130px; left: 40px; top: 30px; background: #ffe9e3; transform: rotate(-8deg); }
.hero-art .b2 { width: 104px; height: 104px; right: 20px; top: 0; background: #e6f7f0; transform: rotate(9deg); }
.hero-art .b3 { width: 112px; height: 112px; left: 0; bottom: 26px; background: #eef0ff; transform: rotate(6deg); }
.hero-art .b4 { width: 96px; height: 96px; right: 44px; bottom: 0; background: #fff6d9; transform: rotate(-5deg); }

/* ---------------- buttons ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    font: 800 17px/1 var(--font);
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: #cf3d3d;
    box-shadow: 0 4px 0 #a72f2f;
    transition: transform .12s ease, box-shadow .12s ease;
    cursor: pointer;
}
.btn:hover {
    color: #fff;
    transform: translateY(1px);
    box-shadow: 0 3px 0 #a72f2f;
}
.btn-mint { background: var(--mint); box-shadow: 0 4px 0 #2f9a90; }
.btn-mint:hover { box-shadow: 0 3px 0 #2f9a90; }

/* ---------------- sections / blocks ---------------- */

.section-block { padding: 46px 0 6px; }

.block-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    font-size: clamp(22px, 2.6vw, 30px);
}
.block-title .emoji {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    font-size: 22px;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

/* ---------------- categories ---------------- */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    box-shadow: 0 3px 0 rgba(34, 49, 76, .05);
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.category-card:hover {
    color: var(--ink);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.category-thumb {
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    width: 58px; height: 58px;
    border-radius: 16px;
    font-size: 30px;
    line-height: 1;
    overflow: hidden;
}
.category-thumb img { width: 100%; height: 100%; object-fit: contain; }
.category-body { display: flex; flex-direction: column; min-width: 0; }
.category-name { font-weight: 800; font-size: 17px; line-height: 1.3; }
.category-meta { font-size: 14px; color: var(--muted); font-weight: 600; }

/* цветовые тона карточек */
.tone-0 .category-thumb { background: #ffe9e3; }
.tone-1 .category-thumb { background: #e6f7f0; }
.tone-2 .category-thumb { background: #eef0ff; }
.tone-3 .category-thumb { background: #fff6d9; }
.tone-4 .category-thumb { background: #fdeaf6; }
.tone-5 .category-thumb { background: #e9f6e6; }

/* ---------------- how it works ---------------- */

.steps-how {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.how-card {
    padding: 22px;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 3px 0 rgba(34, 49, 76, .05);
}
.how-num {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    margin-bottom: 12px;
    font-weight: 800;
    color: #fff;
    background: var(--sky);
    border-radius: 12px;
    box-shadow: 0 3px 0 #2f7fd1;
}
.how-card:nth-child(2) .how-num { background: var(--mint); box-shadow: 0 3px 0 #2f9a90; }
.how-card:nth-child(3) .how-num { background: var(--grape); box-shadow: 0 3px 0 #7a5ce0; }
.how-card h3 { margin: 0 0 6px; font-size: 18px; }
.how-card p { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------------- post cards ---------------- */

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    align-items: start;
}

.post-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    box-shadow: 0 3px 0 rgba(34, 49, 76, .05);
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.post-card:hover {
    color: var(--ink);
    transform: translateY(-4px);
    border-color: #e2d3bd;
    box-shadow: var(--shadow-hover);
}
.post-thumb {
    display: block;
    aspect-ratio: 4 / 3;
    background: #fdf6ea;
    border-bottom: 2px solid var(--line);
}
.post-thumb img { width: 100%; height: 100%; object-fit: contain; }
.post-thumb-empty {
    display: grid;
    place-items: center;
    height: 100%;
    font-size: 44px;
    font-weight: 800;
    color: #d9c8b0;
}
.post-body { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px 18px; }

.post-icon {
    display: inline-grid;
    place-items: center;
    width: 38px; height: 38px;
    margin-bottom: 6px;
    font-size: 20px;
    line-height: 1;
    background: #fdf6ea;
    border: 2px solid var(--line);
    border-radius: 12px;
}

.post-card--text .post-body { padding-top: 18px; }
.post-title { font-weight: 800; font-size: 17px; line-height: 1.32; }
.post-excerpt { font-size: 14px; color: var(--muted); }

/* ---------------- breadcrumbs ---------------- */

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 20px 0 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--coral-dark); }
.breadcrumbs span[aria-current] { color: var(--ink); }
.breadcrumbs--article { max-width: 820px; margin: 0 auto; }

/* ---------------- section hero ---------------- */

.section-hero { padding: 26px 0 8px; }
.section-hero-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 22px 24px;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.section-hero-img {
    flex: 0 0 118px;
    width: 118px; height: 118px;
    object-fit: contain;
    background: #fdf6ea;
    border: 2px solid var(--line);
    border-radius: 20px;
}
.section-hero-emoji {
    flex: 0 0 100px;
    display: grid;
    place-items: center;
    width: 100px; height: 100px;
    font-size: 46px;
    background: #fff2cc;
    border-radius: 24px;
}
.section-hero h1 { margin: 0 0 8px; font-size: clamp(25px, 3vw, 36px); }
.section-hero-lead { margin: 0 0 10px; color: var(--muted); max-width: 700px; }
.section-hero-meta {
    display: inline-block;
    margin: 0;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 700;
    color: #8a5a00;
    background: #fff2cc;
    border-radius: 999px;
}

/* ---------------- article ---------------- */

.article { padding: 26px 0 10px; }
.article-head,
.article-lead,
.article-text { max-width: 820px; margin-left: auto; margin-right: auto; }
.article h1 { margin: 0 0 12px; font-size: clamp(27px, 3.6vw, 42px); }

/* Вводка: первый абзац перед плеером */
.article-lead {
    margin-bottom: 26px;
    padding-left: 18px;
    border-left: 4px solid var(--sun);
    font-size: clamp(17px, 1.3vw, 19px);
    line-height: 1.62;
    font-weight: 500;
    color: var(--ink);
}
.article-lead p { margin: 0; }

/* ---------------- обратная связь (цели Метрики) ---------------- */

.feedback {
    max-width: 820px;
    margin: 30px auto 0;
    padding: 22px 24px;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
}
.feedback-title { margin: 0 0 12px; font-size: 19px; font-weight: 800; }
.feedback-question { margin: 18px 0 10px; font-size: 15px; font-weight: 700; color: var(--muted); }
.feedback-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font: 700 15px/1 var(--font);
    color: var(--ink);
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.feedback-btn:hover:not(:disabled) { transform: translateY(-1px); border-color: #dcc39a; }
.feedback-btn:focus-visible { outline: 3px solid rgba(77, 159, 255, .4); outline-offset: 2px; }
.feedback-btn:disabled { cursor: default; opacity: .55; }
.feedback-btn.is-chosen { opacity: 1; background: #eefaf6; border-color: var(--mint); }
.feedback-btn.is-chosen[data-goal="notlike"],
.feedback-btn.is-chosen[data-goal="hard"] { background: #fff1f1; border-color: #ff9b9b; }
.feedback-thanks { margin: 14px 0 0; font-weight: 800; color: #1f7a3a; }
.feedback-thanks[hidden] { display: none; }

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 26px;
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #eef0ff;
    color: #4a3ed1;
}
.chip-date { background: var(--surface); border: 2px solid var(--line); color: var(--muted); }

.article-cover {
    margin: 0 auto 30px;
    max-width: 820px;
    padding: 14px;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}
.article-cover img { display: block; margin: 0 auto; max-height: 420px; width: auto; }
.article-cover--result { margin: 34px 0 0; }
.article-cover figcaption {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

/* ---------------- пошаговый просмотрщик ---------------- */

.steps {
    margin: 0 0 34px;
    padding: 26px 28px;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.steps-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 620px;
    margin: 0 auto 16px;
}
.steps-title { margin: 0; font-size: 19px; font-weight: 800; }
.steps-counter {
    padding: 6px 13px;
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    background: #f7f2e8;
    border-radius: 999px;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.steps.is-done .steps-counter { color: #1f7a3a; background: #e7f7ec; }

.steps-stage {
    position: relative;
    width: 100%;
    max-width: 620px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 18px;
    padding: 10px;
    background:
        radial-gradient(circle at 1px 1px, #eee6d8 1px, transparent 0) 0 0 / 18px 18px,
        #fff;
    border: 2px dashed #e6d3b3;
    border-radius: 20px;
    cursor: pointer;
    outline: none;
    touch-action: pan-y;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.steps-stage:hover { border-color: #dcc39a; }
.steps-stage:focus-visible { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(77, 159, 255, .16); }

.steps-svg { display: block; width: 100%; height: 100%; transition: opacity .3s ease; }

.steps-poster {
    position: absolute;
    inset: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    object-fit: contain;
    background: #fff;
    border-radius: 14px;
    transition: opacity .3s ease, visibility .3s;
}

/* кнопка запуска поверх цветной картинки */
.steps-start {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 10px 10px;
    font: 800 15px/1 var(--font);
    color: #fff;
    background: #cf3d3d;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 5px 0 #a72f2f, 0 10px 26px rgba(34, 49, 76, .18);
    cursor: pointer;
    white-space: nowrap;
    transform: translateX(-50%);
    transition: opacity .25s ease, visibility .25s, background .15s ease;
}
.steps-start-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding-left: 2px;
    font-size: 12px;
    color: #cf3d3d;
    background: #fff;
    border-radius: 50%;
}
.steps-start:hover { background: #c0392b; }
.steps-start:active { transform: translateX(-50%) translateY(2px); box-shadow: 0 3px 0 #a72f2f; }
.steps-start:focus-visible { outline: 3px solid rgba(255, 255, 255, .75); outline-offset: 3px; }
.steps-start::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 999px;
    border: 2px solid rgba(207, 61, 61, .35);
    animation: steps-pulse 2.6s ease-out infinite;
    pointer-events: none;
}
@keyframes steps-pulse {
    0% { transform: scale(1); opacity: .85; }
    70% { transform: scale(1.05); opacity: 0; }
    100% { transform: scale(1.05); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .steps-start::before { animation: none; }
}

/* режим «постер»: картинка + Play, управление спрятано */
.steps.is-poster .steps-svg { opacity: 0; visibility: hidden; }
.steps.is-poster .steps-progress-wrap,
.steps.is-poster .steps-bar,
.steps.is-poster .steps-tap { display: none; }
.steps:not(.is-poster) .steps-poster,
.steps:not(.is-poster) .steps-start { opacity: 0; visibility: hidden; pointer-events: none; }
.steps.is-poster .steps-start { opacity: 1; visibility: visible; }

/* финальный кадр: последний шаг сменяется цветной картинкой */
.steps.is-final .steps-svg { opacity: 0; visibility: hidden; }
.steps.is-final .steps-poster { opacity: 1; visibility: visible; }
.steps.is-final .steps-start { opacity: 1; visibility: visible; pointer-events: auto; }
.steps.is-final .steps-start::before { animation: none; opacity: 0; }
.steps.is-final .steps-tap { display: none; }

.steps-tap {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    padding: 6px 13px;
    font-size: 13px;
    font-weight: 700;
    color: #8a5a00;
    background: #fff2cc;
    border-radius: 999px;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity .2s ease;
}
.steps.is-touched .steps-tap,
.steps.is-done .steps-tap { opacity: 0; }

.steps-bar { display: flex; align-items: center; justify-content: center; gap: 10px; }

.steps-btn {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--ink);
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 3px 0 rgba(34, 49, 76, .06);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.steps-btn svg { width: 20px; height: 20px; fill: currentColor; }
.steps-btn:hover:not(:disabled) { background: #fdf6ea; transform: translateY(-1px); }
.steps-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 0 rgba(34, 49, 76, .06); }
.steps-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.steps-btn:focus-visible { outline: 3px solid rgba(77, 159, 255, .35); outline-offset: 2px; }

.steps-btn--play {
    color: #fff;
    background: #cf3d3d;
    border-color: #cf3d3d;
    box-shadow: 0 3px 0 #a72f2f;
}
.steps-btn--play:hover:not(:disabled) { background: #c0392b; border-color: #c0392b; }
.steps-btn--play .icon-pause { display: none; }
.steps.is-playing .steps-btn--play .icon-play { display: none; }
.steps.is-playing .steps-btn--play .icon-pause { display: block; }

.steps-progress-wrap { max-width: 760px; margin: 0 auto 14px; }

.steps-progress {
    position: relative;
    height: 10px;
    background: #f1ece2;
    border-radius: 999px;
    overflow: hidden;
}
.steps-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #7bd389, #44c2b5);
    border-radius: 999px;
    transition: width .25s ease;
}
.steps.is-done .steps-progress-fill { background: linear-gradient(90deg, #63c86e, #2f9a90); }

.steps-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 760px;
    margin: 16px auto 0;
}
.steps-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    font: 700 14px/1 var(--font);
    color: var(--muted);
    background: transparent;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.steps-link svg { width: 16px; height: 16px; fill: currentColor; }
.steps-link:hover { color: var(--ink); background: #fdf6ea; border-color: var(--line); }
.steps-link--primary {
    color: #fff;
    background: #cf3d3d;
    border-color: #cf3d3d;
    box-shadow: 0 3px 0 #a72f2f;
}
.steps-link--primary:hover { color: #fff; background: #c0392b; border-color: #c0392b; }
.steps-link--primary:active { transform: translateY(1px); box-shadow: 0 1px 0 #a72f2f; }

/* без JS: показываем готовое — постер или полный SVG, без интерфейса */
.steps:not(.is-enhanced) .steps-tap,
.steps:not(.is-enhanced) .steps-bar,
.steps:not(.is-enhanced) .steps-actions,
.steps:not(.is-enhanced) .steps-counter,
.steps:not(.is-enhanced) .steps-progress-wrap,
.steps:not(.is-enhanced) .steps-start { display: none; }
.steps:not(.is-enhanced) .steps-poster ~ .steps-svg { display: none; }
.steps-noscript { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

.article-text { font-size: 17px; }
.article-text p { margin: 0 0 16px; }

/* ---------------- errors ---------------- */

.error-page { padding: 80px 0; text-align: center; }
.error-page h1 { margin: 0 0 10px; font-size: clamp(56px, 10vw, 96px); }
.error-page p { color: var(--muted); font-size: 18px; }

.empty-note { padding: 16px 0 40px; color: var(--muted); }

/* ---------------- footer ---------------- */

.site-footer {
    margin-top: 60px;
    padding: 30px 0 36px;
    background: var(--bg-soft);
    border-top: 2px solid var(--line);
    font-size: 15px;
    color: var(--muted);
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.footer-inner p { margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-nav a {
    padding: 6px 12px;
    font-weight: 700;
    color: var(--muted);
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 999px;
}
.footer-nav a:hover { color: var(--coral-dark); }

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}
.footer-legal a { color: var(--muted); }
.footer-legal a:hover { color: var(--coral-dark); }
.footer-legal span { color: #c3cbd6; }

/* ---------------- поиск ---------------- */

.search-page { max-width: 920px; padding: 26px 0 0; }
.search-page h1 { margin: 0 0 18px; font-size: clamp(26px, 3.4vw, 40px); }

.search-form { display: flex; gap: 10px; margin: 0 0 16px; }
.search-form input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 18px;
    font: 600 17px/1.2 var(--font);
    color: var(--ink);
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 16px;
    outline: none;
}
.search-form input:focus { border-color: #cfd8e3; box-shadow: 0 0 0 4px rgba(77, 159, 255, .12); }
.search-form button {
    flex: 0 0 auto;
    padding: 0 26px;
    font: 800 17px/1 var(--font);
    color: #fff;
    background: #cf3d3d;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 4px 0 #a72f2f;
    cursor: pointer;
}
.search-form button:hover { background: #c0392b; }

.search-hint,
.search-summary { margin: 0 0 22px; color: var(--muted); }
.search-categories { margin-bottom: 22px; }
.search-empty { padding: 6px 0 46px; color: var(--muted); }
.search-empty p { margin: 0 0 14px; }
.search-page .post-grid { margin-top: 22px; }

mark { background: #fff2cc; color: inherit; padding: 0 2px; border-radius: 4px; }

/* ---------------- 404 ---------------- */

.notfound { padding: 38px 0 8px; text-align: center; }

.notfound-art {
    position: relative;
    max-width: 520px;
    height: 230px;
    margin: 0 auto 8px;
}
/* «404» рисуем через псевдоэлемент: это декор, а не текст для скринридеров */
.notfound-art::before {
    content: "404";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(104px, 20vw, 190px);
    font-weight: 800;
    line-height: .85;
    letter-spacing: -.05em;
    color: #fff6d9;
    -webkit-text-stroke: 4px #f0be45;
}
.nf-blob {
    position: absolute;
    display: grid;
    place-items: center;
    width: 78px; height: 78px;
    font-size: 34px;
    line-height: 1;
    background: var(--surface);
    border: 3px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    z-index: 2;
}
.nf-blob--1 { left: 0; top: 16px; transform: rotate(-12deg); background: #ffe9e3; }
.nf-blob--2 { right: 2%; top: 0; transform: rotate(10deg); background: #e6f7f0; }
.nf-blob--3 { left: 12%; bottom: 0; transform: rotate(6deg); background: #eef0ff; }

.notfound h1 { margin: 0 0 12px; font-size: clamp(26px, 3.6vw, 38px); }
.notfound-lead { max-width: 560px; margin: 0 auto 22px; color: var(--muted); }
.notfound-search { max-width: 520px; margin: 0 auto 12px; }
.notfound-hint { margin: 0 0 8px; font-size: 15px; color: var(--muted); }
.notfound-hint a { color: var(--coral-ink); font-weight: 700; }

/* ---------------- cookie banner ---------------- */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    width: min(980px, calc(100% - 32px));
    padding: 16px 20px;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(34, 49, 76, .16);
    transform: translateX(-50%);
    font-size: 15px;
    color: var(--muted);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__text { flex: 1 1 320px; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn-sm { padding: 10px 18px; font-size: 15px; }
.btn-ghost {
    color: var(--ink);
    background: var(--surface);
    border: 2px solid var(--line);
    box-shadow: 0 3px 0 rgba(34, 49, 76, .06);
}
.btn-ghost:hover { color: var(--ink); box-shadow: 0 2px 0 rgba(34, 49, 76, .06); }

/* ---------------- link list (другие разделы) ---------------- */

.link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.link-list a {
    padding: 10px 16px;
    font-weight: 700;
    color: var(--ink);
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 999px;
    transition: transform .12s ease, border-color .12s ease;
}
.link-list a:hover { transform: translateY(-2px); border-color: #e2d3bd; color: var(--ink); }

/* ---------------- текстовая страница ---------------- */

.article--text h2 { margin: 28px 0 10px; font-size: 22px; }
.article--text p { margin: 0 0 14px; }
.article--text ul { margin: 0 0 16px; padding-left: 22px; }
.article--text li { margin-bottom: 6px; }
.article-updated { margin: -4px 0 22px !important; font-size: 14px; color: var(--muted); }

/* ---------------- mobile ---------------- */

@media (max-width: 900px) {
    .hero-art { display: none; }
}

@media (max-width: 760px) {
    body { font-size: 16px; }

    .nav-burger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px; height: 44px;
        padding: 11px;
        background: var(--surface);
        border: 2px solid var(--line);
        border-radius: 14px;
        cursor: pointer;
    }
    .nav-burger span { display: block; height: 3px; background: var(--ink); border-radius: 3px; }

    .main-nav {
        display: none;
        position: absolute;
        left: 0; right: 0;
        top: 72px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 22px 20px;
        background: var(--bg);
        border-bottom: 2px solid var(--line);
        box-shadow: var(--shadow);
    }
    .nav-toggle:checked ~ .main-nav { display: flex; }
    .main-nav > a,
    .nav-dropdown summary { padding: 12px 0; border-bottom: 2px solid var(--line); border-radius: 0; }
    .nav-dropdown summary { display: block; }

    .search-mini { display: none; }
    .search-mobile { display: flex; gap: 8px; padding: 12px 0 6px; }
    .search-mobile input {
        flex: 1 1 auto;
        min-width: 0;
        padding: 11px 14px;
        font: 600 15px/1.2 var(--font);
        color: var(--ink);
        background: var(--surface);
        border: 2px solid var(--line);
        border-radius: 14px;
        outline: none;
    }
    .search-mobile button {
        padding: 0 16px;
        font: 800 15px/1 var(--font);
        color: #fff;
        background: #cf3d3d;
        border: 0;
        border-radius: 14px;
    }
    .search-form { flex-wrap: wrap; }
    .search-form button { padding: 14px 22px; }
    .logo-tagline { font-size: 10px; }

    .notfound { padding-top: 26px; }
    .notfound-art { height: 176px; }
    .nf-blob { width: 60px; height: 60px; font-size: 26px; border-radius: 18px; }
    .nf-code { -webkit-text-stroke-width: 3px; }
    .notfound-art::before { -webkit-text-stroke-width: 3px; }
    .dropdown-panel {
        position: static;
        grid-template-columns: 1fr;
        min-width: 0;
        padding: 8px 0 10px 12px;
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    .hero { padding: 36px 0 32px; }
    .hero-lead { font-size: 17px; }
    .hero-chips span { font-size: 14px; }

    .section-hero-inner { flex-direction: column; align-items: flex-start; gap: 16px; padding: 18px; }
    .section-hero-img, .section-hero-emoji { flex: none; width: 84px; height: 84px; font-size: 36px; }

    .section-block { padding-top: 34px; }
    .post-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .post-title { font-size: 15.5px; }
    .post-excerpt { display: none; }
    .category-grid { grid-template-columns: 1fr; }

    .footer-inner { flex-direction: column; align-items: flex-start; }

    .steps { padding: 16px; }
    .steps-head { margin-bottom: 12px; }
    .steps-title { font-size: 17px; }
    .steps-counter { font-size: 14px; }
    .steps-btn { width: 40px; height: 40px; border-radius: 12px; }
    .steps-btn svg { width: 18px; height: 18px; }
    .steps-bar { gap: 6px; }
    .steps-progress-wrap { margin-bottom: 12px; }
    .steps-actions { justify-content: center; }
    .steps-tap { font-size: 12px; bottom: 8px; }
    .steps-start { font-size: 14px; padding: 9px 16px 9px 9px; bottom: 14px; }
    .steps-start-icon { width: 24px; height: 24px; font-size: 11px; }
}

/* ---------------- печать: показываем готовый рисунок ---------------- */

@media print {
    @page { size: A4 portrait; margin: 8mm; }

    .site-header,
    .site-footer,
    .cookie-banner,
    .breadcrumbs,
    .article-meta,
    .article-cover,
    .article-lead,
    .article-text,
    .feedback,
    .steps-head,
    .steps-bar,
    .steps-actions,
    .steps-tap,
    .steps-noscript,
    .steps-progress-wrap,
    .post-grid,
    .section-block { display: none !important; }

    html, body { margin: 0; padding: 0; background: #fff; }
    .container { width: auto; max-width: none; margin: 0; padding: 0; }
    .article { max-width: none; margin: 0; padding: 0; }

    .article-head { max-width: none; margin: 0 0 3mm; }
    .article h1 { margin: 0; font-size: 15pt; line-height: 1.15; text-align: center; }

    .steps {
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .steps-stage {
        width: 100%;
        max-width: none;
        aspect-ratio: 1 / 1;
        margin: 0 auto;
        padding: 0;
        background: #fff;
        border: 0;
        border-radius: 0;
    }
    .steps-start, .steps-poster { display: none !important; }
    .steps-svg {
        width: 100%;
        height: 100%;
        max-height: none;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .steps-svg * { opacity: 1 !important; stroke-dashoffset: 0 !important; }
}
