/* Shared mobile header and full-width editorial reading area. */
@media (max-width: 781px) {
    body:not(.home) .td-main-header { position: relative; }
    body:not(.home) .td-main-header .td-header-top .wp-block-columns {
        display: flex; flex-direction: column; align-items: stretch;
        width: 100%; max-width: none; min-height: 0;
        margin: 0 !important; padding: 14px 16px 16px; gap: 12px;
    }
    body:not(.home) .td-main-header .td-header-top .wp-block-column {
        flex-basis: auto !important; width: 100%; min-width: 0;
    }
    body:not(.home) .td-main-header .td-header-top .wp-block-column:first-child {
        padding-left: 48px;
    }
    body:not(.home) .td-main-header .td-header-top .wp-block-site-title {
        font-size: 23px; line-height: 1.25; text-align: left; margin: 0;
    }
    body:not(.home) .td-main-header .td-header-top .td-header-brand-subheadline {
        max-width: none; margin: 4px 0 0; font-size: 11px; line-height: 1.3;
        text-align: left; text-wrap: balance;
    }
    body:not(.home) .td-main-header .td-header-top .td-home-page-count {
        margin: 0 0 8px; font-size: 11.5px; line-height: 1.35; text-align: left;
    }
    body:not(.home) .td-main-header .td-header-top .wp-block-search__inside-wrapper { gap: 8px; }
    body:not(.home) .td-main-header .td-header-top .wp-block-search__input {
        height: 48px; padding: 0 16px !important; font-size: 14px;
    }
    body:not(.home) .td-main-header .td-header-top .wp-block-search__button {
        width: 48px; min-width: 48px; height: 48px; padding: 0;
    }
    body:not(.home) .td-main-header .td-header-menu {
        position: absolute; top: 0; left: 0; z-index: 30;
        display: block; width: 60px; min-height: 0; padding: 0;
        margin: 0 !important; background: transparent;
    }
    body:not(.home) .td-main-header .td-header-menu .wp-block-navigation {
        width: auto; max-width: none; margin: 0;
    }
    body:not(.home) .td-main-header .td-header-menu .wp-block-navigation__responsive-container-open {
        display: flex !important; align-items: center; justify-content: center;
        width: 44px; height: 44px; min-width: 44px; min-height: 44px;
        margin: 7px 0 0 8px; padding: 10px; border: 0;
        color: #fff; background: transparent; cursor: pointer;
    }
    body:not(.home) .td-main-header .td-header-menu .wp-block-navigation__responsive-container:not(.is-menu-open) {
        display: none !important;
    }
    body:not(.home) .td-main-header .td-header-menu .wp-block-navigation__responsive-container.is-menu-open {
        display: flex !important; position: fixed; inset: 0;
        z-index: 100000; width: 100%; max-width: none; height: 100dvh;
        padding: 24px; overflow: auto; background: #291b3b; color: #fff;
    }
    body:not(.home) .td-main-header .td-header-menu .is-menu-open .wp-block-navigation__responsive-container-content {
        align-items: stretch; padding-top: 56px;
    }
    body:not(.home) .td-main-header .td-header-menu .is-menu-open .wp-block-navigation__container {
        display: flex; flex-direction: column; align-items: stretch;
        width: 100%; gap: 16px;
    }
    body:not(.home) .td-main-header .td-header-menu .wp-block-navigation__responsive-container-close {
        top: 0; right: 0; width: 44px; height: 44px; padding: 10px; color: #fff;
    }
    .td-main-header .td-header-category-bar .td-header-category-desktop {
        display: flex !important; width: 100%; max-width: none;
        min-height: 46px; padding: 0 16px; gap: 0; margin: 0;
    }
    .td-main-header .td-header-category-bar .td-header-category-mobile { display: none !important; }
    .td-main-header .td-header-category-bar .td-header-category-label { display: none; }
    .td-main-header .td-header-category-bar .td-header-category-scroller {
        display: flex; flex-direction: row; align-items: center; flex-wrap: nowrap;
        width: 100%; min-width: 0; gap: 18px; overflow-x: auto; overflow-y: hidden;
        white-space: nowrap; -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain; scrollbar-width: thin;
    }
    .td-main-header .td-header-category-bar .td-header-category-row,
    .td-main-header .td-header-category-bar .td-header-category-row p {
        display: contents; margin: 0 !important; padding: 0 !important;
    }
    .td-main-header .td-header-category-bar .td-header-category-row br,
    .td-main-header .td-header-category-bar .td-header-category-row p:empty { display: none; }
    .td-main-header .td-header-category-bar .td-header-category-link {
        flex: 0 0 auto; min-height: 44px; padding: 10px 0 8px;
        white-space: nowrap; font-size: 12.5px; line-height: 1.4;
    }
}

/* The reading surface fills the viewport only on mobile. */
@media (max-width: 781px) {
    .page main:has(.td-page-reading-panel) { background: #fff; }
    .page main .td-page-reading-panel {
        --td-editorial-gutter: 16px;
        position: relative; left: 50%; transform: translateX(-50%);
        box-sizing: border-box; width: var(--td-screen-width, 100vw) !important;
        max-width: none !important; margin-left: 0 !important; margin-right: 0 !important;
        padding: 24px var(--td-editorial-gutter) !important;
        background: #fff; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
    }
    .page main .td-page-reading-panel > .wp-block-post-content,
    .page main .td-page-reading-panel > .td-editorial-introduction,
    .page main .td-page-reading-panel > .td-article-toc,
    .page main .td-page-reading-panel > .td-page-author,
    .page main .td-page-reading-panel > .td-page-parents,
    .page main .td-page-reading-panel > .td-editorial-acf-references {
        box-sizing: border-box; width: 100%; max-width: none !important;
        margin-left: auto !important; margin-right: auto !important;
    }
    .page main .td-page-reading-panel > .wp-block-post-content { padding-left: 0; padding-right: 0; }
    .page main .td-page-reading-panel > .td-editorial-acf-faq {
        box-sizing: border-box; width: calc(100% + 2 * var(--td-editorial-gutter));
        max-width: none !important;
        margin-left: calc(-1 * var(--td-editorial-gutter)) !important;
        margin-right: calc(-1 * var(--td-editorial-gutter)) !important;
    }
    .page main .td-page-reading-panel > .td-editorial-acf-faq > h2,
    .page main .td-page-reading-panel .td-editorial-acf-faq summary,
    .page main .td-page-reading-panel .td-editorial-faq-answer {
        padding-left: var(--td-editorial-gutter); padding-right: var(--td-editorial-gutter);
    }
    body:not(.home) .td-main-header .td-header-top .td-header-brand-subheadline { display: none; }
    .td-main-header .td-header-top .wp-block-column:has(> .wp-block-search) {
        display: flex; flex-direction: column; gap: 0;
    }
    .td-main-header .td-header-top .wp-block-column > .wp-block-search { order: 0; }
    .td-main-header .td-header-top .wp-block-column > .td-home-page-count {
        order: 1; margin: 8px 0 0 !important;
    }
    .is-style-section-5 .wp-block-columns:has(> .wp-block-column > .wp-block-site-title) {
        display: flex; flex-direction: column;
    }
    .is-style-section-5 .wp-block-columns > .wp-block-column:first-child:has(.wp-block-site-title) {
        order: 10;
    }
}

/* A compact disclosure TOC; H2 and H3 keep their hierarchy. */
details.td-article-toc { margin: 22px 0 28px; }
details.td-article-toc > summary.td-article-toc-title {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: 0; padding: 8px 10px; background: #f6f0fa;
    color: #79618c; font-size: 18px; line-height: 1.35; list-style: none; cursor: pointer;
}
details.td-article-toc > summary::-webkit-details-marker { display: none; }
details.td-article-toc > summary::marker { content: ""; }
details.td-article-toc > summary::after { content: "+"; font-size: 21px; line-height: 1; }
details.td-article-toc[open] > summary::after { content: "−"; }
details.td-article-toc > summary:focus-visible { outline: 2px solid #9574af; outline-offset: -2px; }
details.td-article-toc > nav { padding-top: 6px; }
details.td-article-toc .td-article-toc-columns { column-count: 2; column-gap: 12px; }
details.td-article-toc .td-toc-group { margin-bottom: 5px !important; }
details.td-article-toc a { display: flex; align-items: baseline; gap: 6px; font-size: 13px; line-height: 1.25; padding: 5px 8px; }
details.td-article-toc .td-toc-h3 { font-size: 12.5px; padding: 4px 8px 4px 20px; }
details.td-article-toc .td-toc-number { flex: 0 0 auto; min-width: 17px; font-variant-numeric: tabular-nums; }
details.td-article-toc .td-toc-h3 .td-toc-number { min-width: 24px; }
details.td-article-toc .td-toc-label { flex: 1 1 auto; min-width: 0; }
@media (max-width: 781px) {
    details.td-article-toc .td-article-toc-columns { column-count: 1; }
    details.td-article-toc a { font-size: 14px; padding-block: 7px; }
    details.td-article-toc .td-toc-h3 { font-size: 13px; padding-block: 6px; }
    details.td-article-toc:not([data-td-disclosure-ready]) > nav { display: none; }
}

/* Footer labels remain links; the adjacent button expands their children on mobile. */
.td-footer-category-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.td-footer-category-heading > .td-branch-category-link { flex: 1; min-width: 0; }
.td-footer-category-toggle { display: none; }
.td-page-branch-menu .td-branch-category-children[hidden] { display: none !important; }
@media (max-width: 781px) {
    .td-footer-category-toggle {
        display: inline-flex; flex: 0 0 40px; align-items: center; justify-content: center;
        width: 40px; height: 40px; border: 1px solid #514359; border-radius: 0;
        padding: 0; color: #e8ddee; background: transparent; cursor: pointer;
    }
    .td-footer-category-toggle::after { content: "+"; font-size: 22px; line-height: 1; }
    .td-footer-category-toggle[aria-expanded="true"]::after { content: "−"; }
    .td-footer-category-toggle:focus-visible { outline: 2px solid #d5bfe6; outline-offset: 2px; }
    .td-page-branch-menu .td-branch-category-group > .td-footer-category-heading {
        border-bottom: 1px solid #3a303f; padding-block: 5px;
    }
    .td-page-branch-menu:not([data-td-disclosure-ready]) .td-branch-category-group[data-td-branch-active="0"] > .td-branch-category-children {
        display: none;
    }
}

@media (min-width: 782px) {
    .td-page-branch-menu .td-footer-category-heading { display: contents; }
    .td-page-branch-menu .td-branch-root-grid > li > .td-footer-category-heading > .td-branch-category-link {
        font-weight: 600; font-size: 13px; line-height: 1.4; color: #f5f0fa;
        border-bottom: 1px solid #333; padding-bottom: 7px; margin-bottom: 4px; break-after: avoid;
    }
    .td-page-branch-menu .td-branch-root-grid > li > .td-footer-category-heading > .td-branch-category-link.is-active { color: #fff; }
}

/* Compact shared navigation and a continuous, wide search bar. */
body:not(.home) .td-main-header .td-header-top .wp-block-search { width: 100%; margin: 0; }
body:not(.home) .td-main-header .td-header-top .wp-block-search__inside-wrapper {
    display: flex; align-items: stretch; gap: 0; width: 100%; height: 42px;
    box-sizing: border-box; padding: 0; overflow: hidden;
    border: 1px solid #d3bfdc; border-radius: 6px; background: #fff;
}
body:not(.home) .td-main-header .td-header-top .wp-block-search__input {
    flex: 1 1 0; min-width: 0; width: 0; height: 40px; min-height: 0;
    box-sizing: border-box; margin: 0; padding: 0 13px;
    border: 0; border-radius: 0; box-shadow: none; font-size: 15px; line-height: 1.3;
}
body:not(.home) .td-main-header .td-header-top .wp-block-search__button {
    flex: 0 0 50px; width: 50px; min-width: 0; height: 40px; min-height: 0;
    box-sizing: border-box; display: flex; align-items: center; justify-content: center;
    margin: 0; padding: 8px 12px; border: 0; border-radius: 0 !important;
}
body:not(.home) .td-main-header .td-header-top .wp-block-search__button svg { width: 23px; height: 23px; }
body:not(.home) .td-main-header .td-header-top .wp-block-search__inside-wrapper:focus-within {
    outline: 2px solid #d6b9eb; outline-offset: 2px;
}
.td-main-header .td-header-search-category {
    flex: 0 0 138px; width: 138px; min-width: 0; height: 40px;
    box-sizing: border-box; margin: 0; padding: 0 10px;
    color: #483552; background: #eee6f4; border: 0; border-right: 1px solid #d3bfdc;
    border-radius: 0; font-family: inherit; font-size: 12px; line-height: 1.3;
}
div.yoast-breadcrumbs, div.yoast-breadcrumbs a, div.yoast-breadcrumbs span, div.yoast-breadcrumbs strong {
    font-size: 11px; line-height: 1.4;
}
@media (min-width: 782px) {
    body:not(.home) .td-main-header .td-header-top .wp-block-columns {
        max-width: 1500px; min-height: 0; padding: 12px 20px; gap: 24px;
    }
    body:not(.home) .td-main-header .td-header-top .wp-block-column:first-child {
        flex: 0 0 250px !important; min-width: 0;
    }
    body:not(.home) .td-main-header .td-header-top .wp-block-column:nth-child(2) {
        flex: 1 1 0 !important; min-width: 0;
    }
    body:not(.home) .td-main-header .td-header-top .wp-block-column:last-child:empty { display: none; }
    body:not(.home) .td-main-header .td-header-top .wp-block-site-title { font-size: 21px; line-height: 1.2; }
    body:not(.home) .td-main-header .td-header-top .td-header-brand-subheadline {
        margin-top: 5px; font-size: 11.5px; line-height: 1.35; max-width: 44ch;
    }
    body:not(.home) .td-main-header .td-header-top .td-home-page-count {
        margin: 0 auto 6px; font-size: 12px; line-height: 1.35;
    }
    body:not(.home) .td-main-header .td-header-menu { min-height: 46px; padding: 6px 20px; }
    body:not(.home) .td-main-header .td-header-menu .wp-block-navigation__container { gap: 8px 20px; }
    body:not(.home) .td-main-header .td-header-menu .wp-block-navigation-item { font-size: 15px; line-height: 1.3; }
    body:not(.home) .td-main-header .td-header-menu .td-premium-tab > a { min-height: 34px; padding: 6px 14px; }
    body:not(.home) .td-main-header .td-header-category-desktop { min-height: 60px; padding: 4px 20px; gap: 10px; }
    body:not(.home) .td-main-header .td-header-category-row > .td-header-category-link { min-height: 25px; padding: 3px 2px; font-size: clamp(10px,.85vw,11.5px); }
    body:not(.home) .td-main-header .td-header-category-label { font-size: 11.5px; }
    div.yoast-breadcrumbs { box-sizing: border-box; width: calc(100% - 32px); max-width: 613px; margin-inline: auto; }
}
@media (max-width: 781px) {
    body:not(.home) .td-main-header .td-header-top .wp-block-columns { padding-block: 10px; gap: 8px; }
    body:not(.home) .td-main-header .td-header-top .wp-block-site-title { font-size: 21.5px; }
    body:not(.home) .td-main-header .td-header-top .td-home-page-count { font-size: 10.5px; line-height: 1.35; margin-top: 6px; }
    body:not(.home) .td-main-header .td-header-top .wp-block-search__inside-wrapper { height: 40px; }
    body:not(.home) .td-main-header .td-header-top .wp-block-search__input {
        height: 38px; padding-inline: 10px; font-size: 12px;
    }
    body:not(.home) .td-main-header .td-header-top .wp-block-search__button {
        height: 38px; flex-basis: 42px; width: 42px; padding: 7px 9px;
    }
    .td-main-header .td-header-search-category { display: none; }
    body:not(.home) .td-main-header .td-header-category-desktop { min-height: 40px; }
    body:not(.home) .td-main-header .td-header-category-link { min-height: 40px; padding-block: 8px 6px; font-size: 11.5px; }
    .td-main-header .td-header-menu .wp-block-navigation-item { font-size: 16px; }
    div.yoast-breadcrumbs, div.yoast-breadcrumbs a, div.yoast-breadcrumbs span, div.yoast-breadcrumbs strong { font-size: 10px; }
    .page h1.wp-block-post-title { font-size: 2.08rem; }
    .page main p.td-page-seo-subheadline { font-size: 14px; line-height: 1.45; }
}

/* Optional article overview and keyword panels around the native featured image. */
.page main .td-page-reading-panel > .td-featured-sides { margin: 0 auto 32px; }
.page main .td-featured-sides > .td-template-featured-image {
    margin: 0; min-width: 0; align-self: center; text-align: center;
}
.page main .td-featured-sides > .td-template-featured-image img {
    display: block; width: auto; height: auto; max-width: 100%; max-height: 720px; margin: 0 auto; object-fit: contain;
}
.page main .td-editorial-side {
    min-width: 0; margin: 0; padding: 16px 12px; box-sizing: border-box;
    color: #896514; background: #e9f4fc; border: 0; border-radius: 0;
}
.page main .td-editorial-side--shadow { background: #1b1025; color: #e3c16c; }
.page main .td-editorial-side .td-editorial-side-title {
    margin: 0 0 12px; padding: 0 0 9px; border-bottom: 1px solid rgba(137,101,20,.25);
    font-size: 21px; line-height: 1.15; font-weight: 500; color: inherit;
}
.page main .td-editorial-side h2::before, .page main .td-editorial-side h2::after,
.page main .td-article-summary h2::before, .page main .td-article-summary h2::after { content: none !important; }
.page main .td-editorial-side .td-side-entries {
    display: grid; gap: 12px; margin: 0; padding: 0; list-style: none;
}
.page main .td-editorial-side .td-side-entry {
    display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 0; list-style: none;
}
.page main .td-side-entry::before, .page main .td-side-entry::after { content: none !important; }
.page main .td-side-emoji { flex: 0 0 23px; font-size: 21px; line-height: 1.25; text-align: center; }
.page main .td-side-emoji img.emoji { display: inline; width: 1em; height: 1em; margin: 0; }
.page main .td-side-entry-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.page main .td-side-keyword { display: block; font-size: 15px; line-height: 1.3; font-weight: 600; color: inherit; }
.page main .td-side-explanation { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: inherit; }
.page main .td-page-reading-panel > .td-article-summary {
    box-sizing: border-box; margin: 0 auto 24px; padding: 18px 20px;
    color: #4b4b4b; background: #f1f1f1; border: 0; border-radius: 0;
}
.page main .td-article-summary .td-article-summary-title {
    margin: 0 0 10px; padding: 0; color: #454545; font-size: 24px; line-height: 1.2; font-weight: 500;
}
.page main .td-article-summary .td-article-summary-text,
.page main .td-article-summary .td-article-summary-text p,
.page main .td-article-summary .td-article-summary-text li { font-size: 17px; line-height: 1.55; }
.page main .td-article-summary-text > :first-child { margin-top: 0; }
.page main .td-article-summary-text > :last-child { margin-bottom: 0; }
@media (min-width: 782px) {
    .page main .td-page-reading-panel > .td-featured-sides.has-shadow-side,
    .page main .td-page-reading-panel > .td-featured-sides.has-light-side {
        display: grid; align-items: start; gap: 14px; width: 100%; max-width: 100%;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
    }
    .page main .td-featured-sides.has-shadow-side.has-light-side > .td-editorial-side--light { grid-column: 1; grid-row: 2; }
    .page main .td-featured-sides.has-shadow-side.has-light-side > .td-template-featured-image { grid-column: 2; grid-row: 2; }
    .page main .td-featured-sides.has-shadow-side.has-light-side > .td-editorial-side--shadow { grid-column: 3; grid-row: 2; }
    .page main .td-featured-sides.has-light-side:not(.has-shadow-side) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); }
    .page main .td-featured-sides.has-light-side:not(.has-shadow-side) > .td-editorial-side--light { grid-column: 1; grid-row: 2; }
    .page main .td-featured-sides.has-light-side:not(.has-shadow-side) > .td-template-featured-image { grid-column: 2; grid-row: 2; }
    .page main .td-featured-sides.has-shadow-side:not(.has-light-side) { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
    .page main .td-featured-sides.has-shadow-side:not(.has-light-side) > .td-template-featured-image { grid-column: 1; grid-row: 2; }
    .page main .td-featured-sides.has-shadow-side:not(.has-light-side) > .td-editorial-side--shadow { grid-column: 2; grid-row: 2; }
    .page main .td-featured-sides.has-shadow-side.has-light-side:not(.has-featured-image) { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .page main .td-featured-sides.has-shadow-side.has-light-side:not(.has-featured-image) > .td-editorial-side--shadow { grid-column: 2; }
    .page main .td-featured-sides:not(.has-featured-image):not(.has-light-side),
    .page main .td-featured-sides:not(.has-featured-image):not(.has-shadow-side) { grid-template-columns: minmax(0,1fr); }
    .page main .td-featured-sides:not(.has-featured-image):not(.has-light-side) > .td-editorial-side--shadow { grid-column: 1; }
}
@media (max-width: 781px) {
    .page main .td-page-reading-panel > .td-featured-sides {
        display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 100%;
    }
    .page main .td-featured-sides > .td-template-featured-image { order: 0; width: 100%; }
    .page main .td-featured-sides > .td-editorial-side--light { order: 1; width: 100%; }
    .page main .td-featured-sides > .td-editorial-side--shadow { order: 2; width: 100%; }
    .page main .td-editorial-side { padding: 16px; }
    .page main .td-editorial-side .td-editorial-side-title { font-size: 23px; }
    .page main .td-side-keyword { font-size: 17px; }
    .page main .td-side-explanation { font-size: 15px; }
    .page main .td-page-reading-panel > .td-article-summary { padding: 16px; }
    .page main .td-article-summary .td-article-summary-text,
    .page main .td-article-summary .td-article-summary-text p,
    .page main .td-article-summary .td-article-summary-text li { font-size: 16px; }
}

/* A three-point editorial summary, with clearly visible list markers. */
.page main .td-editorial-side--shadow .td-editorial-side-title { border-bottom-color: rgba(227,193,108,.3); }
.page main .td-article-summary .td-article-summary-text ul {
    display: grid; gap: 14px; margin: 0; padding: 0 0 0 23px; list-style: disc outside;
}
.page main .td-article-summary .td-article-summary-text ul > li {
    display: list-item; margin: 0; padding-left: 3px; list-style: disc outside; color: #4b4b4b;
}
.page main .td-article-summary .td-article-summary-text ul > li::marker { color: #555; font-size: 1.05em; }
.page main .td-article-summary .td-article-summary-text ul > li::before,
.page main .td-article-summary .td-article-summary-text ul > li::after { content: none !important; }
.page main .td-article-summary .td-article-summary-text strong { color: #353535; font-weight: 700; }

/* One dark surface includes the headline, image and both translucent side gradients. */
.page main .td-page-reading-panel > .td-featured-sides {
    box-sizing: border-box; padding: 20px 14px; color: #e3c16c; background: #1b1025;
}
.page main .td-featured-sides .td-featured-sides-heading {
    grid-column: 1 / -1; grid-row: 1; margin: 0; padding: 0 8px 4px; text-align: center;
}
.page main .td-featured-sides .td-featured-sides-title {
    margin: 0; padding: 0; color: #e3c16c; font-size: 29px; line-height: 1.2; font-weight: 500; text-align: center;
}
.page main .td-featured-sides .td-featured-sides-title::before,
.page main .td-featured-sides .td-featured-sides-title::after { content: none !important; }
.page main .td-featured-sides .td-featured-sides-subheadline {
    margin: 8px auto 0; padding: 0; max-width: 56ch; color: #d8c5e5;
    font-size: 16px; line-height: 1.4; font-style: italic; font-weight: 400; text-align: center;
}
.page main .td-featured-sides > .td-template-featured-image { background: transparent; }
.page main .td-featured-sides > .td-editorial-side {
    color: #e3c16c; border: 0; border-radius: 0; background-color: transparent;
}
.page main .td-featured-sides .td-editorial-side--light {
    background-image: linear-gradient(90deg, rgba(111,188,235,.28) 0%, rgba(111,188,235,.12) 62%, rgba(111,188,235,0) 100%);
}
.page main .td-featured-sides .td-editorial-side--shadow {
    background-image: linear-gradient(270deg, rgba(142,83,182,.34) 0%, rgba(142,83,182,.14) 62%, rgba(142,83,182,0) 100%);
}
.page main .td-featured-sides .td-editorial-side-title { border-bottom-color: rgba(227,193,108,.25); }
.page main .td-featured-sides .td-side-explanation { color: #d8b96e; }
.page main .td-editorial-side--shadow .td-side-entry { flex-direction: row-reverse; gap: 9px; }
.page main .td-editorial-side--shadow .td-side-keyword { text-align: right; }
.page main .td-editorial-side--shadow .td-side-explanation { text-align: right; }
.page main .td-editorial-side--shadow .td-side-emoji {
    display: inline-flex; flex: 0 0 24px; align-items: center; justify-content: center;
    width: 24px; height: auto; padding: 0; border: 0;
    border-radius: 0; background: transparent; font-size: 21px; line-height: 1.25;
}
@media (max-width: 781px) {
    .page main .td-page-reading-panel > .td-featured-sides { padding: 18px 10px; }
    .page main .td-featured-sides .td-featured-sides-heading { order: -1; padding-inline: 4px; }
    .page main .td-featured-sides .td-featured-sides-title { font-size: 26px; }
    .page main .td-featured-sides .td-featured-sides-subheadline { font-size: 15px; }
}

/* Gold section names, lilac keywords and silver explanations. */
.page main .td-featured-sides .td-editorial-side-title { color: #e3c16c; }
.page main .td-featured-sides .td-editorial-side--shadow .td-editorial-side-title { text-align: right; }
.page main .td-featured-sides .td-side-keyword { color: #d5b6ee; }
.page main .td-featured-sides .td-side-explanation { color: #d0cdd4; }

/* Progressive enhancement: only mobile turns the three existing panels into a deck. */
@media (max-width: 781px) {
    .page main .td-featured-sides.has-mobile-stack { overflow: hidden; }
    .page main .td-featured-sides .td-featured-stack {
        position: relative; order: 0; isolation: isolate; width: calc(100% - 16px);
        margin: 0 16px 0 0; padding: 0; touch-action: pan-y pinch-zoom;
        transition: height .22s ease;
    }
    .page main .td-featured-stack > .td-stack-slide {
        position: absolute; inset: 0 auto auto 0; width: 100%; min-width: 0;
        box-sizing: border-box; margin: 0; background-color: #1b1025;
        transform-origin: top center; border: 1px solid rgba(213,182,238,.2);
        box-shadow: 0 5px 14px rgba(0,0,0,.18);
        transition: transform .26s ease, opacity .26s ease, filter .26s ease;
    }
    .page main .td-featured-stack > .td-stack-slide[data-stack-position="active"] {
        z-index: 3; height: auto; transform: translate(0,0) scale(1); opacity: 1; filter: none;
    }
    .page main .td-featured-stack > .td-stack-slide[data-stack-position="next"] {
        z-index: 2; height: 100%; transform: translate(7px,8px) scale(.97); opacity: .75;
        filter: brightness(.85); pointer-events: none; overflow: hidden;
    }
    .page main .td-featured-stack > .td-stack-slide[data-stack-position="previous"] {
        z-index: 1; height: 100%; transform: translate(14px,16px) scale(.94); opacity: .5;
        filter: brightness(.75); pointer-events: none; overflow: hidden;
    }
    .page main .td-featured-stack > .td-stack-slide:not([data-stack-position="active"]) > * { visibility: hidden; }
    .page main .td-featured-stack > .td-template-featured-image { padding: 10px; }
    .page main .td-featured-stack .td-template-featured-image img {
        display: block; width: auto; height: auto; max-width: 100%;
        max-height: min(58svh,480px); margin: 0 auto; object-fit: contain;
    }
    .page main .td-featured-sides .td-featured-stack-nav {
        display: flex; order: 1; align-items: center; justify-content: space-between; gap: 8px;
        box-sizing: border-box; width: 100%; margin: 10px 0 0; padding: 6px;
        color: #e3c16c; background: #30213d; border: 1px solid rgba(213,182,238,.22);
    }
    .page main .td-featured-stack-nav button {
        display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center;
        width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0;
        color: #e3c16c; background: transparent; font: 30px/1 Georgia,serif; cursor: pointer;
    }
    .page main .td-featured-stack-message {
        flex: 1; min-width: 0; margin: 0; color: #e0d4eb;
        font-size: 12px; line-height: 1.3; text-align: center;
    }
    .page main .td-featured-stack-status { display: block; margin-top: 4px; color: #d5b6ee; font-size: 11px; }
    .page main .td-featured-stack:focus-visible,
    .page main .td-featured-stack-nav button:focus-visible { outline: 2px solid #d5b6ee; outline-offset: 2px; }
}
@media (prefers-reduced-motion: reduce) {
    .page main .td-featured-stack, .page main .td-featured-stack > .td-stack-slide { transition: none; }
}

/* Mouse dragging a mobile preview should swipe without selecting the card text. */
@media (max-width: 781px) and (hover: hover) and (pointer: fine) {
    .page main .td-featured-stack { -webkit-user-select: none; user-select: none; }
}

/* Petrol-green correspondence table, scoped to the existing featured panel. */
.page main .td-featured-sides > .td-correspondences {
    grid-column: 1 / -1; grid-row: 3; order: 2; box-sizing: border-box;
    width: 100%; min-width: 0; margin: 18px 0 0; padding: 16px 14px;
    color: #f1f7f4; background: #0d3c42; border: 1px solid #648e8b;
}
.page main .td-correspondences .td-correspondences-title {
    margin: 0 0 10px; padding: 0; color: #edf6ef; font-size: 23px; line-height: 1.2; font-weight: 500; text-align: center;
}
.page main .td-correspondences .td-correspondences-reference-title {
    margin: 0 0 12px; padding: 0; color: #d0e9e1; font-size: 19px; line-height: 1.25; font-weight: 500; text-align: center;
}
.page main .td-correspondences .td-correspondences-title::before,
.page main .td-correspondences .td-correspondences-title::after,
.page main .td-correspondences .td-correspondences-reference-title::before,
.page main .td-correspondences .td-correspondences-reference-title::after,
.page main .td-correspondences .td-corr-group-title::before,
.page main .td-correspondences .td-corr-group-title::after { content: none !important; }
.page main .td-correspondences .td-corr-group { margin: 14px 0 0; padding: 0; min-width: 0; }
.page main .td-correspondences .td-corr-group-title {
    margin: 0; padding: 7px 9px; color: #e3c16c; background: #194c52;
    font-size: 14px; line-height: 1.3; font-weight: 500; text-align: left; letter-spacing: normal;
}
.page main .td-correspondences .td-correspondences-grid {
    display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid #648e8b;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.page main .td-correspondences .td-corr-grid--1 { grid-template-columns: minmax(0, 1fr); }
.page main .td-correspondences .td-corr-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page main .td-correspondences .td-corr-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.page main .td-correspondences .td-corr-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.page main .td-correspondences .td-corr-grid--subrow { border-top: 0; background: rgba(255,255,255,.025); }
.page main .td-correspondences .td-corr-item {
    box-sizing: border-box; min-width: 0; margin: 0; padding: 10px 8px;
    border-bottom: 1px solid #648e8b; border-right: 1px solid rgba(157,192,187,.4); overflow-wrap: anywhere;
}
.page main .td-correspondences .td-corr-item:last-child { border-right: 0; }
.page main .td-correspondences .td-corr-label {
    display: block; margin: 0 0 5px; padding: 0; color: #c9e0da; font-size: 11px; line-height: 1.3; font-weight: 500;
}
.page main .td-correspondences .td-corr-copy { min-width: 0; margin: 0; padding: 0; }
.page main .td-correspondences .td-corr-value {
    display: flex; align-items: baseline; gap: 6px; margin: 0; padding: 0;
    color: #f2f7f4; font-size: 13px; font-weight: 600; line-height: 1.35;
}
.page main .td-correspondences .td-corr-symbol { flex: 0 0 auto; font-size: 18px; line-height: 1.1; }
.page main .td-correspondences .td-corr-value > span:last-child { min-width: 0; }
.page main .td-correspondences p:empty { display: none; margin: 0; padding: 0; }
@media (max-width: 781px) {
    .page main .td-featured-sides > .td-correspondences { padding: 14px 8px; margin-top: 14px; }
    .page main .td-correspondences .td-correspondences-title { font-size: 21px; }
    .page main .td-correspondences .td-corr-group-title { font-size: 13px; }
    .page main .td-correspondences .td-correspondences-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page main .td-correspondences .td-corr-grid--1 { grid-template-columns: minmax(0, 1fr); }
    .page main .td-correspondences .td-corr-grid--3 .td-corr-item:last-child,
    .page main .td-correspondences .td-corr-grid--5 .td-corr-item:last-child { grid-column: 1 / -1; }
    .page main .td-correspondences .td-corr-item { padding: 10px 8px; }
    .page main .td-correspondences .td-corr-item:nth-child(2n) { border-right: 0; }
    .page main .td-correspondences .td-corr-symbol { font-size: 17px; }
}

/* Optional cartomancy reference cards: four topics, two orientations. */
.td-correspondences .td-card-reference { margin-top: 18px; }
.td-correspondences .td-card-reference-title {
    margin: 0 0 12px; color: #e3c16c; font-size: 19px; line-height: 1.3; text-align: center;
}
.td-correspondences .td-card-reference-table {
    width: 100%; table-layout: fixed; border-collapse: collapse; border-spacing: 0;
    margin: 0; padding: 0; border: 0; background: transparent; color: #f2f7f4; font-size: 13px; line-height: 1.5;
    white-space: normal; overflow: visible;
}
.td-correspondences .td-card-reference-table th,
.td-correspondences .td-card-reference-table td {
    box-sizing: border-box; padding: 9px; border: 1px solid #648e8b;
    text-align: left; vertical-align: top; overflow-wrap: anywhere; white-space: normal;
}
.td-correspondences .td-card-reference-columns th {
    width: 25%; color: #e3c16c; background: #194c52; font-size: 12px; font-weight: 600;
}
.td-correspondences .td-card-orientation th {
    color: #e3c16c; background: #16464c; font-size: 14px; font-weight: 600;
}
.td-correspondences .td-card-reference-values td { font-weight: 400; }
.td-correspondences .td-card-cell-label { display: none; }
@media (max-width: 781px) {
    .td-correspondences .td-card-reference-table,
    .td-correspondences .td-card-reference-table tbody { display: block; width: 100%; }
    .td-correspondences .td-card-reference-columns { display: none; }
    .td-correspondences .td-card-orientation,
    .td-correspondences .td-card-orientation th { display: block; width: 100%; }
    .td-correspondences .td-card-reference-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .td-correspondences .td-card-reference-values td { display: block; min-width: 0; font-size: 12.5px; }
    .td-correspondences .td-card-cell-label { display: block; margin-bottom: 5px; color: #e3c16c; font-size: 11px; font-weight: 600; line-height: 1.35; }
}

/* Eastern traditions share the correspondence panel and its optional field behavior. */
.page main .td-correspondences .td-corr-eastern > .td-corr-group { margin-top: 0; }
.page main .td-correspondences .td-corr-eastern > .td-corr-group > .td-corr-group-title {
    padding: 7px 9px; color: #e3c16c; background: #16464c; font-size: 12.5px; line-height: 1.35;
}
.page main .td-correspondences .td-corr-eastern > .td-corr-group + .td-corr-group { margin-top: 8px; }

/* Full-width, gently slanted ribbons behind page article chapter headings. */
.page:not(.home) main .td-explicit-editorial-sections h2:not(.td-no-chapter) {
    --td-h2-chapter-size: .72rem;
    --td-h2-ribbon-bleed: var(--wp--preset--spacing--40, 30px);
    position: relative; isolation: isolate; box-sizing: border-box;
    padding: 0 14px 18px; color: #f5f1e8;
    background: linear-gradient(#9b7b32, #9b7b32) 14px bottom / 55px 1px no-repeat;
}
.page:not(.home) main .td-explicit-editorial-sections h2:not(.td-no-chapter)::before {
    margin-bottom: 12px;
}
.page:not(.home) main .td-explicit-editorial-sections h2:not(.td-no-chapter)::after {
    content: ""; position: absolute;
    top: calc(var(--td-h2-chapter-size) * 1.2 + 8px); bottom: 14px;
    right: calc(-1 * var(--td-h2-ribbon-bleed)); left: calc(-1 * var(--td-h2-ribbon-bleed));
    display: block; width: auto; height: auto; margin: 0;
    background: #0e626b; transform: skewY(.65deg); transform-origin: center;
    z-index: -1; pointer-events: none;
}
@media (max-width: 768px) {
    .page:not(.home) main .td-explicit-editorial-sections h2:not(.td-no-chapter) {
        --td-h2-chapter-size: .68rem;
        padding-left: 10px; padding-right: 10px;
        background-position-x: 10px; background-size: 42px 1px;
    }
}

@media (max-width: 781px) {
    .page:not(.home) main .td-explicit-editorial-sections h2:not(.td-no-chapter) {
        --td-h2-ribbon-bleed: var(--td-editorial-gutter, 16px);
    }
}

/* Compact page-article subheadings, with the existing space above preserved. */
.page:not(.home) main .td-explicit-editorial-sections h3 {
    font-size: 1.6rem; font-weight: 600; color: #0c5158;
    margin-top: 1.75rem; margin-bottom: 8px;
    padding-inline-start: 12px;
}
.page:not(.home) main .td-explicit-editorial-sections h3 + :where(p, ul, ol, blockquote) {
    margin-block-start: 8px;
}
@media (max-width: 768px) {
    .page:not(.home) main .td-explicit-editorial-sections h3 {
        font-size: 1.3rem;
        margin-top: 1.33rem;
        padding-inline-start: 8px;
    }
}

/* Expandable correspondence macro sections; heading text stays in its own heading. */
.page main .td-correspondences details.td-corr-disclosure { border: 0; padding: 0; min-width: 0; }
.page main .td-correspondences .td-corr-summary {
    display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 9px;
    color: #e3c16c; background: #194c52; list-style: none; cursor: pointer;
}
.page main .td-correspondences .td-corr-summary::-webkit-details-marker { display: none; }
.page main .td-correspondences .td-corr-summary::marker { content: ""; }
.page main .td-correspondences .td-corr-summary > .td-corr-group-title,
.page main .td-correspondences .td-corr-summary > .td-card-reference-title {
    flex: 1; min-width: 0; margin: 0; padding: 0; color: #e3c16c; background: transparent; text-align: left;
}
.page main .td-correspondences .td-corr-summary::after { content: "+"; margin-left: auto; font-size: 21px; line-height: 1; }
.page main .td-correspondences details[open] > .td-corr-summary::after { content: "−"; }
.page main .td-correspondences .td-corr-summary.td-has-expand-ui::after { content: none !important; }
.page main .td-correspondences .td-corr-summary:focus-visible { outline: 2px solid #e3c16c; outline-offset: -2px; }
.page main .td-correspondences .td-corr-panel { min-width: 0; }
.page main .td-correspondences .td-corr-eastern > .td-corr-panel > .td-corr-group { margin-top: 0; }
.page main .td-correspondences .td-corr-eastern > .td-corr-panel > .td-corr-group + .td-corr-group { margin-top: 8px; }
.page main .td-correspondences .td-corr-eastern > .td-corr-panel > .td-corr-group > .td-corr-group-title {
    padding: 7px 9px; color: #e3c16c; background: #16464c; font-size: 12.5px; line-height: 1.35;
}
.page main .td-correspondences .td-corr-scroll-block,
.page main .td-correspondences .td-corr-scroll,
.page main .td-correspondences .td-corr-scroll-inner { min-width: 0; max-width: 100%; }
.td-corr-swipe-hint[hidden] { display: none !important; }
.td-expand-affordance, .td-expand-hint { display: none; }
.td-corr-summary > .td-expand-affordance {
    display: inline-flex; align-items: center; gap: 5px; margin-left: auto; flex: 0 0 auto; font-weight: 400;
}
.td-expand-sign::after { content: "+"; display: block; font-size: 21px; line-height: 1; }
details[open] > summary > .td-expand-affordance > .td-expand-sign::after { content: "−"; }

@media (max-width: 781px) {
    /* Preserve each table's columns in a native horizontal scroll region. */
    .page main .td-correspondences .td-corr-scroll {
        width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #9ebbb0 #16464c;
    }
    .page main .td-correspondences .td-corr-scroll:focus-visible { outline: 2px solid #e3c16c; outline-offset: -2px; }
    .page main .td-correspondences .td-corr-scroll-inner {
        width: 100%; min-width: calc(var(--td-corr-columns, 1) * 130px); max-width: none;
    }
    .page main .td-correspondences .td-corr-scroll-inner .td-corr-grid--1 { grid-template-columns: minmax(0, 1fr); }
    .page main .td-correspondences .td-corr-scroll-inner .td-corr-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page main .td-correspondences .td-corr-scroll-inner .td-corr-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .page main .td-correspondences .td-corr-scroll-inner .td-corr-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .page main .td-correspondences .td-corr-scroll-inner .td-corr-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .page main .td-correspondences .td-corr-scroll-inner .td-corr-item { grid-column: auto; border-right: 1px solid rgba(157,192,187,.4); }
    .page main .td-correspondences .td-corr-scroll-inner .td-corr-item:last-child { border-right: 0; }
    .page main .td-correspondences .td-corr-swipe-hint {
        margin: 0; padding: 6px 9px; color: #d4e6df; background: #16464c;
        text-align: right; font-size: 10px; line-height: 1.35;
    }
    .page main .td-correspondences .td-card-reference-table { display: table; width: 100%; }
    .page main .td-correspondences .td-card-reference-table .td-card-reference-columns { display: table-header-group; }
    .page main .td-correspondences .td-card-reference-table tbody { display: table-row-group; width: auto; }
    .page main .td-correspondences .td-card-reference-table tr { display: table-row; }
    .page main .td-correspondences .td-card-reference-table th,
    .page main .td-correspondences .td-card-reference-table td { display: table-cell; }
    .page main .td-correspondences .td-card-reference-table .td-card-orientation th { width: auto; }
    .page main .td-correspondences .td-card-reference-table .td-card-cell-label { display: none; }

    /* Shared mobile affordance on site disclosures, including TOC, FAQ and categories. */
    body summary.td-has-expand-ui {
        display: flex !important; align-items: center; gap: 8px; list-style: none;
    }
    body summary.td-has-expand-ui::after { content: none !important; }
    body summary.td-has-expand-ui::marker { content: ""; }
    body summary.td-has-expand-ui::-webkit-details-marker { display: none; }
    body summary.td-has-expand-ui > .td-disclosure-label { flex: 1 1 auto; min-width: 0; }
    body summary.td-has-expand-ui > .td-expand-affordance {
        display: inline-flex; align-items: center; gap: 5px; margin-left: auto; flex: 0 0 auto; font-weight: 400;
    }
    body details:not([open]) > summary.td-has-expand-ui > .td-expand-affordance > .td-expand-hint,
    body button.td-has-expand-hint[aria-expanded="false"] > .td-expand-hint {
        display: inline; font-family: Arial, sans-serif; font-size: 9px; line-height: 1.2;
        font-weight: 400; letter-spacing: normal; text-transform: none; white-space: nowrap;
    }
    body summary.td-has-expand-ui .td-header-category-chevron { display: none; }
    body .td-footer-category-toggle.td-has-expand-hint {
        flex: 0 0 auto; width: auto; min-width: 40px; padding-inline: 6px; gap: 5px;
    }
}

@media (max-width: 781px) {
    .td-editorial-archive-page .td-editorial-category-sidebar .td-nav-topic > summary.td-has-expand-ui {
        padding-right: 6px !important;
    }
}
