/*
Theme Name: dds_topmaster.su
Theme URI: https://topmaster.su/
Author: Алексей Боровиков
Description: Тема информационно-аналитического портала об умном доме. Дизайн-концепция «Лабораторный минимализм»: асимметричные сетки, точечная инженерная подложка, фиолетово-бирюзовая техно-палитра.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: domlab
*/

:root {
    --page: #F4F7FC;
    --page-alt: #EBF0FA;
    --panel: #FFFFFF;
    --deep: #191B2A;
    --ink: #1E1F2E;
    --accent: #6C4DFF;
    --accent-2: #00C9B2;
    --muted: #8E98B0;
    --grid: #C8D4E6;
    --radius-card: 12px;
    --radius-btn: 8px;
    --shell: min(92%, 1180px);
    --font-head: "Inter", "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-body: "IBM Plex Sans", "Roboto", "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--page);
    background-image:
        radial-gradient(circle, var(--grid) 1px, transparent 1px),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520' viewBox='0 0 520 520'%3E%3Cpath d='M120 400c-70-30-100-120-50-190S220 110 300 130s150 60 160 140-60 160-150 170-120-10-190-40z' fill='%236C4DFF' fill-opacity='0.03'/%3E%3C/svg%3E");
    background-position: 0 0, left -120px bottom -120px;
    background-size: 40px 40px, 520px 520px;
    background-repeat: repeat, no-repeat;
    background-attachment: scroll, fixed;
}

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

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

.entry-content a,
.widget a,
.crumbs a,
.site-nav a {
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0 1px;
    transition: background-size .25s ease;
}

.entry-content a:hover,
.widget a:hover,
.crumbs a:hover,
.site-nav a:hover { background-size: 100% 1px; }

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

h1 { font-size: 2.1rem; letter-spacing: .02em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

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

/* Заголовки секций: вертикальная фиолетовая полоса слева */
.sec-title {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: .4em;
    text-transform: none;
}

.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .18em;
    bottom: .18em;
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.sec-sub {
    margin: 0 0 2rem 2.6rem;
    color: var(--muted);
    max-width: 62ch;
}

/* Кнопки */
.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .03em;
    padding: .72em 1.5em;
    border-radius: var(--radius-btn);
    border: 1px solid transparent;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 0 14px rgba(255, 255, 255, .35), 0 8px 18px rgba(108, 77, 255, .25);
}

.btn-ghost {
    background: transparent;
    border-color: var(--accent-2);
    color: #05867a;
}

.btn-ghost:hover {
    background: rgba(0, 201, 178, .1);
    box-shadow: inset 0 0 14px rgba(0, 201, 178, .18), 0 8px 18px rgba(0, 201, 178, .18);
}

/* Шапка */
.site-header {
    background: var(--panel);
    border-bottom: 1px solid #E1E8F4;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.4rem 0;
    flex-wrap: wrap;
}

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

.brand-logo { display: block; width: 54px; height: 54px; flex: 0 0 auto; }

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

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: .04em;
    color: var(--ink);
    line-height: 1.35;
}

.brand-tagline {
    display: block;
    margin-top: .35rem;
    font-size: .82rem;
    line-height: 1.5;
    color: var(--muted);
}

.nav-toggle {
    display: none;
    font-family: var(--font-head);
    font-size: .9rem;
    letter-spacing: .05em;
    padding: .6em 1.1em;
    border: 1px solid var(--accent);
    border-radius: var(--radius-btn);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
}

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

.site-nav a {
    font-family: var(--font-head);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--ink);
}

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

/* Хлебные крошки */
.crumbs {
    font-size: .85rem;
    color: var(--muted);
    padding: 1.4rem 0 0;
}

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

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

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

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

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

/* Карточки записей */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border-radius: var(--radius-card);
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 20px rgba(25, 27, 42, .08);
    transition: box-shadow .25s ease;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity .25s ease;
    z-index: 2;
}

.card:hover { box-shadow: 0 14px 30px rgba(25, 27, 42, .12); }
.card:hover::before { opacity: 1; }

.card-thumb-wrap {
    flex: none;
    width: 100%;
    position: static;
    overflow: hidden;
    background: var(--page-alt);
}

.card-thumb-wrap a { display: block; }

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

.card-body {
    flex: 1;
    min-width: 0;
    padding: 1.6rem 1.7rem;
}

.card-title {
    font-size: 1.25rem;
    margin: 0 0 .5rem;
}

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

.post-meta {
    font-family: var(--font-head);
    font-size: .8rem;
    letter-spacing: .05em;
    color: var(--muted);
    margin-bottom: .8rem;
}

.post-meta .meta-cat {
    color: #04998a;
    margin-left: .8rem;
}

.post-meta .meta-cat::before {
    content: "> ";
    color: var(--accent-2);
}

.card-excerpt { color: #3b4055; font-size: .97rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }

.card-more {
    display: inline-block;
    margin-top: .6rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .88rem;
    letter-spacing: .04em;
    color: var(--accent);
}

.card-more::after { content: " ›"; color: var(--accent-2); }

/* Сайдбар и виджеты */
.sidebar { min-width: 0; }

.widget {
    background: var(--panel);
    border-radius: var(--radius-card);
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.8rem;
    box-shadow: 0 10px 20px rgba(25, 27, 42, .07);
    color: var(--ink);
    font-size: .95rem;
}

.widget-title {
    font-size: 1.02rem;
    letter-spacing: .05em;
    margin: 0 0 1rem;
    padding-left: .8rem;
    position: relative;
    color: var(--ink);
}

.widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .15em;
    bottom: .15em;
    width: 3px;
    background: var(--accent);
}

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

.widget li {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: .7rem;
    line-height: 1.5;
}

.widget li::before {
    content: ">";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-2);
    font-family: var(--font-head);
    font-weight: 700;
}

.widget a { color: var(--ink); }
.widget a:hover { color: var(--accent); }
.widget .post-date { display: block; color: var(--muted); font-size: .8rem; }

/* Подвал */
.site-footer {
    background: var(--deep);
    color: #C9CEE0;
    padding: 3.4rem 0 1.8rem;
}

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

.site-footer .footer-widget {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
    color: #C9CEE0;
}

.site-footer .footer-widget .widget-title { color: #FFFFFF; }
.site-footer .footer-widget .widget-title::before { background: var(--accent-2); }
.site-footer .footer-widget a { color: #C9CEE0; }
.site-footer .footer-widget a:hover { color: var(--accent-2); }
.site-footer .footer-widget li::before { color: var(--accent-2); }
.site-footer .footer-widget .post-date { color: #7C86A0; }

.footer-bottom {
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, .09);
    font-size: .85rem;
    color: #8A93AC;
}

/* Пагинация */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2.6rem;
}

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .8rem;
    border: 1px solid #DCE4F1;
    border-radius: var(--radius-btn);
    background: var(--panel);
    font-family: var(--font-head);
    font-size: .9rem;
    color: var(--ink);
    transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.pager .page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

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

.pager .page-numbers.dots {
    border: none;
    background: transparent;
    min-width: auto;
}

/* Контент записи */
.entry-header { margin-bottom: 1.6rem; }
.entry-title { font-size: 2rem; margin-bottom: .5rem; }

.entry-thumb {
    display: block;
    width: 100%;
    border-radius: var(--radius-card);
    margin-bottom: 1.8rem;
    aspect-ratio: 16 / 8;
    object-fit: cover;
}

.entry-content { font-size: 1.02rem; }
.entry-content h2 { margin-top: 2rem; }
.entry-content h3 { margin-top: 1.6rem; }

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

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

.entry-content ul li {
    position: relative;
    padding-left: 1.3rem;
    margin-bottom: .5rem;
}

.entry-content ul li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--accent-2);
    font-family: var(--font-head);
    font-weight: 700;
}

.entry-content blockquote {
    margin: 1.8rem 0;
    padding: 1.4rem 1.6rem;
    background: var(--page-alt);
    border-left: 3px dotted var(--accent);
    border-radius: 0 var(--radius-card) var(--radius-card) 0;
    color: #33384c;
}

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

.entry-content img { border-radius: var(--radius-card); display: block; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    background: var(--panel);
    font-size: .95rem;
}

.entry-content table,
.entry-content th,
.entry-content td { border: 1px solid #D3DCEB; }

.entry-content th,
.entry-content td { padding: .7rem .9rem; text-align: left; }

.entry-content th { background: var(--page-alt); font-family: var(--font-head); }

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

.entry-tags a { color: #04998a; margin-right: .7rem; }
.entry-tags a::before { content: "> "; color: var(--accent-2); }

/* Форма поиска */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

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

.search-form input[type="search"] {
    flex: 1 1 180px;
    min-width: 0;
    padding: .7em .9em;
    border: 1px solid #DCE4F1;
    border-radius: var(--radius-btn);
    background: var(--panel);
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--ink);
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
}

/* Комментарии */
.comments-area {
    margin-top: 3rem;
    background: var(--panel);
    border-radius: var(--radius-card);
    padding: 1.8rem;
    box-shadow: 0 10px 20px rgba(25, 27, 42, .07);
}

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

.comment-inner {
    border-left: 3px dotted var(--accent);
    padding: .2rem 0 .2rem 1.1rem;
    margin-bottom: 1.4rem;
}

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

.comment-author { font-family: var(--font-head); font-weight: 700; }
.comment-date { font-size: .8rem; color: var(--muted); }
.comment-hold { font-size: .85rem; color: var(--accent); }
.comment-actions { font-size: .85rem; }

.comment-form label {
    display: block;
    font-size: .85rem;
    font-family: var(--font-head);
    margin-bottom: .3rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .7em .9em;
    border: 1px solid #DCE4F1;
    border-radius: var(--radius-btn);
    background: var(--page);
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--ink);
    margin-bottom: 1rem;
}

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

.comment-form .submit {
    font-family: var(--font-head);
    font-weight: 600;
    padding: .72em 1.5em;
    border: none;
    border-radius: var(--radius-btn);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

/* ---------------- Главная ---------------- */

.front-section {
    padding: 3.4rem 1.8rem;
    border-radius: var(--radius-card);
    margin-bottom: 2.6rem;
}

.front-section.alt {
    background: var(--page-alt);
}

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

/* Блок 1 — hero */
.fs-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(115deg, rgba(108, 77, 255, .10), rgba(0, 201, 178, .06)),
        var(--panel);
    padding: 4.2rem 2.2rem;
}

.fs-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 460px;
    height: 460px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='460' height='460' viewBox='0 0 460 460'%3E%3Cg fill='none' stroke='%236C4DFF' stroke-width='3' stroke-opacity='0.28'%3E%3Ccircle cx='300' cy='230' r='58'/%3E%3Ccircle cx='300' cy='230' r='24'/%3E%3Cpath d='M300 150v-26M300 336v-26M380 230h26M194 230h26M357 173l18-18M225 305l18-18M357 287l18 18M225 155l18 18'/%3E%3C/g%3E%3Cg fill='none' stroke='%2300C9B2' stroke-width='3' stroke-opacity='0.35'%3E%3Cpath d='M92 268a52 52 0 0 1 74 0'/%3E%3Cpath d='M68 244a86 86 0 0 1 122 0'/%3E%3Cpath d='M44 220a120 120 0 0 1 170 0'/%3E%3Ccircle cx='129' cy='294' r='7' fill='%2300C9B2' fill-opacity='0.5' stroke='none'/%3E%3C/g%3E%3Cg fill='none' stroke='%236C4DFF' stroke-opacity='0.14' stroke-width='2'%3E%3Cpath d='M60 400h340M120 400V300l90-70 90 70v100'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 640px;
}

.hero-kicker {
    font-family: var(--font-head);
    font-size: .82rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #04998a;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.4rem;
    line-height: 1.12;
    margin-bottom: 1rem;
}

.hero-text {
    color: #3b4055;
    margin-bottom: 1.8rem;
    max-width: 54ch;
}

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

/* Блок 2 — таймлайн */
.tl {
    position: relative;
    margin: 0;
    padding: 0 0 0 1.4rem;
    list-style: none;
    border-left: 2px solid rgba(108, 77, 255, .35);
}

.tl li {
    position: relative;
    padding: 0 0 2rem 1.6rem;
}

.tl li::before {
    content: "";
    position: absolute;
    left: -1.4rem;
    top: .55rem;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--accent);
    transform: translateX(-50%);
}

.tl li:last-child { padding-bottom: 0; }

.tl li.now::before {
    background: var(--accent-2);
    box-shadow: 0 0 0 6px rgba(0, 201, 178, .18), 0 0 16px rgba(0, 201, 178, .8);
}

.tl-year {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--accent);
    font-size: .92rem;
    margin-bottom: .2rem;
}

.tl li.now .tl-year { color: #04998a; }

.tl-head {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: .2rem;
}

.tl p { margin: 0; color: #3b4055; font-size: .96rem; }

/* Блок «последние записи» */
.fs-latest { padding-top: 1rem; }

/* Разделитель «печатная плата» */
.circuit-divider {
    display: block;
    width: 100%;
    height: 26px;
    margin: 0 0 2.6rem;
    color: var(--accent);
}

/* Блок 3 — глоссарий */
.gloss { display: grid; gap: 0; }

.gloss-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .3rem;
    padding: 1.3rem 0;
    border-bottom: 1px solid rgba(142, 152, 176, .28);
}

.gloss-row:last-child { border-bottom: none; }

.gloss-term {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--accent);
    letter-spacing: .04em;
    min-width: 0;
}

.gloss-def { color: #3b4055; min-width: 0; font-size: .97rem; }

/* Блок 4 — карта тем */
.topics {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
}

.topic-tile {
    display: block;
    padding: 2.2rem 1.8rem;
    border: 2px solid rgba(108, 77, 255, .35);
    border-radius: var(--radius-card);
    background: var(--panel);
    color: var(--ink);
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
    min-width: 0;
}

.topic-tile:hover {
    border-color: var(--accent-2);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(25, 27, 42, .1);
}

.topic-figure { display: block; width: 62px; height: 62px; margin-bottom: 1.2rem; }

.topic-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: .05em;
    margin-bottom: .5rem;
}

.topic-desc { color: var(--muted); font-size: .93rem; }

/* 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.2rem;
    flex-wrap: wrap;
    padding: 1.1rem 1.6rem;
    background: var(--deep);
    color: #D6DAE8;
    font-size: .88rem;
    box-shadow: 0 -8px 24px rgba(25, 27, 42, .18);
}

.cookie-banner p { margin: 0; min-width: 0; }
.cookie-banner a { color: var(--accent-2); }

.cookie-accept {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .88rem;
    padding: .6em 1.4em;
    border: none;
    border-radius: var(--radius-btn);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cookie-accept:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 0 14px rgba(255, 255, 255, .3);
}

/* 404 */
.page-404 {
    background: var(--panel);
    border-radius: var(--radius-card);
    padding: 3rem 2rem;
    box-shadow: 0 10px 20px rgba(25, 27, 42, .07);
}

.code-404 {
    font-family: var(--font-head);
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: .6rem;
}

.page-404 .search-form { margin: 1.6rem 0; max-width: 420px; }

.no-posts {
    background: var(--panel);
    border-radius: var(--radius-card);
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(25, 27, 42, .07);
}

.archive-header { margin-bottom: 2rem; }

/* ---------------- Адаптив ---------------- */

@media (max-width: 600px) {
    .front-section { padding: 2.2rem 1.3rem; }
    .fs-hero { padding: 2.4rem 1.3rem; }
    .fs-hero::after { opacity: .35; right: -160px; }
    .hero-title { font-size: 1.8rem; }
    .front-wrap { width: 100%; }
    .layout-single .content-area { width: 100%; }
    .card-body { padding: 1.3rem; }
    .cookie-banner { padding: 1rem 1.2rem; }
}

@media (min-width: 601px) {
    .site-main { padding: 2.4rem 0 5rem; }

    .card { flex-direction: row; }

    .card-thumb-wrap {
        flex: 0 0 280px;
        position: relative;
        overflow: hidden;
    }

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

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

    .gloss-row {
        grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
        gap: 2rem;
        align-items: start;
    }

    .gloss-term {
        border-right: 1px solid rgba(142, 152, 176, .35);
        padding-right: 2rem;
    }

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

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

@media (min-width: 961px) {
    h1 { font-size: 3.5rem; letter-spacing: .02em; }
    .entry-title { font-size: 3.5rem; }
    .hero-title { font-size: 3.5rem; }
    h2 { font-size: 2rem; }

    .front-section { padding: 4.6rem 3rem; margin-bottom: 3.2rem; }
    .fs-hero { padding: 5.4rem 3.4rem; }

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

    .header-inner { flex-wrap: nowrap; }
    .brand-logo { width: 62px; height: 62px; }
    .brand-name { font-size: 1.15rem; }
}

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

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

    .site-nav.open { display: block; }

    .site-nav ul {
        flex-direction: column;
        gap: .8rem;
        padding-top: 1rem;
        border-top: 1px solid #E1E8F4;
    }
}
