/*
Theme Name: dds_skorlupa-yug.ru
Author: Алексей Смирнов
Description: Тема образовательного портала о теплоизоляции и основах теплотехники. Тёмная швейцарская сетка, контрастная типографика, акцент «тепловой поток».
Version: 1.1
Requires at least: 6.0
Tested up to: 6.6
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: tkontur
*/

:root {
    --bg: #12161C;
    --bg-alt: #1A2029;
    --bg-deep: #0D1117;
    --bg-side: #171D25;
    --line: #2A3441;
    --text: #E8EDF2;
    --text-soft: #BCC6D0;
    --muted: #7A8899;
    --accent: #4FD1C5;
    --accent-hi: #7DE3DA;
    --amber: #F6AD55;
    --radius: 10px;
    --f-head: 'Space Grotesk', 'Inter Tight', 'Segoe UI', Arial, sans-serif;
    --f-body: 'Inter', 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
}

*, *::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-body);
    font-size: 1.0625rem;
    line-height: 1.78;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cg opacity='0.04'%3E%3Cpath d='M70 200 L200 90 L330 200 V340 H70Z' fill='%234FD1C5'/%3E%3Cg fill='none' stroke='%234FD1C5' stroke-width='3'%3E%3Cpath d='M40 210 L200 62 L360 210 V370 H40Z' stroke-dasharray='10 8'/%3E%3Cpath d='M10 222 L200 34 L390 222 V398 H10Z' stroke-dasharray='3 10'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        repeating-linear-gradient(45deg, rgba(79, 209, 197, 0.03) 0 1px, transparent 1px 24px);
    background-repeat: no-repeat, repeat;
    background-position: right -80px top 150px, 0 0;
    background-size: 560px auto, auto;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.24em;
    transition: color .2s, text-decoration-color .2s;
}
a:hover { color: var(--amber); text-decoration-thickness: 2px; }

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    color: #F3F6F9;
    line-height: 1.2;
    margin: 1.6em 0 0.6em;
    letter-spacing: -0.01em;
    overflow-wrap: break-word;
}
h1 { font-size: 3.2rem; font-weight: 700; letter-spacing: -0.028em; line-height: 1.08; margin-top: 0; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }

ul, ol { padding-left: 1.3em; margin: 0 0 1.1em; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; border: 1px solid var(--line); font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: .65em .85em; text-align: left; vertical-align: top; }
th { background: var(--bg-alt); font-family: var(--f-head); font-weight: 600; color: #F3F6F9; }

blockquote {
    margin: 1.8em 0;
    padding: 1.3em 1.5em 1.3em 1.7em;
    border-left: 3px solid var(--amber);
    border-radius: 0 8px 8px 0;
    background: linear-gradient(90deg, rgba(246, 173, 85, 0.09), rgba(246, 173, 85, 0.02));
    box-shadow: -6px 0 24px -12px rgba(246, 173, 85, 0.35);
}
blockquote p:last-child { margin-bottom: 0; }

code, kbd { font-family: 'JetBrains Mono', Consolas, monospace; font-size: .9em; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 4px; padding: .1em .35em; }
pre { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.2rem; overflow-x: auto; }
pre code { border: 0; padding: 0; background: none; }
hr { border: 0; height: 1px; background: var(--line); margin: 2.5em 0; }

.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-inline: auto; }
.shell--front { width: min(85%, 1180px); }

/* ---------- Кнопки ---------- */
.btn-fill, .btn-ghost,
.comment-form input[type="submit"] {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .85rem 1.5rem;
    border-radius: 8px;
    font-family: var(--f-head); font-weight: 600; font-size: 1rem; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    transition: background-color .2s, box-shadow .2s, color .2s, border-color .2s;
}
.btn-fill, .comment-form input[type="submit"] { background: var(--accent); color: var(--bg); border: 1px solid var(--accent); }
.btn-fill:hover, .comment-form input[type="submit"]:hover {
    background: var(--accent-hi); border-color: var(--accent-hi); color: var(--bg);
    box-shadow: 0 0 12px rgba(79, 209, 197, 0.35); text-decoration: none;
}
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost:hover { background: var(--accent); color: var(--bg); box-shadow: 0 0 12px rgba(79, 209, 197, 0.35); text-decoration: none; }

/* ---------- Шапка ---------- */
.heat-strip { height: 3px; background: linear-gradient(90deg, var(--accent), var(--amber)); }

.masthead { background: var(--bg-deep); border-bottom: 1px solid var(--line); }
.masthead-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; padding: 1.1rem 0; }

.brand { display: flex; align-items: center; gap: .9rem; flex: 1 1 460px; min-width: 0; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-logo { display: block; max-height: 56px; width: auto; }
.brand-mark { display: block; width: 52px; height: 52px; flex: 0 0 52px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--f-head); font-weight: 700; font-size: 1rem; line-height: 1.3; color: #F3F6F9; }
.brand-desc {
    margin-top: .2rem; font-size: .78rem; line-height: 1.45; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.primary-nav { min-width: 0; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.primary-nav a {
    display: block; padding: .5rem .95rem; border-radius: 8px;
    font-family: var(--f-head); font-weight: 500; font-size: .95rem;
    color: var(--text); text-decoration: none;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a { color: var(--accent); background: rgba(79, 209, 197, 0.08); }

.nav-toggle {
    display: none; align-items: center; gap: .6rem;
    padding: .55rem .9rem; border: 1px solid var(--line); border-radius: 8px;
    background: transparent; color: var(--text); font-family: var(--f-head); font-size: .9rem; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: var(--accent); position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* ---------- Хлебные крошки и заголовки страниц ---------- */
.breadcrumbs { padding-top: 1.6rem; font-size: .86rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 .45rem; color: var(--accent); }

.site-main { padding-bottom: 5.5rem; }
.site-main--front { padding-bottom: 0; }

.page-head { margin-bottom: 2.4rem; }
.page-title { margin: 0; }
.page-lead { margin: 1rem 0 0; color: var(--text-soft); max-width: 680px; }

.sec-kicker {
    display: block; margin-bottom: .75rem;
    font-family: var(--f-head); font-size: .74rem; font-weight: 600;
    letter-spacing: .18em; text-transform: uppercase; color: var(--amber);
}
.sec-title { margin: 0; padding-left: 16px; border-left: 4px solid var(--accent); font-size: 2.25rem; line-height: 1.15; }
.sec-lead { margin: 1.1rem 0 0; color: var(--text-soft); max-width: 640px; }

.sec-title::before,
.entry-content h2::before,
.discussion-title::before {
    content: ''; display: inline-block; width: 8px; height: 8px; margin-right: .55em;
    border-radius: 50%; background: var(--accent); vertical-align: .3em;
    box-shadow: 0 0 10px rgba(79, 209, 197, 0.7);
}

/* ---------- Раскладки ---------- */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
    margin-top: 2rem;
}
.layout-single { display: block; margin-top: 2rem; }
.layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area, .sidebar { min-width: 0; }

/* ---------- Карточки ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1.6rem; }
.card-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
    display: flex; flex-direction: column; min-width: 0;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 18px rgba(79, 209, 197, 0.22);
}
.card-thumb-wrap { position: relative; border-bottom: 1px solid var(--line); }
.card-thumb-wrap a { display: block; position: relative; }
.card-thumb-wrap a::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(13, 17, 23, 0.08), rgba(13, 17, 23, 0.45));
}
.card-thumb-wrap img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.card-thumb-wrap--empty a {
    display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10;
    background:
        radial-gradient(circle at 20% 110%, rgba(246, 173, 85, 0.16), transparent 55%),
        radial-gradient(circle at 85% 0%, rgba(79, 209, 197, 0.14), transparent 50%),
        repeating-linear-gradient(45deg, rgba(79, 209, 197, 0.05) 0 1px, transparent 1px 16px),
        var(--bg-deep);
}
.card-thumb-mark { display: block; width: 64px; height: 64px; }

.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 1.3rem 1.4rem 1.5rem; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; margin-bottom: .6rem; font-size: .8rem; color: var(--muted); }
.card-cat { color: var(--amber); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.card-pin { padding: .1rem .5rem; border: 1px solid var(--amber); border-radius: 4px; color: var(--amber); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.card-title { margin: 0 0 .6rem; font-size: 1.2rem; line-height: 1.3; }
.card-title a { color: #F3F6F9; text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { margin-bottom: 1.1rem; font-size: .95rem; line-height: 1.65; color: var(--text-soft); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { margin-top: auto; align-self: flex-start; font-family: var(--f-head); font-weight: 600; font-size: .9rem; text-decoration: none; }
.card-more::after { content: ' →'; }

.empty-note { color: var(--muted); }

/* ---------- Главная ---------- */
.fp-sec { padding: 5.5rem 0; }
.fp-sec--alt { background: var(--bg-alt); }

.sec-divider { position: relative; height: 1px; background: var(--line); }
.sec-divider::after {
    content: ''; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px;
    background: var(--accent); transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 0 10px rgba(79, 209, 197, 0.6);
}
.dots-line {
    height: 8px;
    background-image: radial-gradient(circle, rgba(79, 209, 197, 0.35) 1.3px, transparent 1.8px);
    background-size: 12px 8px; background-repeat: repeat-x; background-position: center;
}

.sec-head { margin-bottom: 3rem; max-width: 780px; }
.sec-head-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1.2rem 2rem; margin-bottom: 3rem; }
.sec-head-row .sec-head { margin-bottom: 0; }

/* Hero */
.fp-hero { position: relative; display: flex; align-items: center; min-height: 620px; overflow: hidden; background: var(--bg-deep); }
.fp-hero-media { position: absolute; inset: 0; }
.fp-hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fp-hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18, 22, 28, 0.82) 0%, rgba(18, 22, 28, 0.7) 55%, rgba(18, 22, 28, 0.55) 100%); }
.fp-hero-inner { position: relative; z-index: 1; padding: 6rem 0; }
.fp-hero-content { max-width: 760px; }
.fp-hero h1 { margin: 0 0 1.4rem; }
.fp-hero-sub { max-width: 620px; margin-bottom: 2.3rem; font-size: 1.2rem; line-height: 1.65; color: #CDD5DD; }
.fp-hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Шаги */
.steps { list-style: none; margin: 0; padding: 0; max-width: 900px; counter-reset: none; }
.step { position: relative; padding-bottom: 44px; }
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::after {
    content: ''; position: absolute; left: 54px; bottom: 0; width: 12px; height: 44px;
    background:
        radial-gradient(circle, var(--accent) 0 4px, transparent 4.5px) center / 12px 12px no-repeat,
        repeating-linear-gradient(to bottom, rgba(79, 209, 197, 0.55) 0 3px, transparent 3px 7px) center / 2px 100% no-repeat;
}
.step-card {
    position: relative; display: flex; align-items: flex-start; gap: 1.4rem;
    padding: 1.8rem 2rem; overflow: hidden;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    transition: border-color .25s;
}
.step-card:hover { border-color: rgba(79, 209, 197, 0.6); }
.step-icon {
    position: relative; z-index: 1; flex: 0 0 56px; width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 8px; background: var(--bg-deep); color: var(--accent);
}
.step-icon svg { display: block; width: 28px; height: 28px; }
.step-body { position: relative; z-index: 1; min-width: 0; padding-right: 5rem; }
.step-body h3 { margin: 0 0 .45rem; font-size: 1.3rem; }
.step-body p { margin: 0; color: var(--text-soft); }
.step-num {
    position: absolute; z-index: 0; right: 1.2rem; top: 50%; transform: translateY(-50%);
    font-family: var(--f-head); font-weight: 700; font-size: 6.5rem; line-height: 1; letter-spacing: -0.05em;
    color: var(--accent); opacity: .14; pointer-events: none;
}

/* Статистика */
.fp-stats {
    background:
        radial-gradient(ellipse 60% 85% at 0% 100%, rgba(79, 209, 197, 0.10), transparent 70%),
        var(--bg-alt);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; }
.stat { min-width: 0; padding: 1.9rem 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13, 17, 23, 0.5); }
.stat-value { display: block; margin-bottom: .8rem; font-family: var(--f-head); font-weight: 700; font-size: 3.8rem; line-height: 1; letter-spacing: -0.04em; color: var(--accent); text-shadow: 0 0 24px rgba(79, 209, 197, 0.25); }
.stat-value small { margin-left: .06em; font-size: .5em; }
.stat-label { display: block; font-size: .95rem; line-height: 1.5; color: var(--muted); }
.stat-bar { display: block; height: 4px; margin-top: 1.3rem; border-radius: 2px; background: var(--line); overflow: hidden; }
.stat-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--amber)); }
.stats-note { margin: 2.2rem 0 0; padding: .2rem 0 .2rem 1rem; max-width: 760px; border-left: 3px solid var(--amber); font-size: .92rem; color: var(--muted); }

/* CTA */
.fp-cta-box {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2.5rem; align-items: center;
    padding: 3.4rem 3.4rem 3.4rem 4rem;
    background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.45);
}
.fp-cta-box::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, var(--accent), var(--amber)); }
.fp-cta-main { min-width: 0; }
.fp-cta-main h2 { margin: 0 0 1rem; font-size: 2.3rem; }
.fp-cta-main p { margin: 0; color: var(--text-soft); }
.fp-cta-side { min-width: 0; justify-self: end; display: flex; flex-direction: column; align-items: flex-start; gap: 1.2rem; }
.cta-mail { margin: 0; font-size: .92rem; color: var(--muted); }
.cta-mail a { font-family: var(--f-head); font-size: 1.05rem; }

/* ---------- Запись и страница ---------- */
.entry-head { margin-bottom: 2rem; }
.entry-title { margin: 0; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-bottom: 1rem; font-size: .85rem; color: var(--muted); }
.entry-cats a { margin-right: .6rem; color: var(--amber); text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
.entry-thumb { margin: 0 0 2.2rem; }
.entry-thumb img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.entry-content { min-width: 0; overflow-wrap: break-word; }
.entry-content h2 { font-size: 1.8rem; }
.entry-content img { border-radius: 8px; }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption, .wp-caption-text { font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.4rem; }
.entry-tags a { padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 8px; font-size: .82rem; color: var(--text-soft); text-decoration: none; }
.entry-tags a:hover { border-color: var(--accent); color: var(--accent); }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* ---------- Сайдбар ---------- */
.sidebar .widget {
    margin-bottom: 1.6rem; padding: 1.5rem 1.4rem;
    background: var(--bg-side); border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--text); font-size: .95rem;
}
.sidebar .widget-title { margin: 0 0 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; color: #F3F6F9; }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: .6rem 0; border-bottom: 1px dashed var(--line); line-height: 1.45; }
.sidebar .widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.sidebar .widget a { color: var(--text); text-decoration: none; }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .widget .post-date { display: block; margin-top: .25rem; font-size: .78rem; color: var(--muted); }
.sidebar .widget p { color: var(--text-soft); }

/* ---------- Подвал ---------- */
.site-foot { background: var(--bg-deep); border-top: 1px solid var(--line); color: #C3CCD6; }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; padding: 4rem 0 3rem; }
.foot-col { min-width: 0; }
.foot-col .widget { margin-bottom: 1.5rem; font-size: .93rem; line-height: 1.7; color: #C3CCD6; }
.foot-col .widget-title { margin: 0 0 1rem; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #F3F6F9; }
.foot-col .widget p, .foot-col .textwidget { color: #C3CCD6; }
.foot-col .widget a { color: var(--accent); }
.foot-col .widget a:hover { color: var(--amber); }
.foot-col .widget ul { list-style: none; margin: 0; padding: 0; }
.foot-col .widget li { padding: .3rem 0; }
.foot-col .widget_nav_menu a { color: #C3CCD6; text-decoration: none; }
.foot-col .widget_nav_menu a:hover { color: var(--accent); }
.foot-col .post-date { color: var(--muted); font-size: .78rem; margin-left: .4rem; }
.foot-bottom { padding: 1.3rem 0; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: 3rem; }
.pager .page-numbers, .pager .post-page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.6rem; height: 2.6rem; padding: 0 .85rem;
    border: 1px solid var(--line); border-radius: 8px; background: var(--bg-alt);
    font-family: var(--f-head); font-size: .95rem; color: var(--text); text-decoration: none;
    transition: border-color .2s, color .2s, box-shadow .2s;
}
.pager a.page-numbers:hover, .pager a.post-page-numbers:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 12px rgba(79, 209, 197, 0.25); }
.pager .page-numbers.current, .pager .post-page-numbers.current { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 700; }
.pager .page-numbers.dots { min-width: auto; border: 0; background: none; }

/* ---------- Формы ---------- */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea {
    width: 100%; padding: .75rem .9rem;
    background: var(--bg-deep); border: 1px solid var(--line); border-radius: 8px;
    color: var(--text); font: inherit; font-size: .95rem;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.18); }
button { font: inherit; }

.search-box { display: flex; gap: .6rem; max-width: 560px; }
.search-box input { flex: 1; min-width: 0; }
.search-box button { flex: 0 0 auto; }

.discussion { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.discussion-title { margin: 0 0 1.5rem; font-size: 1.6rem; }
.discussion-closed { color: var(--muted); }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.6rem; }
.comment-list .comment-body { margin-bottom: 1rem; padding: 1.2rem 1.4rem; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); }
.comment-author { font-family: var(--f-head); font-weight: 600; }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-right: .6rem; }
.comment-author .says { display: none; }
.comment-metadata { margin: .2rem 0 .6rem; font-size: .8rem; }
.comment-metadata a { color: var(--muted); text-decoration: none; }
.comment-content p:last-child { margin-bottom: 0; }
.reply a { font-size: .85rem; }
.comment-respond { padding: 1.8rem 1.6rem; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); }
.comment-reply-title { margin: 0 0 1rem; font-size: 1.3rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; margin-bottom: .35rem; font-size: .88rem; color: var(--text-soft); }
.comment-form .comment-form-cookies-consent label { display: inline; }
.comment-notes, .logged-in-as { font-size: .85rem; color: var(--muted); }

/* ---------- 404 ---------- */
.nf { padding: 2rem 0 1rem; }
.nf-code {
    display: block; margin-bottom: .5rem;
    font-family: var(--f-head); font-weight: 700; font-size: 8rem; line-height: 1; letter-spacing: -0.05em;
    background: linear-gradient(90deg, var(--accent), var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nf .page-lead { margin-bottom: 2rem; }
.nf-back { margin-top: 2rem; }

/* ---------- Cookie ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 999;
    max-width: 920px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
    padding: 1rem 1.4rem;
    background: var(--bg-deep); border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    font-size: .9rem; color: #C3CCD6;
}
.cookie-text { margin: 0; min-width: 0; }
.cookie-accept { flex: 0 0 auto; padding: .6rem 1.3rem; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    h1 { font-size: 2.5rem; }
    .sec-title { font-size: 1.9rem; }
    .nav-toggle { display: inline-flex; }
    .primary-nav { flex-basis: 100%; }
    .primary-nav ul { display: none; flex-direction: column; padding: .5rem 0 .3rem; border-top: 1px solid var(--line); }
    .primary-nav.is-open ul { display: flex; }
    .brand { flex-basis: 0; flex-grow: 1; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 3rem; }
    .layout-single .content-area { width: 100%; }
    .card-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-cta-box { grid-template-columns: minmax(0, 1fr); padding: 2.6rem 2.2rem 2.6rem 2.8rem; }
    .fp-cta-side { justify-self: start; }
    .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shell--front { width: min(92%, 1180px); }
}

@media (max-width: 600px) {
    body { font-size: 1rem; background-size: 320px auto, auto; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    .sec-title { font-size: 1.55rem; }
    .brand-desc { display: none; }
    .brand-name { font-size: .9rem; }
    .brand-mark { width: 44px; height: 44px; flex-basis: 44px; }
    .fp-sec { padding: 3.6rem 0; }
    .fp-hero { min-height: 0; }
    .fp-hero-inner { padding: 4rem 0; }
    .fp-hero-sub { font-size: 1.05rem; }
    .card-grid--three { grid-template-columns: minmax(0, 1fr); }
    .step:not(:last-child)::after { left: 40px; }
    .step-card { flex-direction: column; gap: 1rem; padding: 1.4rem 1.3rem; }
    .step-body { padding-right: 0; }
    .step-num { top: 1rem; right: 1rem; transform: none; font-size: 4.5rem; }
    .stat { padding: 1.4rem 1.2rem; }
    .stat-value { font-size: 2.7rem; }
    .fp-cta-box { padding: 1.9rem 1.4rem 1.9rem 1.9rem; }
    .fp-cta-main h2 { font-size: 1.7rem; }
    .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding: 3rem 0 2rem; }
    .search-box { flex-direction: column; }
    .cookie-banner { flex-direction: column; align-items: flex-start; }
    .nf-code { font-size: 5.5rem; }
    .sidebar .widget { padding: 1.3rem 1.2rem; }
    .comment-respond { padding: 1.4rem 1.2rem; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
}
