/*
Theme Name: dds_b2bcon.ru
Author: Алексей Туманов
Description: Тема для ежедневного издания об образовании и человеческих историях. Концепция «Тёплый янтарный дневник».
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: b2bcon
*/

:root {
    --paper: #FFFDF7;
    --honey: #FFF3E0;
    --ink: #2D2A26;
    --cream: #FFF8EC;
    --amber: #E07A3F;
    --amber-dark: #B95A24;
    --gold: #C9A227;
    --muted: #8A7F72;
    --line: #F0E6D8;
    --hatch: #F5EDE0;
    --serif: "Lora", "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans: "Source Sans 3", "Inter", "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--paper);
    background-image: repeating-linear-gradient(45deg, transparent 0 22px, var(--hatch) 22px 23px);
}
body::after {
    content: "";
    position: fixed;
    right: 2vw;
    bottom: 2vh;
    width: 340px;
    height: 240px;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340 240'%3E%3Cpath d='M170 50C120 20 60 20 10 40v180c50-20 110-20 160 10 50-30 110-30 160-10V40C280 20 220 20 170 50z' fill='%232D2A26'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; }
p { margin: 0 0 1.1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.25;
    margin: 1.4em 0 0.6em;
    color: var(--ink);
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

a { color: var(--amber-dark); text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; border: 1px solid #E2D4BF; }
th, td { border: 1px solid #E2D4BF; padding: 0.55em 0.8em; text-align: left; vertical-align: top; }
th { background: var(--honey); font-weight: 700; }

blockquote {
    margin: 1.6em 0;
    padding: 1rem 1.4rem 1rem 1.6rem;
    border-left: 6px solid var(--amber);
    background: var(--cream);
    border-radius: 0 8px 8px 0;
    font-family: var(--serif);
    font-size: 1.2rem;
    font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
    position: relative;
    z-index: 1;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.4rem;
    border-radius: 8px;
    border: 2px solid var(--amber);
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
    text-decoration: none;
    background-image: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(224, 122, 63, 0.28); }
.btn-fill { background: var(--amber); color: #fff; }
.btn-fill:hover { background: #D56C30; color: #fff; }
.btn-ghost { background: transparent; color: var(--amber-dark); }
.btn-ghost:hover { background: rgba(224, 122, 63, 0.08); }
.btn-ghost-light { color: #FFE9D6; border-color: #FFE9D6; }
.btn-ghost-light:hover { color: #fff; border-color: var(--amber); background: rgba(224, 122, 63, 0.18); }

/* Animated text links */
.entry-content a, .sec-lead a, .cookie-text a, .crumbs a, .card-more, .talk a {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .3s ease, color .2s ease;
    color: var(--amber-dark);
}
.entry-content a:hover, .sec-lead a:hover, .cookie-text a:hover, .crumbs a:hover, .card-more:hover, .talk a:hover {
    background-size: 100% 1px;
}

/* ---------- Header ---------- */
.amber-strip { height: 4px; background: var(--amber); position: relative; z-index: 2; }
.masthead { background: var(--ink); color: #F6EEE2; position: relative; z-index: 2; }
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.1rem 0;
}
.brand { display: flex; align-items: center; gap: 1rem; color: #F6EEE2; min-width: 0; }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-logo { display: block; width: 56px; height: 56px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    color: #FFF8EC;
    max-width: 760px;
}
.brand-desc {
    font-size: 0.85rem;
    line-height: 1.45;
    color: #C9BBA9;
    margin-top: 0.3rem;
    max-width: 760px;
}
.menu-switch {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #F6EEE2;
    border: 1px solid #5A534B;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font: 600 0.95rem var(--sans);
    cursor: pointer;
}
.menu-switch-bars, .menu-switch-bars::before, .menu-switch-bars::after {
    display: block; width: 18px; height: 2px; background: var(--amber); position: relative;
}
.menu-switch-bars::before, .menu-switch-bars::after { content: ""; position: absolute; left: 0; }
.menu-switch-bars::before { top: -6px; }
.menu-switch-bars::after { top: 6px; }

.topnav { border-top: 1px solid #423D37; }
.topnav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1.8rem; }
.topnav-list a {
    display: block;
    padding: 0.8rem 0;
    color: #F6EEE2;
    font-weight: 600;
    position: relative;
}
.topnav-list a::after {
    content: "";
    position: absolute; left: 0; bottom: 0.55rem;
    width: 100%; height: 2px;
    background: var(--amber);
    transform: scaleX(0); transform-origin: left;
    transition: transform .25s ease;
}
.topnav-list a:hover::after,
.topnav-list .current-menu-item a::after { transform: scaleX(1); }
.topnav-list a:hover { color: #FFD9BF; }

/* ---------- Section titles & dividers ---------- */
.sec-title {
    position: relative;
    font-size: 2.1rem;
    margin: 0 0 1.4rem;
    padding: 0 0 0.7rem 1.5rem;
}
.sec-title::before {
    content: "";
    position: absolute; left: 0; top: 0.55em;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.35);
}
.sec-title::after {
    content: "";
    position: absolute; left: 1.5rem; bottom: 0;
    width: 110px; height: 1px;
    background: var(--gold);
}
.sec-lead { color: var(--muted); font-size: 1.1rem; max-width: 64ch; margin-bottom: 2rem; }

.dots-divider {
    height: 6px;
    width: min(92%, 1180px);
    margin: 0 auto;
    background-image: radial-gradient(circle, var(--amber) 1.4px, transparent 1.6px);
    background-size: 12px 6px;
    background-position: center;
    opacity: 0.55;
}
.gold-divider {
    position: relative;
    width: min(60%, 520px);
    height: 1px;
    margin: 0 auto;
    background: var(--gold);
}
.gold-divider span {
    position: absolute; left: 50%; top: 50%;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--amber);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px var(--paper);
}

/* ---------- Front page ---------- */
.front-inner { width: 85%; margin-left: auto; margin-right: auto; }
.band { padding: 5rem 0; position: relative; }
.band-paper { background: var(--paper); }
.band-honey { background-color: var(--honey); }
.band-dotted {
    background-image: radial-gradient(rgba(201, 162, 39, 0.28) 1.2px, transparent 1.4px);
    background-size: 18px 18px;
}
.band-ink { background: var(--ink); color: #F6EEE2; }

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: center;
    color: #fff;
    background: var(--ink);
}
.hero-img {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.hero-veil {
    position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(100deg, rgba(45, 42, 38, 0.92) 0%, rgba(45, 42, 38, 0.72) 55%, rgba(45, 42, 38, 0.45) 100%);
}
.hero .shell { padding: 5rem 0; }
.hero-inner { position: relative; }
.hero-title {
    font-size: 3.2rem;
    line-height: 1.12;
    margin: 0 0 1.2rem;
    color: #FFF8EC;
    max-width: 16ch;
}
.hero-lead { font-size: 1.25rem; color: #EADCC8; max-width: 52ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero-flourish {
    position: absolute; right: 3%; bottom: 6%;
    width: 220px; height: 120px;
    opacity: 0.85;
    pointer-events: none;
}

/* Timeline */
.route { list-style: none; margin: 0; padding: 0; position: relative; }
.route::before {
    content: "";
    position: absolute; top: 0; bottom: 0; left: 50%;
    width: 2px; margin-left: -1px;
    background: var(--gold);
}
.route-step { position: relative; width: 50%; padding: 0 2.6rem 2.2rem 0; }
.route-step:nth-child(even) { margin-left: 50%; padding: 0 0 2.2rem 2.6rem; }
.route-step::after {
    content: "";
    position: absolute; top: 1.6rem; right: -9px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--amber);
    border: 3px solid var(--honey);
    box-shadow: 0 0 0 2px var(--gold);
}
.route-step:nth-child(even)::after { right: auto; left: -9px; }
.route-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    box-shadow: 0 10px 26px rgba(224, 122, 63, 0.08);
    min-width: 0;
}
.route-card h3 { margin: 0.2rem 0 0.5rem; }
.route-card p { margin: 0; color: #4F4841; }
.route-num {
    font-family: var(--serif);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--amber-dark);
}

/* Stats */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.6rem; }
.fact { text-align: center; padding: 1.4rem 1rem; min-width: 0; border-top: 1px solid rgba(201, 162, 39, 0.5); }
.fact-num {
    display: block;
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--amber);
    margin-bottom: 0.5rem;
}
.fact-label { display: block; color: var(--muted); font-size: 1rem; }

/* CTA */
.story-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 3rem 2.6rem;
    border-radius: 12px;
    border: 1px solid #4A443D;
    position: relative;
}
.story-cta::before {
    content: "";
    position: absolute; left: 2.6rem; top: 0;
    width: 120px; height: 3px;
    background: var(--gold);
}
.story-cta-text { min-width: 0; max-width: 60ch; }
.story-cta-title { margin: 0 0 0.7rem; font-size: 2.1rem; color: #FFF8EC; }
.story-cta p { margin: 0; color: #D8CBB9; }
.story-cta .btn { flex: 0 0 auto; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.8rem; }
.card-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(224, 122, 63, 0.08);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    min-width: 0;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(224, 122, 63, 0.16);
    border-color: var(--amber);
}
.card-thumb { display: block; background: var(--honey); }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb-empty {
    display: block;
    aspect-ratio: 16 / 9;
    background-color: var(--honey);
    background-image: radial-gradient(rgba(201, 162, 39, 0.35) 1.2px, transparent 1.4px);
    background-size: 14px 14px;
}
.card-body { flex: 1; display: flex; flex-direction: column; padding: 1.3rem 1.4rem 1.5rem; min-width: 0; }
.card-title { font-size: 1.25rem; margin: 0.6rem 0 0.4rem; overflow-wrap: anywhere; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--amber-dark); }
.card-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.7rem; }
.card-excerpt { color: #4F4841; font-size: 1rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { align-self: flex-start; margin-top: auto; padding-top: 0.6rem; font-weight: 700; }

.cat-chip {
    align-self: flex-start;
    display: inline-block;
    padding: 0.18rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.5;
}
.cat-chip.tone-0 { background: #FCE3D3; color: #9A4718; }
.cat-chip.tone-1 { background: #F6EBC6; color: #7A6010; }
.cat-chip.tone-2 { background: #F8DCD6; color: #943A2C; }
.cat-chip.tone-3 { background: #EFE4D2; color: #6A5439; }
.cat-chip.tone-4 { background: #FDE9C4; color: #8A5A0A; }
.cat-chip:hover { filter: brightness(0.96); }

.empty-note { color: var(--muted); font-style: italic; }

/* ---------- Inner pages ---------- */
.page-wrap { padding: 2rem 0 4.5rem; }
.crumbs { font-size: 0.92rem; color: var(--muted); margin-bottom: 2rem; overflow-wrap: anywhere; }
.crumbs-sep { color: var(--gold); margin: 0 0.25rem; }
.crumbs > span:last-child { color: var(--ink); }

.layout-with-sidebar { display: flex; justify-content: space-between; align-items: flex-start; gap: 0; }
.layout-with-sidebar .content-area { width: 67%; min-width: 0; }
.layout-with-sidebar .sidebar { width: 27%; min-width: 0; }
.layout-single { display: block; }
.layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }

.list-head { margin-bottom: 1rem; }
.list-title { font-size: 2.4rem; }

.entry {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 2.4rem 2.6rem;
    box-shadow: 0 8px 22px rgba(224, 122, 63, 0.06);
}
.entry-cats { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
.entry-title { font-size: 2.4rem; margin: 0 0 0.6rem; overflow-wrap: anywhere; }
.entry-meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.6rem; padding-bottom: 1rem; border-bottom: 1px dashed #E7D6BE; }
.entry-cover { margin: 0 0 1.8rem; }
.entry-cover img { display: block; width: 100%; height: auto; border-radius: 10px; }
.entry-content { min-width: 0; overflow-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry-content ul li::marker { color: var(--gold); }
.entry-content ol li::marker { color: var(--amber-dark); font-weight: 700; }
.entry-content img { border-radius: 8px; }
.entry-content pre { overflow-x: auto; background: var(--cream); padding: 1rem 1.2rem; border-radius: 8px; }
.entry-content .wp-block-table, .entry-content figure { max-width: 100%; overflow-x: auto; }
.entry-tags { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.entry-tags a { color: var(--muted); font-size: 0.92rem; }
.entry-tags a:hover { color: var(--amber-dark); }

/* Sidebar */
.sidebar {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.6rem 1.5rem;
    color: var(--ink);
}
.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    color: var(--ink);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gold);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.6rem 0; border-bottom: 1px dashed #E7D6BE; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink); font-weight: 600; }
.sidebar a:hover { color: var(--amber-dark); }
.sidebar .post-date { display: block; color: #7A6F63; font-size: 0.85rem; margin-top: 0.2rem; }
.sidebar p, .sidebar .textwidget { color: var(--ink); }

/* Pagination */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 2.6rem; }
.pager .page-numbers {
    display: inline-block;
    min-width: 2.6rem;
    padding: 0.5rem 0.85rem;
    text-align: center;
    border: 1px solid #E2D4BF;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-weight: 600;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.pager a.page-numbers:hover { border-color: var(--amber); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(224, 122, 63, 0.2); }
.pager .page-numbers.current { background: var(--amber); border-color: var(--amber); color: #fff; }
.pager .page-numbers.dots { border: 0; background: none; min-width: 0; }

/* Search */
.seek { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.4rem 0; }
.seek-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.seek-field {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 1px solid #E2D4BF;
    border-radius: 8px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}
.seek-field:focus { border-color: var(--amber); }

/* 404 */
.lost { text-align: center; padding: 2rem 0; }
.lost-code { font-family: var(--serif); font-size: 6rem; line-height: 1; color: var(--amber); margin: 0 0 0.5rem; }
.lost .seek { max-width: 520px; margin-left: auto; margin-right: auto; }

/* Comments */
.talk {
    margin-top: 2.4rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 2rem 2.2rem;
}
.talk-title, .comment-reply-title { font-size: 1.5rem; margin: 0 0 1.2rem; }
.talk-list, .talk-list .children { list-style: none; margin: 0; padding: 0; }
.talk-list .children { padding-left: 1.6rem; border-left: 2px solid var(--line); }
.talk-list .comment-body { padding: 1rem 0; border-bottom: 1px dashed #E7D6BE; }
.talk-list .avatar { border-radius: 50%; float: left; margin-right: 0.8rem; }
.talk-list .comment-meta { font-size: 0.88rem; color: var(--muted); }
.talk-list .comment-meta a { color: var(--muted); }
.talk-list .fn { font-style: normal; font-weight: 700; color: var(--ink); }
.comment-form label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.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: 1px solid #E2D4BF;
    border-radius: 8px;
    font: inherit;
    background: var(--paper);
}
.comment-form .submit {
    background: var(--amber); color: #fff; border: 0; border-radius: 8px;
    padding: 0.75rem 1.4rem; font: 700 1rem var(--sans); cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.comment-form .submit:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(224, 122, 63, 0.28); }
.talk-note, .talk-closed { color: var(--muted); }

/* ---------- Footer ---------- */
.colophon { background: var(--ink); color: #E9DFD1; position: relative; z-index: 1; }
.colophon-line {
    height: 6px;
    background-image: radial-gradient(circle, var(--amber) 1.4px, transparent 1.6px);
    background-size: 12px 6px;
    opacity: 0.8;
}
.colophon-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; padding: 3.5rem 0 2.5rem; }
.colophon-col { min-width: 0; }
.colophon .widget { margin-bottom: 1.6rem; }
.colophon .widget-title {
    font-size: 1.15rem;
    color: #FFF8EC;
    margin: 0 0 1rem;
    padding-left: 1.1rem;
    position: relative;
}
.colophon .widget-title::before {
    content: "";
    position: absolute; left: 0; top: 0.5em;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--gold);
}
.colophon p, .colophon .textwidget, .colophon li { color: #D8CBB9; }
.colophon a { color: #FFC9A3; }
.colophon a:hover { color: #FFFFFF; }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { padding: 0.3rem 0; }
.colophon .post-date { color: #B3A594; font-size: 0.85rem; display: block; }
.colophon-copy {
    border-top: 1px solid #4A443D;
    padding: 1.3rem 0 1.6rem;
    font-size: 0.9rem;
    color: #B3A594;
}

/* ---------- Cookie banner ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    max-width: 920px;
    margin-left: auto; margin-right: auto;
    padding: 1rem 1.4rem;
    background: #FFFDF7;
    color: var(--ink);
    border: 1px solid var(--line);
    border-top: 3px solid var(--amber);
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(45, 42, 38, 0.22);
}
.cookie-text { margin: 0; font-size: 0.95rem; min-width: 0; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-with-sidebar { display: block; }
    .layout-with-sidebar .content-area, .layout-with-sidebar .sidebar { width: auto; }
    .layout-with-sidebar .sidebar { margin-top: 2.5rem; }
    .layout-single .content-area { width: auto; }
    .front-inner { width: auto; }
    .hero-title { font-size: 2.6rem; }
    .story-cta { flex-direction: column; align-items: flex-start; }
    .colophon-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .menu-switch { display: inline-flex; }
    .topnav { display: none; }
    .topnav.is-open { display: block; }
    .topnav-list { flex-direction: column; gap: 0; }
    .topnav-list a { border-bottom: 1px solid #423D37; }
    .topnav-list a::after { display: none; }
    .brand-desc { display: none; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .band { padding: 3.2rem 0; }
    .card-grid, .card-grid-two, .facts, .colophon-cols { grid-template-columns: minmax(0, 1fr); }
    .hero { min-height: 480px; }
    .hero .shell { padding: 3.5rem 0; }
    .hero-title { font-size: 2.1rem; }
    .hero-lead { font-size: 1.08rem; }
    .hero-flourish { width: 130px; height: 72px; }
    .sec-title, .list-title { font-size: 1.7rem; }
    .brand-name { font-size: 0.92rem; }
    .brand-logo { width: 44px; height: 44px; }
    .route::before { left: 9px; }
    .route-step, .route-step:nth-child(even) { width: auto; margin-left: 0; padding: 0 0 1.6rem 2.2rem; }
    .route-step::after, .route-step:nth-child(even)::after { left: 0; right: auto; }
    .route-card { padding: 1.2rem 1.2rem; }
    .fact-num { font-size: 2.5rem; }
    .story-cta { padding: 2rem 1.4rem; }
    .story-cta::before { left: 1.4rem; }
    .story-cta-title { font-size: 1.7rem; }
    .entry { padding: 1.5rem 1.3rem; }
    .entry-title { font-size: 1.8rem; }
    .talk { padding: 1.4rem 1.3rem; }
    .sidebar { padding: 1.3rem 1.2rem; }
    .cookie-banner { flex-direction: column; align-items: flex-start; padding: 1rem 1.2rem; }
    body::after { width: 180px; height: 130px; }
}
