/*
Theme Name: Mahabharata Theme
Theme URI: http://localhost
Author: Mahabharata Project
Author URI: http://localhost
Description: Кастомная тема для сайта «Махабхарата»
Version: 1.0
Text Domain: mahabharata-theme
*/

:root {
    --mh-font-ui: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    --mh-font-display: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

body,
button,
input,
textarea,
select {
    font-family: var(--mh-font-ui);
}

img.mh-protected-image,
img[src*="/chapter-images/"] {
    -webkit-user-drag: none;
    user-select: none;
}

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

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header,
.site-footer {
    padding: 24px 0;
    background: #1f1a17;
    color: #f7f3ee;
}

.site-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.site-main {
    padding: 64px 0;
}

.hero-title {
    font-size: 48px;
    line-height: 1.1;
    margin: 0 0 20px;
}

.hero-text {
    font-size: 20px;
    line-height: 1.6;
    max-width: 720px;
    margin: 0;
}

.site-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-brand {
    color: #f7f3ee;
    text-decoration: none;
    font-size: 28px;
    font-weight: 700;
}

.site-brand:hover {
    opacity: 0.9;
}

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

.site-menu {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-menu a {
    color: #f7f3ee;
    text-decoration: none;
    font-size: 16px;
}

.site-menu a:hover {
    opacity: 0.85;
}

.hero {
    padding: 88px 0;
}

.hero-kicker {
    margin: 0 0 16px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #7b5c43;
}

.site-footer__text {
    margin: 0;
}

@media (max-width: 767px) {
    .site-header__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-menu {
        flex-direction: column;
        gap: 12px;
    }

    .hero {
        padding: 56px 0;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-text {
        font-size: 18px;
    }
}

.page-content {
    max-width: 820px;
}

.page-title {
    margin: 0 0 24px;
    font-size: 44px;
    line-height: 1.1;
}

body {
    margin: 0;
    background: #f7f3ee;
    color: #1f1a17;
}

.page-body p {
    margin: 0 0 20px;
}

@media (max-width: 767px) {
    .page-title {
        font-size: 34px;
    }

    .page-body {
        font-size: 18px;
    }
}

.hero--home {
    padding: 96px 0 72px;
}

.hero-text--wide {
    max-width: 860px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid #1f1a17;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    max-width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.button--primary {
    background: #1f1a17;
    color: #f7f3ee;
}

.button--primary:hover {
    opacity: 0.92;
}

.button--ghost {
    background: transparent;
    color: #1f1a17;
}

.button--ghost:hover {
    background: rgba(31, 26, 23, 0.05);
}

.section {
    padding: 72px 0;
}

.section--accent {
    background: #efe7dd;
}

.section-heading {
    max-width: 820px;
    margin-bottom: 40px;
}

.section-kicker {
    margin: 0 0 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #7b5c43;
}

.section-title {
    margin: 0 0 18px;
    font-size: 42px;
    line-height: 1.1;
    overflow-wrap: break-word;
}

.hero-title,
.page-title,
.page-masthead__title,
.section-title,
.chapter-featured-title,
.mh-chapter-section-title,
.cta-band__title {
    font-family: var(--mh-font-display);
    font-weight: 600;
    letter-spacing: 0;
}

.section-text {
    margin: 0;
    font-size: 20px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

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

.info-card {
    display: flex;
    flex-direction: column;
    padding: 30px 28px 26px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(31, 26, 23, 0.10);
    box-shadow: 0 12px 30px rgba(31, 26, 23, 0.05);
    backdrop-filter: blur(4px);
}

.cards-grid--three .info-card {
    height: auto;
}

.info-card__title {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.08;
}

.info-card__text {
    margin: 0 0 22px;
    font-size: 16px;
    line-height: 1.62;
    color: #4f4a45;
}

.info-card__link {
    margin-top: auto;
    color: #1f1a17;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
}

.info-card__link:hover {
    opacity: 0.8;
}

.split-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: start;
}

.feature-list {
    display: grid;
    gap: 20px;
}

.feature-item {
    padding: 24px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(31, 26, 23, 0.10);
}

.feature-item__title {
    margin: 0 0 10px;
    font-size: 24px;
}

.feature-item__text {
    margin: 0;
    font-size: 17px;
    line-height: 1.6;
}

@media (max-width: 991px) {
    .cards-grid,
    .cards-grid--two,
    .split-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .hero--home {
        padding: 64px 0 48px;
    }

    .section {
        padding: 56px 0;
    }

    .section-title {
        font-size: 34px;
    }

    .section-text,
    .info-card__text {
        font-size: 18px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .button {
        width: 100%;
    }
}

.page-hero {
    padding: 88px 0 48px;
}

.page-hero__title {
    margin: 0 0 24px;
    max-width: 980px;
    font-size: 56px;
    line-height: 1.05;
}

.page-hero__text {
    margin: 0;
    max-width: 860px;
    font-size: 22px;
    line-height: 1.65;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.about-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid rgba(31, 26, 23, 0.12);
}

.about-card__title {
    margin: 0 0 14px;
    font-size: 28px;
    line-height: 1.15;
}

.about-card__text {
    margin: 0;
    font-size: 18px;
    line-height: 1.65;
}

.about-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
}

@media (max-width: 991px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .page-hero {
        padding: 64px 0 32px;
    }

    .page-hero__title {
        font-size: 40px;
    }

    .page-hero__text {
        font-size: 19px;
    }

    .about-cta {
        flex-direction: column;
        align-items: stretch;
    }
}

.newcomer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.newcomer-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid rgba(31, 26, 23, 0.12);
}

.newcomer-card__title {
    margin: 0 0 14px;
    font-size: 28px;
    line-height: 1.15;
}

.newcomer-card__text {
    margin: 0 0 20px;
    font-size: 18px;
    line-height: 1.65;
}

.newcomer-note {
    padding: 28px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(31, 26, 23, 0.10);
}

.newcomer-note__title {
    margin: 0 0 16px;
    font-size: 28px;
    line-height: 1.15;
}

.newcomer-list {
    margin: 0;
    padding-left: 22px;
    font-size: 18px;
    line-height: 1.7;
}

.newcomer-list li + li {
    margin-top: 8px;
}

@media (max-width: 991px) {
    .newcomer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .newcomer-card__title,
    .newcomer-note__title {
        font-size: 24px;
    }

    .newcomer-card__text,
    .newcomer-list {
        font-size: 17px;
    }
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.support-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid rgba(31, 26, 23, 0.12);
}

.support-card__title {
    margin: 0 0 14px;
    font-size: 28px;
    line-height: 1.15;
}

.support-card__text {
    margin: 0;
    font-size: 18px;
    line-height: 1.65;
}

.support-note {
    padding: 28px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(31, 26, 23, 0.10);
}

.support-note__title {
    margin: 0 0 16px;
    font-size: 28px;
    line-height: 1.15;
}

.support-list {
    margin: 0;
    padding-left: 22px;
    font-size: 18px;
    line-height: 1.7;
}

.support-list li + li {
    margin-top: 8px;
}

@media (max-width: 991px) {
    .support-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .support-card__title,
    .support-note__title {
        font-size: 24px;
    }

    .support-card__text,
    .support-list {
        font-size: 17px;
    }
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.chapter-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid rgba(31, 26, 23, 0.12);
}

.chapter-card__title {
    margin: 0 0 16px;
    font-size: 30px;
    line-height: 1.15;
}

.chapter-card__title a {
    color: #1f1a17;
    text-decoration: none;
}

.chapter-card__title a:hover {
    opacity: 0.85;
}

.chapter-card__excerpt {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.7;
}

.chapter-card__excerpt p {
    margin: 0;
}

.empty-state {
    padding: 32px;
    background: #ffffff;
    border: 1px solid rgba(31, 26, 23, 0.12);
}

.empty-state__text {
    margin: 0;
    font-size: 18px;
    line-height: 1.7;
}

.page-hero--chapter {
    padding-bottom: 32px;
}

.chapter-single {
    max-width: 860px;
}

.chapter-single__content {
    font-size: 21px;
    line-height: 1.8;
}

.chapter-single__content p {
    margin: 0 0 22px;
}

.chapter-single__back {
    margin-top: 40px;
}

@media (max-width: 991px) {
    .chapters-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .chapter-card__title {
        font-size: 24px;
    }

    .chapter-card__excerpt,
    .chapter-single__content,
    .empty-state__text {
        font-size: 17px;
    }
}

.chapter-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.chapter-card__image-link {
    display: block;
    text-decoration: none;
}

.chapter-card__image {
    aspect-ratio: 16 / 10;
    background: #d9cec2;
    overflow: hidden;
}

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

.chapter-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7b5c43;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
    background: linear-gradient(135deg, #e9ddd0 0%, #d8c6b4 100%);
}

.chapter-card__body {
    padding: 24px 28px 28px;
}

.chapter-card__kicker {
    margin: 0 0 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #7b5c43;
}

.chapter-card__title {
    margin: 0 0 14px;
    font-size: 30px;
    line-height: 1.15;
}

.chapter-card__excerpt {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.7;
}

.chapter-cover {
    max-width: 960px;
    overflow: hidden;
    border: 1px solid rgba(31, 26, 23, 0.12);
    background: #ffffff;
}

.chapter-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.section--chapter-cover {
    padding-top: 0;
    padding-bottom: 24px;
}

/* ===== UI Sprint 1: header + navigation + home polish ===== */

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at top left, rgba(123, 92, 67, 0.06), transparent 28%),
        linear-gradient(180deg, #f7f3ee 0%, #f5efe7 100%);
}

.container {
    width: min(1180px, calc(100% - 40px));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 16px 0;
    background: rgba(31, 26, 23, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(31, 26, 23, 0.12);
}

.site-header__row {
    gap: 32px;
}

.site-brand {
    letter-spacing: 0;
}

.site-menu {
    gap: 10px;
}

.site-menu a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 15px;
    transition: background 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}

.site-menu a:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}

.site-menu .current-menu-item > a,
.site-menu .current_page_item > a,
.site-menu .current-menu-ancestor > a {
    background: rgba(255, 255, 255, 0.14);
    opacity: 1;
}

.site-main--home {
    padding-top: 0;
    padding-bottom: 0;
}

/* ===== Hero final ===== */

.hero--elevated {
    position: relative;
    overflow: hidden;
    padding: 86px 0 64px;
    background: #0f141a;
}

.hero--elevated::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(10, 14, 20, 0.78) 0%, rgba(10, 14, 20, 0.42) 42%, rgba(10, 14, 20, 0.18) 62%, rgba(10, 14, 20, 0.48) 100%),
        var(--mh-hero-art);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero--elevated::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 74% 28%, rgba(212, 175, 55, 0.12), transparent 18%),
        radial-gradient(circle at 16% 10%, rgba(212, 175, 55, 0.05), transparent 24%);
    pointer-events: none;
}

.hero--elevated .container,
.hero--elevated .home-hero {
    position: relative;
    z-index: 1;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(280px, 318px);
    gap: 46px;
    align-items: start;
}

.home-hero__content {
    padding: 8px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    max-width: none;
}

.hero-panel {
    justify-self: end;
    width: 100%;
    max-width: 318px;
    margin-top: 8px;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(180deg, rgba(8, 14, 24, 0.46) 0%, rgba(8, 14, 24, 0.34) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.hero-title--xl {
    font-size: clamp(34px, 4.6vw, 62px);
    line-height: 1.02;
    max-width: 16ch;
    letter-spacing: 0;
    margin-bottom: 20px;
}

.hero-title--xl br {
    display: block;
}

.hero-text--wide {
    max-width: 52ch;
    font-size: 18px;
    line-height: 1.74;
    font-weight: 300;
}

.hero-actions,
.quick-links {
    max-width: 52ch;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(245, 239, 230, 0.08);
    border: 1px solid rgba(245, 239, 230, 0.08);
    color: #f5efe6;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.quick-link:hover {
    background: rgba(245, 239, 230, 0.14);
    transform: translateY(-1px);
}

.hero-panel__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.hero-kicker,
.hero-panel__kicker,
.hero-panel__meta,
.chapter-mini__label {
    margin: 0;
    font-size: 10px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0;
    color: rgba(212, 175, 55, 0.92);
}

.hero--elevated .hero-title,
.hero--elevated .hero-text,
.hero--elevated .chapter-mini__title,
.hero--elevated .chapter-mini__title a,
.hero--elevated .chapter-mini__excerpt,
.hero--elevated .chapter-mini__link {
    color: #f5efe6;
}

.hero-panel {
    overflow: visible;
    position: relative;
    z-index: 1;
}

.hero-panel__top {
    position: relative;
    z-index: 1;
}

.chapter-mini {
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.chapter-mini__image {
    position: relative;
    z-index: 100;
    display: block;
    overflow: visible;
    aspect-ratio: 16 / 8.2;
    border-radius: 16px;
    margin: 10px 0 12px;
    text-decoration: none;
}

.chapter-mini__image-thumb,
.chapter-mini__image-popout-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 44%;
}

.chapter-mini__body {
    position: relative;
    z-index: 1;
}

.chapter-mini__title,
.chapter-mini__excerpt,
.chapter-mini__link {
    position: relative;
    z-index: 1;
}

.chapter-mini__image-thumb {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition:
        opacity 0.28s ease,
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.chapter-mini__image-popout {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 122%;
    aspect-ratio: 1 / 1;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.86);
    transform-origin: center center;
    transition:
        opacity 0.32s ease,
        transform 0.38s ease;
    z-index: 999;
}

.hero-panel__kicker,
.hero-panel__meta,
.chapter-mini__label,
.chapter-mini__body,
.chapter-mini__title,
.chapter-mini__excerpt,
.chapter-mini__link {
    position: relative;
    z-index: 1;
}

.chapter-mini__image-popout-img {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.chapter-mini__image:hover .chapter-mini__image-thumb {
    opacity: 0.08;
}

.chapter-mini__image:hover .chapter-mini__image-popout {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.chapter-mini__excerpt {
    font-size: 14px;
    line-height: 1.58;
    margin-bottom: 14px;
    font-weight: 300;
}

.chapter-mini__excerpt p {
    margin: 0;
}

.chapter-mini__link {
    text-decoration: none;
    font-weight: 300;
    font-size: 14px;
}

.hero--elevated .button--primary {
    background: #d4af37;
    border-color: #d4af37;
    color: #0f141a;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.hero--elevated .button--ghost {
    background: transparent;
    border-color: rgba(245, 239, 230, 0.5);
    color: #f5efe6;
}

.hero--elevated .button--ghost:hover {
    background: rgba(245, 239, 230, 0.08);
}

@media (max-width: 1100px) {
    .home-hero {
        grid-template-columns: 1fr;
    }

    .home-hero__content {
    padding: 0;
    }

    .hero-panel {
    max-width: none;
    width: 100%;
    padding: 24px;
    }

    .hero-title--xl, 
    .hero-text--wide {
        max-width: none;
    }

    .hero-title--xl {
    font-size: clamp(34px, 7vw, 54px);
    }

    .hero-text--wide {
    font-size: 17px;
    }

    .hero--elevated::before {
        background-image:
            linear-gradient(180deg, rgba(10, 14, 20, 0.82) 0%, rgba(10, 14, 20, 0.54) 100%),
            var(--mh-hero-art);
    }
}

@media (max-width: 767px) {
    .hero--elevated {
        padding: 54px 0 42px;
    }

    .home-hero__content {
    padding: 0;
    border-radius: 0;
    }
    
    .hero-panel {
        padding: 22px;
        border-radius: 20px;
    }
}

.chapter-mini__link:hover {
    opacity: 0.8;
}

.section {
    padding: 88px 0;
}

.section--soft {
    background: rgba(255, 255, 255, 0.35);
    border-top: 1px solid rgba(31, 26, 23, 0.06);
    border-bottom: 1px solid rgba(31, 26, 23, 0.06);
}

.section-heading--narrow {
    max-width: 760px;
}

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

.cards-grid--lift .info-card,
.chapter-card,
.about-card,
.newcomer-card,
.support-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.cards-grid--lift .info-card:hover,
.chapter-card:hover,
.about-card:hover,
.newcomer-card:hover,
.support-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(31, 26, 23, 0.07);
    border-color: rgba(31, 26, 23, 0.14);
}

.info-card--interactive {
    position: relative;
    overflow: hidden;
}

.info-card__icon {
    display: none;
}

.home-split {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 36px;
    align-items: start;
}

.home-split::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 960px;
    height: 960px;
    background-image: var(--mh-icon-lotus);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.13;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.home-split > * {
    position: relative;
    z-index: 1;
}


.home-split__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.home-split__main--mandala {
    position: relative;
    isolation: isolate;
    overflow: visible;
    padding-right: 32px;
}

.home-split__main--mandala::after {
    content: none;
}

@media (max-width: 991px) {
    .home-split::before {
        width: 560px;
        height: 560px;
        opacity: 0.09;
    }
}

@media (max-width: 767px) {
    .home-split::before {
        width: 420px;
        height: 420px;
        opacity: 0.06;
    }
}

.home-split__main--mandala > * {
    position: relative;
    z-index: 1;
}

.feature-stack {
    display: grid;
    gap: 18px;
}

.feature-item--soft {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 26, 23, 0.08);
    box-shadow: 0 12px 30px rgba(31, 26, 23, 0.05);
}

.entry-mode-card {
    position: relative;
    padding-bottom: 24px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.entry-mode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(31, 26, 23, 0.08);
    border-color: rgba(31, 26, 23, 0.14);
}

.entry-mode-card__link {
    display: inline-flex;
    align-items: center;
    margin-top: 16px;
    color: #1f1a17;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.entry-mode-card__link:hover {
    opacity: 0.78;
}

.button {
    border-radius: 999px;
    min-height: 50px;
    padding: 0 22px;
}

.button--primary {
    box-shadow: 0 10px 24px rgba(31, 26, 23, 0.16);
}

.button--ghost {
    background: rgba(255, 255, 255, 0.5);
}

.button--ghost:hover {
    background: rgba(31, 26, 23, 0.08);
}

.chapter-card {
    box-shadow: 0 10px 26px rgba(31, 26, 23, 0.04);
}

.chapter-card__image {
    background: linear-gradient(135deg, #eadfd2 0%, #d8c6b4 100%);
}

.chapter-single__back {
    padding-top: 8px;
    border-top: 1px solid rgba(31, 26, 23, 0.08);
}

.site-footer {
    margin-top: 88px;
    background: #171311;
}

@media (max-width: 991px) {
    .home-hero,
    .home-split,
    .cards-grid--three {
        grid-template-columns: 1fr;
    }

    .hero-title--xl {
        max-width: 12ch;
    }
}

@media (max-width: 767px) {
    .site-header {
        padding: 14px 0;
    }

    .site-header__row {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .home-hero__content,
    .hero-panel {
        padding: 24px;
    }

    .hero--elevated {
        padding: 42px 0 24px;
    }

    .section {
        padding: 56px 0;
    }

    .hero-actions,
    .home-split__actions,
    .about-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-links {
        gap: 10px;
    }

    .quick-link {
        width: 100%;
        justify-content: center;
    }

    .chapter-mini__title {
        font-size: 24px;
    }
}

/* ===== UI Sprint 2: inner pages polish ===== */

.page-masthead {
    padding: 64px 0 28px;
}

.page-chip-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.page-chip-nav__item {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(31, 26, 23, 0.05);
    color: #1f1a17;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.page-chip-nav__item:hover {
    background: rgba(31, 26, 23, 0.10);
    transform: translateY(-1px);
}

.section-card-grid {
    display: grid;
    gap: 24px;
}

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

.section-card-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.section-card {
    padding: 28px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(31, 26, 23, 0.10);
    box-shadow: 0 12px 30px rgba(31, 26, 23, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(31, 26, 23, 0.08);
    border-color: rgba(31, 26, 23, 0.16);
}

.section-card__eyebrow {
    margin: 0 0 14px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #7b5c43;
    font-weight: 700;
}

.section-card__title {
    margin: 0 0 14px;
    font-size: 28px;
    line-height: 1.12;
}

.section-card__text {
    margin: 0;
    font-size: 18px;
    line-height: 1.7;
}

.home-entry-grid .section-card {
    min-height: 0;
}

.home-entry-grid .info-card__link {
    margin-top: 18px;
    padding-top: 0;
}

.home-project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.home-project-card {
    display: flex;
    min-height: 260px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.home-project-card::after {
    content: "";
    position: absolute;
    right: -44px;
    bottom: -52px;
    width: 148px;
    height: 148px;
    border: 1px solid rgba(212, 175, 55, 0.20);
    border-radius: 50%;
    opacity: 0.8;
    pointer-events: none;
}

.home-project-card__kicker {
    display: block;
    margin-bottom: 20px;
    color: #7b5c43;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.home-project-card__title {
    display: block;
    margin-bottom: 14px;
    color: var(--mh-ink);
    font-family: var(--mh-heading-font);
    font-size: 30px;
    line-height: 1.08;
    font-weight: 500;
}

.home-project-card__text {
    display: block;
    color: rgba(23, 19, 17, 0.74);
    font-size: 17px;
    line-height: 1.62;
}

.home-project-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    color: var(--mh-burgundy);
    font-weight: 700;
}

.home-project-card__link::after {
    content: "→";
    color: var(--mh-gold);
}

.home-project-card--listen {
    border-color: rgba(47, 96, 87, 0.20);
}

.home-project-card--chapters {
    border-color: rgba(91, 31, 45, 0.18);
}

.home-project-card--themes {
    border-color: rgba(212, 175, 55, 0.22);
}

.home-project-card--essays {
    border-color: rgba(155, 107, 52, 0.22);
}

.home-project-card--figures {
    border-color: rgba(47, 96, 87, 0.22);
}

.home-project-card--arcs {
    border-color: rgba(126, 80, 47, 0.22);
}

.home-project-card--materials {
    border-color: rgba(58, 67, 84, 0.18);
}

.home-full-map {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.home-full-map__group {
    display: grid;
    gap: 18px;
    align-content: start;
}

.home-full-map__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.home-meaning-split {
    align-items: center;
}

.home-meaning-links {
    display: grid;
    gap: 14px;
}

.home-meaning-link {
    display: block;
    padding: 18px 20px;
    border: 1px solid rgba(91, 31, 45, 0.10);
    background:
        linear-gradient(180deg, rgba(255, 252, 246, 0.84), rgba(246, 239, 228, 0.70));
    box-shadow: 0 10px 24px rgba(31, 26, 23, 0.05);
    color: inherit;
    text-decoration: none;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.home-meaning-link:hover {
    transform: translateY(-2px);
    border-color: rgba(91, 31, 45, 0.18);
    box-shadow: 0 16px 34px rgba(31, 26, 23, 0.08);
}

.home-meaning-link span {
    display: block;
    margin-bottom: 6px;
    color: var(--mh-ink);
    font-family: var(--mh-heading-font);
    font-size: 24px;
    line-height: 1.1;
    font-weight: 500;
}

.home-meaning-link small {
    display: block;
    color: rgba(23, 19, 17, 0.66);
    font-size: 15px;
    line-height: 1.5;
}

.home-trust-support {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
    gap: 28px;
    align-items: stretch;
}

.home-trust-support__trust,
.home-trust-support__support {
    height: 100%;
    box-sizing: border-box;
}

.home-trust-support__trust {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-trust-support__trust .section-kicker {
    margin-top: 0;
}

.home-trust-support__support {
    margin: 0;
}

.editorial-split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 36px;
    align-items: start;
}

.quote-panel,
.note-panel {
    padding: 28px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 26, 23, 0.08);
    box-shadow: 0 12px 30px rgba(31, 26, 23, 0.05);
}

.quote-panel__kicker {
    margin: 0 0 12px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #7b5c43;
    font-weight: 700;
}

.quote-panel__text {
    margin: 0;
    font-size: 24px;
    line-height: 1.5;
}

.note-panel__title {
    margin: 0 0 16px;
    font-size: 28px;
    line-height: 1.15;
}

.note-panel__list {
    margin: 0;
    padding-left: 22px;
    font-size: 18px;
    line-height: 1.75;
}

.note-panel__list li + li {
    margin-top: 8px;
}

.cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 30px 32px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(31, 26, 23, 0.10);
    box-shadow: 0 12px 30px rgba(31, 26, 23, 0.05);
}

.cta-band__content {
    max-width: 720px;
}

.cta-band__eyebrow {
    margin: 0 0 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #7b5c43;
    font-weight: 700;
}

.cta-band__title {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.08;
}

.cta-band__text {
    margin: 0;
    font-size: 18px;
    line-height: 1.7;
}

.cta-band__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: flex-end;
}

@media (max-width: 1100px) {
    .home-project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-full-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-card-grid--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-card-grid--three,
    .editorial-split,
    .cta-band,
    .home-trust-support {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .cta-band__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .page-masthead {
        padding: 42px 0 12px;
    }

    .home-project-grid,
    .home-full-map,
    .section-card-grid--four,
    .section-card-grid--three {
        grid-template-columns: 1fr;
    }

    .home-project-card {
        min-height: 0;
    }

    .home-project-card__title {
        font-size: 26px;
    }

    .section-card__title,
    .note-panel__title {
        font-size: 24px;
    }

    .section-card__text,
    .cta-band__text,
    .note-panel__list {
        font-size: 17px;
    }

    .quote-panel__text {
        font-size: 20px;
    }

    .cta-band {
        padding: 24px;
    }

    .cta-band__title {
        font-size: 28px;
    }

    .cta-band__actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===== CTA center fix ===== */

.cta-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.cta-band__content {
    max-width: 760px;
    width: 100%;
    text-align: center;
}

.cta-band__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    width: 100%;
    min-width: 0;
}

.cta-band__actions .button {
    width: auto;
    min-width: 180px;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .cta-band__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-band__actions .button {
        width: 100%;
        min-width: 0;
    }
}

/* ===== UI Sprint 3: library + chapter polish ===== */

.library-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 220px;
    gap: 28px;
    align-items: end;
    margin-bottom: 42px;
}

.library-stat {
    padding: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(31, 26, 23, 0.10);
    box-shadow: 0 12px 30px rgba(31, 26, 23, 0.05);
    text-align: center;
}

.library-stat__label {
    margin: 0 0 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #7b5c43;
    font-weight: 700;
}

.library-stat__value {
    margin: 0;
    font-size: 54px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0;
}

.chapters-grid--enhanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.chapter-card--enhanced {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(31, 26, 23, 0.10);
    box-shadow: 0 14px 36px rgba(31, 26, 23, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.chapter-card--enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 46px rgba(31, 26, 23, 0.09);
    border-color: rgba(31, 26, 23, 0.16);
}

.chapter-card--enhanced .chapter-card__image {
    aspect-ratio: 16 / 9;
}

.chapter-card--enhanced .chapter-card__body {
    padding: 24px 26px 26px;
}

.chapter-card--enhanced .chapter-card__title {
    font-size: 34px;
    line-height: 1.08;
    letter-spacing: 0;
}

.chapter-card__footer {
    margin-top: auto;
    padding-top: 8px;
}

.chapter-card__cta {
    color: #1f1a17;
    text-decoration: none;
    font-weight: 700;
}

.chapter-card__cta:hover {
    opacity: 0.8;
}

.empty-state--soft {
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 30px rgba(31, 26, 23, 0.05);
}

.chapter-cover--elevated {
    border: 1px solid rgba(31, 26, 23, 0.10);
    box-shadow: 0 18px 50px rgba(31, 26, 23, 0.08);
}

.section--chapter-body {
    padding-top: 20px;
}

.chapter-single--enhanced {
    max-width: 880px;
    padding: 34px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(31, 26, 23, 0.08);
    box-shadow: 0 14px 36px rgba(31, 26, 23, 0.05);
}

.chapter-single--enhanced .chapter-single__content {
    font-size: 22px;
    line-height: 1.85;
}

.chapter-single--enhanced .chapter-single__content p {
    margin: 0 0 24px;
}

.chapter-single--enhanced .chapter-single__back {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid rgba(31, 26, 23, 0.08);
}

@media (max-width: 991px) {
    .library-overview,
    .chapters-grid--enhanced {
        grid-template-columns: 1fr;
    }

    .library-overview__side {
        max-width: 240px;
    }
}

@media (max-width: 767px) {
    .library-stat__value {
        font-size: 42px;
    }

    .chapter-card--enhanced .chapter-card__title {
        font-size: 28px;
    }

    .chapter-single--enhanced {
        padding: 24px;
    }

    .chapter-single--enhanced .chapter-single__content {
        font-size: 18px;
    }
}

/* ===== Visual Layer V1: backgrounds + ornaments ===== */

:root {
    --mh-hero-art: url("/wp-content/themes/mahabharata-theme/assets/images/hero-main.webp");
    --mh-page-masthead-texture: url("/wp-content/themes/mahabharata-theme/assets/images/page-masthead-texture.webp");
    --mh-soft-paper-texture: url("/wp-content/themes/mahabharata-theme/assets/images/soft-paper-texture.webp");
    --mh-default-cover: url("/wp-content/themes/mahabharata-theme/assets/images/chapter-cover-default.webp");

    --mh-ornament-lotus: url("/wp-content/themes/mahabharata-theme/assets/icons/ornament-lotus-gold.svg");
    --mh-ornament-mandala: url("/wp-content/themes/mahabharata-theme/assets/icons/ornament-mandala-gold.svg");
    --mh-icon-scroll: url("/wp-content/themes/mahabharata-theme/assets/icons/icon-scroll-gold.svg");
    --mh-icon-flame: url("/wp-content/themes/mahabharata-theme/assets/icons/icon-flame-gold.svg");
    --mh-icon-wheel: url("/wp-content/themes/mahabharata-theme/assets/icons/icon-wheel-gold.svg");
    --mh-icon-support: url("/wp-content/themes/mahabharata-theme/assets/icons/icon-support-gold.svg");
    --mh-icon-lotus: url("/wp-content/themes/mahabharata-theme/assets/icons/lotus_fon.svg");
}


/* ---------- Внутренние hero-блоки ---------- */

.page-masthead {
    position: relative;
    overflow: hidden;
}

.page-masthead::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--mh-page-masthead-texture);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
}

.page-masthead__inner {
    position: relative;
    z-index: 1;
}

/* ---------- Мягкая текстура секций ---------- */

.section--soft,
.section--accent {
    position: relative;
    overflow: hidden;
}

.section--soft::before,
.section--accent::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--mh-soft-paper-texture);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    pointer-events: none;
}

.section--soft > .container,
.section--accent > .container {
    position: relative;
    z-index: 1;
}

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

/* ---------- Точечные орнаменты только для нужных блоков ---------- */

.home-path-card,
.home-value,
.home-deep-card {
    position: relative;
    overflow: hidden;
}

.home-path-card::after,
.home-value::after,
.home-deep-card::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 178px;
    height: 178px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: translate(-50%, -50%);
    opacity: 0.18;
    pointer-events: none;
}

.home-path-card--mandala::after {
    background-image: var(--mh-ornament-mandala);
}

.home-path-card--lotus::after {
    background-image: var(--mh-ornament-lotus);
}

.home-path-card--scroll::after {
    background-image: var(--mh-icon-scroll);
}

.home-value--flame::after {
    background-image: var(--mh-icon-flame);
}

.home-value--lotus::after {
    background-image: var(--mh-ornament-lotus);
}

.home-value--support::after {
    background-image: var(--mh-icon-support);
}

.home-deep-card--mandala::after {
    background-image: var(--mh-ornament-mandala);
    opacity: 0.10;
}

.home-deep-card--support::after {
    background-image: var(--mh-icon-support);
    opacity: 0.10;
}

.home-path-card::after {
    width: 186px;
    height: 186px;
    opacity: 0.18;
}

.home-path-card > * {
    position: relative;
    z-index: 1;
}

.section-card:nth-child(even)::after,
.feature-item--soft:nth-child(even)::after,
.chapter-card--enhanced:nth-child(even)::after {
    background-image: var(--mh-ornament-mandala);
}

/* ---------- Иконки для смысловых блоков ---------- */

.feature-item__title,
.section-card__title {
    position: relative;
    z-index: 1;
}

.feature-item__text,
.section-card__text {
    position: relative;
    z-index: 1;
}

/* ---------- Placeholder для обложки главы ---------- */

.chapter-card__image--placeholder {
    background-image:
        linear-gradient(135deg, rgba(15, 20, 26, 0.18), rgba(30, 42, 68, 0.12)),
        var(--mh-default-cover);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #f5efe6;
}

/* ---------- Обложка одной главы ---------- */

.chapter-cover--elevated {
    background: #0f141a;
}

.chapter-cover--elevated img {
    display: block;
}

/* ---------- Чуть более музейный ритм ---------- */

.hero--elevated .hero-title {
    text-wrap: balance;
}

.page-masthead__title,
.section-title,
.chapter-card__title,
.chapter-mini__title {
    text-wrap: balance;
    overflow-wrap: break-word;
}

@media (max-width: 991px) {
   

    .info-card::after,
    .section-card::after,
    .feature-item--soft::after,
    .quote-panel::after,
    .note-panel::after,
    .chapter-card--enhanced::after,
    .chapter-single--enhanced::after,
    .library-stat::after {
        width: 60px;
        height: 60px;
    }
}

/* ===== Visual Layer V2: museum-grade home polish ===== */

:root {
    --mh-ink: #171311;
    --mh-ink-soft: #342b25;
    --mh-paper: #f6efe4;
    --mh-paper-warm: #eadfce;
    --mh-gold: #d4af37;
    --mh-gold-soft: rgba(212, 175, 55, 0.24);
    --mh-burgundy: #5b1f2d;
    --mh-verdigris: #2f6057;
    --mh-shadow-soft: 0 18px 50px rgba(31, 26, 23, 0.08);
    --mh-shadow-deep: 0 30px 90px rgba(0, 0, 0, 0.28);
}

body {
    background:
        linear-gradient(180deg, rgba(246, 239, 228, 0.88), rgba(241, 230, 214, 0.94)),
        radial-gradient(circle at 12% 0%, rgba(91, 31, 45, 0.12), transparent 28%),
        radial-gradient(circle at 86% 14%, rgba(47, 96, 87, 0.11), transparent 30%),
        var(--mh-soft-paper-texture);
    background-size: auto, auto, auto, 760px auto;
    color: var(--mh-ink);
}

.site-header {
    background:
        linear-gradient(90deg, rgba(23, 19, 17, 0.96), rgba(34, 24, 22, 0.88)),
        rgba(23, 19, 17, 0.92);
    border-bottom: 1px solid rgba(212, 175, 55, 0.18);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
}

.site-brand {
    color: #fff8ea;
    font-weight: 600;
}

.site-menu a,
.site-header__cta {
    color: rgba(255, 248, 234, 0.88);
}

.site-header__cta {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid rgba(212, 175, 55, 0.26);
    border-radius: 999px;
    background: rgba(255, 248, 234, 0.05);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.site-header__cta:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.42);
    color: #fff8ea;
}

.site-menu a:hover,
.site-menu .current-menu-item > a,
.site-menu .current_page_item > a,
.site-menu .current-menu-ancestor > a {
    background: rgba(212, 175, 55, 0.12);
    color: #fff8ea;
}

.site-header__toggle {
    display: none;
}

@media (max-width: 767px) {
    .site-header {
        padding: 10px 0;
    }

    .site-header__row {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .site-brand {
        display: inline-flex;
        align-items: center;
        font-size: 24px;
        min-height: 44px;
        line-height: 1;
    }

    .site-header__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin-left: auto;
        border: 1px solid rgba(212, 175, 55, 0.24);
        border-radius: 999px;
        background: rgba(255, 248, 234, 0.06);
        color: #fff8ea;
        cursor: pointer;
    }

    .site-header__toggle-line,
    .site-header__toggle-line::before,
    .site-header__toggle-line::after {
        display: block;
        width: 19px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
    }

    .site-header__toggle-line {
        position: relative;
    }

    .site-header__toggle-line::before,
    .site-header__toggle-line::after {
        content: "";
        position: absolute;
        left: 0;
    }

    .site-header__toggle-line::before {
        top: -6px;
    }

    .site-header__toggle-line::after {
        top: 6px;
    }

    .site-header.is-open .site-header__toggle-line {
        background: transparent;
    }

    .site-header.is-open .site-header__toggle-line::before {
        transform: translateY(6px) rotate(45deg);
    }

    .site-header.is-open .site-header__toggle-line::after {
        transform: translateY(-6px) rotate(-45deg);
    }

    .site-nav {
        display: none;
        order: 3;
        width: 100%;
        margin-left: 0;
    }

    .site-menu {
        width: 100%;
        flex-direction: column;
        gap: 6px;
        padding: 10px 0 0;
    }

    .site-menu a,
    .site-header__cta {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
        min-height: 48px;
    }

    .site-header__cta {
        display: none;
        order: 4;
        margin-top: 4px;
    }

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

    .site-header.is-open .site-header__cta {
        display: inline-flex;
    }
}

/* ===== Primary site navigation ===== */

.site-header__row {
    flex-wrap: nowrap;
}

.site-brand {
    flex: 0 0 auto;
    white-space: nowrap;
}

.site-header__quick-listen {
    display: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-left: auto;
}

.site-menu li {
    list-style: none;
}

.site-menu--primary {
    gap: 4px;
}

.site-menu--primary a,
.site-menu--more a,
.site-more__toggle {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    border: 0;
    border-radius: 999px;
    color: rgba(255, 248, 234, 0.88);
    background: transparent;
    text-decoration: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.site-menu--primary a,
.site-more__toggle {
    padding: 0 12px;
}

.site-menu--primary a:hover,
.site-menu--primary .is-active > a,
.site-menu--more a:hover,
.site-menu--more .is-active > a,
.site-more.is-active > .site-more__toggle,
.site-more.is-open > .site-more__toggle,
.site-more__toggle:hover {
    background: rgba(212, 175, 55, 0.13);
    color: #fff8ea;
}

.site-more {
    position: relative;
    flex: 0 0 auto;
}

.site-more::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    min-width: 86px;
    height: 14px;
}

.site-more__panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: min(560px, calc(100vw - 40px));
    padding: 18px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(36, 28, 25, 0.98), rgba(20, 17, 15, 0.98));
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.34);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.site-more:hover .site-more__panel,
.site-more:focus-within .site-more__panel,
.site-more.is-open .site-more__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.site-more__label {
    margin: 0 0 8px;
    color: rgba(212, 175, 55, 0.78);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.site-menu--more {
    flex-direction: column;
    gap: 4px;
}

.site-menu--more a {
    width: 100%;
    justify-content: flex-start;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    color: rgba(255, 248, 234, 0.82);
    font-size: 14px;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.site-header__cta--support {
    border-color: rgba(212, 175, 55, 0.44);
    background: rgba(212, 175, 55, 0.12);
    color: #fff8ea;
}

.site-header__cta--account {
    color: rgba(255, 248, 234, 0.82);
}

@media (max-width: 1180px) {
    .site-header__row {
        gap: 12px;
    }

    .site-menu--primary a,
    .site-more__toggle {
        padding: 0 9px;
        font-size: 14px;
    }

    .site-header__cta {
        padding: 0 12px;
    }
}

@media (max-width: 1100px) {
    .site-header {
        padding: 10px 0;
    }

    .site-header__row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .site-brand {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        font-size: 24px;
        line-height: 1;
    }

    .site-header__quick-listen {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        margin-left: auto;
        padding: 0 14px;
        border: 1px solid rgba(212, 175, 55, 0.34);
        border-radius: 999px;
        background: rgba(212, 175, 55, 0.12);
        color: #fff8ea;
        text-decoration: none;
        font-size: 15px;
        font-weight: 700;
    }

    .site-header__toggle {
        display: inline-flex;
        margin-left: 0;
    }

    .site-nav {
        display: none;
        order: 5;
        width: 100%;
        margin-left: 0;
        padding: 14px;
        border: 1px solid rgba(212, 175, 55, 0.18);
        border-radius: 18px;
        background: rgba(255, 248, 234, 0.055);
    }

    .site-header.is-open .site-nav {
        display: grid;
        gap: 14px;
    }

    .site-menu--primary {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        padding: 0;
    }

    .site-menu--primary a,
    .site-menu--more a {
        justify-content: center;
        min-height: 48px;
        border: 1px solid rgba(212, 175, 55, 0.16);
        background: rgba(255, 248, 234, 0.045);
        border-radius: 12px;
        white-space: normal;
        text-align: center;
    }

    .site-more__toggle {
        display: none;
    }

    .site-more__panel {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        width: 100%;
        padding: 14px;
        border-radius: 14px;
        background: rgba(10, 8, 7, 0.22);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .site-menu--more {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        padding: 0;
    }

    .site-header__actions {
        display: none;
        order: 6;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .site-header.is-open .site-header__actions {
        display: grid;
    }

    .site-header__cta {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        margin-top: 0;
    }
}

@media (max-width: 560px) {
    .site-brand {
        font-size: 21px;
    }

    .site-header__quick-listen {
        min-height: 40px;
        padding: 0 12px;
        font-size: 14px;
    }

    .site-menu--more {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .site-header__quick-listen {
        display: none;
    }

    .site-header__toggle {
        margin-left: auto;
    }
}

.hero--elevated {
    min-height: min(760px, calc(100vh - 76px));
    display: flex;
    align-items: center;
    padding: 104px 0 82px;
    background: #080b10;
}

.hero--elevated::before {
    background-image:
        linear-gradient(90deg, rgba(6, 8, 12, 0.88) 0%, rgba(8, 10, 14, 0.70) 35%, rgba(8, 10, 14, 0.24) 64%, rgba(8, 10, 14, 0.58) 100%),
        linear-gradient(180deg, rgba(6, 8, 12, 0.18) 0%, rgba(6, 8, 12, 0.72) 100%),
        var(--mh-hero-art);
    background-position: center center;
}

.hero--elevated::after {
    background-image:
        linear-gradient(180deg, transparent 0%, rgba(246, 239, 228, 0.04) 70%, rgba(246, 239, 228, 0.16) 100%),
        radial-gradient(circle at 64% 24%, rgba(212, 175, 55, 0.16), transparent 22%),
        radial-gradient(circle at 15% 12%, rgba(91, 31, 45, 0.22), transparent 25%);
}

.home-hero {
    align-items: center;
}

.home-hero__content {
    position: relative;
    padding-left: 28px;
}

.home-hero__content::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 4px;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(212, 175, 55, 0.78), transparent);
}

.hero-kicker,
.section-kicker,
.hero-panel__kicker,
.hero-panel__meta,
.chapter-mini__label,
.chapter-card__kicker,
.cta-band__eyebrow,
.quote-panel__kicker {
    letter-spacing: 0;
}

.hero--elevated .hero-kicker {
    color: rgba(239, 204, 101, 0.92);
}

.hero-title--xl {
    max-width: 15ch;
    font-weight: 500;
    text-shadow: 0 16px 52px rgba(0, 0, 0, 0.46);
}

.hero-text--wide {
    color: rgba(255, 248, 234, 0.84);
    text-shadow: 0 12px 36px rgba(0, 0, 0, 0.42);
}

.hero--elevated .button--primary,
.button--primary {
    border-color: rgba(212, 175, 55, 0.76);
    background:
        linear-gradient(180deg, #e3c767 0%, #c79b27 100%);
    color: #171311;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.button--primary:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.button--ghost {
    border-color: rgba(23, 19, 17, 0.20);
    background: rgba(255, 255, 255, 0.20);
    color: var(--mh-ink);
}

.hero--elevated .button--ghost {
    border-color: rgba(255, 248, 234, 0.42);
    background: rgba(255, 248, 234, 0.05);
    color: #fff8ea;
}

.button--ghost:hover,
.hero--elevated .button--ghost:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.quick-link {
    border-color: rgba(255, 248, 234, 0.14);
    background: rgba(255, 248, 234, 0.07);
    color: rgba(255, 248, 234, 0.86);
    backdrop-filter: blur(8px);
}

.hero-panel {
    border-color: rgba(212, 175, 55, 0.18);
    background:
        linear-gradient(180deg, rgba(11, 14, 18, 0.68), rgba(11, 14, 18, 0.42)),
        rgba(23, 19, 17, 0.28);
    box-shadow: var(--mh-shadow-deep);
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 248, 234, 0.08);
    border-radius: 16px;
    pointer-events: none;
}

.chapter-mini__image-thumb {
    border-color: rgba(212, 175, 55, 0.18);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.section {
    position: relative;
}

.section-heading--narrow {
    position: relative;
}

.section-heading--narrow::after {
    content: "";
    display: block;
    width: 86px;
    height: 1px;
    margin-top: 24px;
    background: linear-gradient(90deg, var(--mh-gold), transparent);
}

.section-title {
    color: var(--mh-ink);
    font-weight: 500;
}

.section-text,
.section-card__text,
.cta-band__text,
.note-panel__list,
.quote-panel__text {
    color: rgba(23, 19, 17, 0.76);
}

.section-card,
.quote-panel,
.note-panel,
.chapter-card--enhanced,
.library-stat,
.chapter-single--enhanced {
    border-color: rgba(91, 31, 45, 0.10);
    background:
        linear-gradient(180deg, rgba(255, 252, 246, 0.86), rgba(246, 239, 228, 0.74));
    box-shadow: var(--mh-shadow-soft);
    backdrop-filter: blur(10px);
}

.section-card,
.quote-panel,
.note-panel,
.cta-band,
.chapter-card--enhanced {
    position: relative;
}

.section-card::before,
.quote-panel::before,
.note-panel::before,
.cta-band::before,
.chapter-card--enhanced::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.section-card:hover,
.chapter-card--enhanced:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 64px rgba(31, 26, 23, 0.12);
}

.section-card__title,
.note-panel__title,
.chapter-card__title,
.cta-band__title {
    color: var(--mh-ink);
    font-weight: 500;
}

.section-card > *,
.quote-panel > *,
.note-panel > *,
.cta-band > *,
.chapter-card--enhanced > * {
    position: relative;
    z-index: 1;
}

.home-entry-grid .section-card {
    padding-top: 28px;
}

.home-entry-grid .section-card::before {
    border-color: rgba(212, 175, 55, 0.18);
}

.info-card__link,
.chapter-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mh-burgundy);
    font-weight: 600;
}

.info-card__link::after,
.chapter-card__cta::after {
    content: "→";
    color: var(--mh-gold);
}

.chapter-card--enhanced {
    overflow: hidden;
}

.chapter-card--enhanced .chapter-card__image {
    position: relative;
}

.chapter-card--enhanced .chapter-card__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 58%, rgba(23, 19, 17, 0.28) 100%),
        radial-gradient(circle at 70% 18%, rgba(212, 175, 55, 0.18), transparent 34%);
    pointer-events: none;
}

.chapter-card--enhanced .chapter-card__image img {
    transition: transform 0.7s ease;
}

.chapter-card--enhanced:hover .chapter-card__image img {
    transform: scale(1.035);
}

.cta-band {
    background:
        linear-gradient(135deg, rgba(255, 252, 246, 0.88), rgba(235, 223, 204, 0.78)),
        var(--mh-soft-paper-texture);
    border-color: rgba(212, 175, 55, 0.16);
    box-shadow: var(--mh-shadow-soft);
}

.section--accent .cta-band {
    background:
        linear-gradient(135deg, rgba(23, 19, 17, 0.94), rgba(51, 28, 32, 0.88)),
        var(--mh-soft-paper-texture);
    border-color: rgba(212, 175, 55, 0.22);
    color: #fff8ea;
}

.section--accent .cta-band__title,
.section--accent .cta-band__text {
    color: #fff8ea;
}

.section--accent .cta-band__text {
    opacity: 0.82;
}

.section--accent .button--ghost {
    border-color: rgba(255, 248, 234, 0.32);
    background: rgba(255, 248, 234, 0.05);
    color: #fff8ea;
}

.home-trust-support__trust {
    border-left: 3px solid rgba(47, 96, 87, 0.38);
}

.home-trust-support__support {
    border-color: rgba(91, 31, 45, 0.14);
}

.page-masthead::after,
.section--soft::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.30), transparent);
    pointer-events: none;
}

@media (max-width: 1100px) {
    .home-hero__content {
        padding-left: 22px;
    }

    .hero-title--xl {
        max-width: 14ch;
    }
}

@media (max-width: 767px) {
    .home-hero__content::before,
    .section-card::before,
    .quote-panel::before,
    .note-panel::before,
    .cta-band::before,
    .chapter-card--enhanced::before {
        display: none;
    }

    .hero--elevated {
        min-height: auto;
        padding: 56px 0 44px;
    }

    .home-hero__content {
        padding-left: 0;
    }

    .hero-title--xl {
        max-width: none;
        font-size: 40px;
    }

    .hero-text--wide {
        font-size: 17px;
    }

    .section-heading--narrow::after {
        margin-top: 18px;
    }

    .section-card,
    .quote-panel,
    .note-panel,
    .cta-band {
        box-shadow: 0 12px 34px rgba(31, 26, 23, 0.07);
    }
}

/* ===== Footer: museum closing section ===== */

.site-footer {
    position: relative;
    overflow: hidden;
    margin-top: 0;
    padding: 78px 0 30px;
    background:
        linear-gradient(135deg, rgba(12, 10, 9, 0.98), rgba(35, 22, 23, 0.94)),
        var(--mh-soft-paper-texture);
    color: #fff8ea;
    border-top: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 248, 234, 0.08);
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(212, 175, 55, 0.13), transparent 26%),
        radial-gradient(circle at 88% 8%, rgba(47, 96, 87, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(255, 248, 234, 0.03), transparent 42%);
    pointer-events: none;
}

.site-footer::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.62), transparent);
    pointer-events: none;
}

.site-footer .container {
    position: relative;
    z-index: 1;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(260px, 1.45fr) minmax(150px, 0.65fr) minmax(130px, 0.55fr) minmax(240px, 0.9fr);
    gap: 34px;
    align-items: start;
}

.site-footer__brand {
    max-width: 520px;
}

.site-footer__title {
    margin: 0 0 18px;
    color: #fff8ea;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 0.98;
    font-weight: 500;
    text-wrap: balance;
}

.site-footer__title::after {
    content: "";
    display: block;
    width: 92px;
    height: 1px;
    margin-top: 22px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.88), transparent);
}

.site-footer__lead,
.site-footer__meta {
    margin: 0;
    color: rgba(255, 248, 234, 0.72);
    font-size: 17px;
    line-height: 1.72;
    font-weight: 300;
}

.site-footer__meta--small {
    margin-bottom: 14px;
    color: rgba(255, 248, 234, 0.58);
    font-size: 14px;
    line-height: 1.55;
}

.site-footer__map {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px;
    margin-top: 48px;
    padding-top: 34px;
    border-top: 1px solid rgba(255, 248, 234, 0.10);
}

.site-footer__group {
    min-width: 0;
}

.site-footer__group-title {
    margin: 0 0 16px;
    color: rgba(212, 175, 55, 0.92);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.site-footer__links {
    display: grid;
    gap: 9px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__links a,
.site-footer__bottom-link {
    color: rgba(255, 248, 234, 0.82);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.site-footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    font-size: 16px;
    line-height: 1.35;
}

.site-footer__links a:hover,
.site-footer__bottom-link:hover {
    color: #fff8ea;
    transform: translateX(2px);
}

.site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 54px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 248, 234, 0.10);
}

.site-footer__text {
    margin: 0;
    color: rgba(255, 248, 234, 0.58);
    font-size: 14px;
}

.site-footer__bottom-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.site-footer__bottom-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid rgba(212, 175, 55, 0.32);
    background: rgba(255, 248, 234, 0.05);
    color: #fff8ea;
    font-size: 14px;
    font-weight: 600;
}

.site-footer__bottom-link::after {
    content: "→";
    margin-left: 8px;
    color: var(--mh-gold);
}

@media (max-width: 1100px) {
    .site-footer__inner {
        grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.8fr);
    }

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

@media (max-width: 767px) {
    .site-footer {
        padding: 54px 0 24px;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .site-footer__map {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-top: 34px;
    }

    .site-footer__title {
        font-size: 42px;
    }

    .site-footer__lead,
    .site-footer__meta {
        font-size: 16px;
    }

    .site-footer__links a {
        min-height: 40px;
    }

    .site-footer__bottom {
        flex-direction: column;
        align-items: stretch;
        margin-top: 36px;
    }

    .site-footer__bottom-link {
        justify-content: center;
    }

    .site-footer__bottom-links {
        justify-content: stretch;
    }
}

/* ===== Chapter page: soft navigation-safe gallery/layout ===== */

.mh-chapter-page .section--chapter-cover > .container {
    width: min(1180px, calc(100% - 40px));
}

.page-masthead--chapter .page-masthead__inner {
    max-width: none;
}

.page-masthead--chapter .page-masthead__title {
    max-width: none;
    text-wrap: normal;
    overflow-wrap: normal;
    word-break: normal;
}

.page-masthead--chapter .page-masthead__text {
    max-width: 760px;
}

.mh-chapter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
}

.mh-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(31, 26, 23, 0.05);
    border: 1px solid rgba(31, 26, 23, 0.08);
    color: #1f1a17;
    font-size: 14px;
}

.mh-chapter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

.mh-chapter-section-title {
    margin: 0 0 16px;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.08;
}

.mh-chapter-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.84fr);
    gap: 24px;
}

.mh-key-list,
.mh-inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mh-key-list .mh-chip {
    background: rgba(255, 255, 255, 0.82);
}

.mh-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.mh-visual-core-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.mh-visual-core-card {
    min-height: 100%;
}

.mh-arc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) repeat(2, minmax(0, 0.96fr));
    gap: 20px;
    align-items: start;
}

.mh-arc-panel {
    display: grid;
    gap: 18px;
}

.mh-arc-item + .mh-arc-item {
    padding-top: 18px;
    border-top: 1px solid rgba(31, 26, 23, 0.08);
}

.mh-material-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.mh-material-sections {
    display: grid;
    gap: 30px;
}

.mh-material-section {
    display: grid;
    gap: 14px;
}

.mh-material-section__title {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.mh-material-card,
.mh-gated-teaser {
    padding: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(31, 26, 23, 0.08);
    box-shadow: 0 12px 30px rgba(31, 26, 23, 0.05);
}

.mh-gated-teaser__badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    margin: 0 0 12px;
    border-radius: 999px;
    background: rgba(91, 31, 45, 0.10);
    color: #5b1f2d;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.mh-gated-teaser__title {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.14;
}

.mh-gated-teaser__text {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.65;
    color: #4f4a45;
}

.mh-gated-teaser__note {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.55;
    color: #7b5c43;
}

.mh-material-cover {
    margin: 0 0 28px;
}

.mh-material-cover img,
.mh-material-gallery__item img {
    display: block;
    width: 100%;
    height: auto;
}

.mh-material-player {
    margin: 0 0 28px;
}

.mh-material-player audio {
    width: 100%;
}

.mh-material-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 32px 0 0;
}

.mh-material-gallery__item {
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(31, 26, 23, 0.08);
}

.mh-chip--link {
    color: inherit;
    text-decoration: none;
}

.mh-chip--link:hover {
    background: rgba(123, 92, 67, 0.14);
    color: #1f1a17;
}

.mh-title-link {
    color: inherit;
    text-decoration: none;
}

.mh-title-link:hover {
    color: #7b5c43;
}

.mh-image-description {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(31, 26, 23, 0.08);
    background: rgba(255, 255, 255, 0.68);
}

.mh-image-description summary {
    cursor: pointer;
    color: #7b5c43;
    font-weight: 700;
}

.mh-image-description p {
    margin: 10px 0 0;
    color: #4a4540;
    font-size: 15px;
    line-height: 1.65;
    white-space: pre-line;
}

.mh-related-card,
.mh-nav-box {
    padding: 22px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(31, 26, 23, 0.08);
    box-shadow: 0 12px 30px rgba(31, 26, 23, 0.05);
}

.mh-related-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.mh-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(31, 26, 23, 0.08);
    border-color: rgba(31, 26, 23, 0.14);
}

.mh-related-card__kicker {
    margin: 0 0 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #7b5c43;
}

.mh-related-card__title {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.1;
}

.mh-related-card__text {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
}

.mh-nav-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.mh-chapter-media__video iframe,
.mh-chapter-media__video video {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
    border-radius: 18px;
}

.mh-chapter-media-card .wp-audio-shortcode,
.mh-chapter-media-card audio {
    width: 100%;
}

.mh-chapter-play-hero {
    display: flex;
    align-items: center;
    gap: 22px;
    width: 100%;
    min-height: 116px;
    padding: 26px 30px;
    border: 1px solid rgba(212, 175, 55, 0.24);
    background:
        linear-gradient(135deg, rgba(24, 30, 40, 0.98), rgba(16, 21, 29, 0.98));
    color: #f5efe6;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 20px 54px rgba(16, 21, 29, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mh-chapter-play-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 62px rgba(16, 21, 29, 0.26);
    border-color: rgba(212, 175, 55, 0.40);
}

.mh-chapter-play-hero.is-current-track {
    border-color: rgba(212, 175, 55, 0.42);
}

.mh-chapter-play-hero.is-playing {
    background:
        linear-gradient(135deg, rgba(30, 43, 58, 0.98), rgba(16, 28, 40, 0.98));
    border-color: rgba(212, 175, 55, 0.54);
    box-shadow: 0 22px 64px rgba(18, 32, 56, 0.28);
}

.mh-chapter-play-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.18);
    border: 1px solid rgba(212, 175, 55, 0.24);
    color: #f5efe6;
    font-size: 28px;
    line-height: 1;
    flex: 0 0 auto;
}

.mh-chapter-play-hero__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.mh-chapter-play-hero__title {
    font-size: clamp(28px, 3.2vw, 42px);
    line-height: 1.02;
    font-weight: 600;
    color: #fff8ea;
}

.mh-chapter-play-hero__subtitle {
    font-size: 17px;
    line-height: 1.45;
    color: rgba(245, 239, 230, 0.72);
}

.mh-support-cta .cta-band__actions .button,
.mh-telegram-cta .cta-band__actions .button {
    min-width: 210px;
}

.mh-chapter-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    min-width: 0;
}

.mh-chapter-cover-stage {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 960px;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
}

.mh-chapter-cover-card,
.mh-chapter-side-card,
.mh-chapter-inline-card {
    padding: 24px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 26, 23, 0.08);
    box-shadow: 0 12px 30px rgba(31, 26, 23, 0.05);
}

.mh-chapter-cover-card {
    position: relative;
    overflow: visible;
    width: 100%;
    min-height: 280px;
    padding: 0;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mh-chapter-cover-card img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 58vh;
    object-fit: contain;
    object-position: center;
    cursor: zoom-in;
}

.mh-chapter-cover-card--interactive img {
    transition: opacity 0.22s ease;
}

.mh-chapter-cover-placeholder {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(15, 20, 26, 0.18), rgba(30, 42, 68, 0.12)),
        var(--mh-default-cover);
    background-size: cover;
    background-position: center;
    color: #f5efe6;
    font-size: 20px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mh-chapter-cover-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(15, 20, 26, 0.58);
    color: #f5efe6;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.mh-chapter-cover-nav:hover {
    background: rgba(15, 20, 26, 0.78);
    border-color: rgba(255, 255, 255, 0.32);
}

.mh-chapter-cover-nav--prev {
    left: 18px;
}

.mh-chapter-cover-nav--next {
    right: 18px;
}

.mh-chapter-cover-caption {
    font-size: 14px;
    color: rgba(31, 26, 23, 0.66);
    text-align: center;
}

.mh-chapter-side-card {
    order: 3;
    width: 100%;
    max-width: 1040px;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
}

.mh-chapter-gallery-shell {
    order: 2;
    grid-column: 1 / -1;
    width: 100%;
    max-width: 960px;
    min-width: 0;
    margin: 0 auto;
    padding: 18px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(31, 26, 23, 0.08);
    box-shadow: 0 12px 30px rgba(31, 26, 23, 0.05);
}

.mh-chapter-gallery-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.mh-chapter-gallery-label {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #7b5c43;
}

.mh-chapter-gallery-hint {
    margin: 0;
    font-size: 14px;
    color: rgba(31, 26, 23, 0.66);
}

.mh-chapter-gallery {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 26, 23, 0.24) transparent;
}

.mh-chapter-gallery::-webkit-scrollbar {
    height: 8px;
}

.mh-chapter-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.mh-chapter-gallery::-webkit-scrollbar-thumb {
    background: rgba(31, 26, 23, 0.22);
    border-radius: 999px;
}

.mh-chapter-gallery-card {
    flex: 0 0 96px;
    padding: 0;
    border: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.mh-chapter-gallery-card:hover {
    transform: translateY(-2px);
}

.mh-chapter-gallery-card.is-active {
    border-color: #7b5c43;
}

.mh-chapter-gallery-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(31, 26, 23, 0.08);
}

.mh-gallery-overlay[hidden] {
    display: none;
}

.mh-gallery-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(8, 12, 18, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.mh-gallery-overlay__stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mh-gallery-overlay__image {
    display: block;
    max-width: min(100%, 1080px);
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
    cursor: pointer;
}

.mh-gallery-overlay__close,
.mh-gallery-overlay__prev,
.mh-gallery-overlay__next {
    position: absolute;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f5efe6;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.mh-gallery-overlay__close {
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    font-size: 28px;
}

.mh-gallery-overlay__prev,
.mh-gallery-overlay__next {
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    font-size: 34px;
}

.mh-gallery-overlay__prev {
    left: 18px;
}

.mh-gallery-overlay__next {
    right: 18px;
}

.mh-gallery-overlay__caption {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    color: rgba(245, 239, 230, 0.78);
    font-size: 14px;
}

@media (max-width: 1100px) {
    .mh-arc-layout,
    .mh-material-grid,
    .mh-material-gallery,
    .mh-visual-core-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .page-masthead--chapter .page-masthead__title,
    .page-masthead--chapter .page-masthead__text {
        max-width: none;
    }

    .mh-chapter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .mh-chapter-actions .button {
        width: 100%;
    }

    .mh-chapter-hero-grid,
    .mh-chapter-columns,
    .mh-arc-layout,
    .mh-material-grid,
    .mh-material-gallery,
    .mh-visual-core-grid,
    .mh-related-grid,
    .mh-nav-row {
        grid-template-columns: 1fr;
    }

    .mh-chapter-play-hero {
        min-height: 92px;
        padding: 18px;
        gap: 14px;
    }

    .mh-chapter-play-hero__icon {
        width: 50px;
        height: 50px;
        font-size: 21px;
    }

    .mh-chapter-play-hero__title {
        font-size: 24px;
    }

    .mh-chapter-play-hero__subtitle {
        font-size: 15px;
    }

    .mh-chapter-cover-card {
        min-height: 260px;
        max-height: 46vh;
    }

    .mh-chapter-gallery-shell {
        padding: 14px;
    }

    .mh-chapter-gallery-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .mh-chapter-gallery-card {
        flex-basis: 72px;
    }

    .mh-chapter-cover-nav,
    .mh-gallery-overlay__prev,
    .mh-gallery-overlay__next {
        width: 44px;
        height: 44px;
        font-size: 28px;
    }

    .mh-chapter-cover-nav--prev,
    .mh-gallery-overlay__prev {
        left: 10px;
    }

    .mh-chapter-cover-nav--next,
    .mh-gallery-overlay__next {
        right: 10px;
    }

    .mh-gallery-overlay {
        padding: 14px;
    }

    .mh-chip {
        min-height: 40px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .mh-chip--link {
        min-height: 44px;
    }

    .mh-image-description {
        padding: 0 14px;
    }

    .mh-image-description summary {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .mh-image-description p {
        padding-bottom: 14px;
    }
}

/* ===== Chapters catalog: soft navigation-safe filters/layout ===== */

.chapter-hub-intro {
    max-width: 860px;
}

.chapter-route-grid,
.chapter-book-grid {
    display: grid;
    gap: 24px;
}

.chapter-route-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.chapter-route-card,
.chapter-book-card,
.chapter-support-card,
.chapter-source-card {
    position: relative;
    overflow: hidden;
}

.chapter-route-card::after,
.chapter-book-card::after,
.chapter-source-card::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -18px;
    width: 120px;
    height: 120px;
    transform: translateY(-50%);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.12;
    pointer-events: none;
}

.chapter-route-card--start::after,
.chapter-book-card--origin::after {
    background-image: var(--mh-ornament-lotus);
}

.chapter-route-card--key::after,
.chapter-book-card--power::after {
    background-image: var(--mh-ornament-mandala);
}

.chapter-route-card--themes::after,
.chapter-book-card--forest::after {
    background-image: var(--mh-icon-scroll);
}

.chapter-route-card--new::after,
.chapter-book-card--virata::after,
.chapter-source-card::after {
    background-image: var(--mh-icon-wheel);
}

.chapter-route-card > *,
.chapter-book-card > *,
.chapter-source-card > * {
    position: relative;
    z-index: 1;
}

.chapter-route-card .button,
.chapter-book-card .button,
.chapter-support-card .button {
    margin-top: 18px;
}

.chapter-filter-shell {
    padding: 28px;
    background:
        linear-gradient(180deg, rgba(255, 252, 246, 0.86), rgba(246, 239, 228, 0.74));
    border: 1px solid rgba(91, 31, 45, 0.10);
    box-shadow: var(--mh-shadow-soft);
    backdrop-filter: blur(10px);
}

.chapter-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.chapter-filter-field {
    display: grid;
    gap: 8px;
}

.chapter-filter-label {
    margin: 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #7b5c43;
    font-weight: 700;
}

.chapter-filter-input,
.chapter-filter-select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(31, 26, 23, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: #1f1a17;
    font: inherit;
    box-sizing: border-box;
}

.chapter-filter-hint {
    margin: 16px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: #5f666d;
}

.chapter-catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 28px;
}

.chapter-catalog-meta {
    display: grid;
    gap: 6px;
}

.chapter-catalog-count {
    margin: 0;
    font-size: 15px;
    color: #5f666d;
}

.chapter-view-toggle {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chapter-view-button {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(31, 26, 23, 0.12);
    background: rgba(255, 255, 255, 0.85);
    color: #1f1a17;
    font: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.chapter-view-button:hover,
.chapter-view-button.is-active {
    background: rgba(31, 26, 23, 0.08);
    border-color: rgba(31, 26, 23, 0.16);
    transform: translateY(-1px);
}

.chapter-catalog-grid.is-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.chapter-catalog-grid.is-list .chapter-card--enhanced {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: stretch;
}

.chapter-catalog-grid.is-list .chapter-card__image {
    height: 100%;
    aspect-ratio: auto;
}

.chapter-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.chapter-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(31, 26, 23, 0.06);
    color: #5f666d;
    font-size: 13px;
    line-height: 1;
}

.chapter-tag--link {
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.chapter-tag--link:hover {
    background: rgba(123, 92, 67, 0.14);
    color: #1f1a17;
    transform: translateY(-1px);
}

.chapter-theme-chip--link {
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.chapter-theme-chip--link:hover {
    background: rgba(123, 92, 67, 0.12);
    border-color: rgba(123, 92, 67, 0.24);
    transform: translateY(-1px);
}

.chapter-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.chapter-card__actions .button {
    min-height: 42px;
}

.chapter-catalog-empty {
    margin: 22px 0 0;
    color: #5f666d;
    font-size: 16px;
    display: none;
}

.chapter-catalog-empty.is-visible {
    display: block;
}

.chapter-catalog-anchor {
    scroll-margin-top: 100px;
}

@media (max-width: 1100px) {
    .chapter-route-grid,
    .chapter-book-grid,
    .chapter-featured-panel {
        grid-template-columns: 1fr 1fr;
    }

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

    .chapter-catalog-grid.is-list .chapter-card--enhanced {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .chapter-route-grid,
    .chapter-book-grid,
    .chapter-featured-panel,
    .chapter-filter-grid {
        grid-template-columns: 1fr;
    }

    .chapter-filter-shell,
    .chapter-featured-copy,
    .chapter-featured-card,
    .chapter-source-card {
        padding: 24px;
    }

    .chapter-featured-actions,
    .chapter-card__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .chapter-card__actions .button,
    .chapter-featured-actions .button,
    .chapter-route-card .button,
    .chapter-book-card .button,
    .chapter-support-card .button {
        width: 100%;
    }

    .chapter-view-toggle {
        width: 100%;
    }

    .chapter-view-button {
        flex: 1 1 0;
    }
}

/* ===== Discovery pages: themes / figures / meaning lines ===== */

.discovery-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.46fr);
    gap: 34px;
    align-items: end;
    max-width: 1180px;
}

.discovery-hero__copy {
    max-width: 820px;
}

.discovery-hero__meta,
.mh-material-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.discovery-hero__meta {
    margin-top: 22px;
}

.discovery-hero-card,
.discovery-focus-card,
.mh-material-detail-side,
.mh-material-article {
    border: 1px solid rgba(31, 26, 23, 0.10);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 16px 40px rgba(31, 26, 23, 0.055);
}

.discovery-hero-card {
    padding: 24px;
}

.discovery-hero-card__eyebrow,
.discovery-focus-card__eyebrow {
    margin: 0 0 10px;
    color: #7b5c43;
    font-size: 13px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0;
}

.discovery-hero-card__text {
    margin: 0 0 20px;
    color: #4f4a45;
    font-size: 18px;
    line-height: 1.62;
}

.discovery-focus-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.discovery-focus-card {
    padding: 24px;
}

.discovery-focus-card__title {
    margin: 0;
    font-size: 27px;
    line-height: 1.1;
}

.discovery-focus-card__text {
    margin: 14px 0 0;
    color: #6f6258;
    font-size: 17px;
    line-height: 1.58;
}

.discovery-note-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.discovery-chapter-grid {
    align-items: stretch;
}

.discovery-card .chapter-card__actions .button {
    width: 100%;
}

.discovery-window-form {
    display: flex;
    align-items: center;
    width: fit-content;
    gap: 12px;
    margin: 0 0 22px;
    padding: 12px 14px;
    border: 1px solid rgba(31, 26, 23, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.discovery-window-form .chapter-filter-select {
    min-width: 132px;
}

.discovery-window-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 8px;
    margin: 0 0 28px;
}

.discovery-window-nav__link,
.discovery-window-nav__gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 10px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.discovery-window-nav__link {
    border: 1px solid rgba(123, 92, 67, 0.16);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.62);
    color: #7b5c43;
    text-decoration: none;
}

.discovery-window-nav__gap {
    color: rgba(123, 92, 67, 0.48);
}

.discovery-window-nav__link:hover,
.discovery-window-nav__link.is-active {
    background: rgba(31, 26, 23, 0.10);
    border-color: rgba(123, 92, 67, 0.24);
    color: #1f1a17;
}

@media (max-width: 1100px) {
    .discovery-hero__inner {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .discovery-focus-grid,
    .discovery-note-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .discovery-focus-grid,
    .discovery-note-grid {
        grid-template-columns: 1fr;
    }

    .discovery-window-form {
        display: flex;
        align-items: stretch;
        flex-direction: column;
    }

    .discovery-window-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ===== Material detail ===== */

.mh-material-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.36fr);
    gap: 26px;
    align-items: start;
}

.mh-material-detail-layout--gated {
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.42fr);
}

.mh-material-article {
    padding: 30px;
}

.mh-material-article__body {
    color: #302b27;
    font-size: 19px;
    line-height: 1.78;
}

.mh-material-article__body > *:first-child {
    margin-top: 0;
}

.mh-material-article__body > *:last-child {
    margin-bottom: 0;
}

.mh-material-cover--hero img {
    max-height: 560px;
    object-fit: contain;
    background: rgba(31, 26, 23, 0.04);
}

.mh-material-detail-side {
    position: sticky;
    top: 94px;
    padding: 24px;
}

.mh-material-detail-actions {
    margin-top: 20px;
}

.mh-material-detail-actions .button {
    width: 100%;
}

.mh-material-detail-layout--gated .mh-gated-teaser {
    min-height: 100%;
}

@media (max-width: 980px) {
    .mh-material-detail-layout,
    .mh-material-detail-layout--gated {
        grid-template-columns: 1fr;
    }

    .mh-material-detail-side {
        position: static;
    }
}

@media (max-width: 767px) {
    .mh-material-article,
    .mh-material-detail-side {
        padding: 20px;
    }

    .mh-material-article__body {
        font-size: 18px;
    }
}
