/*
Theme Name: dds_daughterofamurderedwoman.com
Theme URI: https://daughterofamurderedwoman.com/
Author: Анна Ветрова
Description: Тёмная тема для информационно-аналитического портала о медицинской этике и биоэтике. Лавандовый акцент, журнальные линейки, стеклянные карточки.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: medetika
*/

/* =========================================================
   1. Токены
   ========================================================= */

:root {
    --bg: #0D0D12;
    --bg-alt: #16161F;
    --bg-foot: #0A0A0E;
    --bg-aside: #13131B;
    --ink: #F0F0F5;
    --accent: #B8A9FF;
    --accent-2: #6B5B8D;
    --muted: #7A7A8C;
    --line: #2A2A3A;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-line: rgba(184, 169, 255, 0.2);
    --font: "Inter", "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --shell: min(92%, 1180px);
}

/* =========================================================
   2. Сброс и база
   ========================================================= */

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

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

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    color: var(--ink);
    background-color: var(--bg);
    background-image: radial-gradient(rgba(240, 240, 245, 0.04) 1px, transparent 1px);
    background-size: 4px 4px;
}

body::after {
    content: "";
    position: fixed;
    right: -140px;
    bottom: -160px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.03;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
}

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);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 0.6em;
}

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

p {
    margin: 0 0 1.1em;
}

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

li {
    margin-bottom: 0.45em;
}

blockquote {
    margin: 1.8em 0;
    padding: 1.4rem 1.6rem;
    border-left: 4px solid var(--accent);
    background: var(--glass);
    color: var(--muted);
    font-size: 1.1rem;
}

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

code, pre {
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.92em;
}

pre {
    overflow-x: auto;
    padding: 1.1rem 1.2rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 4px;
}

table {
    width: 100%;
    margin: 1.6em 0;
    border-collapse: collapse;
    border: 1px solid var(--line);
}

th, td {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    text-align: left;
}

th {
    background: var(--bg-alt);
    font-weight: 700;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* =========================================================
   3. Оболочка ширины
   ========================================================= */

.shell {
    width: var(--shell);
    margin-inline: auto;
    position: relative;
    z-index: 1;
}

.site-main {
    padding: 2.6rem 0 4rem;
}

.layout-single {
    display: block;
}

.layout-single > .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

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

/* =========================================================
   4. Верхняя полоса, шапка, меню
   ========================================================= */

.truth-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
}

.site-head {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 2;
}

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

.brand {
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
    min-width: 0;
    flex: 1 1 340px;
}

.brand-mark {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
}

.brand-mark svg {
    width: 100%;
    height: 100%;
    display: block;
}

.brand-logo {
    width: auto;
    max-height: 54px;
}

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

.brand-name {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

a.brand-name:hover {
    color: var(--accent);
}

.brand-tagline {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    font: inherit;
    font-size: 0.86rem;
    color: var(--accent);
    background: transparent;
    border: 1.5px solid var(--accent);
    border-radius: 4px;
    cursor: pointer;
}

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

.site-nav li {
    margin: 0;
}

.site-nav a {
    position: relative;
    display: inline-block;
    padding: 0.2rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ink);
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.site-nav a:hover {
    color: var(--accent);
}

.site-nav a:hover::after,
.site-nav .current-menu-item > a::after {
    width: 100%;
}

.site-nav .current-menu-item > a {
    color: var(--accent);
}

/* =========================================================
   5. Типовые элементы
   ========================================================= */

.section-title {
    padding-left: 1rem;
    border-left: 4px solid var(--accent);
    margin-bottom: 1.5rem;
}

.trail {
    padding: 1.1rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
}

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

.trail a:hover {
    color: var(--accent);
}

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

.btn {
    display: inline-block;
    padding: 0.68rem 1.4rem;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--accent);
    background: transparent;
    border: 1.5px solid var(--accent);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    background: rgba(184, 169, 255, 0.1);
    color: var(--accent);
}

.btn-solid {
    color: var(--bg);
    background: var(--accent);
    border-color: var(--accent);
}

.btn-solid:hover {
    color: var(--bg);
    background: var(--accent);
    transform: translateY(2px);
    box-shadow: 0 6px 22px rgba(184, 169, 255, 0.35);
}

.dots-rule {
    margin: 3.2rem 0;
    text-align: center;
    color: var(--accent-2);
    font-size: 1.4rem;
    letter-spacing: 0.6em;
    line-height: 1;
    user-select: none;
}

.hair-rule {
    height: 1px;
    margin: 2.6rem 0;
    background: var(--line);
    border: 0;
}

.entry-content a,
.widget a,
.comment-text a {
    position: relative;
}

.entry-content a::after,
.comment-text a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.entry-content a:hover::after,
.comment-text a:hover::after {
    width: 100%;
}

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

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--glass);
    border: 1px solid var(--glass-line);
    border-radius: 8px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(184, 169, 255, 0.8);
}

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

.card-thumb img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    filter: saturate(0.4) contrast(1.05);
    transition: filter 0.3s ease;
}

.card:hover .card-thumb img {
    filter: saturate(0.65) contrast(1.05);
}

.card-thumb-empty {
    display: block;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at 30% 30%, rgba(184, 169, 255, 0.12), transparent 60%),
        linear-gradient(140deg, #16161F 0%, #1A1A2E 100%);
    border-bottom: 1px solid var(--glass-line);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.25rem 1.35rem 1.45rem;
}

.card-title {
    font-size: 1.14rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.55rem;
}

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

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

.meta-line {
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.7rem;
}

.meta-line a {
    color: var(--accent-2);
}

.meta-line a:hover {
    color: var(--accent);
}

.meta-dot {
    padding: 0 0.3rem;
}

.card-excerpt {
    font-size: 0.94rem;
    color: #C7C7D4;
    margin-bottom: 1.1rem;
}

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

.card-excerpt p:last-child {
    margin-bottom: 0;
}

.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

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

/* =========================================================
   7. Главная
   ========================================================= */

.front-section {
    padding: 3.2rem 0;
}

.front-section.is-alt {
    background: var(--bg-alt);
    background-image: radial-gradient(rgba(240, 240, 245, 0.04) 1px, transparent 1px);
    background-size: 4px 4px;
}

.front-wide > .shell {
    width: min(85%, 1180px);
}

/* Блок 1 — hero */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 2.6rem;
    align-items: center;
    padding: 3.6rem 0 3.2rem;
}

.hero-text {
    min-width: 0;
    padding-left: 1.2rem;
    border-left: 4px solid var(--accent);
}

.hero-kicker {
    display: block;
    margin-bottom: 0.9rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.hero h1 {
    margin-bottom: 1rem;
}

.hero-lead {
    max-width: 46ch;
    font-size: 1.06rem;
    color: #C7C7D4;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.6rem;
}

.hero-art {
    min-width: 0;
}

.hero-art svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Блок 2 — хронология */

.chrono {
    position: relative;
    margin-top: 2.4rem;
    padding: 0;
    list-style: none;
}

.chrono::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 6px;
    bottom: 6px;
    width: 0;
    border-left: 1px dashed var(--accent-2);
    transform: translateX(-0.5px);
}

.chrono li {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
    align-items: baseline;
    margin: 0 0 1.9rem;
}

.chrono-date {
    grid-column: 1;
    text-align: right;
    padding-right: 0.4rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
    min-width: 0;
}

.chrono-dot {
    grid-column: 2;
    justify-self: center;
    align-self: center;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(184, 169, 255, 0.14), 0 0 16px rgba(184, 169, 255, 0.6);
}

.chrono-body {
    grid-column: 3;
    padding-left: 0.4rem;
    min-width: 0;
}

.chrono-body h3 {
    margin: 0 0 0.3rem;
    font-size: 1.12rem;
}

.chrono-body p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--muted);
}

/* Блок 3 — статистика */

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

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

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

.stat-num {
    display: block;
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.stat-cap {
    display: block;
    margin-top: 0.7rem;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--muted);
}

/* Блок 4 — карта тем */

.topics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 2.2rem;
}

.topic {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    padding: 1.35rem 1.4rem;
    background: var(--glass);
    border: 1px solid var(--accent-2);
    border-radius: 8px;
    color: var(--ink);
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.topic svg {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.4;
    transition: stroke 0.22s ease;
}

.topic span {
    min-width: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.topic:hover {
    background: var(--accent);
    border-color: transparent;
    color: var(--bg);
}

.topic:hover svg {
    stroke: var(--bg);
}

/* Лента последних записей на главной */

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

.latest-head .section-title {
    margin-bottom: 0;
}

.latest-link {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.latest-cards {
    margin-top: 2rem;
}

/* Цитата-врезка */

.pullquote {
    position: relative;
    padding: 2.6rem 2.4rem 2.4rem 5rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #16161F 0%, #1A1A2E 100%);
    border: 1px solid var(--line);
}

.pullquote::before {
    content: "“";
    position: absolute;
    left: 1.5rem;
    top: 0.8rem;
    font-size: 4rem;
    line-height: 1;
    font-weight: 800;
    color: var(--accent);
}

.pullquote p {
    margin: 0;
    font-family: var(--font);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--accent-2);
}

.pullquote cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

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

.entry-header {
    margin-bottom: 1.8rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--line);
}

.entry-header h1 {
    font-size: 2.6rem;
    margin-bottom: 0.7rem;
}

.entry-thumb {
    margin: 0 0 2rem;
    border: 1px solid var(--glass-line);
    border-radius: 8px;
    overflow: hidden;
}

.entry-thumb img {
    width: 100%;
    display: block;
    filter: saturate(0.45) contrast(1.05);
}

.entry-content h2 {
    margin-top: 2.1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--accent);
    font-size: 1.7rem;
}

.entry-content h3 {
    margin-top: 1.7rem;
    font-size: 1.3rem;
}

.entry-content img {
    border-radius: 8px;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.2em;
}

.entry-content ul li::marker {
    color: var(--accent);
}

.entry-content ol li::marker {
    color: var(--accent);
    font-weight: 700;
}

.entry-tags {
    margin-top: 2rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.entry-tags a {
    display: inline-block;
    margin: 0 0.35rem 0.4rem 0;
    padding: 0.25rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--accent-2);
}

.entry-tags a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 2.4rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--line);
}

.post-nav-item {
    min-width: 0;
}

.post-nav-item span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.post-nav-item.is-next {
    text-align: right;
}

.page-heading {
    margin-bottom: 1.6rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--line);
}

.page-heading h1 {
    font-size: 2.6rem;
    padding-left: 1rem;
    border-left: 4px solid var(--accent);
    margin-bottom: 0;
}

.list-intro {
    margin: 0 0 2rem;
    color: var(--muted);
    max-width: 62ch;
}

.nothing-found {
    padding: 2rem 2rem;
    background: var(--glass);
    border: 1px solid var(--glass-line);
    border-radius: 8px;
}

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

.sidebar {
    min-width: 0;
    padding: 1.6rem 1.5rem;
    background: var(--bg-aside);
    border: 1px solid rgba(184, 169, 255, 0.14);
    border-radius: 8px;
}

.sidebar .widget + .widget {
    margin-top: 2rem;
}

.widget-title {
    margin: 0 0 1rem;
    padding-left: 0.8rem;
    border-left: 4px solid var(--accent);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

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

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

.sidebar .widget li {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(42, 42, 58, 0.9);
    font-size: 0.94rem;
}

.sidebar .widget li:last-child {
    border-bottom: 0;
}

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

.sidebar .widget a:hover {
    color: var(--accent);
}

.sidebar .post-date,
.sidebar .rss-date {
    display: block;
    font-size: 0.76rem;
    color: var(--muted);
}

.sidebar .widget p {
    color: #C7C7D4;
    font-size: 0.94rem;
}

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

.site-foot {
    position: relative;
    z-index: 1;
    background: var(--bg-foot);
    border-top: 1px solid var(--line);
    padding: 3rem 0 1.8rem;
}

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

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

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

.site-foot .widget {
    color: #C9C9D6;
    font-size: 0.93rem;
}

.site-foot .widget p {
    color: #C9C9D6;
}

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

.site-foot .widget li {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(42, 42, 58, 0.75);
}

.site-foot .widget li:last-child {
    border-bottom: 0;
}

.site-foot .widget a {
    color: #D6D6E2;
}

.site-foot .widget a:hover {
    color: var(--accent);
}

.site-foot .post-date {
    display: block;
    font-size: 0.76rem;
    color: var(--muted);
}

.copyright {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--muted);
}

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

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

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    padding: 0.5rem 0.85rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    background: transparent;
    border: 1.5px solid var(--accent);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.pager a.page-numbers:hover {
    background: rgba(184, 169, 255, 0.1);
}

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

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

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

.search-form {
    display: flex;
    gap: 0.6rem;
    max-width: 460px;
}

.search-form label {
    flex: 1 1 auto;
    min-width: 0;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
    width: 100%;
    padding: 0.62rem 0.85rem;
    font: inherit;
    font-size: 0.94rem;
    color: var(--ink);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 4px;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
}

.search-form input:focus,
textarea:focus {
    border-color: var(--accent);
    outline: none;
}

.search-submit,
input[type="submit"],
button[type="submit"] {
    padding: 0.62rem 1.3rem;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent);
    border: 1.5px solid var(--accent);
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-submit:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    transform: translateY(2px);
    box-shadow: 0 6px 22px rgba(184, 169, 255, 0.35);
}

.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.comments-title,
.comment-reply-title {
    padding-left: 1rem;
    border-left: 4px solid var(--accent);
    font-size: 1.5rem;
}

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

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

.comment-item {
    margin-bottom: 1.2rem;
}

.comment-inner {
    padding: 1.2rem 1.35rem;
    background: var(--glass);
    border: 1px solid var(--glass-line);
    border-radius: 8px;
}

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

.comment-author {
    font-weight: 700;
}

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

.comment-text {
    font-size: 0.96rem;
}

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

.comment-actions {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.comment-respond {
    padding: 1.6rem 1.6rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 8px;
}

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

.comment-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.84rem;
    color: var(--muted);
}

.comment-notes,
.logged-in-as,
.comment-form-cookies-consent label {
    font-size: 0.82rem;
    color: var(--muted);
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-form-cookies-consent label {
    margin: 0;
}

/* =========================================================
   13. 404
   ========================================================= */

.error-block {
    padding: 3rem 2.2rem;
    text-align: center;
    background: var(--glass);
    border: 1px solid var(--glass-line);
    border-radius: 8px;
}

.error-code {
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.error-block .search-form {
    margin: 1.8rem auto 1.6rem;
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.6rem;
    background: rgba(13, 13, 18, 0.96);
    border-top: 1px solid var(--glass-line);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cookie-banner p {
    margin: 0;
    min-width: 0;
    flex: 1 1 320px;
    font-size: 0.86rem;
    color: #C9C9D6;
}

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

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

    .layout-with-sidebar {
        display: block;
    }

    .sidebar {
        margin-top: 2.6rem;
    }

    .layout-single > .content-area {
        width: 100%;
    }

    .front-wide > .shell {
        width: var(--shell);
    }

    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
        padding: 2.6rem 0;
    }

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

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

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

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

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

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

    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.55rem; }
    h3 { font-size: 1.25rem; }

    .head-inner {
        padding: 1.1rem 0;
    }

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

    .site-nav {
        flex: 1 1 100%;
    }

    .site-nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
        padding-top: 0.6rem;
    }

    .site-nav.is-open ul {
        display: flex;
    }

    .site-nav li {
        border-top: 1px solid var(--line);
    }

    .site-nav a {
        display: block;
        padding: 0.7rem 0;
    }

    .front-section {
        padding: 2.4rem 0;
    }

    .hero-text {
        padding-left: 0.9rem;
    }

    .entry-header h1,
    .page-heading h1 {
        font-size: 1.9rem;
    }

    .chrono::before {
        left: 5px;
    }

    .chrono li {
        grid-template-columns: 22px minmax(0, 1fr);
        row-gap: 0.3rem;
    }

    .chrono-dot {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .chrono-date {
        grid-column: 2;
        grid-row: 1;
        text-align: left;
        padding-right: 0;
        padding-left: 0.4rem;
    }

    .chrono-body {
        grid-column: 2;
        grid-row: 2;
        padding-left: 0.4rem;
    }

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

    .stat {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding-top: 1.2rem;
    }

    .stat:first-child {
        border-top: 0;
    }

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

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

    .pullquote {
        padding: 2.2rem 1.4rem 1.8rem 1.4rem;
    }

    .pullquote::before {
        position: static;
        display: block;
        margin-bottom: 0.2rem;
    }

    .pullquote p {
        font-size: 1.22rem;
    }

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

    .post-nav-item.is-next {
        text-align: left;
    }

    .comment-respond {
        padding: 1.2rem 1.1rem;
    }

    .nothing-found,
    .error-block {
        padding: 1.8rem 1.4rem;
    }

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

    .search-form {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
