/*
Theme Name: dds_chuyendongbongda.com
Theme URI: https://chuyendongbongda.com/
Author: Алексей Туров
Description: Тема для информационного портала об удалённой аренде квартир: инструкции, проверка объявлений, документы, командировки и переезд.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: ddsrent
*/

:root {
    --bg: #F4F1FA;
    --bg-alt: #E8E1F0;
    --dark: #1F1A2E;
    --dark-2: #2A2342;
    --text: #2A2342;
    --accent: #2BB0A0;
    --accent-2: #C65BCF;
    --muted: #9A8AB2;
    --line: #D6CDE4;
    --rail: #8B7AA6;
    --card-shadow: 0 6px 20px rgba(47, 35, 75, 0.08);
    --card-shadow-hover: 0 10px 30px rgba(47, 35, 75, 0.14);
    --font-head: "Montserrat", "Futura", "Trebuchet MS", "Segoe UI", sans-serif;
    --font-body: "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
}

/* --- служебные правила видимости (до основных стилей) --- */
.cookie-bar[hidden] { display: none !important; }
.site-nav[hidden] { display: none !important; }

*, *::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.75;
    letter-spacing: 0.01em;
    color: var(--text);
    background-color: var(--bg);
    background-image: radial-gradient(var(--line) 2px, transparent 2px);
    background-size: 40px 40px;
    background-attachment: fixed;
}

body::after {
    content: "";
    position: fixed;
    right: -140px;
    bottom: -180px;
    width: 620px;
    height: 480px;
    pointer-events: none;
    z-index: -1;
    opacity: 0.05;
    filter: blur(80px);
    background:
        radial-gradient(circle at 30% 40%, var(--accent) 0 42%, transparent 43%),
        radial-gradient(circle at 70% 62%, var(--accent-2) 0 42%, transparent 43%);
}

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

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

h1 { font-size: 2.4rem; margin-bottom: 0.9em; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

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

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

.entry-content a,
.crumbs a,
.widget a,
.site-nav a {
    display: inline;
}

.entry-content a::after,
.widget a::after,
.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom center;
    transition: transform 0.22s ease;
}

.entry-content a:hover::after,
.widget a:hover::after,
.site-nav a:hover::after { transform: scaleY(1); }

blockquote {
    margin: 1.8em 0;
    padding: 1.4rem 1.6rem;
    border-left: 4px solid var(--accent);
    background: #FFFFFF;
    color: var(--dark-2);
}

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

code, pre {
    font-family: "SFMono-Regular", Consolas, monospace;
    background: var(--bg-alt);
    font-size: 0.92em;
}

pre { padding: 1rem 1.2rem; overflow-x: auto; }

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

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

th { background: var(--bg-alt); font-family: var(--font-head); }

/* --- контейнер --- */

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

/* --- кнопки --- */

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.75rem 1.7rem;
    border-radius: 4px;
    border: 2px solid var(--accent);
    color: var(--text);
    background: transparent;
    cursor: pointer;
    transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

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

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

.btn-fill:hover {
    background: #23968a;
    border-color: #23968a;
    color: #FFFFFF;
    box-shadow: 0 6px 0 -2px rgba(47, 35, 75, 0.18);
    transform: translateY(2px);
}

.btn-light {
    border-color: var(--accent);
    color: #FFFFFF;
}

/* --- шапка --- */

.site-head {
    background: rgba(244, 241, 250, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

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

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

.brand-logo { width: 56px; height: 56px; flex: 0 0 auto; }

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

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    max-width: 46ch;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.brand-desc {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--muted);
    max-width: 60ch;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-toggle {
    display: none;
    font-family: var(--font-head);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.6rem 1.1rem;
    border: 2px solid var(--accent);
    border-radius: 4px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

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

.site-nav li { margin: 0; }

.site-nav a {
    font-family: var(--font-head);
    font-size: 0.93rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text);
}

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

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

/* --- хлебные крошки --- */

.crumbs {
    font-size: 0.86rem;
    color: var(--muted);
    padding: 1.4rem 0 0;
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs-sep { color: var(--line); margin: 0 0.25rem; }

/* --- раскладки --- */

.site-main { padding: 1.4rem 0 4.5rem; }

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

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

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

/* --- заголовки секций и контента --- */

.section-head { margin-bottom: 2.4rem; }

.section-head h2,
.page-title {
    position: relative;
    margin: 0 0 0.4rem;
    padding-left: 1.1rem;
    margin-left: -1.1rem;
    font-size: 2rem;
}

.section-head h2::before,
.page-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 3px;
    height: 1.5em;
    background: var(--accent);
}

.section-sub {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    max-width: 62ch;
}

.entry-content h2 {
    position: relative;
    margin-top: 2em;
}

.entry-content h2::before {
    content: "";
    position: absolute;
    left: -28px;
    top: 0.45em;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-2);
}

.entry-content h3 { margin-top: 1.6em; }

.entry-content img { margin: 1.4em 0; border-radius: 8px; }

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
}

/* --- карточки записей --- */

.card-list {
    display: grid;
    gap: 1.6rem;
    margin-bottom: 2.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-radius: 8px;
    border-top: 2px solid var(--accent-2);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
}

.card-inner {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1;
    min-width: 0;
}

.card-thumb-wrap {
    flex: 0 0 40%;
    position: relative;
    overflow: hidden;
    background: var(--bg-alt);
    min-height: 200px;
}

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

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

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

.card-title {
    font-size: 1.2rem;
    margin: 0 0 0.55rem;
}

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

.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
    letter-spacing: 0.03em;
}

.card-excerpt {
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
}

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

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

.card-more .btn { padding: 0.55rem 1.25rem; font-size: 0.82rem; }

.card--no-thumb .card-body { padding: 1.7rem 1.8rem; }

/* --- пагинация --- */

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

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.85rem;
    border: 2px solid var(--line);
    border-radius: 4px;
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    background: #FFFFFF;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

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

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

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

/* --- сайдбар --- */

.sidebar {
    min-width: 0;
    background: #FFFFFF;
    border-left: 2px solid var(--rail);
    padding: 1.6rem 1.5rem;
}

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

.sidebar .widget-title {
    font-size: 1.05rem;
    color: var(--dark-2);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--line);
}

.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: var(--text); }

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

.sidebar .widget li {
    padding: 0.5rem 0 0.5rem 1rem;
    position: relative;
    border-bottom: 1px solid var(--bg-alt);
    font-size: 0.93rem;
}

.sidebar .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-2);
}

.sidebar .widget a { color: var(--dark-2); }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .widget .post-date { display: block; color: var(--muted); font-size: 0.78rem; }

/* --- форма поиска --- */

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

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

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

/* --- главная: общие секции --- */

.front-section {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
}

.front-section + .front-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: var(--line);
}

.front-section .shell-narrow {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

.front-deco {
    position: absolute;
    top: 46px;
    left: -6%;
    width: 112%;
    height: 3px;
    transform: rotate(-5deg);
    pointer-events: none;
    opacity: 0.65;
    background-image: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 12px, transparent 12px 20px);
    mask-image: repeating-linear-gradient(90deg, #000 0 12px, transparent 12px 20px);
}

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

.hero {
    position: relative;
    padding: 0;
    background: var(--dark);
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(31, 26, 46, 0.92) 0%, rgba(31, 26, 46, 0.62) 48%, rgba(42, 35, 66, 0.35) 100%);
}

.hero-house {
    position: absolute;
    top: 42px;
    right: 5%;
    width: 220px;
    opacity: 0.18;
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    min-height: 520px;
    padding: 7rem 0 4rem;
}

.hero-box { max-width: 44rem; min-width: 0; }

.hero h1 {
    position: relative;
    color: #FFFFFF;
    font-size: 3.5rem;
    line-height: 1.06;
    margin-bottom: 0.5em;
}

.hero h1::before {
    content: "";
    position: absolute;
    left: -30px;
    top: 0.42em;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-2);
}

.hero-sub {
    color: #C9BEDD;
    font-size: 1.08rem;
    max-width: 46rem;
    margin-bottom: 2rem;
}

/* --- блок 2: статистика --- */

.facts-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fact {
    min-width: 0;
    padding: 0 1.4rem;
    border-left: 1px solid var(--line);
}

.fact:first-child { border-left: 0; padding-left: 0; }

.fact-num {
    display: block;
    font-family: var(--font-head);
    font-size: 3.1rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent-2);
    letter-spacing: -0.02em;
}

.fact-label {
    display: block;
    margin-top: 0.9rem;
    color: var(--text);
    font-size: 0.93rem;
    line-height: 1.5;
}

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

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

.front-posts-more { margin-top: 2rem; }

/* --- блок 3: таймлайн --- */

.timeline {
    position: relative;
    padding-left: 2.6rem;
    margin-top: 0.6rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6rem;
    bottom: 1.5rem;
    width: 2px;
    background: var(--accent);
}

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

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

.tl-num {
    position: absolute;
    left: -2.6rem;
    top: 0;
    width: 46px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #FFFFFF;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
    transform: translateX(-24px);
}

.tl-body { padding-left: 1.4rem; min-width: 0; }

.tl-body h3 { margin: 0 0 0.4rem; }

.tl-body p { margin: 0; color: var(--dark-2); font-size: 0.97rem; }

.tl-note {
    display: inline-block;
    margin-top: 0.9rem;
    padding: 0.45rem 1.1rem 0.45rem 0.9rem;
    background: var(--accent);
    color: #FFFFFF;
    font-size: 0.85rem;
    clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%);
}

/* --- блок 4: рубрикатор --- */

.topics-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.4rem;
}

.topic-tile {
    grid-column: span 3;
    min-width: 0;
    display: block;
    padding: 2rem 1.6rem;
    border: 2px solid var(--accent);
    border-radius: 4px;
    background: transparent;
    color: var(--text);
    transition: background-color 0.24s ease, color 0.24s ease, transform 0.24s ease;
}

.topic-tile:nth-child(n+3):nth-child(-n+5) { grid-column: span 2; }
.topic-tile:nth-child(6) { grid-column: 4 / span 3; }

.topic-tile:hover {
    background: var(--accent);
    color: #FFFFFF;
    transform: translateY(-4px);
}

.topic-tile svg { display: block; margin-bottom: 1rem; }
.topic-tile svg * { stroke: currentColor; }

.topic-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
}

.topic-desc {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.87rem;
    color: inherit;
    opacity: 0.78;
}

/* --- подвал --- */

.site-foot {
    background: var(--dark);
    color: #D8D0E6;
    padding: 3.6rem 0 1.8rem;
    background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 30px);
}

.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
    padding-bottom: 2.4rem;
    border-bottom: 1px solid rgba(214, 205, 228, 0.18);
}

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

.site-foot .widget-title {
    font-size: 1.02rem;
    color: #FFFFFF;
    margin-bottom: 1rem;
    padding-left: 0.85rem;
    position: relative;
}

.site-foot .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 3px;
    height: 1.2em;
    background: var(--accent);
}

.site-foot .widget,
.site-foot .widget p,
.site-foot .widget li,
.site-foot .widget span { color: #D8D0E6; font-size: 0.93rem; }

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

.site-foot .widget li {
    padding: 0.35rem 0 0.35rem 0.95rem;
    position: relative;
}

.site-foot .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.95rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-2);
}

.site-foot .widget a { color: #E7E0F2; }
.site-foot .widget a:hover { color: var(--accent); }
.site-foot .widget .post-date { color: #A99CC0; font-size: 0.8rem; }

.foot-bottom {
    padding-top: 1.6rem;
    font-size: 0.85rem;
    color: #A99CC0;
}

/* --- комментарии --- */

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

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

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

.comment-inner {
    background: #FFFFFF;
    border-radius: 8px;
    border-top: 2px solid var(--accent-2);
    box-shadow: var(--card-shadow);
    padding: 1.3rem 1.5rem;
    margin-bottom: 1.2rem;
}

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

.comment-author { font-family: var(--font-head); font-weight: 700; }
.comment-date { color: var(--muted); font-size: 0.82rem; }
.comment-actions { font-size: 0.85rem; }
.comment-hold { color: var(--muted); font-size: 0.88rem; }

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

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

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

.comment-form .submit {
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.75rem 1.7rem;
    border-radius: 4px;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: #FFFFFF;
    cursor: pointer;
}

.comment-form .submit:hover { background: #23968a; border-color: #23968a; }

/* --- 404 и поиск --- */

.page-lead { color: var(--muted); max-width: 60ch; }

.notfound-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-top: 1.6rem;
}

.notfound-search { max-width: 420px; margin-top: 1.8rem; }

/* --- cookie-баннер --- */

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

.cookie-bar p { margin: 0; min-width: 0; }
.cookie-bar a { color: var(--accent); }
.cookie-bar .btn { color: #FFFFFF; }

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

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

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

    .layout-single { width: 100%; }

    .front-section .shell-narrow { width: 100%; }

    .hero h1 { font-size: 2.6rem; }
    .hero-inner { min-height: 420px; padding: 5rem 0 3rem; }
    .hero-house { width: 150px; top: 24px; }

    .facts-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 0; }
    .fact:nth-child(3) { border-left: 0; padding-left: 0; }

    .topics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topic-tile,
    .topic-tile:nth-child(n+3):nth-child(-n+5),
    .topic-tile:nth-child(6) { grid-column: span 1; }

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

@media (max-width: 600px) {
    h1 { font-size: 1.9rem; }
    .section-head h2, .page-title { font-size: 1.55rem; }

    .front-section { padding: 52px 0; }

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

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

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

    .site-nav ul {
        flex-direction: column;
        gap: 0.9rem;
        padding: 1rem 0 0.4rem;
        border-top: 1px solid var(--line);
        margin-top: 0.6rem;
    }

    .brand-logo { width: 46px; height: 46px; }
    .brand-name { font-size: 1rem; }
    .brand-desc { -webkit-line-clamp: 3; }

    .hero h1 { font-size: 2.05rem; }
    .hero h1::before { left: -20px; width: 10px; height: 10px; }
    .hero-inner { min-height: 340px; padding: 3.6rem 0 2.4rem; }
    .hero-house { display: none; }

    .facts-row { grid-template-columns: minmax(0, 1fr); }
    .fact { border-left: 0; padding-left: 0; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
    .fact:last-child { border-bottom: 0; padding-bottom: 0; }
    .fact-num { font-size: 2.5rem; }

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

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

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

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

    .card-body { padding: 1.3rem 1.2rem; }

    .entry-content h2::before { left: -13px; width: 8px; height: 8px; }

    .timeline { padding-left: 1.9rem; }
    .tl-num { width: 38px; height: 34px; font-size: 0.95rem; transform: translateX(-19px); }
    .tl-body { padding-left: 1rem; }

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

    .sidebar { padding: 1.3rem 1.1rem; }

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

    .cookie-bar { padding: 1rem 1.1rem; font-size: 0.85rem; }

    .comment-list .children { padding-left: 0.8rem; }
}
