/*
Theme Name: dds_chemistrycorners.com
Author: Анна Соколова
Description: Тема для образовательной платформы по химии: подготовка к SPM и STPM.
Version: 1.1
Text Domain: chemcorner
*/

:root {
    --bg: #F4F7FC;
    --bg-alt: #E9F0F8;
    --head-bg: #1B2A4A;
    --head-bg-2: #2A3F66;
    --foot-bg: #0F1A2C;
    --side-bg: #FFFFFF;
    --text: #1E2A3A;
    --accent: #3B82F6;
    --accent-dark: #2B6FE0;
    --accent-2: #10B981;
    --muted: #6B7A8F;
    --line: #D3DEEC;
    --shell: min(92%, 1180px);
    --font-head: "Inter", "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-body: "Roboto", "Source Sans Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* служебное: скрытие через атрибут hidden */
.cookie-banner[hidden] { display: none !important; }
.site-nav[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 1px 1px, rgba(59, 130, 246, 0.14) 1px, transparent 0),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%233B82F6' stroke-width='6' opacity='0.28'%3E%3Cellipse cx='210' cy='210' rx='195' ry='84'/%3E%3Cellipse cx='210' cy='210' rx='195' ry='84' transform='rotate(60 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='195' ry='84' transform='rotate(120 210 210)'/%3E%3C/g%3E%3Ccircle cx='210' cy='210' r='20' fill='%233B82F6' opacity='0.28'/%3E%3C/svg%3E");
    background-size: 34px 34px, 420px 420px;
    background-position: 0 0, right -90px top 140px;
    background-repeat: repeat, no-repeat;
    background-attachment: scroll, fixed;
}

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

a { color: var(--accent); text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 0.7em;
    font-weight: 700;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

.shell {
    width: var(--shell);
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* --------------------------------------------------
   Заголовки секций — линия с квадратной засечкой
   -------------------------------------------------- */
.sec-title {
    display: inline-block;
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 1.6rem;
}
.sec-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: calc(100% + 14px);
    height: 2px;
    background: var(--accent);
}
.sec-title::before {
    content: "";
    position: absolute;
    left: calc(100% + 18px);
    bottom: -3px;
    width: 8px;
    height: 8px;
    background: var(--accent);
}
.on-dark .sec-title,
.sec-title.on-dark { color: #fff; }

/* --------------------------------------------------
   Кнопки и ссылки
   -------------------------------------------------- */
.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.98rem;
    padding: 0.78rem 1.6rem;
    border-radius: 4px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: background 0.22s ease, box-shadow 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}
.btn:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22), 0 6px 18px rgba(59, 130, 246, 0.28);
    color: #fff;
}
.btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.btn-ghost:hover {
    background: var(--accent);
    color: #fff;
}
.btn-ghost-light {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
}
.btn-ghost-light:hover {
    background: #fff;
    color: var(--head-bg);
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.text-link,
.entry-content a,
.comment-text a,
.widget a {
    position: relative;
    color: var(--accent);
}
.text-link::after,
.entry-content a::after,
.comment-text a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transition: transform 0.25s ease;
}
.text-link:hover::after,
.entry-content a:hover::after,
.comment-text a:hover::after {
    transform: scaleX(1);
}

/* --------------------------------------------------
   Шапка
   -------------------------------------------------- */
.site-header {
    background: var(--head-bg);
    color: #fff;
    border-bottom: 3px solid var(--accent);
    position: relative;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.15rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
    flex: 1 1 320px;
    color: #fff;
}
.brand-logo,
.brand-mark {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    display: block;
}
.brand-text { min-width: 0; }
.brand-name {
    font-family: var(--font-head);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-desc {
    font-size: 0.82rem;
    color: #A8BCDA;
    line-height: 1.45;
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    border-radius: 4px;
    padding: 0.5rem 0.9rem;
    font-family: var(--font-head);
    font-size: 0.92rem;
    cursor: pointer;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.site-nav a {
    display: block;
    padding: 0.55rem 0.95rem;
    color: #DCE7F6;
    font-family: var(--font-head);
    font-size: 0.97rem;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.site-nav a:hover,
.site-nav .current-menu-item > a {
    color: #fff;
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.18);
}

/* --------------------------------------------------
   Раскладки
   -------------------------------------------------- */
.site-main { padding: 2.6rem 0 3.4rem; }

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

.sidebar {
    min-width: 0;
    background: var(--side-bg);
    border-radius: 8px;
    padding: 1.5rem 1.4rem;
    box-shadow: 4px 6px 0 rgba(27, 42, 74, 0.08);
    border-top: 3px solid var(--accent);
}

/* --------------------------------------------------
   Хлебные крошки
   -------------------------------------------------- */
.breadcrumbs {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--line);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--accent); margin: 0 0.35rem; }

/* --------------------------------------------------
   Карточки записей
   -------------------------------------------------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.7rem;
}
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    overflow: hidden;
    box-shadow: 4px 6px 0 rgba(27, 42, 74, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 6px 10px 0 rgba(27, 42, 74, 0.14);
}
.card-thumb { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-thumb-empty {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background:
        repeating-linear-gradient(135deg, rgba(59, 130, 246, 0.09) 0 10px, transparent 10px 20px),
        linear-gradient(160deg, var(--head-bg), var(--head-bg-2));
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.15rem 1.25rem 1.35rem;
}
.card-title {
    font-size: 1.16rem;
    margin: 0 0 0.5rem;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-meta {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.meta-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-2);
    display: inline-block;
    transform: rotate(45deg);
}
.meta-cat { color: var(--muted); }
.meta-cat:hover { color: var(--accent); }
.card-excerpt {
    color: #43536A;
    font-size: 0.96rem;
    margin-bottom: 1rem;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--accent);
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}
.card-more:hover { border-color: var(--accent); }

/* --------------------------------------------------
   Пагинация
   -------------------------------------------------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.6rem;
}
.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    font-family: var(--font-head);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}
.pager .page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}
.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pager .page-numbers.dots {
    border: none;
    background: transparent;
    box-shadow: none;
}

/* --------------------------------------------------
   Главная страница
   -------------------------------------------------- */
.front-wrap { width: 85%; margin-inline: auto; }

.front-section { padding: 3rem 0; }
.front-section.alt {
    background: var(--bg-alt);
    padding: 3rem 2.2rem;
    border-radius: 10px;
    position: relative;
}
.front-section.alt::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='16' viewBox='0 0 40 16'%3E%3Cpath d='M0 14 L10 4 L20 14 L30 4 L40 14' fill='none' stroke='%233B82F6' stroke-width='1.6' opacity='0.5'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    border-radius: 10px 10px 0 0;
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    color: #fff;
    margin-top: 0.5rem;
    isolation: isolate;
}
.hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}
.hero-veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 300 300'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-width='4' opacity='0.16'%3E%3Cellipse cx='150' cy='150' rx='138' ry='60'/%3E%3Cellipse cx='150' cy='150' rx='138' ry='60' transform='rotate(60 150 150)'/%3E%3Cellipse cx='150' cy='150' rx='138' ry='60' transform='rotate(120 150 150)'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(105deg, rgba(15, 26, 44, 0.95) 0%, rgba(27, 42, 74, 0.88) 48%, rgba(42, 63, 102, 0.72) 100%);
    background-repeat: no-repeat, no-repeat;
    background-position: right -40px bottom -60px, center;
    background-size: 300px 300px, cover;
}
.hero-inner {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding: 4rem 2.6rem;
}
.hero-text { flex: 1 1 420px; min-width: 0; }
.hero-kicker {
    font-family: var(--font-head);
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8FD3C0;
    margin-bottom: 1rem;
}
.hero h1 {
    color: #fff;
    margin-bottom: 1rem;
}
.hero-sub {
    font-size: 1.08rem;
    color: #C9D8EE;
    max-width: 46ch;
    margin-bottom: 1.8rem;
}
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.hero-stat {
    flex: 0 1 300px;
    min-width: 0;
    background: rgba(244, 247, 252, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    padding: 1.9rem 1.7rem;
    backdrop-filter: blur(3px);
}
.hero-stat-value {
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-2);
    line-height: 1;
}
.hero-stat-label {
    font-size: 0.95rem;
    color: #C9D8EE;
    margin-top: 0.6rem;
}
.hero-stat-note {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.85rem;
    color: #A8BCDA;
}

/* Сетка рубрик */
.rubric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1.4rem;
}
.rubric {
    min-width: 0;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    padding: 1.5rem 1.4rem;
    box-shadow: 4px 6px 0 rgba(27, 42, 74, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    display: flex;
    flex-direction: column;
}
.rubric:hover {
    transform: translateY(-5px);
    box-shadow: 6px 10px 0 rgba(27, 42, 74, 0.14);
}
.rubric svg { width: 44px; height: 44px; display: block; margin-bottom: 1rem; }
.rubric h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.rubric p { font-size: 0.93rem; color: #4B5B70; margin-bottom: 1.1rem; }
.rubric-progress { margin-top: auto; }
.progress-track {
    height: 8px;
    background: var(--bg-alt);
    border-radius: 2px;
    overflow: hidden;
}
.progress-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 2px;
}
.progress-label {
    display: block;
    margin-top: 0.45rem;
    font-family: var(--font-head);
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.04em;
}

/* Таймлайн */
.timeline {
    position: relative;
    margin: 0;
    padding: 0.5rem 0 0;
    list-style: none;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: #B8C7DB;
}
.timeline li {
    position: relative;
    width: 50%;
    padding: 0 2.4rem 2.2rem 0;
    min-width: 0;
}
.timeline li:nth-child(even) {
    margin-left: 50%;
    padding: 0 0 2.2rem 2.4rem;
}
.timeline li::before {
    content: "";
    position: absolute;
    top: 0.55rem;
    right: -7px;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border: 3px solid var(--bg-alt);
    border-radius: 50%;
}
.timeline li:nth-child(even)::before {
    right: auto;
    left: -7px;
}
.tl-stage {
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.35rem;
}
.tl-title { font-size: 1.12rem; margin-bottom: 0.4rem; }
.timeline p { font-size: 0.95rem; color: #4B5B70; margin: 0; }

/* FAQ */
.faq-item {
    background: rgba(27, 42, 74, 0.05);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 0.9rem;
    overflow: hidden;
}
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1.05rem 1.3rem 1.05rem 3.5rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.03rem;
    color: var(--text);
    position: relative;
    background: rgba(27, 42, 74, 0.06);
    transition: background 0.2s ease, color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: "";
    position: absolute;
    left: 1.2rem;
    top: 50%;
    margin-top: -12px;
    width: 22px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 24'%3E%3Cpath d='M9 1v7L3 20a2 2 0 0 0 1.8 3h12.4A2 2 0 0 0 19 20L13 8V1z' fill='none' stroke='%233B82F6' stroke-width='1.6'/%3E%3Cpath d='M6.2 16h9.6' stroke='%2310B981' stroke-width='1.6'/%3E%3Cpath d='M7.5 1h7' stroke='%233B82F6' stroke-width='1.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    transition: transform 0.25s ease;
}
.faq-item[open] summary { background: var(--head-bg); color: #fff; }
.faq-item[open] summary::before { transform: rotate(-12deg); }
.faq-answer {
    background: #fff;
    padding: 1.15rem 1.3rem;
    font-size: 0.97rem;
    color: #43536A;
}
.faq-answer p:last-child { margin-bottom: 0; }

/* CTA / акцентная плашка */
.accent-plate {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='48' viewBox='0 0 56 48'%3E%3Cpath d='M14 2 L28 10 L28 26 L14 34 L0 26 L0 10 Z M42 2 L56 10 L56 26 L42 34 L28 26 L28 10 Z M28 26 L42 34 L42 50 L28 58 L14 50 L14 34 Z' fill='none' stroke='%23FFFFFF' stroke-width='1' opacity='0.14'/%3E%3C/svg%3E"),
        linear-gradient(120deg, var(--head-bg), var(--head-bg-2));
    color: #fff;
    border-radius: 10px;
    padding: 2.6rem 2.2rem;
}
.accent-plate h2, .accent-plate h3 { color: #fff; }
.accent-plate p { color: #C9D8EE; }

/* Список последних записей на главной */
.front-latest-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* --------------------------------------------------
   Контент записи и страницы
   -------------------------------------------------- */
.entry-header { margin-bottom: 1.6rem; }
.entry-title { font-size: 2.4rem; margin-bottom: 0.6rem; }
.entry-meta {
    font-size: 0.88rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.entry-thumb { margin-bottom: 1.8rem; border-radius: 8px; overflow: hidden; }
.entry-thumb img { width: 100%; display: block; }

.entry-content { font-size: 1.03rem; }
.entry-content h2,
.entry-content h3,
.entry-content h4 { margin-top: 1.9rem; }
.entry-content h2 {
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--text);
    box-shadow: 0 3px 0 -1px var(--accent);
    display: inline-block;
}
.entry-content ul { list-style: none; padding-left: 0; }
.entry-content ul li {
    position: relative;
    padding-left: 1.9rem;
    margin-bottom: 0.55rem;
}
.entry-content ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 12px;
    height: 13px;
    background: var(--accent);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.entry-content ol { padding-left: 1.4rem; }
.entry-content ol li { margin-bottom: 0.55rem; }
.entry-content blockquote {
    margin: 1.8rem 0;
    padding: 1.5rem 1.7rem;
    background: linear-gradient(120deg, var(--head-bg), var(--head-bg-2));
    color: #fff;
    border-radius: 8px;
    font-size: 1.05rem;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content img { border-radius: 8px; }
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    border: 1px solid var(--line);
    font-size: 0.95rem;
}
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
    padding: 0.65rem 0.85rem;
    text-align: left;
}
.entry-content th { background: var(--bg-alt); font-family: var(--font-head); }
.entry-content code {
    background: var(--bg-alt);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.92em;
}

.entry-footer {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
    color: var(--muted);
}
.entry-footer a { color: var(--accent); }

/* --------------------------------------------------
   Виджеты
   -------------------------------------------------- */
.widget { margin-bottom: 1.8rem; }
.widget:last-child { margin-bottom: 0; }
.widget-title {
    font-size: 1.05rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.55rem;
    position: relative;
}
.widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 46px;
    height: 2px;
    background: var(--accent);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li {
    position: relative;
    padding: 0.45rem 0 0.45rem 1.4rem;
    border-bottom: 1px dashed rgba(107, 122, 143, 0.35);
    font-size: 0.95rem;
}
.widget li:last-child { border-bottom: none; }
.widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.95em;
    width: 9px;
    height: 10px;
    background: var(--accent);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.widget .post-date {
    display: block;
    font-size: 0.8rem;
}

/* сайдбар — светлый фон */
.sidebar .widget-title { color: var(--text); }
.sidebar .widget,
.sidebar .widget p { color: #43536A; }
.sidebar .widget a { color: var(--text); }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .widget .post-date { color: var(--muted); }

/* --------------------------------------------------
   Подвал
   -------------------------------------------------- */
.site-footer {
    background: var(--foot-bg);
    color: #C4D2E6;
    border-top: 3px solid var(--accent);
    padding: 3rem 0 1.6rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 2.2rem;
}
.footer-cols > div { min-width: 0; }
.site-footer .widget-title { color: #fff; }
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li { color: #C4D2E6; }
.site-footer .widget a { color: #DCE7F6; }
.site-footer .widget a:hover { color: var(--accent-2); }
.site-footer .widget li { border-bottom-color: rgba(196, 210, 230, 0.2); }
.site-footer .widget .post-date { color: #93A7C2; }
.site-copy {
    margin-top: 2.4rem;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(196, 210, 230, 0.18);
    font-size: 0.84rem;
    color: #93A7C2;
    line-height: 1.6;
}

/* --------------------------------------------------
   Формы поиска и комментарии
   -------------------------------------------------- */
.search-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.search-form input[type="search"] {
    flex: 1 1 180px;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: #fff;
}
.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.comments-area {
    margin-top: 2.8rem;
    background: #fff;
    border-radius: 8px;
    padding: 1.8rem 1.7rem;
    box-shadow: 4px 6px 0 rgba(27, 42, 74, 0.08);
}
.comments-title { font-size: 1.35rem; }
.comment-list { list-style: none; margin: 0 0 1.8rem; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-item {
    border-left: 3px solid var(--accent);
    padding: 0.9rem 1.1rem;
    background: var(--bg);
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
}
.comment-head {
    display: flex;
    gap: 0.8rem;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}
.comment-author { font-family: var(--font-head); font-weight: 600; }
.comment-date { font-size: 0.82rem; color: var(--muted); }
.comment-text { font-size: 0.97rem; }
.comment-text p:last-child { margin-bottom: 0; }
.comment-reply { font-size: 0.88rem; margin-top: 0.4rem; }
.comment-hold { font-size: 0.85rem; color: var(--muted); }

.comment-respond { margin-top: 1.5rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: #fff;
    color: var(--text);
}
.comment-form textarea { min-height: 140px; }
.comment-form label { display: block; font-size: 0.9rem; margin-bottom: 0.25rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form .submit {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #fff;
    border-radius: 4px;
    padding: 0.75rem 1.6rem;
    font-family: var(--font-head);
    font-weight: 600;
    cursor: pointer;
    width: auto;
}
.comment-form .submit:hover { background: var(--accent-dark); }

/* --------------------------------------------------
   404 и поиск
   -------------------------------------------------- */
.page-lead {
    font-size: 1.05rem;
    color: #43536A;
    margin-bottom: 1.6rem;
}
.notfound-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 2rem; }

.archive-header { margin-bottom: 2rem; }
.archive-title { font-size: 2.1rem; }

/* --------------------------------------------------
   Cookie-баннер
   -------------------------------------------------- */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--head-bg);
    color: #DCE7F6;
    border-top: 3px solid var(--accent);
    padding: 1rem 0;
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.cookie-text { flex: 1 1 320px; min-width: 0; font-size: 0.92rem; margin: 0; }
.cookie-text a { color: #8FD3C0; }

/* --------------------------------------------------
   Адаптив
   -------------------------------------------------- */
@media (max-width: 960px) {
    h1 { font-size: 2.5rem; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .layout-single { width: 100%; }
    .front-wrap { width: 100%; }
    .hero-inner { padding: 3rem 2rem; }
    .timeline::before { left: 7px; }
    .timeline li,
    .timeline li:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding: 0 0 2rem 2.2rem;
    }
    .timeline li::before,
    .timeline li:nth-child(even)::before { left: 0; right: auto; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    .entry-title { font-size: 1.75rem; }
    .header-inner { padding: 1rem 0; }
    .nav-toggle { display: block; }
    .site-nav {
        flex-basis: 100%;
        order: 3;
    }
    .site-nav ul { flex-direction: column; gap: 0.2rem; }
    .front-section { padding: 2.2rem 0; }
    .front-section.alt { padding: 2.2rem 1.4rem; }
    .accent-plate { padding: 1.9rem 1.4rem; }
    .hero-inner { padding: 2.4rem 1.4rem; gap: 1.8rem; }
    .hero-stat { padding: 1.5rem 1.3rem; }
    .hero-stat-value { font-size: 2.4rem; }
    .sidebar { padding: 1.3rem 1.2rem; }
    .comments-area { padding: 1.3rem 1.2rem; }
    .cards { gap: 1.3rem; }
}
