/*
Theme Name: dds_mastersway.ru
Theme URI: https://mastersway.ru/
Author: Ева Ларионова
Description: Информационная тема для сайта о монетизации знаний и образовательных продуктах. Лавандовый техно-минимализм с японской асимметрией.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: mstway
Tags: one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments
*/

/* =========================================================
   1. Переменные
   ========================================================= */

:root {
    --bg: #F8F7FC;
    --bg-alt: #EFEDF5;
    --head-bg: #2A223A;
    --foot-bg: #1A1425;
    --panel: #FFFFFF;
    --ink: #2C2433;
    --accent: #7B4B9A;
    --accent-dark: #5A3570;
    --accent-light: #A67DC0;
    --accent-2: #B8A9C9;
    --muted: #8A7A9A;
    --shade: #D3C7E0;

    --font-head: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-body: "IBM Plex Sans", "PT Root UI", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-quote: "PT Serif", Georgia, "Times New Roman", serif;

    --shell: 1180px;
}

/* =========================================================
   2. Скрытие элементов, управляемых из JS (см. правило [hidden])
   ========================================================= */

.cookie-note[hidden] { display: none !important; }
.main-nav[hidden] { display: none !important; }

/* =========================================================
   3. База
   ========================================================= */

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

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

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.72;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        radial-gradient(540px 420px at 0% 10%, rgba(123, 75, 154, 0.07), rgba(123, 75, 154, 0) 70%),
        radial-gradient(600px 480px at 100% 58%, rgba(184, 169, 201, 0.22), rgba(184, 169, 201, 0) 72%);
    background-repeat: no-repeat;
    background-attachment: fixed;
}

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

figure { margin: 1.6rem 0; }

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

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

.site-main {
    display: block;
    padding: 2.4rem 0 3.4rem;
}

.home .site-main {
    position: relative;
    overflow: hidden;
    padding: 0 0 3.4rem;
}

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

/* =========================================================
   4. Типографика
   ========================================================= */

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

h1 {
    font-size: clamp(2rem, 4.6vw, 3.5rem);
    letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); }
h3 { font-size: clamp(1.22rem, 1.9vw, 1.45rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.15em; }

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

/* Заголовок секции: тонкая вертикальная черта слева, чуть выше строки */
.sec-title {
    position: relative;
    padding-left: 1.35rem;
    letter-spacing: 0.06em;
    margin-bottom: 1.6rem;
}

.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: -0.32em;
    width: 2px;
    height: 2.35em;
    background: var(--accent);
}

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

.sec-lead {
    max-width: 62ch;
    color: var(--muted);
    margin-bottom: 2rem;
}

/* Двойная линейка-разделитель */
.rule-double {
    border: 0;
    height: 14px;
    margin: 2.6rem 0;
    border-top: 2px solid var(--accent-2);
    position: relative;
}

.rule-double::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 12px;
    border-top: 1px solid var(--shade);
}

/* =========================================================
   5. Ссылки и кнопки
   ========================================================= */

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

a:hover,
a:focus-visible { color: var(--accent-dark); }

.entry-content a,
.widget-area-text a,
.txt-link {
    color: var(--ink);
    padding-bottom: 2px;
    background-image: repeating-linear-gradient(90deg, currentColor 0 2px, rgba(0, 0, 0, 0) 2px 5px);
    background-position: 0 100%;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    transition: color 0.18s ease, background-image 0.18s ease;
}

.entry-content a:hover,
.widget-area-text a:hover,
.txt-link:hover,
.entry-content a:focus-visible,
.txt-link:focus-visible {
    color: var(--accent);
    background-image: linear-gradient(currentColor, currentColor);
}

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.2;
    padding: 0.85rem 1.6rem;
    border: 0;
    cursor: pointer;
    background: var(--accent);
    color: #FFFFFF;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
    background: var(--accent-dark);
    color: #FFFFFF;
    transform: translateY(2px);
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent-2);
    padding: 0.8rem 1.55rem;
}

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

.btn-light {
    background: #FFFFFF;
    color: var(--head-bg);
}

.btn-light:hover,
.btn-light:focus-visible {
    background: var(--bg-alt);
    color: var(--head-bg);
}

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

.site-top {
    background: var(--head-bg);
    color: #FFFFFF;
    border-bottom: 3px solid var(--accent);
}

.site-top-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem;
    padding: 1.25rem 0;
}

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

.brand-mark,
.brand-logo {
    display: block;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
}

.brand-logo {
    width: auto;
    height: 46px;
    flex: 0 0 auto;
    max-width: 140px;
    object-fit: contain;
}

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

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.35;
    letter-spacing: 0.02em;
    color: #FFFFFF;
}

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

.brand-tagline {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #B8A9C9;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    padding: 0.6rem 0.9rem;
    background: transparent;
    border: 1px solid rgba(184, 169, 201, 0.5);
    color: #FFFFFF;
    font-family: var(--font-head);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.nav-toggle:hover { border-color: var(--accent-2); }

.main-nav { margin-left: auto; }

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

.main-nav li { margin: 0; }

.main-nav a {
    font-family: var(--font-head);
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    color: #EDE9F3;
    padding-bottom: 4px;
    border-bottom: 1px dotted rgba(184, 169, 201, 0.75);
}

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

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

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    justify-content: space-between;
    align-items: start;
    gap: 2.4rem 0;
}

.layout-single { display: block; }

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

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

.sidebar {
    min-width: 0;
    background: var(--panel);
    border-top: 2px solid var(--accent);
    padding: 1.5rem 1.4rem;
    box-shadow: 0 8px 26px rgba(211, 199, 224, 0.55);
    border-radius: 4px;
}

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

.crumbs {
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.crumbs a {
    color: var(--muted);
    border-bottom: 1px dotted var(--accent-2);
    padding-bottom: 1px;
}

.crumbs a:hover {
    color: var(--accent);
    border-bottom: 1px solid var(--accent);
}

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

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

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

.cards-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.7rem;
    margin-bottom: 2.2rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--panel);
    border-top: 2px solid var(--bg-alt);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(211, 199, 224, 0.5);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-top-color 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(211, 199, 224, 0.85);
    border-top-color: var(--accent);
}

.card-thumb {
    display: block;
    position: relative;
    overflow: hidden;
}

.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: filter 0.25s ease;
}

.card:hover .card-thumb img { filter: saturate(0.72) hue-rotate(-12deg) brightness(1.02); }

.card-thumb-empty {
    display: block;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-alt);
    background-image: repeating-linear-gradient(45deg, rgba(184, 169, 201, 0.55) 0 1px, rgba(184, 169, 201, 0) 1px 11px);
}

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

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

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

.card-excerpt {
    color: #4A4055;
    font-size: 0.96rem;
    margin-bottom: 1rem;
}

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

.card-foot { margin-top: auto; }

.entry-meta {
    font-size: 0.82rem;
    color: var(--muted);
    letter-spacing: 0.04em;
    margin-bottom: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.entry-meta-sep {
    width: 12px;
    height: 1px;
    background: var(--accent-2);
    display: inline-block;
}

.entry-meta-cat { color: var(--accent); }

/* Горизонтальная карточка (похожие записи) */
.card-row {
    flex-direction: row;
    align-items: stretch;
}

.card-row .card-thumb-wrap {
    flex: 0 0 190px;
    position: relative;
    overflow: hidden;
    background: var(--bg-alt);
}

.card-row .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.card-row .card-thumb-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-row .card-thumb-wrap .card-thumb-empty {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    aspect-ratio: auto;
}

.card-row .card-body { padding: 1.05rem 1.2rem; }

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2.2rem 0 0.5rem;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    padding: 0.55rem 0.85rem;
    font-family: var(--font-head);
    font-size: 0.92rem;
    color: var(--ink);
    background: var(--panel);
    border: 1px solid var(--accent-2);
    border-radius: 4px;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.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 {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

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

.front-sec { padding: 3.6rem 0; }

.front-sec-alt { background: var(--bg-alt); }

.front-sec-pattern {
    background-color: var(--bg);
    background-image: repeating-linear-gradient(45deg, rgba(184, 169, 201, 0.35) 0 1px, rgba(184, 169, 201, 0) 1px 10px);
}

/* Блок 1 — Hero */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--head-bg);
    color: #FFFFFF;
    padding: 4.2rem 0 4rem;
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 46rem;
}

.hero h1 {
    color: #FFFFFF;
    font-size: clamp(1.75rem, 3.3vw, 2.75rem);
    letter-spacing: 0.005em;
    margin-bottom: 1rem;
}

.hero-sub {
    color: #C9BEDA;
    font-size: 1.05rem;
    max-width: 44rem;
    margin-bottom: 1.9rem;
}

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

.hero-mark {
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 460px;
    height: 460px;
    color: rgba(184, 169, 201, 0.22);
    z-index: 1;
    pointer-events: none;
}

/* Блок 2 — Дорожная карта (шаги по диагонали) */
.steps { display: block; }

.step {
    position: relative;
    overflow: hidden;
    background: var(--bg);
    border-left: 6px solid var(--accent);
    padding: 1.5rem 1.7rem;
    margin-bottom: 1.4rem;
    width: min(100%, 640px);
    border-radius: 0 4px 4px 0;
}

.step:nth-child(2) { margin-left: min(12%, 120px); }
.step:nth-child(3) { margin-left: min(24%, 240px); }

.step-num {
    position: absolute;
    right: 0.8rem;
    top: -0.6rem;
    font-family: var(--font-head);
    font-size: 5.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--shade);
    pointer-events: none;
    z-index: 0;
}

.step h3,
.step p {
    position: relative;
    z-index: 1;
}

.step h3 { margin-bottom: 0.4rem; }
.step p { margin: 0; color: #4A4055; }

/* Блок «последние записи» */
.latest-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

/* Блок 3 — Цитата */
.quote-box {
    display: flex;
    gap: 1.6rem;
    align-items: stretch;
    background: var(--panel);
    border-radius: 4px;
    padding: 2.2rem 2.2rem;
    box-shadow: 0 10px 30px rgba(211, 199, 224, 0.55);
}

.quote-bar {
    flex: 0 0 8px;
    background: linear-gradient(180deg, var(--accent) 0%, rgba(123, 75, 154, 0) 100%);
    border-radius: 4px;
}

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

.quote-body blockquote {
    margin: 0 0 1rem;
    font-family: var(--font-quote);
    font-style: italic;
    font-size: clamp(1.2rem, 2.2vw, 1.72rem);
    line-height: 1.45;
    color: var(--ink);
}

.quote-author {
    font-family: var(--font-head);
    font-size: 0.88rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0;
}

/* Блок 4 — Карта тем */
.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 1.3rem;
}

.tile {
    position: relative;
    display: block;
    min-width: 0;
    padding: 1.5rem 1.5rem 1.6rem;
    background: var(--panel);
    border: 1px solid var(--accent-2);
    border-radius: 4px;
    color: var(--ink);
    transition: color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
    background-image: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.tile::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(184, 169, 201, 0.6);
    border-radius: 2px;
    transition: border-color 0.22s ease;
    pointer-events: none;
    z-index: 1;
}

.tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--panel);
    border-radius: 4px;
    transition: opacity 0.22s ease;
    z-index: 0;
    pointer-events: none;
}

.tile:hover::after,
.tile:focus-visible::after { opacity: 0; }

.tile:hover,
.tile:focus-visible {
    color: #FFFFFF;
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(211, 199, 224, 0.9);
}

.tile:hover::before,
.tile:focus-visible::before { border-color: rgba(255, 255, 255, 0.55); }

.tile:nth-child(2n) { background-image: linear-gradient(135deg, #5A3570 0%, #8E63AE 100%); }
.tile:nth-child(3n) { background-image: linear-gradient(135deg, #7B4B9A 0%, #B8A9C9 100%); }

.tile-icon,
.tile-name,
.tile-note {
    position: relative;
    z-index: 2;
}

.tile-icon {
    width: 32px;
    height: 32px;
    display: block;
    color: var(--accent);
    margin-bottom: 0.9rem;
    transition: color 0.22s ease;
}

.tile:hover .tile-icon,
.tile:focus-visible .tile-icon { color: #FFFFFF; }

.tile-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.03em;
    margin-bottom: 0.35rem;
}

.tile-note {
    display: block;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--muted);
    transition: color 0.22s ease;
}

.tile:hover .tile-note,
.tile:focus-visible .tile-note { color: rgba(255, 255, 255, 0.85); }

/* Декоративная «сетка знаний» */
.knowledge-mesh {
    position: absolute;
    right: -70px;
    bottom: -60px;
    width: 420px;
    height: 420px;
    color: var(--bg-alt);
    z-index: 0;
    pointer-events: none;
}

.front-sec > .shell-narrow { position: relative; z-index: 1; }

/* =========================================================
   12. Контент записи и страницы
   ========================================================= */

.entry-head { margin-bottom: 1.5rem; }

.entry-title { margin-bottom: 0.7rem; }

.entry-cover {
    margin: 0 0 1.8rem;
    border-radius: 4px;
    overflow: hidden;
    border-top: 2px solid var(--accent);
}

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

.entry-content { font-size: 1.03rem; }

.entry-content h2,
.entry-content h3 { margin-top: 1.9rem; }

.entry-content ul { list-style: none; padding-left: 0; }

.entry-content ul li {
    position: relative;
    padding-left: 2rem;
}

.entry-content ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background-color: var(--accent-2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3l2.1 2.2 4.7-4.8' fill='none' stroke='%23ffffff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
}

.entry-content ol { padding-left: 1.3rem; }

.entry-content blockquote {
    margin: 1.8rem 0;
    padding: 1.4rem 1.6rem;
    background-color: var(--bg-alt);
    background-image: repeating-linear-gradient(45deg, rgba(184, 169, 201, 0.35) 0 1px, rgba(184, 169, 201, 0) 1px 10px);
    border-left: 4px solid var(--accent);
    border-radius: 0 4px 4px 0;
    font-family: var(--font-quote);
    font-style: italic;
}

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

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

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

.entry-content th,
.entry-content td {
    border: 1px solid var(--accent-2);
    padding: 0.7rem 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.1em 0.35em;
    border-radius: 3px;
    font-size: 0.92em;
}

.entry-content pre {
    background: var(--head-bg);
    color: #EDE9F3;
    padding: 1rem 1.1rem;
    border-radius: 4px;
    overflow-x: auto;
}

.page-links { margin: 1.4rem 0; font-family: var(--font-head); }

/* Похожие записи */
.related { margin-top: 3rem; }

/* =========================================================
   13. Комментарии
   ========================================================= */

.comments-area {
    margin-top: 3rem;
    background: var(--panel);
    border-top: 2px solid var(--accent);
    border-radius: 4px;
    padding: 1.7rem 1.7rem 1.9rem;
    box-shadow: 0 8px 24px rgba(211, 199, 224, 0.5);
}

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

.comment-list ol.children {
    list-style: none;
    padding-left: 1.4rem;
}

.comment-list li { margin-bottom: 1.2rem; }

.comment-body {
    border-bottom: 1px dotted var(--accent-2);
    padding-bottom: 1rem;
}

.comment-author img {
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.comment-metadata,
.comment-metadata a { font-size: 0.82rem; color: var(--muted); }

.comment-reply-link {
    font-family: var(--font-head);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--accent-2);
    border-radius: 4px;
    background: var(--bg);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
}

.comment-respond textarea { min-height: 150px; }

.comment-respond label {
    display: block;
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

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

.comment-respond .submit {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.85rem 1.6rem;
    border: 0;
    cursor: pointer;
    background: var(--accent);
    color: #FFFFFF;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
}

.comment-respond .submit:hover { background: var(--accent-dark); }

/* =========================================================
   14. Форма поиска
   ========================================================= */

.search-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-form .search-field {
    flex: 1 1 180px;
    min-width: 0;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--accent-2);
    border-radius: 4px;
    background: var(--panel);
    font-family: var(--font-body);
    font-size: 0.98rem;
    color: var(--ink);
}

.search-form .search-submit {
    font-family: var(--font-head);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.75rem 1.3rem;
    border: 0;
    cursor: pointer;
    background: var(--accent);
    color: #FFFFFF;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
}

.search-form .search-submit:hover { background: var(--accent-dark); }

/* =========================================================
   15. Виджеты
   ========================================================= */

.widget { margin-bottom: 1.8rem; }
.widget:last-child { margin-bottom: 0; }

.widget-title {
    position: relative;
    font-size: 1.08rem;
    letter-spacing: 0.05em;
    padding-left: 0.9rem;
    margin-bottom: 1rem;
}

.widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.1em;
    width: 2px;
    height: 1.3em;
    background: var(--accent);
}

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

.widget li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dotted var(--accent-2);
    line-height: 1.45;
}

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

/* Сайдбар — светлый фон, тёмный текст */
.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: var(--ink); }

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

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

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

.sidebar .widget .post-date {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.2rem;
}

/* Подвал — тёмный фон, светлый текст */
.site-bottom .widget,
.site-bottom .widget p,
.site-bottom .widget li { color: #D6CFE2; }

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

.site-bottom .widget-title::before { background: var(--accent-2); }

.site-bottom .widget a { color: #D6CFE2; }

.site-bottom .widget a:hover { color: #FFFFFF; }

.site-bottom .widget li { border-bottom-color: rgba(184, 169, 201, 0.28); }

.site-bottom .widget .post-date {
    display: block;
    font-size: 0.8rem;
    color: #A99BBD;
    margin-top: 0.2rem;
}

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

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

.foot-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 2rem;
    margin-bottom: 2.2rem;
}

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

.foot-bottom {
    border-top: 1px solid rgba(184, 169, 201, 0.25);
    padding-top: 1.3rem;
    font-size: 0.86rem;
    color: #A99BBD;
    letter-spacing: 0.02em;
}

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

.cookie-note {
    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: 1.1rem 1.4rem;
    background: var(--head-bg);
    color: #E4DEEC;
    border-top: 2px solid var(--accent);
    box-shadow: 0 -8px 26px rgba(26, 20, 37, 0.28);
}

.cookie-note p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 74ch;
    min-width: 0;
}

.cookie-note a { color: var(--accent-2); }
.cookie-note a:hover { color: #FFFFFF; }

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

.plain-block {
    background: var(--panel);
    border-top: 2px solid var(--accent);
    border-radius: 4px;
    padding: 2rem 2rem 2.2rem;
    box-shadow: 0 8px 24px rgba(211, 199, 224, 0.5);
}

.plain-block .search-form { margin: 1.4rem 0; }

.nothing-found {
    background: var(--panel);
    border-left: 4px solid var(--accent-2);
    padding: 1.4rem 1.6rem;
    border-radius: 0 4px 4px 0;
}

.arch-head { margin-bottom: 1.8rem; }

.arch-desc { color: var(--muted); }

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

@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }

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

    .hero-mark {
        width: 340px;
        height: 340px;
        right: -110px;
        opacity: 0.7;
    }

    .step:nth-child(2) { margin-left: 6%; }
    .step:nth-child(3) { margin-left: 12%; }

    .shell-narrow { width: 92%; }
}

@media (max-width: 760px) {
    .nav-toggle { display: inline-block; }

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

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

    .main-nav ul {
        flex-direction: column;
        gap: 0.9rem;
        padding-top: 0.6rem;
    }

    .hero-mark { display: none; }

    .knowledge-mesh {
        width: 260px;
        height: 260px;
        right: -60px;
        bottom: -50px;
    }
}

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

    .front-sec { padding: 2.6rem 0; }

    .hero { padding: 3rem 0 2.8rem; }

    .quote-box { padding: 1.7rem 1.4rem; gap: 1.1rem; }

    .step {
        padding: 1.3rem 1.2rem;
        width: 100%;
    }

    .step:nth-child(2),
    .step:nth-child(3) { margin-left: 0; }

    .step-num { font-size: 4rem; }

    .tile { padding: 1.3rem 1.3rem 1.4rem; }

    .sidebar { padding: 1.3rem 1.2rem; }

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

    .plain-block { padding: 1.5rem 1.3rem 1.7rem; }

    .cookie-note { padding: 1rem 1.1rem; }

    .card-row { flex-direction: column; }

    .card-row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }

    .card-row .card-thumb-wrap a { position: static; }

    .card-row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .card-row .card-thumb-wrap .card-thumb-empty {
        position: static;
        aspect-ratio: 16 / 9;
    }
}
