
/*
Theme Name: dds_code-route.ru
Author: Михаил Озеров
Description: Информационная тема для образовательной платформы по программированию code-route.ru.
Version: 1.1
Text Domain: croute
*/

/* ===== Переменные ===== */
:root:where(html[data-wp-theme="code-route.ru"]) {
    --bg: #ffffff;
    --bg-soft: #f4f6fb;
    --ink: #16203a;
    --ink-soft: #5a647d;
    --primary: #15233f;
    --accent: #3d5af1;
    --accent-2: #14b8a6;
    --line: #e2e7f0;
    --footer-bg: #101c33;
    --footer-ink: #c4ccdc;
    --footer-head: #ffffff;
    --radius: 12px;
    --shadow: 0 6px 24px rgba(20, 35, 63, 0.07);
}

/* ===== База ===== */
:where(html[data-wp-theme="code-route.ru"]) *, :where(html[data-wp-theme="code-route.ru"]) *::before, :where(html[data-wp-theme="code-route.ru"]) *::after { box-sizing: border-box; }

html:where(html[data-wp-theme="code-route.ru"]) { scroll-behavior: smooth; }

:where(html[data-wp-theme="code-route.ru"]) body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
}

:where(html[data-wp-theme="code-route.ru"]) img { max-width: 100%; height: auto; }

:where(html[data-wp-theme="code-route.ru"]) a { color: var(--accent); text-decoration: none; }
:where(html[data-wp-theme="code-route.ru"]) a:hover { text-decoration: underline; }

:where(html[data-wp-theme="code-route.ru"]) h1, :where(html[data-wp-theme="code-route.ru"]) h2, :where(html[data-wp-theme="code-route.ru"]) h3, :where(html[data-wp-theme="code-route.ru"]) h4 { line-height: 1.25; color: var(--primary); margin: 0 0 0.6em; }
:where(html[data-wp-theme="code-route.ru"]) h1 { font-size: 2rem; }
:where(html[data-wp-theme="code-route.ru"]) h2 { font-size: 1.55rem; }
:where(html[data-wp-theme="code-route.ru"]) h3 { font-size: 1.2rem; }

:where(html[data-wp-theme="code-route.ru"]) p { margin: 0 0 1em; }

/* Контейнер ширины — единственное место */
:where(html[data-wp-theme="code-route.ru"]) .cr-shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* ===== Шапка (не липкая) ===== */
:where(html[data-wp-theme="code-route.ru"]) .cr-site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    min-width: 0;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1 1 auto;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-brand-logo { width: 52px; height: 52px; display: block; flex: 0 0 auto; }
:where(html[data-wp-theme="code-route.ru"]) .cr-brand-text { min-width: 0; }
:where(html[data-wp-theme="code-route.ru"]) .cr-brand-name {
    display: block;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.02rem;
    line-height: 1.25;
    max-width: 640px;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-brand-name a { color: inherit; }
:where(html[data-wp-theme="code-route.ru"]) .cr-brand-desc {
    display: block;
    color: var(--ink-soft);
    font-size: 0.82rem;
    margin-top: 0.2rem;
    max-width: 640px;
}

:where(html[data-wp-theme="code-route.ru"]) .cr-nav-toggle {
    display: none;
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    font-size: 0.95rem;
    cursor: pointer;
}

:where(html[data-wp-theme="code-route.ru"]) .cr-main-nav { flex: 0 0 auto; }
:where(html[data-wp-theme="code-route.ru"]) .cr-main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-main-nav a {
    color: var(--primary);
    font-weight: 600;
    padding: 0.35rem 0;
    display: inline-block;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-main-nav a:hover { color: var(--accent); text-decoration: none; }

/* ===== Хлебные крошки ===== */
:where(html[data-wp-theme="code-route.ru"]) .cr-breadcrumbs {
    font-size: 0.86rem;
    color: var(--ink-soft);
    padding: 1rem 0 0;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-breadcrumbs .cr-sep { color: var(--line); margin: 0 0.15rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-breadcrumbs span { color: var(--ink-soft); }

/* ===== Основной макет ===== */
:where(html[data-wp-theme="code-route.ru"]) .cr-site-main { padding: 1.5rem 0 3rem; }

:where(html[data-wp-theme="code-route.ru"]) .cr-layout-with-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    align-items: flex-start;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-layout-with-sidebar .cr-content-area { flex: 1 1 0; min-width: 0; width: 67%; }
:where(html[data-wp-theme="code-route.ru"]) .cr-layout-with-sidebar .cr-sidebar { flex: 0 0 27%; min-width: 0; }

:where(html[data-wp-theme="code-route.ru"]) .cr-layout-single .cr-content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    min-width: 0;
}

/* ===== Карточки записей (вертикальные) ===== */
:where(html[data-wp-theme="code-route.ru"]) .cr-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.6rem;
}

:where(html[data-wp-theme="code-route.ru"]) .cr-card {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-width: 0;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-card-thumb { display: block; }
:where(html[data-wp-theme="code-route.ru"]) .cr-card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-card-thumb-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1d2c4d, #3d5af1);
}
:where(html[data-wp-theme="code-route.ru"]) .cr-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.3rem 1.35rem;
    min-width: 0;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-card-title { font-size: 1.15rem; margin: 0 0 0.45rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-card-title a { color: var(--primary); }
:where(html[data-wp-theme="code-route.ru"]) .cr-card-title a:hover { color: var(--accent); text-decoration: none; }
:where(html[data-wp-theme="code-route.ru"]) .cr-card-meta { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 0.6rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-card-excerpt { color: var(--ink); font-size: 0.95rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-card-excerpt p { margin: 0 0 0.5em; background: none; }
:where(html[data-wp-theme="code-route.ru"]) .cr-card-more {
    margin-top: auto;
    padding-top: 0.7rem;
    font-weight: 600;
    color: var(--accent);
}

/* ===== Пагинация (type => plain, .page-numbers) ===== */
:where(html[data-wp-theme="code-route.ru"]) .cr-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 2.2rem;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-pagination .cr-page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--primary);
    font-weight: 600;
    background: var(--bg);
}
:where(html[data-wp-theme="code-route.ru"]) .cr-pagination a.cr-page-numbers:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
:where(html[data-wp-theme="code-route.ru"]) .cr-pagination .cr-page-numbers.cr-current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-pagination .cr-page-numbers.cr-dots { border: 0; background: none; }

/* ===== Главная: общие секции ===== */
:where(html[data-wp-theme="code-route.ru"]) .cr-front-section { padding: 3rem 0; }
:where(html[data-wp-theme="code-route.ru"]) .cr-front-section + .cr-front-section { border-top: 1px solid var(--line); }
:where(html[data-wp-theme="code-route.ru"]) .cr-section-head { max-width: 760px; margin-bottom: 1.8rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-section-head .cr-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* Блок 1: текст + иллюстрация */
:where(html[data-wp-theme="code-route.ru"]) .cr-fs-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
    align-items: center;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-fs-split .cr-fs-media img { display: block; width: 100%; border-radius: var(--radius); }
:where(html[data-wp-theme="code-route.ru"]) .cr-fs-split.cr-media-left .cr-fs-media { order: -1; }

/* Блок 2: сетка направлений */
:where(html[data-wp-theme="code-route.ru"]) .cr-fs-tracks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 1.4rem;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-track {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem 1.4rem;
    min-width: 0;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-track-icon {
    width: 46px;
    height: 46px;
    display: block;
    margin-bottom: 0.9rem;
    color: var(--accent);
}
:where(html[data-wp-theme="code-route.ru"]) .cr-track h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-track p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }

/* Блок 3: шаги */
:where(html[data-wp-theme="code-route.ru"]) .cr-fs-steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
    gap: 1.4rem;
    counter-reset: step;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-step {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem 1.4rem 1.4rem;
    min-width: 0;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.8rem;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-step h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-step p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }

/* Блок 4: CTA (плашка — отступ со всех сторон, A14) */
:where(html[data-wp-theme="code-route.ru"]) .cr-fs-cta {
    background: var(--primary);
    color: #fff;
    border-radius: 16px;
    padding: 2.8rem 2.4rem;
    text-align: center;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-fs-cta h2 { color: #fff; }
:where(html[data-wp-theme="code-route.ru"]) .cr-fs-cta p { color: #cdd6ea; max-width: 620px; margin: 0 auto 1.4rem; }

:where(html[data-wp-theme="code-route.ru"]) .cr-btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    padding: 0.8rem 1.8rem;
    border-radius: 10px;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-btn:hover { background: #2f49d8; text-decoration: none; color: #fff; }
:where(html[data-wp-theme="code-route.ru"]) .cr-btn-light { background: #fff; color: var(--primary); }
:where(html[data-wp-theme="code-route.ru"]) .cr-btn-light:hover { background: #eef1fb; color: var(--primary); }

/* ===== Контент записей/страниц ===== */
:where(html[data-wp-theme="code-route.ru"]) .cr-entry-header { margin-bottom: 1.2rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-entry-title { font-size: 2rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-entry-meta { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 1rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-entry-thumb { margin-bottom: 1.5rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-entry-thumb img { display: block; width: 100%; border-radius: var(--radius); }
:where(html[data-wp-theme="code-route.ru"]) .cr-entry-content { font-size: 1.02rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-entry-content img { border-radius: 8px; }
:where(html[data-wp-theme="code-route.ru"]) .cr-entry-content h2, :where(html[data-wp-theme="code-route.ru"]) .cr-entry-content h3 { margin-top: 1.6em; }

:where(html[data-wp-theme="code-route.ru"]) .cr-entry-content table { border-collapse: collapse; width: 100%; margin: 1.2em 0; }
:where(html[data-wp-theme="code-route.ru"]) .cr-entry-content table, :where(html[data-wp-theme="code-route.ru"]) .cr-entry-content th, :where(html[data-wp-theme="code-route.ru"]) .cr-entry-content td { border: 1px solid var(--line); }
:where(html[data-wp-theme="code-route.ru"]) .cr-entry-content th, :where(html[data-wp-theme="code-route.ru"]) .cr-entry-content td { padding: 0.6rem 0.8rem; text-align: left; }
:where(html[data-wp-theme="code-route.ru"]) .cr-entry-content th { background: var(--bg-soft); }

:where(html[data-wp-theme="code-route.ru"]) blockquote {
    margin: 1.4em 0;
    padding: 1.2rem 1.4rem;
    background: var(--bg-soft);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
}
:where(html[data-wp-theme="code-route.ru"]) blockquote p:last-child { margin-bottom: 0; }

/* ===== Сайдбар и виджеты ===== */
:where(html[data-wp-theme="code-route.ru"]) .cr-widget { margin-bottom: 2rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-widget-title {
    font-size: 1.05rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-widget ul { list-style: none; margin: 0; padding: 0; }
:where(html[data-wp-theme="code-route.ru"]) .cr-widget li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
:where(html[data-wp-theme="code-route.ru"]) .cr-widget li:last-child { border-bottom: 0; }

/* Сайдбар: светлый фон → тёмный текст (явно) */
:where(html[data-wp-theme="code-route.ru"]) .cr-sidebar .cr-widget { color: var(--ink); }
:where(html[data-wp-theme="code-route.ru"]) .cr-sidebar .cr-widget-title { color: var(--primary); }
:where(html[data-wp-theme="code-route.ru"]) .cr-sidebar .cr-widget a { color: var(--accent); }
:where(html[data-wp-theme="code-route.ru"]) .cr-sidebar .cr-widget .cr-post-date { display: block; color: var(--ink-soft); font-size: 0.78rem; }

/* ===== Подвал ===== */
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 3rem 0 1.5rem;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 2rem;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-footer-cols .cr-widget { margin-bottom: 0; }

/* Подвал: тёмный фон → светлый текст (явно, для всех областей footer-1/2/3) */
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-widget { color: var(--footer-ink); }
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-widget-title { color: var(--footer-head); border-bottom-color: var(--accent); }
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-widget a { color: #e9edf6; }
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-widget a:hover { color: #fff; }
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-widget li { border-bottom-color: rgba(255, 255, 255, 0.08); }
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-widget .cr-post-date { color: #95a1ba; font-size: 0.78rem; display: block; }

:where(html[data-wp-theme="code-route.ru"]) .cr-site-info {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2.2rem;
    padding-top: 1.4rem;
    font-size: 0.85rem;
    color: #97a3bb;
}

/* ===== Форма поиска ===== */
:where(html[data-wp-theme="code-route.ru"]) .cr-search-form { display: flex; gap: 0.5rem; max-width: 420px; }
:where(html[data-wp-theme="code-route.ru"]) .cr-search-form .cr-search-field {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-search-form .cr-search-submit {
    flex: 0 0 auto;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0 1.1rem;
    font-weight: 600;
    cursor: pointer;
}

/* ===== Комментарии ===== */
:where(html[data-wp-theme="code-route.ru"]) .cr-comments-area { margin-top: 2.5rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-list { list-style: none; margin: 0; padding: 0; }
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-list .cr-children { list-style: none; margin: 0 0 0 1.5rem; padding: 0; }
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-body {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-meta { display: flex; gap: 0.8rem; align-items: baseline; margin-bottom: 0.4rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-author { font-weight: 700; color: var(--primary); }
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-date { font-size: 0.78rem; color: var(--ink-soft); }
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-reply a { font-size: 0.85rem; font-weight: 600; }
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-respond { margin-top: 1.5rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-form input[type="text"],
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-form input[type="email"],
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-form input[type="url"],
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    margin-top: 0.3rem;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-form p { margin-bottom: 0.9rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-comment-form .cr-submit {
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0.7rem 1.6rem;
    font-weight: 700;
    cursor: pointer;
}

/* ===== 404 ===== */
:where(html[data-wp-theme="code-route.ru"]) .cr-error-404 { text-align: center; padding: 3rem 0; }
:where(html[data-wp-theme="code-route.ru"]) .cr-error-404 .cr-big { font-size: 4rem; color: var(--accent); margin: 0; }
:where(html[data-wp-theme="code-route.ru"]) .cr-error-404 .cr-search-form { margin: 1.5rem auto 0; }

/* ===== Cookie-баннер: правило [hidden] ДО основного блока (A11) ===== */
:where(html[data-wp-theme="code-route.ru"]) .cr-cookie-banner[hidden] { display: none !important; }

:where(html[data-wp-theme="code-route.ru"]) .cr-cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 999;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    background: var(--primary);
    color: #fff;
    padding: 1rem 1.3rem;
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    max-width: 720px;
    margin-inline: auto;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-cookie-banner p { margin: 0; flex: 1 1 280px; font-size: 0.9rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-cookie-banner a { color: #aebcff; }
:where(html[data-wp-theme="code-route.ru"]) .cr-cookie-accept {
    flex: 0 0 auto;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0.6rem 1.4rem;
    font-weight: 700;
    cursor: pointer;
}

/* ===== Адаптив ===== */
@media (max-width: 960px) {
    :where(html[data-wp-theme="code-route.ru"]) .cr-layout-with-sidebar { display: block; }
    :where(html[data-wp-theme="code-route.ru"]) .cr-layout-with-sidebar .cr-content-area,
    :where(html[data-wp-theme="code-route.ru"]) .cr-layout-with-sidebar .cr-sidebar { width: 100%; }
    :where(html[data-wp-theme="code-route.ru"]) .cr-layout-with-sidebar .cr-sidebar { margin-top: 2.5rem; }
    :where(html[data-wp-theme="code-route.ru"]) .cr-fs-split { grid-template-columns: 1fr; }
    :where(html[data-wp-theme="code-route.ru"]) .cr-fs-split.cr-media-left .cr-fs-media { order: 0; }
}

@media (max-width: 600px) {
    :where(html[data-wp-theme="code-route.ru"]) body { font-size: 16px; }
    :where(html[data-wp-theme="code-route.ru"]) h1, :where(html[data-wp-theme="code-route.ru"]) .cr-entry-title { font-size: 1.6rem; }
    :where(html[data-wp-theme="code-route.ru"]) .cr-layout-single .cr-content-area { width: 100%; }
    :where(html[data-wp-theme="code-route.ru"]) .cr-nav-toggle { display: inline-block; }
    :where(html[data-wp-theme="code-route.ru"]) .cr-main-nav {
        flex-basis: 100%;
        display: none;
    }
    :where(html[data-wp-theme="code-route.ru"]) .cr-main-nav.cr-is-open { display: block; }
    :where(html[data-wp-theme="code-route.ru"]) .cr-main-nav ul { flex-direction: column; gap: 0; }
    :where(html[data-wp-theme="code-route.ru"]) .cr-main-nav li { border-bottom: 1px solid var(--line); }
    :where(html[data-wp-theme="code-route.ru"]) .cr-front-section { padding: 2.2rem 0; }
    :where(html[data-wp-theme="code-route.ru"]) .cr-fs-cta { padding: 2rem 1.4rem; }
}

:where(html[data-wp-theme="code-route.ru"]) body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

:where(html[data-wp-theme="code-route.ru"]) .cr-site-main { flex: 1; }
:where(html[data-wp-theme="code-route.ru"]) .cr-page .cr-site-main .cr-layout-single .cr-content-area { width: 100%; }
:where(html[data-wp-theme="code-route.ru"]) .cr-site-main > .cr-shell { min-width: 0; }
[data-wp-theme="build-guide.ru"]:where(html[data-wp-theme="code-route.ru"]) .cr-brand-name { display: block; }

/* The Emotion Logic front page has a separate wrapper in WordPress. */
[data-wp-theme="emotion-logic.ru"]:where(html[data-wp-theme="code-route.ru"]) .cr-site-main > .cr-front-wrap { width: var(--shell); }
[data-wp-theme="emotion-logic.ru"]:where(html[data-wp-theme="code-route.ru"]) .cr-front-latest { padding-inline: clamp(1rem, 2vw, 1.75rem); }

:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-page :is(.cr-breadcrumbs, .cr-crumbs) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .1rem .45rem;
  margin-block-end: .75rem;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-crumb-step { display: inline-flex; align-items: baseline; gap: .35rem; min-width: 0; }
:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-page .cr-crumb-step .cr-sep { margin-inline: 0; }

:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-rubrics ul {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.15rem;
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-rubrics a { display: inline-block; padding-block: .2rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-rubrics a[aria-current] { text-decoration: underline; text-underline-offset: .2em; }

:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-page .cr-entry-content { overflow-wrap: break-word; }
:where(html[data-wp-theme="code-route.ru"]) .cr-page .cr-pilot-page .cr-entry-content { max-inline-size: 74ch; }
:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-page .cr-entry-thumb img { height: auto; }
:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-page .cr-entry-content pre { max-inline-size: 100%; overflow-x: auto; }
:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-page .cr-entry-content > section + section { margin-block-start: 1.75rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-lead { font-size: 1.12em; }
:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-project-story { max-inline-size: 74ch; }
:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-project-links {
  margin-block-start: 1.75rem;
  padding: clamp(1rem, 2.5vw, 1.65rem);
  border: 1px solid var(--c-line, var(--line));
  border-radius: var(--radius);
  background: var(--c-surface, var(--bg-soft, var(--bg)));
}
:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-project-links h2 { margin-block-start: 0; font-size: 1.3rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-project-links li + li { margin-block-start: .4rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-pilot-project-links > :last-child { margin-block-end: 0; }

@media (min-width: 900px) {
  :where(html[data-wp-theme="code-route.ru"]) .cr-page .cr-pilot-page .cr-entry-content.cr-pilot-project {
    max-inline-size: none;
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(2rem, 5.5vw, 5rem);
  }
  :where(html[data-wp-theme="code-route.ru"]) .cr-pilot-project-links { margin-block-start: 0; }
}

/* Keep the source article panel. Service pages join the same reading axis as archives. */
[data-wp-theme="build-guide.ru"]:where(html[data-wp-theme="code-route.ru"]) .cr-page .cr-pilot-page .cr-entry {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

/* The WordPress widget areas have no confirmed content for this pilot. */
:where(html[data-wp-theme="code-route.ru"]) body .cr-site-footer { padding-block: 1.35rem 0; }
:where(html[data-wp-theme="code-route.ru"]) body .cr-site-footer .cr-footer-cols {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 2rem;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-pilot-footer-brand > a { font-size: 1.08rem; font-weight: 700; }
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-pilot-footer-brand > p { margin: .25rem 0 0; font-size: .85rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-pilot-footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-pilot-footer-nav li { padding: 0; border: 0; }
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-footer-cols a { color: inherit; }
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-pilot-footer-nav a { display: inline-flex; align-items: center; min-height: 44px; }
:where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-footer-cols a:is(:hover, [aria-current]) { text-decoration: underline; text-underline-offset: .2em; }
:where(html[data-wp-theme="code-route.ru"]) body .cr-site-footer :is(.cr-site-info, .cr-footer-bottom) {
  margin-top: .85rem;
  padding-block: .75rem .9rem;
  text-align: start;
}

@media (max-width: 680px) {
  :where(html[data-wp-theme="code-route.ru"]) .cr-pilot-page .cr-entry-content table { display: block; max-inline-size: 100%; overflow-x: auto; }
  :where(html[data-wp-theme="code-route.ru"]) body .cr-site-footer .cr-footer-cols { display: grid; gap: .1rem; }
  :where(html[data-wp-theme="code-route.ru"]) .cr-site-footer .cr-pilot-footer-nav ul { display: grid; grid-template-columns: repeat(2, max-content); }
  :where(html[data-wp-theme="code-route.ru"]) body .cr-site-footer :is(.cr-site-info, .cr-footer-bottom) { margin-top: .35rem; }
}

:where(html[data-wp-theme="code-route.ru"]) .cr-learning-route {
  margin-block-start: 2.6rem;
  padding: clamp(1.1rem, 3vw, 1.8rem);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
:where(html[data-wp-theme="code-route.ru"]) .cr-learning-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .35rem 1rem; margin-block-end: 1rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-learning-title h2 { margin: 0; font-size: 1.4rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-learning-title a { font-size: .9rem; }
:where(html[data-wp-theme="code-route.ru"]) .cr-learning-route ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin: 0; padding: 0; list-style: none; }
:where(html[data-wp-theme="code-route.ru"]) .cr-learning-route li {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--bg);
}
:where(html[data-wp-theme="code-route.ru"]) .cr-learning-route .cr-learning-current { border-color: var(--accent); box-shadow: inset 0 .18rem var(--accent); }
:where(html[data-wp-theme="code-route.ru"]) .cr-learning-step { font-size: .8rem; color: var(--ink-soft); }
:where(html[data-wp-theme="code-route.ru"]) .cr-learning-label { font-size: .94rem; font-weight: 700; line-height: 1.4; }
@media (max-width: 680px) {
  :where(html[data-wp-theme="code-route.ru"]) .cr-learning-route ol { grid-template-columns: 1fr; }
}

