/*
Theme Name: dds_biyskonline.ru
Theme URI: https://biyskonline.ru/
Author: Алексей Решетников
Description: «Бийск. Свет знаний» — швейцарская модульная тема для городского информационно-образовательного портала: холодная синяя гамма, золотой акцент, сетка-тетрадь.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bsvet
*/

:root {
    --bg: #F4F7FB;
    --bg-alt: #E8EEF6;
    --head: #0F2A4A;
    --foot: #0A1D33;
    --aside: #FFFFFF;
    --text: #1B2A3A;
    --accent: #2563EB;
    --accent-dark: #1D4ED8;
    --gold: #D4A017;
    --muted: #6B7F94;
    --line: #D9E2EC;
    --line-alt: #C5D3E3;
    --shadow: 0 4px 12px rgba(15, 42, 74, 0.08);
    --shadow-up: 0 12px 28px rgba(15, 42, 74, 0.14);
    --f-head: "Manrope", "Inter Tight", "Segoe UI", Arial, sans-serif;
    --f-body: "Inter", "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(217, 226, 236, 0.55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(217, 226, 236, 0.55) 1px, transparent 1px);
    background-size: 24px 24px;
}
body::after {
    content: "";
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 340px;
    height: 240px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.04;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340 240'%3E%3Cg fill='none' stroke='%232563EB' stroke-width='6' stroke-linejoin='round'%3E%3Cpath d='M20 210V40c55-18 105-12 150 20 45-32 95-38 150-20v170c-55-18-105-12-150 20-45-32-95-38-150-20z'/%3E%3Cpath d='M170 60v170'/%3E%3Cpath d='M50 80c35-8 70-4 95 10M50 115c35-8 70-4 95 10M50 150c35-8 70-4 95 10M195 90c25-14 60-18 95-10M195 125c25-14 60-18 95-10M195 160c25-14 60-18 95-10'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}
img { max-width: 100%; height: auto; }
p { margin: 0 0 1.1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    color: var(--text);
    line-height: 1.2;
    margin: 1.6em 0 0.6em;
    font-weight: 700;
    letter-spacing: -0.01em;
}
h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; position: relative; padding-left: 16px; }
h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.52em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
}
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-dark); }
ul, ol { padding-left: 1.4em; margin: 0 0 1.1em; }
li { margin-bottom: 0.35em; }
blockquote { margin: 1.5em 0; padding: 1rem 1.5rem; border-left: 4px solid var(--gold); background: var(--bg-alt); border-radius: 0 4px 4px 0; }
blockquote p:last-child { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; border: 1px solid var(--line-alt); background: #FFFFFF; }
th, td { border: 1px solid var(--line-alt); padding: 0.6em 0.8em; text-align: left; vertical-align: top; }
th { background: var(--bg-alt); font-family: var(--f-head); font-weight: 700; }
pre { overflow-x: auto; background: #0F2A4A; color: #E8EEF6; padding: 1rem 1.2rem; border-radius: 4px; }
code { font-size: 0.92em; }
hr { border: 0; height: 1px; background: var(--line-alt); margin: 2em 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: 0.875rem; color: var(--muted); }

/* Контейнер ширины — единственное место */
.shell { width: min(92%, 1180px); margin-inline: auto; }
.shell.is-front { width: 85%; max-width: none; }

/* Анимированное подчёркивание текстовых ссылок */
.entry-content a, .page-lead a, .breadcrumbs a, .card-title a, .widget a, .remark-text a, .entry-tags a {
    background-image: linear-gradient(var(--gold), var(--gold));
    background-size: 0 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size .25s ease, color .2s ease;
    padding-bottom: 1px;
}
.entry-content a:hover, .page-lead a:hover, .breadcrumbs a:hover, .card-title a:hover, .widget a:hover, .remark-text a:hover, .entry-tags a:hover { background-size: 100% 2px; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 0.975rem;
    line-height: 1.2;
    padding: 0.85em 1.5em;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #FFFFFF; }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #FFFFFF; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #0F2A4A; }
.btn-gold:hover { background: #B88A10; border-color: #B88A10; color: #0F2A4A; }

.tag-gold {
    display: inline-block;
    font-family: var(--f-head);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.4em 0.65em;
    border-radius: 3px;
    background: rgba(212, 160, 23, 0.14);
    color: #7A5A05;
    border: 1px solid rgba(212, 160, 23, 0.55);
}
a.tag-gold:hover { background: var(--gold); color: #0F2A4A; }

/* ---------- Шапка ---------- */
.topline { height: 4px; background: linear-gradient(90deg, #2563EB, #D4A017); }
.masthead { background: var(--head); color: #FFFFFF; position: relative; }
.masthead-row { display: flex; align-items: center; gap: 1.5rem; padding: 1.1rem 0; }
.brand { display: flex; align-items: center; gap: 1rem; color: #FFFFFF; min-width: 0; flex: 1 1 auto; }
.brand:hover { color: #FFFFFF; }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-logo { display: block; max-height: 60px; width: auto; }
.brand-svg { display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; max-width: 640px; }
.brand-name { font-family: var(--f-head); font-weight: 700; font-size: 0.98rem; line-height: 1.3; color: #FFFFFF; }
.brand-desc {
    font-size: 0.78rem;
    line-height: 1.45;
    color: #A9BCD2;
    margin-top: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mainnav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.3rem; }
.mainnav-list li { margin: 0; }
.mainnav-list a {
    display: block;
    padding: 0.55rem 0.9rem;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 0.95rem;
    color: #E8EEF6;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.mainnav-list a:hover,
.mainnav-list .current-menu-item > a { color: #FFFFFF; border-bottom-color: var(--gold); }
.nav-toggle { display: none; }

/* ---------- Главная: секции ---------- */
.fs { padding: 5.5rem 0; position: relative; }
.fs-alt {
    background-color: var(--bg-alt);
    background-image:
        linear-gradient(rgba(197, 211, 227, 0.6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(197, 211, 227, 0.6) 1px, transparent 1px);
    background-size: 24px 24px;
}
.section-title {
    font-size: 2.1rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0.4rem;
    padding-left: 2.1rem;
    border-left: 4px solid var(--gold);
    line-height: 1.15;
}
.section-title::before { left: 1rem; top: 0.48em; }
.section-lead { color: var(--muted); max-width: 62ch; margin: 0 0 2.6rem 0.4rem; padding-left: 2.35rem; }

/* Hero */
.fs-hero { padding: 0; background: var(--head); overflow: hidden; min-height: 560px; display: flex; align-items: center; }
.fs-hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.fs-hero::after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 42, 74, 0.7); }
.fs-hero-inner { position: relative; z-index: 1; padding: 6rem 0; }
.fs-hero-text { max-width: 720px; min-width: 0; }
.fs-hero-title { color: #FFFFFF; font-size: 3.25rem; line-height: 1.08; margin: 0 0 1.4rem; letter-spacing: -0.03em; }
.fs-hero-lead { color: #D3DEEA; font-size: 1.2rem; line-height: 1.6; margin: 0 0 2.2rem; max-width: 56ch; }

/* Учебные заведения */
.inst-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.inst {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #FFFFFF;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.inst::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gold); z-index: 2; transition: height .25s ease; }
.inst:hover { transform: translateY(-4px); box-shadow: var(--shadow-up); }
.inst:hover::before { height: 5px; }
.inst-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.inst-body { flex: 1; padding: 1.25rem 1.3rem 1.4rem; min-width: 0; }
.inst-title { font-size: 1.15rem; margin: 0.75rem 0 0.5rem; }
.inst-body p { font-size: 0.95rem; color: #3A4B5E; margin: 0; }

/* Последние записи */
.fs-latest-more { margin: 2.4rem 0 0; }
.empty-note { color: var(--muted); }

/* Цитата */
.fs-quote { background: var(--head); }
.bigquote {
    margin: 0;
    padding: 0.4rem 0 0.4rem 2.6rem;
    border-left: 8px solid var(--gold);
    background: none;
    border-radius: 0;
    max-width: 980px;
}
.bigquote p { font-family: var(--f-head); font-weight: 700; font-size: 2.6rem; line-height: 1.2; color: #FFFFFF; margin: 0 0 1.4rem; letter-spacing: -0.02em; }
.bigquote cite { font-style: normal; color: var(--muted); font-size: 1rem; }

/* Таймлайн */
.chrono { list-style: none; margin: 0; padding: 0; position: relative; }
.chrono::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--accent); }
.chrono-item { position: relative; width: 50%; margin: 0 0 2rem; padding-right: 3rem; }
.chrono-item:nth-child(even) { margin-left: 50%; padding-right: 0; padding-left: 3rem; }
.chrono-item::after {
    content: "";
    position: absolute;
    top: 1.6rem;
    right: -8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 4px var(--bg-alt);
}
.chrono-item:nth-child(even)::after { right: auto; left: -8px; }
.chrono-card { background: #FFFFFF; border-radius: 6px; box-shadow: var(--shadow); padding: 1.4rem 1.6rem; border-top: 3px solid var(--gold); min-width: 0; }
.chrono-date { display: block; font-family: var(--f-head); font-weight: 800; font-size: 1.5rem; color: var(--gold); line-height: 1; margin-bottom: 0.5rem; }
.chrono-title { font-size: 1.15rem; color: var(--head); margin: 0 0 0.45rem; }
.chrono-card p { margin: 0; font-size: 0.97rem; color: #3A4B5E; }

/* ---------- Внутренние страницы ---------- */
.page-wrap { padding: 2rem 0 4.5rem; }
.breadcrumbs { font-size: 0.875rem; color: var(--muted); margin: 0 0 1.8rem; }
.breadcrumbs .sep { margin: 0 0.35rem; color: var(--gold); }
.breadcrumbs span:last-child { color: var(--text); }

.layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 67fr) minmax(0, 27fr); column-gap: 6%; align-items: start; }
.layout-single { display: block; }
.layout-single > .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }

.page-head { margin-bottom: 2rem; }
.page-title { font-size: 3.25rem; line-height: 1.08; margin: 0 0 0.8rem; letter-spacing: -0.03em; }
.page-lead { color: var(--muted); max-width: 64ch; margin: 0; }

.sidebar { background: var(--aside); border-radius: 6px; box-shadow: var(--shadow); padding: 1.6rem 1.5rem; border-top: 3px solid var(--gold); min-width: 0; color: var(--text); }
.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title { font-size: 1.1rem; margin: 0 0 1rem; padding-left: 0.8rem; border-left: 3px solid var(--gold); color: var(--text); }
.sidebar .widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar .widget li { padding: 0.65rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--text); font-weight: 600; }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .post-date { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.sidebar .widget p { color: var(--text); }

/* Сетка записей и карточки */
.post-grid { display: grid; gap: 1.6rem; }
.post-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #FFFFFF;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gold); z-index: 3; transition: height .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-up); }
.card:hover::before { height: 5px; }
.card-thumb { position: relative; overflow: hidden; }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.card-thumb::after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(37, 99, 235, 0.28); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.card:hover .card-thumb::after { opacity: 1; }
.card-thumb-empty { aspect-ratio: 16 / 9; display: flex !important; align-items: center; justify-content: center; background: linear-gradient(135deg, #0F2A4A, #1E4A80); }
.card-thumb-empty svg { display: block; }
.card-body { flex: 1; display: flex; flex-direction: column; padding: 1.3rem 1.4rem 1.5rem; min-width: 0; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.6rem; }
.card-cat { color: var(--muted); }
.card-title { font-size: 1.18rem; margin: 0 0 0.6rem; line-height: 1.3; overflow-wrap: anywhere; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-excerpt { font-size: 0.95rem; color: #3A4B5E; flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { margin-top: 0.9rem; font-family: var(--f-head); font-weight: 700; font-size: 0.92rem; color: var(--accent); align-self: flex-start; }
.card-more::after { content: " →"; }
.card-more:hover { color: var(--accent-dark); }

/* Пагинация (type => plain) */
.pager { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 2.8rem 0 0; }
.pager .page-numbers, .pager > a, .pager > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 0.85rem;
    border: 2px solid var(--line-alt);
    border-radius: 4px;
    background: #FFFFFF;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease;
}
.pager a.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: #FFFFFF; }
.pager .page-numbers.dots { border-color: transparent; background: transparent; min-width: auto; padding: 0 0.3rem; }

/* Запись */
.entry { min-width: 0; }
.entry-head { margin-bottom: 1.6rem; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; color: var(--muted); font-size: 0.9rem; }
.entry-cover { margin: 0 0 2rem; border-radius: 6px; overflow: hidden; }
.entry-cover img { display: block; width: 100%; height: auto; }
.entry-content { min-width: 0; overflow-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border-radius: 4px; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line-alt); font-size: 0.9rem; }

/* Комментарии */
.remarks { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line-alt); }
.remark-list, .remark-list .children { list-style: none; padding: 0; margin: 0; }
.remark-list .children { padding-left: 2rem; }
.remark { margin: 0 0 1rem; }
.remark-box { background: #FFFFFF; border-radius: 6px; box-shadow: var(--shadow); padding: 1.2rem 1.4rem; }
.remark-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.remark-ava { border-radius: 50%; display: block; }
.remark-author { display: block; font-family: var(--f-head); font-weight: 700; }
.remark-date { font-size: 0.8rem; color: var(--muted); }
.remark-wait { color: var(--gold); font-size: 0.9rem; }
.remark-reply a { font-size: 0.88rem; font-weight: 600; }
.comment-respond { margin-top: 2rem; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.92rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%; padding: 0.75rem 0.9rem; border: 2px solid var(--line-alt); border-radius: 4px; font: inherit; color: var(--text); background: #FFFFFF;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form .comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-notes { color: var(--muted); font-size: 0.88rem; }

/* Поиск и 404 */
.finder { display: flex; gap: 0.5rem; margin: 1.5rem 0; max-width: 560px; }
.finder-input { flex: 1; min-width: 0; padding: 0.75rem 0.9rem; border: 2px solid var(--line-alt); border-radius: 4px; font: inherit; color: var(--text); background: #FFFFFF; }
.finder-input:focus { outline: none; border-color: var(--accent); }
.finder-btn:hover { transform: none; }
.notfound { padding: 1rem 0 2rem; }
.notfound-code { font-family: var(--f-head); font-weight: 800; font-size: 7rem; line-height: 1; color: var(--gold); margin: 0 0 0.5rem; }
.sidebar .finder { flex-direction: column; }

/* ---------- Подвал ---------- */
.colophon { background: var(--foot); color: #C2D0DF; margin-top: 0; }
.colophon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; padding: 4rem 0 3rem; }
.colophon-col { min-width: 0; }
.colophon .widget { margin-bottom: 1.6rem; color: #C2D0DF; }
.colophon .widget-title { font-size: 1.05rem; color: #FFFFFF; margin: 0 0 1rem; padding-left: 0.8rem; border-left: 3px solid var(--gold); }
.colophon .widget p, .colophon .textwidget { color: #C2D0DF; font-size: 0.95rem; }
.colophon .widget ul { list-style: none; padding: 0; margin: 0; }
.colophon .widget li { margin: 0 0 0.55rem; }
.colophon .widget a { color: #E8EEF6; }
.colophon .widget a:hover { color: #FFFFFF; }
.colophon .post-date { color: #8EA3BA; font-size: 0.8rem; display: block; }
.colophon-base { border-top: 1px solid rgba(197, 211, 227, 0.15); }
.colophon-base p { margin: 0; padding: 1.3rem 0; font-size: 0.85rem; color: #8EA3BA; }

/* ---------- Cookie ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    max-width: 880px;
    margin: 0 auto;
    padding: 1.1rem 1.4rem;
    background: var(--head);
    color: #E8EEF6;
    border-top: 3px solid var(--gold);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(10, 29, 51, 0.35);
}
.cookie-banner-text { margin: 0; font-size: 0.92rem; flex: 1; min-width: 0; }
.cookie-banner-btn { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .masthead-row { flex-wrap: wrap; }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        flex: 0 0 auto;
        background: transparent;
        border: 2px solid rgba(232, 238, 246, 0.4);
        border-radius: 4px;
        cursor: pointer;
    }
    .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 20px; height: 2px; background: #FFFFFF; position: relative; transition: transform .2s ease, background-color .2s ease; }
    .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
    .nav-toggle-bar::before { top: -6px; }
    .nav-toggle-bar::after { top: 6px; }
    .nav-toggle.is-active .nav-toggle-bar { background: transparent; }
    .nav-toggle.is-active .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
    .nav-toggle.is-active .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }
    .mainnav { display: none; width: 100%; }
    .mainnav.is-open { display: block; }
    .mainnav-list { flex-direction: column; gap: 0; padding: 0.5rem 0; border-top: 1px solid rgba(232, 238, 246, 0.15); }
    .mainnav-list a { border-bottom: 1px solid rgba(232, 238, 246, 0.08); border-left: 3px solid transparent; }
    .mainnav-list a:hover, .mainnav-list .current-menu-item > a { border-bottom-color: rgba(232, 238, 246, 0.08); border-left-color: var(--gold); }

    .shell.is-front { width: 92%; }
    .fs { padding: 4rem 0; }
    .fs-hero { padding: 0; min-height: 480px; }
    .fs-hero-title { font-size: 2.6rem; }
    .inst-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bigquote p { font-size: 2rem; }

    .layout-with-sidebar { display: block; }
    .layout-with-sidebar .sidebar { margin-top: 3rem; }
    .layout-single > .content-area { width: 100%; }
    .page-title { font-size: 2.5rem; }
    .colophon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .brand-desc { -webkit-line-clamp: 3; }
    .brand-name { font-size: 0.9rem; }
    .brand-svg { width: 42px; height: 42px; }
    .fs { padding: 3.2rem 0; }
    .fs-hero { padding: 0; min-height: 0; }
    .fs-hero-inner { padding: 4rem 0; }
    .fs-hero-title { font-size: 2rem; }
    .fs-hero-lead { font-size: 1.05rem; }
    .section-title { font-size: 1.6rem; margin-left: 0; padding-left: 1.7rem; }
    .section-title::before { left: 0.7rem; }
    .section-lead { margin-left: 0; padding-left: 1.95rem; }
    .inst-grid, .post-grid.cols-3, .post-grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
    .bigquote { padding: 0.2rem 0 0.2rem 1.4rem; }
    .bigquote p { font-size: 1.55rem; }

    .chrono::before { left: 9px; margin-left: 0; }
    .chrono-item, .chrono-item:nth-child(even) { width: 100%; margin-left: 0; padding-left: 2.5rem; padding-right: 0; }
    .chrono-item::after, .chrono-item:nth-child(even)::after { left: 1px; right: auto; }
    .chrono-card { padding: 1.2rem 1.2rem; }

    .page-title { font-size: 2rem; }
    .sidebar { padding: 1.4rem 1.2rem; }
    .colophon-grid { grid-template-columns: minmax(0, 1fr); padding: 3rem 0 2rem; }
    .finder { flex-direction: column; }
    .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem 1.2rem; }
    .remark-list .children { padding-left: 1rem; }
    .notfound-code { font-size: 5rem; }
}
