/*
Theme Name: dds_houseofroyalties.com
Author: Ольга Киреева
Description: Информационная тема для сайта о бизнесе и лицензировании продуктов. Лавандовый технологичный минимализм в связке со строгой журнальной подачей.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: hroyal
*/

/* ================================================================
   1. Переменные и база
   ================================================================ */

:root {
    --bg:        #F5F2F7;
    --bg-alt:    #EBE6F0;
    --dark:      #1B1723;
    --panel:     #FFFFFF;
    --ink:       #1E1A24;
    --accent:    #B07CD8;
    --accent-2:  #D8B4FE;
    --accent-dk: #9A6BC2;
    --muted:     #9A8B9E;
    --line:      #E2DAE8;
    --sans:      "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --serif:     "Merriweather", "Lora", Georgia, "Times New Roman", serif;
    --shell:     1180px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image: repeating-linear-gradient(90deg, rgba(30, 26, 36, 0.05) 0 1px, rgba(30, 26, 36, 0) 1px 30px);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    right: -60px;
    bottom: -80px;
    width: 520px;
    height: 520px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.12;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right bottom;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath fill='%23D8B4FE' d='M43 152c-19-18-30-45-21-70 9-25 37-47 66-53 29-6 59 5 76 25 17 20 21 49 11 72-10 23-34 40-60 45-26 5-53-1-72-19z'/%3E%3C/svg%3E");
}

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

a { color: var(--ink); }

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

h1 { font-size: 3.5rem; font-weight: 800; }
h2 { font-size: 2.1rem; font-weight: 700; }
h3 { font-size: 1.45rem; font-weight: 700; }
h4 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1.15em; }

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

.skip-to-content {
    position: absolute;
    left: -9999px;
}

/* ================================================================
   2. Шапка
   ================================================================ */

.site-top {
    background: var(--dark);
    color: #F2ECF6;
    border-bottom: 4px solid var(--accent);
}

.top-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.6rem 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1 1 320px;
    text-decoration: none;
}

.brand-mark { flex: 0 0 auto; display: block; }

.brand-logo { display: block; max-height: 62px; width: auto; }

.brand-words { min-width: 0; }

.brand-title {
    display: block;
    font-family: var(--sans);
    font-weight: 800;
    font-size: 1.12rem;
    line-height: 1.3;
    color: #FFFFFF;
    text-decoration: none;
}

.brand-title:hover { color: var(--accent-2); }

.brand-desc {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #A79BB0;
    max-width: 46ch;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--accent);
    color: #FFFFFF;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.55rem 1rem;
    border-radius: 0;
    cursor: pointer;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    color: #EDE5F2;
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: #FFFFFF;
    border-bottom-color: var(--accent);
}

/* ================================================================
   3. Кнопки и ссылки в тексте
   ================================================================ */

.btn,
.btn-ghost {
    display: inline-block;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    border-radius: 0;
    padding: 0.9rem 1.7rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, transform .12s ease;
}

.btn {
    background: var(--accent);
    color: #FFFFFF;
    border: 2px solid var(--accent);
}

.btn:hover {
    background: var(--accent-dk);
    border-color: var(--accent-dk);
    color: #FFFFFF;
    transform: translateY(2px);
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-ghost:hover {
    background: var(--accent);
    color: #FFFFFF;
}

.entry-body a,
.crumbs a,
.widget a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.entry-body a:hover,
.crumbs a:hover,
.widget a:hover {
    color: var(--accent-dk);
    text-decoration-color: var(--accent-dk);
    text-decoration-thickness: 2px;
}

/* ================================================================
   4. Раскладки
   ================================================================ */

.site-main { padding: 2.4rem 0 3.6rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 30fr);
    gap: 3%;
    align-items: start;
}

.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.content-area { min-width: 0; }

/* ================================================================
   5. Хлебные крошки
   ================================================================ */

.crumbs {
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.8rem;
    line-height: 1.6;
}

.crumbs a { color: var(--muted); }

.crumb-sep { color: var(--accent); padding: 0 0.25rem; }

/* ================================================================
   6. Заголовки секций (двойная линия)
   ================================================================ */

.sec-title {
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 1.8rem;
    font-size: 1.9rem;
}

.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 9px;
    width: 210px;
    max-width: 100%;
    height: 2px;
    background: var(--ink);
}

.sec-title::after {
    content: "";
    position: absolute;
    left: 60px;
    bottom: 0;
    width: 110px;
    max-width: 60%;
    height: 3px;
    background: var(--accent);
}

.sec-title.on-dark { color: #FFFFFF; }
.sec-title.on-dark::before { background: #FFFFFF; }
.sec-title.on-dark::after { background: var(--accent-2); }

.dots-break {
    height: 8px;
    width: 110px;
    margin: 0 auto 0 0;
    background-image: radial-gradient(circle, var(--accent) 3px, rgba(0, 0, 0, 0) 3.5px);
    background-size: 22px 8px;
    background-repeat: repeat-x;
}

.grad-num {
    background-image: linear-gradient(160deg, var(--accent) 0%, var(--dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* уголок юриста */
.corner-note { position: relative; }

.corner-note::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 24px 24px 0;
    border-color: transparent var(--accent) transparent transparent;
}

/* ================================================================
   7. Карточки записей
   ================================================================ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
}

.card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.8rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 6px 6px 0 rgba(27, 23, 35, 0.08);
    transition: box-shadow .2s ease, transform .2s ease;
}

.card:hover {
    box-shadow: 10px 10px 0 rgba(27, 23, 35, 0.14);
    transform: translateY(-4px);
}

.card-thumb {
    display: block;
    border-bottom: 1px solid var(--line);
}

.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.card-thumb-empty {
    display: block;
    aspect-ratio: 16 / 10;
    background-color: var(--bg-alt);
    background-image: repeating-linear-gradient(135deg, rgba(176, 124, 216, 0.16) 0 2px, rgba(176, 124, 216, 0) 2px 14px);
    border-bottom: 1px solid var(--line);
}

.card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 1.4rem 1.5rem 1.5rem;
}

.card-title {
    font-size: 1.15rem;
    margin: 0 0 0.6rem;
    line-height: 1.35;
}

.card-title a {
    color: var(--ink);
    text-decoration: none;
}

.card-title a:hover { color: var(--accent-dk); }

.card-excerpt {
    font-size: 0.94rem;
    color: #3B3345;
    margin-bottom: 1rem;
}

.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.entry-meta {
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.7rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.entry-meta a {
    color: var(--accent-dk);
    text-decoration: none;
}

.entry-meta a:hover { text-decoration: underline; }

.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-dk);
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
}

.card-more:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ================================================================
   8. Главная страница
   ================================================================ */

.front-wrap {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.front-section {
    padding: 3.4rem 2.2rem;
    margin-bottom: 2.6rem;
}

.front-section.tone-alt { background: var(--bg-alt); }
.front-section.tone-plain { background: transparent; padding-left: 0; padding-right: 0; }

/* --- Блок 1: hero --- */

.hero {
    position: relative;
    overflow: hidden;
    background: var(--dark);
    border-bottom: 6px solid var(--accent);
    margin-bottom: 2.6rem;
}

.hero-pic {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-veil {
    position: absolute;
    inset: 0;
    background: rgba(27, 23, 35, 0.55);
}

.hero-inner {
    position: relative;
    text-align: center;
    padding: 5.5rem 2.4rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero h1 {
    color: #FFFFFF;
    margin-bottom: 1rem;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero-lead {
    color: #E6DCEE;
    font-size: 1.08rem;
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.9rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-actions .btn-ghost {
    color: #FFFFFF;
    border-color: #FFFFFF;
}

.hero-actions .btn-ghost:hover {
    background: #FFFFFF;
    color: var(--dark);
    border-color: #FFFFFF;
}

/* --- Блок 2: таймлайн --- */

.tl { position: relative; margin-top: 2.4rem; }

.tl::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 3px dashed var(--accent);
    transform: translateX(-50%);
}

.tl-item {
    position: relative;
    width: 50%;
    padding: 0 3rem 2.4rem 0;
    min-width: 0;
}

.tl-item:nth-child(even) {
    margin-left: 50%;
    padding: 0 0 2.4rem 3rem;
}

.tl-num {
    display: block;
    font-family: var(--sans);
    font-weight: 800;
    font-size: 3.2rem;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.tl-item h3 { margin-bottom: 0.4rem; }

.tl-item p { margin: 0; font-size: 0.96rem; }

.tl-item::after {
    content: "";
    position: absolute;
    top: 14px;
    right: -9px;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border: 3px solid var(--bg-alt);
}

.tl-item:nth-child(even)::after {
    right: auto;
    left: -9px;
}

/* --- Блок 3: карта тем --- */

.topic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.6rem;
    margin-top: 2.2rem;
}

.topic-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    min-width: 0;
    aspect-ratio: 1 / 1;
    padding: 1.4rem 1.2rem;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    background: var(--bg-alt);
    border-radius: 0;
    box-shadow: 9px 9px 18px rgba(27, 23, 35, 0.12), -9px -9px 18px rgba(255, 255, 255, 0.9);
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.topic-tile svg {
    width: 46px;
    height: 46px;
    display: block;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
    transition: stroke .2s ease;
}

.topic-tile span {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
}

.topic-tile small {
    display: block;
    font-family: var(--sans);
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
}

.topic-tile:hover {
    background: var(--accent);
    color: #FFFFFF;
    box-shadow: inset 4px 4px 10px rgba(27, 23, 35, 0.2), inset -4px -4px 10px rgba(255, 255, 255, 0.18);
}

.topic-tile:hover svg { stroke: #FFFFFF; }
.topic-tile:hover small { color: rgba(255, 255, 255, 0.85); }

/* --- Блок 4: статистика --- */

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.6rem;
    margin-top: 2.2rem;
}

.stat-cell {
    min-width: 0;
    text-align: center;
    padding: 1.2rem 1rem;
    border-left: 1px solid var(--line);
}

.stat-cell:first-child { border-left: 0; }

.stat-num {
    display: block;
    font-family: var(--sans);
    font-weight: 800;
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-family: var(--sans);
    font-size: 0.9rem;
    color: #463E52;
    line-height: 1.45;
}

/* --- Блок: последние записи --- */

.latest-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
}

.front-cta {
    background-image: linear-gradient(135deg, var(--accent) 0%, var(--dark) 100%);
    color: #FFFFFF;
    padding: 2.6rem 2.4rem;
    margin-top: 2.4rem;
}

.front-cta h3 { color: #FFFFFF; margin-bottom: 0.6rem; }

.front-cta p { color: #EADFF2; margin-bottom: 1.5rem; max-width: 62ch; }

.front-cta .btn-ghost {
    color: #FFFFFF;
    border-color: #FFFFFF;
}

.front-cta .btn-ghost:hover {
    background: #FFFFFF;
    color: var(--dark);
}

/* ================================================================
   9. Записи и страницы
   ================================================================ */

.entry {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 6px 6px 0 rgba(27, 23, 35, 0.08);
    padding: 2.4rem 2.4rem 2.6rem;
}

.entry-title { font-size: 2.4rem; margin-bottom: 0.6rem; }

.entry-thumb {
    margin: 1.4rem 0 1.8rem;
}

.entry-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 8;
    object-fit: cover;
}

.entry-body { min-width: 0; }

.entry-body h2 { font-size: 1.7rem; margin-top: 1.8rem; }
.entry-body h3 { font-size: 1.32rem; margin-top: 1.5rem; }

.entry-body ul,
.entry-body ol { padding-left: 1.3rem; margin: 0 0 1.2em; }

.entry-body li { margin-bottom: 0.5em; }

.entry-body blockquote {
    margin: 1.8rem 0;
    padding: 1.6rem 1.8rem;
    background-image: linear-gradient(135deg, var(--accent) 0%, var(--dark) 100%);
    color: #FFFFFF;
    position: relative;
}

.entry-body blockquote::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 24px 24px 0;
    border-color: transparent var(--accent-2) transparent transparent;
}

.entry-body blockquote p:last-child { margin-bottom: 0; }

.entry-body img { display: block; height: auto; }

.entry-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    font-size: 0.94rem;
}

.entry-body table,
.entry-body th,
.entry-body td {
    border: 1px solid var(--line);
}

.entry-body th,
.entry-body td { padding: 0.7rem 0.9rem; text-align: left; }

.entry-body th {
    background: var(--bg-alt);
    font-family: var(--sans);
    font-weight: 700;
}

.entry-tags {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    font-family: var(--sans);
    font-size: 0.85rem;
}

.entry-tags a {
    display: inline-block;
    margin: 0 0.4rem 0.4rem 0;
    padding: 0.3rem 0.7rem;
    background: var(--bg-alt);
    color: var(--ink);
    text-decoration: none;
}

.entry-tags a:hover { background: var(--accent); color: #FFFFFF; }

.page-heading { margin-bottom: 1.8rem; }

.page-heading .sec-title { font-size: 2.4rem; }

.page-heading p { color: #463E52; max-width: 68ch; }

/* ================================================================
   10. Сайдбар и виджеты
   ================================================================ */

.sidebar {
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 6px 6px 0 rgba(27, 23, 35, 0.08);
    padding: 1.6rem 1.6rem 1.8rem;
}

.sidebar .widget { margin-bottom: 1.8rem; color: var(--ink); }
.sidebar .widget:last-child { margin-bottom: 0; }

.widget-title {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 1rem;
}

.widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 5px;
    width: 120px;
    max-width: 100%;
    height: 2px;
    background: currentColor;
}

.widget-title::after {
    content: "";
    position: absolute;
    left: 34px;
    bottom: 0;
    width: 66px;
    height: 3px;
    background: var(--accent);
}

.sidebar .widget-title { color: var(--ink); }

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    margin-bottom: 0.7rem;
    padding-left: 1.1rem;
    position: relative;
    font-size: 0.94rem;
    line-height: 1.5;
}

.widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 7px;
    height: 7px;
    background: var(--accent);
}

.sidebar .widget a { color: var(--ink); }
.sidebar .widget a:hover { color: var(--accent-dk); }
.sidebar .widget .post-date { color: var(--muted); font-size: 0.82rem; }

/* ================================================================
   11. Подвал
   ================================================================ */

.site-foot {
    background: var(--dark);
    color: #D8CFE0;
    padding: 3rem 0 1.6rem;
    border-top: 4px solid var(--accent);
}

.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
}

.foot-col { min-width: 0; }

.site-foot .widget { color: #D8CFE0; font-size: 0.94rem; }

.site-foot .widget-title { color: #FFFFFF; }

.site-foot .widget-title::before { background: #FFFFFF; }
.site-foot .widget-title::after { background: var(--accent-2); }

.site-foot .widget a {
    color: #E7DDEF;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.site-foot .widget a:hover {
    color: #FFFFFF;
    text-decoration-color: var(--accent-2);
}

.site-foot .widget li::before { background: var(--accent-2); }

.site-foot .widget .post-date { color: #A79BB0; }

.foot-bottom {
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-family: var(--sans);
    font-size: 0.85rem;
    color: #A79BB0;
}

/* ================================================================
   12. Пагинация
   ================================================================ */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.4rem;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 44px;
    text-align: center;
    padding: 0.6rem 0.9rem;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.2;
    color: var(--ink);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0;
    text-decoration: none;
}

.pager a.page-numbers:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
}

.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
}

.pager .page-numbers.dots {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
}

/* ================================================================
   13. Формы поиска и комментарии
   ================================================================ */

.search-form {
    display: flex;
    gap: 0;
    min-width: 0;
}

.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    font-family: var(--serif);
    font-size: 0.95rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: 0;
    background: #FFFFFF;
    color: var(--ink);
}

.search-form input[type="search"]:focus {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.search-form button {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.75rem 1.2rem;
    background: var(--accent);
    color: #FFFFFF;
    border: 1px solid var(--accent);
    border-radius: 0;
    cursor: pointer;
}

.search-form button:hover { background: var(--accent-dk); border-color: var(--accent-dk); }

.comments-area {
    margin-top: 2.4rem;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 6px 6px 0 rgba(27, 23, 35, 0.08);
    padding: 2rem 2.2rem 2.2rem;
}

.comments-title { font-size: 1.5rem; }

.comment-list {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}

.comment-list ul.children {
    list-style: none;
    margin: 1rem 0 0;
    padding-left: 1.6rem;
    border-left: 2px solid var(--line);
}

.comment-item {
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
    background: var(--bg);
    border: 1px solid var(--line);
}

.comment-head {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-family: var(--sans);
    font-weight: 700;
}

.comment-date {
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--muted);
}

.comment-text p:last-child { margin-bottom: 0; }

.comment-actions {
    margin-top: 0.6rem;
    font-family: var(--sans);
    font-size: 0.85rem;
}

.comment-hold { color: var(--muted); font-size: 0.88rem; }

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    font-family: var(--serif);
    font-size: 0.95rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #FFFFFF;
    color: var(--ink);
}

.comment-respond label {
    display: block;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.comment-respond p { margin-bottom: 1rem; }

.comment-respond .submit {
    font-family: var(--sans);
    font-weight: 700;
    background: var(--accent);
    color: #FFFFFF;
    border: 2px solid var(--accent);
    border-radius: 0;
    padding: 0.85rem 1.7rem;
    cursor: pointer;
}

.comment-respond .submit:hover { background: var(--accent-dk); border-color: var(--accent-dk); transform: translateY(2px); }

/* ================================================================
   14. 404 и поиск
   ================================================================ */

.notice-box {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 6px 6px 0 rgba(27, 23, 35, 0.08);
    padding: 2.4rem 2.4rem;
}

.err-code {
    font-family: var(--sans);
    font-weight: 800;
    font-size: 6rem;
    line-height: 1;
    margin-bottom: 0.6rem;
}

.err-actions { margin-top: 1.6rem; }

.search-wide { margin: 1.6rem 0; max-width: 520px; }

/* ================================================================
   15. Cookie-баннер
   ================================================================ */

.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    padding: 1.1rem 1.6rem;
    background: var(--dark);
    color: #E4DAEC;
    border-top: 3px solid var(--accent);
    font-size: 0.9rem;
}

.cookie-banner p { margin: 0; max-width: 74ch; }

.cookie-banner a { color: var(--accent-2); }

.cookie-banner .btn { padding: 0.65rem 1.4rem; }

/* ================================================================
   16. Адаптив
   ================================================================ */

@media (max-width: 960px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }

    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.2rem;
    }

    .layout-single,
    .front-wrap { width: 100%; }

    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .stat-cell:nth-child(3) { border-left: 0; }

    .stat-num { font-size: 3.8rem; }

    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .hero-inner { padding: 4rem 1.8rem; }
}

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

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .top-inner { padding: 1.2rem 0; gap: 1rem; }

    .nav-toggle { display: inline-block; }

    .main-nav {
        flex: 1 1 100%;
        display: none;
    }

    .main-nav.is-open { display: block; }

    .main-nav ul {
        flex-direction: column;
        gap: 0.9rem;
        padding-top: 0.8rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .front-section { padding: 2.2rem 1.3rem; margin-bottom: 1.8rem; }
    .front-section.tone-plain { padding-left: 0; padding-right: 0; }

    .hero-inner { padding: 3rem 1.3rem; }
    .hero-lead { font-size: 1rem; }

    .card-grid,
    .card-list { grid-template-columns: minmax(0, 1fr); }

    .topic-grid { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }

    .topic-tile { aspect-ratio: auto; padding: 1.6rem 1.3rem; }

    .stats-row { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }

    .stat-cell { border-left: 0; border-top: 1px solid var(--line); }
    .stat-cell:first-child { border-top: 0; }

    .stat-num { font-size: 3.4rem; }

    .tl::before { left: 8px; transform: none; }

    .tl-item,
    .tl-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding: 0 0 2rem 2.2rem;
    }

    .tl-item::after,
    .tl-item:nth-child(even)::after {
        left: 0;
        right: auto;
    }

    .tl-num { font-size: 2.6rem; }

    .entry { padding: 1.6rem 1.3rem 1.8rem; }
    .entry-title { font-size: 1.75rem; }

    .comments-area { padding: 1.5rem 1.3rem; }

    .notice-box { padding: 1.7rem 1.3rem; }

    .err-code { font-size: 4rem; }

    .front-cta { padding: 1.9rem 1.4rem; }

    .sidebar { padding: 1.3rem 1.3rem 1.5rem; }

    .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 2rem; }

    .cookie-banner { padding: 1rem 1.2rem; font-size: 0.85rem; }

    body::before { width: 320px; height: 320px; }
}
