/*
Theme Name: BI Insight Modern v2.0
Theme URI: https://biinsight.com
Author: Soheil Bakhshi
Description: A restrained technical authority theme for long-form writing on data, analytics, and agentic BI.
Version: 2.0.2
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: biinsight-modern-v2-0
*/

:root {
    --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "Fira Code", monospace;
    --color-yellow: #f1d046;
    --color-blue: #29528f;
    --color-navy: #132642;
    --color-deep: #04090f;
    --color-orange: #e87037;
    --color-green: #4fa348;
    --color-green-deep: #295626;
    --color-red: #dc5233;
    --color-red-deep: #8f3521;
    --page-bg: #ffffff;
    --section-bg: #f7f8fa;
    --surface: #ffffff;
    --surface-alt: #f2f5f8;
    --text: #0d1117;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border: #e2e6ea;
    --border-strong: #cbd5df;
    --link: #29528f;
    --link-hover: #dc5233;
    --header-bg: #3f6ca9;
    --header-text: #ffffff;
    --header-border: rgba(19, 38, 66, 0.12);
    --footer-bg: #132642;
    --footer-text: #e8edf3;
    --code-bg: #0d1c2e;
    --code-text: #e8edf3;
    --hero-bg:
        radial-gradient(circle at top right, rgba(241, 208, 70, 0.16), transparent 28%),
        radial-gradient(circle at left center, rgba(41, 82, 143, 0.14), transparent 34%),
        linear-gradient(135deg, #edf5ff, #f8fbff 58%, #f9f4de);
    --hero-text: #132642;
    --hero-muted: #425a77;
    --hero-card-bg: rgba(255, 255, 255, 0.88);
    --hero-card-border: rgba(19, 38, 66, 0.1);
    --hero-card-text: #132642;
    --hero-card-muted: #425a77;
    --shadow-sm: 0 12px 30px rgba(4, 9, 15, 0.06);
    --shadow-md: 0 20px 50px rgba(4, 9, 15, 0.12);
    --radius-sm: 3px;
    --radius-md: 8px;
    --radius-lg: 18px;
    --space-1: 0.5rem;
    --space-2: 0.75rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: 3rem;
    --space-7: 4rem;
    --space-8: 5rem;
    --container: min(900px, calc(100vw - 2rem));
    --reading-width: clamp(760px, 72vw, 900px);
    --reading-max: min(var(--reading-width), calc(100vw - 2rem));
    --transition: 200ms ease;
}

html[data-theme="dark"] {
    --page-bg: #04090f;
    --section-bg: #08111d;
    --surface: #0d1c2e;
    --surface-alt: #0f2238;
    --text: #e8edf3;
    --text-secondary: #9aafc5;
    --text-muted: #5a7291;
    --border: #1f3147;
    --border-strong: #294766;
    --link: #6ea3d6;
    --link-hover: #f1d046;
    --header-bg: #04090f;
    --header-text: #ffffff;
    --header-border: rgba(241, 208, 70, 0.14);
    --footer-bg: #04090f;
    --footer-text: #e8edf3;
    --hero-bg:
        radial-gradient(circle at top right, rgba(241, 208, 70, 0.16), transparent 30%),
        linear-gradient(135deg, var(--color-navy), color-mix(in srgb, var(--color-navy) 80%, #04090f 20%));
    --hero-text: #ffffff;
    --hero-muted: rgba(255, 255, 255, 0.84);
    --hero-card-bg: rgba(255, 255, 255, 0.08);
    --hero-card-border: rgba(255, 255, 255, 0.16);
    --hero-card-text: #ffffff;
    --hero-card-muted: rgba(255, 255, 255, 0.84);
    --shadow-sm: 0 16px 40px rgba(0, 0, 0, 0.34);
    --shadow-md: 0 22px 60px rgba(0, 0, 0, 0.42);
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme]) {
        --page-bg: #04090f;
        --section-bg: #08111d;
        --surface: #0d1c2e;
        --surface-alt: #0f2238;
        --text: #e8edf3;
        --text-secondary: #9aafc5;
        --text-muted: #5a7291;
        --border: #1f3147;
        --border-strong: #294766;
        --link: #6ea3d6;
        --link-hover: #f1d046;
        --header-bg: #04090f;
        --header-text: #ffffff;
        --header-border: rgba(241, 208, 70, 0.14);
        --footer-bg: #04090f;
        --footer-text: #e8edf3;
        --hero-bg:
            radial-gradient(circle at top right, rgba(241, 208, 70, 0.16), transparent 30%),
            linear-gradient(135deg, var(--color-navy), color-mix(in srgb, var(--color-navy) 80%, #04090f 20%));
        --hero-text: #ffffff;
        --hero-muted: rgba(255, 255, 255, 0.84);
        --hero-card-bg: rgba(255, 255, 255, 0.08);
        --hero-card-border: rgba(255, 255, 255, 0.16);
        --hero-card-text: #ffffff;
        --hero-card-muted: rgba(255, 255, 255, 0.84);
        --shadow-sm: 0 16px 40px rgba(0, 0, 0, 0.34);
        --shadow-md: 0 22px 60px rgba(0, 0, 0, 0.42);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.8;
    text-rendering: optimizeLegibility;
    transition: background-color var(--transition), color var(--transition);
}

.site-main {
    min-height: 50vh;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color var(--transition), border-color var(--transition), background-color var(--transition), transform var(--transition);
}

a:hover,
a:focus-visible {
    color: var(--link-hover);
}

p,
ul,
ol,
blockquote,
pre,
table {
    margin: 0 0 1.6em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.7em;
    color: var(--text);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(1.875rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.375rem); }
h4 { font-size: 1.125rem; }

code,
pre,
kbd,
samp {
    font-family: var(--font-mono);
}

blockquote {
    padding: 0.3rem 0 0.3rem 1.25rem;
    border-left: 3px solid var(--color-yellow);
    color: var(--text-secondary);
}

hr,
.wp-block-separator {
    border: 0;
    border-top: 1px solid var(--border);
}

.container {
    width: var(--container);
    margin-inline: auto;
}

.reading-width {
    width: min(var(--reading-max), 100%);
    margin-inline: auto;
}

.entry-content,
.entry-header,
.entry-footer,
.author-strip,
.author-box,
.toc-card,
.comments-area,
.post-navigation,
.ad-slot {
    width: 100%;
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 10000;
    padding: 0.75rem 1rem;
    background: var(--color-yellow);
    color: var(--color-navy);
    border-radius: var(--radius-sm);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    color: var(--header-text);
    border-bottom: 1px solid var(--header-border);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 0.65rem;
    min-height: 48px;
    padding-block: 0.3rem;
}

.site-branding {
    min-width: 0;
}

.custom-logo {
    height: 40px;
    width: auto;
    display: block;
}

.site-title {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--header-text);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-title-mark {
    display: inline-block;
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: var(--color-yellow);
    box-shadow: 0 0 0 6px rgba(241, 208, 70, 0.13);
}

.site-description {
    display: none;
}

.nav-toggle,
.search-toggle,
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--header-text);
    cursor: pointer;
}

.nav-toggle {
    display: none;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.theme-toggle .icon-sun {
    display: none;
}

html[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

html[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

.primary-navigation {
    justify-self: end;
    min-width: 0;
}

.header-actions {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.header-search {
    position: relative;
}

.header-search-panel {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    width: min(26rem, calc(100vw - 2rem));
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.25rem);
    transition: opacity var(--transition), transform var(--transition);
    z-index: 1300;
}

.header-search:hover .header-search-panel,
.header-search:focus-within .header-search-panel,
.header-search.is-open .header-search-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.header-search-form {
    margin: 0;
}

.header-search-input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.header-search-input:focus {
    outline: 0;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-blue) 18%, transparent);
}

.header-search-status {
    min-height: 1rem;
    margin-top: 0.55rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.header-search-results {
    display: grid;
    gap: 0.35rem;
    margin: 0.55rem 0 0;
    padding: 0;
    list-style: none;
}

.header-search-results[hidden] {
    display: none;
}

.header-search-result {
    display: grid;
    gap: 0.15rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text);
    background: transparent;
}

.header-search-result:hover,
.header-search-result:focus-visible,
.header-search-result.is-active {
    border-color: color-mix(in srgb, var(--color-blue) 28%, var(--border));
    background: var(--surface-alt);
    color: var(--text);
}

.header-search-result-title {
    font-size: 0.92rem;
    line-height: 1.35;
    font-weight: 600;
}

.header-search-result-meta {
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: nowrap;
}

.nav-menu > li {
    position: relative;
}

.nav-menu a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding-block: 0.18rem;
    padding-inline: 0.22rem;
    color: var(--header-text);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    border-radius: 999px;
    transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.nav-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.18rem;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--color-yellow);
    transition: transform var(--transition);
}

.nav-menu > li > a:hover,
.nav-menu > li > a:focus-visible,
.nav-menu > li.current-menu-item > a {
    color: var(--color-yellow);
    background: rgba(255, 255, 255, 0.08);
}

.nav-menu .current-menu-item > a::after,
.nav-menu a:hover::after,
.nav-menu a:focus-visible::after {
    transform: scaleX(1);
}

.nav-menu .menu-item-type-custom.menu-item-has-children > a,
.nav-menu > .menu-item-has-children > a[data-has-submenu="true"] {
    padding: 0.34rem 0.68rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.nav-menu .menu-item-type-custom.menu-item-has-children > a:hover,
.nav-menu .menu-item-type-custom.menu-item-has-children > a:focus-visible,
.nav-menu > .menu-item-has-children.is-submenu-open > a[data-has-submenu="true"] {
    border-color: rgba(241, 208, 70, 0.45);
    background: rgba(241, 208, 70, 0.12);
}

.nav-menu .menu-item-has-children > a::before {
    content: "▾";
    margin-right: 0.2rem;
    font-size: 0.7em;
}

.nav-menu .sub-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    display: none;
    min-width: 16rem;
    margin: 0;
    padding: 0.55rem 0.7rem;
    list-style: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    z-index: 1200;
}

.nav-menu .sub-menu li + li {
    border-top: 1px solid var(--border);
}

.nav-menu .sub-menu a {
    display: block;
    padding: 0.75rem 0;
    color: var(--text);
}

.nav-menu .sub-menu a::after {
    display: none;
}

.nav-menu > li:hover > .sub-menu,
.nav-menu > li.is-submenu-open > .sub-menu,
.nav-menu > li:focus-within > .sub-menu {
    display: block;
}

.hero {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: 1.65rem 0 1.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
    gap: 1rem;
    align-items: stretch;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.hero-pill {
    display: inline-block;
    margin-bottom: 0.85rem;
    padding: 0.28rem 0.75rem;
    border: 1px solid color-mix(in srgb, var(--color-yellow) 55%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-yellow) 18%, transparent);
    color: var(--hero-text);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1;
}

.hero-eyebrow {
    margin-bottom: 0.7rem;
    color: var(--hero-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-title {
    margin-bottom: 0.8rem;
    color: var(--hero-text);
    max-width: 18ch;
}

.hero-description {
    max-width: 58ch;
    color: var(--hero-muted);
}

.hero--page .hero-title {
    max-width: none;
}

.hero--page .hero-description {
    margin-bottom: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.1rem;
}

.hero-identity,
.feature-card,
.content-panel,
.post-card,
.toc-card,
.author-strip,
.author-box,
.authority-block,
.sidebar-panel,
.consultancy-card,
.archive-heading,
.not-found-card,
.ad-slot {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.hero-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1.35rem 1.25rem;
    background: var(--hero-card-bg);
    border-color: var(--hero-card-border);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.hero-identity-photo {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--hero-card-border), 0 6px 20px rgba(0, 0, 0, 0.22);
}

.hero-identity-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-identity-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.hero-identity-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--hero-card-text);
    letter-spacing: -0.01em;
}

.hero-identity-line {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-yellow);
    letter-spacing: 0.04em;
    line-height: 1.45;
}

.hero-cred-badge {
    background: var(--color-yellow);
    color: var(--color-navy);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.12rem 0.38rem;
    border-radius: var(--radius-sm);
    line-height: 1.3;
    flex-shrink: 0;
    text-transform: uppercase;
}

.hero-identity-line a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.18s ease;
}

.hero-identity-line a:hover {
    text-decoration-color: var(--color-yellow);
}

.section {
    padding: var(--space-6) 0;
}

/* Alternate section shading by DOM position — order-independent */
.site-main > .section:nth-child(odd) {
    background: var(--section-bg);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-heading-title {
    margin: 0;
}

.section-heading-kicker {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.625rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.button--primary,
.wp-block-button.is-style-fill .wp-block-button__link,
.wp-block-button__link:not(.has-background) {
    background: var(--color-navy);
    color: #ffffff;
}

.button--primary:hover,
.button--primary:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
    background: var(--color-yellow);
    color: var(--color-navy);
}

html[data-theme="dark"] .button,
html[data-theme="dark"] .button--primary,
html[data-theme="dark"] .wp-block-button__link {
    border-color: rgba(255, 255, 255, 0.18);
}

.button--ghost {
    background: transparent;
    color: var(--color-navy);
    border-color: var(--color-navy);
}

.button--ghost:hover,
.button--ghost:focus-visible {
    background: var(--color-navy);
    color: #ffffff;
}

html[data-theme="dark"] .button--ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.45);
}

html[data-theme="dark"] .button--ghost:hover,
html[data-theme="dark"] .button--ghost:focus-visible {
    background: rgba(255, 255, 255, 0.12);
}

/* ── Topic Graph Modal ─────────────────────────────────── */

#bim2-topic-graph-modal {
    position: fixed;
    inset: 0;
    z-index: 9900;
    display: flex;
    align-items: center;
    justify-content: center;
}

#bim2-topic-graph-modal[hidden] {
    display: none;
}

.tgm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 18, 30, 0.72);
    backdrop-filter: blur(3px);
}

.tgm-panel {
    position: relative;
    z-index: 1;
    width: min(96vw, 1080px);
    height: min(90vh, 760px);
    background: var(--bg-card, #ffffff);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

html[data-theme="dark"] .tgm-panel {
    background: #1a2535;
}

.tgm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

html[data-theme="dark"] .tgm-header {
    border-color: rgba(255, 255, 255, 0.08);
}

.tgm-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-navy);
}

html[data-theme="dark"] .tgm-title {
    color: #ffffff;
}

.tgm-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.tgm-close:hover { background: rgba(0, 0, 0, 0.06); }

html[data-theme="dark"] .tgm-close:hover { background: rgba(255, 255, 255, 0.08); }

.tgm-legend {
    display: flex;
    gap: 1.25rem;
    padding: 0.55rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

html[data-theme="dark"] .tgm-legend {
    border-color: rgba(255, 255, 255, 0.06);
}

.tgm-legend-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted, #666);
}

.tgm-legend-item::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.tgm-legend--category::before { background: #132642; }
.tgm-legend--tag::before      { background: #f1d046; border: 1.5px solid #c8a800; }
.tgm-legend--post::before     { background: #29528f; }

.tgm-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted, #666);
    pointer-events: none;
    z-index: 2;
}

.tgm-svg {
    flex: 1;
    width: 100%;
    display: block;
}

.tgm-hint {
    flex-shrink: 0;
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted, #999);
    padding: 0.4rem 1rem;
    margin: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

html[data-theme="dark"] .tgm-hint {
    border-color: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
}

.tgm-tooltip {
    position: absolute;
    background: rgba(19, 38, 66, 0.9);
    color: #ffffff;
    font-size: 0.78rem;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    pointer-events: none;
    white-space: nowrap;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 10;
}

@media (max-width: 600px) {
    .tgm-panel {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
    }
}

.featured-grid,
.content-hub-grid,
.media-hub-grid,
.post-grid,
.archive-grid {
    display: grid;
    gap: 1.5rem;
}

.featured-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
}

.feature-card,
.content-panel,
.post-card,
.consultancy-card,
.archive-heading,
.not-found-card {
    padding: 1.5rem;
}

.feature-card-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: calc(var(--radius-md) - 2px);
    margin-bottom: 1.25rem;
    background: var(--surface-alt);
}

.feature-card-media img,
.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-hub-grid {
    --mh-rows: 2; /* CSS fallback; overridden by inline style from Customizer */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.content-panel-list {
    display: grid;
    gap: 0.85rem;
}

.feature-card h3,
.content-panel h3,
.post-card h2,
.archive-heading h1 {
    margin-bottom: 0.55rem;
}

.content-panel-item {
    min-width: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.content-panel-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.content-panel h3 {
    font-size: 1.05rem;
    line-height: 1.35;
}

.content-panel-item h4,
.media-item h4,
.media-library-item h2 {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
}

.content-panel-item a,
.media-item a,
.media-library-item a {
    overflow-wrap: anywhere;
}

.topic-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.topic-pill,
.topic-chip,
.entry-taxonomy a,
.tag-cloud-link,
.post-tags a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
}

/* ── Topics: expand / collapse ──────────────────────────────────────── */
.topic-pill--overflow {
    display: none;
}

#bim2-topic-grid.is-expanded .topic-pill--overflow {
    display: inline-flex;
}

.topic-expand-row {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

.topic-see-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.topic-see-more:hover,
.topic-see-more:focus-visible {
    border-color: var(--color-blue);
    color: var(--color-blue);
    outline: none;
}

.topic-see-more__icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.topic-see-more[aria-expanded="true"] .topic-see-more__icon {
    transform: rotate(180deg);
}

.topic-chip--category,
.entry-taxonomy .category-chip {
    border-color: transparent;
    background: var(--color-blue);
    color: #ffffff;
}

.post-grid,
.archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1rem;
}

.post-card:hover,
.post-card:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.post-card-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: calc(var(--radius-md) - 2px);
    background: var(--surface-alt);
}

.post-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.card-meta,
.entry-meta,
.author-strip-meta,
.author-box-meta,
.feature-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.meta-sep::before {
    content: "·";
}

/* ── Card variant hierarchy ──────────────────────────────────────────────── */

.post-card--featured .post-card-body {
    gap: 1rem;
}

.post-card--featured .post-card-body h3,
.post-card--featured .post-card-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 0;
}

.post-card--standard .post-card-body {
    gap: 0.75rem;
}

.post-card--standard .post-card-body h2,
.post-card--standard .post-card-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.post-card--compact {
    flex-direction: row;
    align-items: flex-start;
    padding: 1rem;
}

.post-card-thumb--compact {
    width: 72px;
    height: 72px;
    aspect-ratio: 1;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: calc(var(--radius-md) - 2px);
    background: var(--surface-alt);
}

.post-card-thumb--compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card--compact .post-card-body {
    gap: 0.35rem;
}

.post-card--compact .post-card-body h2,
.post-card--compact .post-card-body h3 {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0;
}

.post-card--compact .card-meta {
    font-size: 0.76rem;
}

.entry-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    padding: var(--space-6) 0;
}

.entry-layout--editorial {
    width: min(1180px, calc(100vw - 2rem));
    max-width: none;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2rem;
    align-items: stretch;
    transition: grid-template-columns var(--transition), gap var(--transition), width var(--transition);
}

html[data-sidebar-state="collapsed"] .entry-layout--editorial {
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 1rem;
}

.entry-layout-primary {
    align-self: stretch;
    min-width: 0;
}

.reading-progress {
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 1100;
    width: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--color-red)    0%,
        var(--color-orange) 35%,
        var(--color-yellow) 65%,
        var(--color-green)  100%
    );
    box-shadow: 0 0 0 1px rgba(4, 9, 15, 0.08), 0 3px 10px rgba(220, 82, 51, 0.3);
    transition: width 120ms linear;
}

.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    margin-bottom: 0.75rem;
}

.author-strip,
.author-box {
    display: grid;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
}

.author-strip {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    margin-bottom: 1.5rem;
}

.author-box {
    grid-template-columns: auto minmax(0, 1fr);
    margin-top: 2rem;
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface-alt);
}

.author-strip .author-avatar {
    width: 52px;
    height: 52px;
}

.author-links,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.author-links a,
.footer-links a {
    font-size: 0.9rem;
}

/* ── Author module variant system ──────────────────────────── */

.author-module-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0.15rem 0 0.35rem;
    color: var(--text-primary);
}

.author-module--full .author-module-name {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
}

.author-module-credibility {
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.author-module--full .author-avatar {
    width: 80px;
    height: 80px;
}

.author-module--compact .author-avatar {
    width: 52px;
    height: 52px;
}

/* Micro variant — circular headshot only, no body text */
.author-module--micro {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    gap: 0;
}

.author-module--micro .author-avatar {
    width: 36px;
    height: 36px;
}

.author-module--micro .author-module-body {
    display: none;
}

.toc-card {
    margin-bottom: 1.5rem;
    padding: 1rem 1.15rem;
    position: relative;
}

.toc-card ol {
    margin: 0.75rem 0 0;
    padding-left: 1.2rem;
    list-style-type: decimal;
}

.toc-card .toc-sublist {
    list-style-type: upper-alpha;
    margin: 0.25rem 0 0;
    padding-left: 1.5rem;
}

.toc-card.is-collapsed ol {
    display: block;
    max-height: 4.8rem;
    overflow: hidden;
    position: relative;
}

.toc-card.is-collapsed ol::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 2rem;
    background: linear-gradient(180deg, transparent, var(--surface));
}

.toc-card li + li {
    margin-top: 0.35rem;
}

.toc-heading {
    align-items: start;
}

.toc-title {
    font-size: 1rem;
}

.toc-button {
    flex-shrink: 0;
    font-size: 0.72rem;
}

.entry-content h2,
.entry-content h3 {
    scroll-margin-top: 6rem;
}

.entry-content h2 {
    position: relative;
    padding-left: 0.9rem;
}

.entry-content h2::before,
.entry-content h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 3px;
    height: calc(100% - 0.4em);
    background: var(--color-yellow);
    opacity: 0.75;
}

.entry-content h3 {
    position: relative;
    padding-left: 0.8rem;
}

.heading-anchor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    margin-left: 0.45rem;
    color: var(--text-muted);
    font-size: 0.82em;
    line-height: 1;
    opacity: 0;
    text-decoration: none !important;
    transition: opacity var(--transition), color var(--transition);
}

.entry-content h2:hover .heading-anchor,
.entry-content h2:focus-within .heading-anchor,
.entry-content h3:hover .heading-anchor,
.entry-content h3:focus-within .heading-anchor {
    opacity: 1;
}

.entry-content a {
    text-decoration: underline;
    text-decoration-color: rgba(241, 208, 70, 0.5);
    text-underline-offset: 0.18em;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.4rem;
}

.entry-content pre,
.entry-content .wp-block-code,
.entry-content code {
    background: var(--code-bg);
    color: var(--code-text);
}

.entry-content code {
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

.entry-content pre,
.entry-content .wp-block-code {
    overflow-x: auto;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-md);
    border: 1px solid color-mix(in srgb, var(--color-blue) 30%, transparent);
}

.content-callout,
.wp-block-quote.is-style-large,
.wp-block-pullquote {
    padding: 1rem 1.1rem 1rem 1.2rem;
    border-left: 3px solid var(--color-yellow);
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
}

.content-callout--warning {
    border-left-color: var(--color-orange);
}

.content-callout--tip {
    border-left-color: var(--color-green);
}

.content-callout--info {
    border-left-color: var(--color-blue);
}

.entry-featured-image {
    margin-bottom: 1.75rem;
}

.entry-featured-image img {
    border-radius: var(--radius-md);
}

.entry-footer {
    margin-top: 1.75rem;
}

.post-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: min(var(--reading-max), 100%);
    margin: 2rem auto 0;
}

.post-navigation-card {
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.post-navigation-card--origin {
    background: var(--surface-alt);
    border-color: var(--border-strong);
}

.post-navigation-origin-kicker {
    font-style: italic;
}

.authority-sidebar {
    --sidebar-pl: 2rem;
    position: relative;
    align-self: stretch;
    min-width: 0;
    min-height: 100%;
    padding-left: var(--sidebar-pl);
    border-left: 3px solid var(--border);
    overflow: visible;
}

.authority-sidebar-sticky {
    position: sticky;
    top: 80px;
    padding-bottom: 2rem;
}

.authority-sidebar-toggle {
    position: absolute;
    /* top:50% centres relative to .authority-sidebar-sticky (sticky = containing block) */
    top: 50%;
    /* step left by the full padding + half the 3px border to land on border midpoint */
    left: calc(-1 * var(--sidebar-pl) - 1.5px);
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    transition: background var(--transition), color var(--transition);
}

.authority-sidebar-toggle:hover,
.authority-sidebar-toggle:focus-visible {
    background: var(--surface-raised, var(--surface));
    color: var(--text);
    outline: none;
}

/* CSS chevron via two borders rotated */
.authority-sidebar-toggle-icon {
    display: block;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    /* ‹ points left = collapse */
    transform: rotate(-45deg) translate(-1px, 1px);
    transition: transform var(--transition);
    flex-shrink: 0;
}

/* › points right = expand */
html[data-sidebar-state="collapsed"] .authority-sidebar-toggle-icon {
    transform: rotate(135deg) translate(-1px, 1px);
}

.authority-sidebar-panel > * {
    min-width: 0;
}

.authority-sidebar-panel {
    display: grid;
    gap: 1rem;
    min-width: 0;
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

html[data-sidebar-state="collapsed"] .authority-sidebar-panel {
    opacity: 0;
    transform: translateX(0.4rem);
    visibility: hidden;
    pointer-events: none;
}

html[data-sidebar-state="collapsed"] .authority-sidebar {
    --sidebar-pl: 0;
    cursor: pointer;
}

html[data-sidebar-state="collapsed"] .authority-sidebar:hover {
    background: var(--surface-alt, rgba(128, 128, 128, 0.06));
}

/* Collapsed identity panel — position:absolute so it doesn't affect layout height */
.authority-sidebar-collapsed {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 0.75rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 150ms ease, visibility 150ms ease;
    z-index: 1;
}

html[data-sidebar-state="collapsed"] .authority-sidebar-collapsed {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.authority-sidebar-collapsed .asc-avatar img {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: block;
    object-fit: cover;
}

.authority-sidebar-collapsed .asc-book img {
    width: 24px;
    height: auto;
    max-height: 32px;
    display: block;
    border-radius: 2px;
    object-fit: cover;
}

.authority-sidebar-collapsed .asc-book a {
    display: block;
    line-height: 0;
}

/* Connect icons — vertical stack of branded pills in collapsed mode */
.authority-sidebar-collapsed .asc-connect-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.asc-connect-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity var(--transition), transform var(--transition);
}

.asc-connect-icon:hover {
    opacity: 0.85;
    transform: scale(1.1);
}

.asc-connect-icon[data-platform="linkedin"]  { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.asc-connect-icon[data-platform="youtube"]   { background: #ff0000; border-color: #ff0000; color: #fff; }
.asc-connect-icon[data-platform="x"]         { background: #000;    border-color: #000;    color: #fff; }
.asc-connect-icon[data-platform="bluesky"]   { background: #fff;    border-color: #d0d0d0; }
.asc-connect-icon[data-platform="facebook"]  { background: #1877f2; border-color: #1877f2; color: #fff; }
.asc-connect-icon[data-platform="instagram"] { background: #c13584; border-color: #c13584; color: #fff; }
.asc-connect-icon[data-platform="reddit"]    { background: #fff;    border-color: #d0d0d0; }

.authority-block {
    display: grid;
    gap: 0.75rem;
    padding: 1.1rem 1.15rem;
}

.authority-block:last-child {
    padding-bottom: 1.1rem;
}

.authority-block h2,
.authority-block h3 {
    margin: 0;
    font-size: 1rem;
}

.authority-block p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.authority-block-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.authority-author {
    display: grid;
    gap: 0.85rem;
}

.authority-author-avatar img {
    width: 84px;
    height: 84px;
    border-radius: 999px;
    display: block;
    background: var(--surface-alt);
}

.authority-author-credibility {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 600;
}

.authority-book-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.authority-book {
    display: grid;
    gap: 0.45rem;
    color: inherit;
    text-decoration: none;
}

.authority-book img,
.authority-book-fallback {
    display: block;
    width: 100%;
    aspect-ratio: 0.72;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-alt);
}

.authority-book img {
    object-fit: cover;
}

.authority-book-fallback {
    display: grid;
    place-items: center;
    padding: 0.75rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.authority-book-title {
    font-size: 0.84rem;
    line-height: 1.4;
}

.authority-link-list,
.authority-featured-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.authority-link-list a,
.authority-featured-list a,
.authority-text-link {
    color: inherit;
    text-decoration: none;
}

.authority-link-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.authority-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
}

.authority-link-icon[data-platform="linkedin"]  { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.authority-link-icon[data-platform="youtube"]   { background: #ff0000; border-color: #ff0000; color: #fff; }
.authority-link-icon[data-platform="x"]         { background: #000;    border-color: #000;    color: #fff; }
.authority-link-icon[data-platform="bluesky"]   { background: #fff;    border-color: #d0d0d0;  }
.authority-link-icon[data-platform="facebook"]  { background: #1877f2; border-color: #1877f2; color: #fff; }
.authority-link-icon[data-platform="instagram"] { background: #c13584; border-color: #c13584; color: #fff; }
.authority-link-icon[data-platform="reddit"]    { background: #fff;    border-color: #d0d0d0; }

.authority-link-icon svg,
.asc-connect-icon svg {
    width: 0.85em;
    height: 0.85em;
    display: block;
    flex-shrink: 0;
}

.authority-icon-img {
    width: 0.9em;
    height: 0.9em;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.authority-featured-list li + li {
    padding-top: 0.65rem;
    border-top: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
}

.authority-text-link {
    color: var(--link);
    font-weight: 600;
}

.authority-text-link:hover,
.authority-text-link:focus-visible,
.authority-link-list a:hover,
.authority-link-list a:focus-visible,
.authority-featured-list a:hover,
.authority-featured-list a:focus-visible,
.authority-book:hover .authority-book-title,
.authority-book:focus-visible .authority-book-title {
    color: var(--link-hover);
}

.sidebar {
    display: grid;
    gap: 1rem;
}

.sidebar-panel {
    padding: 1.1rem 1.15rem;
}

.sidebar-panel h3 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.widget-title,
.footer-widget-title {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.sidebar-panel ul {
    margin: 0;
    padding-left: 1rem;
}

.sidebar-panel li + li {
    margin-top: 0.45rem;
}

.consultancy-card {
    display: grid;
    gap: 0.8rem;
    border-top: 3px solid var(--color-yellow);
}

.ad-slot {
    padding: 1rem 1.15rem;
    margin: 1.75rem auto;
}

.ad-slot-label {
    display: inline-block;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pagination .nav-links,
.pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.archive-heading {
    margin-bottom: 1.5rem;
}

.archive-description > *:last-child {
    margin-bottom: 0;
}

.pagination {
    margin-top: 2.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.pagination .page-numbers {
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.pagination .current {
    background: var(--color-yellow);
    border-color: var(--color-yellow);
    color: var(--color-navy);
}

.site-footer {
    margin-top: var(--space-7);
    background: var(--footer-bg);
    color: var(--footer-text);
}

.footer-accent-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--color-yellow) 0%, var(--color-blue) 55%, transparent 100%);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr;
    gap: 0;
    padding: var(--space-6) 0 var(--space-5);
    align-items: start;
}

.footer-col {
    min-width: 0;
    padding: 0 1.75rem;
}

.footer-col:first-child {
    padding-left: 0;
}

.footer-col:last-child {
    padding-right: 0;
}

.footer-col + .footer-col {
    border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-site-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--footer-text);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.footer-site-tagline {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-yellow);
    margin: 0 0 0.7rem;
    line-height: 1.4;
    opacity: 0.9;
}

.footer-site-desc {
    font-size: 0.85rem;
    color: rgba(232, 237, 243, 0.55);
    line-height: 1.65;
    margin: 0 0 1.25rem;
}

.footer-advisory-btn {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.95rem !important;
}

.footer-col-heading {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: rgba(232, 237, 243, 0.38);
    margin: 0 0 0.9rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Latest Reads ── */
.footer-latest-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
}

.footer-latest-item {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    gap: 0.15rem;
}

.footer-latest-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.footer-latest-cat {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-yellow);
    opacity: 0.75;
}

.footer-latest-item a {
    font-size: 0.83rem;
    font-weight: 500;
    line-height: 1.35;
    color: rgba(232, 237, 243, 0.7) !important;
    display: block;
    transition: color var(--transition);
}

.footer-latest-item a:hover {
    color: var(--footer-text) !important;
}

/* ── Explore Topics ── */
.footer-topic-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.footer-topic-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.27rem 0.62rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.73rem;
    font-weight: 500;
    color: rgba(232, 237, 243, 0.65) !important;
    line-height: 1;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.footer-topic-pill__count {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.5;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0.1rem 0.38rem;
    line-height: 1.4;
    letter-spacing: 0.02em;
    transition: background var(--transition), opacity var(--transition);
}

.footer-topic-pill:hover .footer-topic-pill__count {
    background: rgba(241, 208, 70, 0.15);
    opacity: 0.85;
}

.footer-topic-pill:hover {
    border-color: var(--color-yellow);
    background: rgba(241, 208, 70, 0.1);
    color: var(--color-yellow) !important;
}

/* ── Social Icons ── */
.footer-social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.2rem;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(232, 237, 243, 0.65) !important;
    flex-shrink: 0;
    transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}

.footer-social-link:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    color: var(--footer-text) !important;
    transform: translateY(-2px);
}

/* ── Channels ── */
.footer-channels {
    display: grid;
    gap: 0.5rem;
}

.footer-channel-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: rgba(232, 237, 243, 0.6) !important;
    transition: color var(--transition);
}

.footer-channel-link:hover {
    color: var(--footer-text) !important;
}

.footer-channel-link svg {
    flex-shrink: 0;
    opacity: 0.65;
    transition: opacity var(--transition);
}

.footer-channel-link:hover svg {
    opacity: 1;
}

/* ── Meta bar ── */
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer a {
    color: var(--footer-text);
}

.footer-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 0 1.4rem;
    color: rgba(232, 237, 243, 0.45);
    font-size: 0.8rem;
}

.footer-meta .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.footer-meta-copy strong {
    color: rgba(232, 237, 243, 0.75);
    font-weight: 600;
}

.footer-back-top {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(232, 237, 243, 0.45) !important;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.28rem 0.7rem;
    transition: color var(--transition), border-color var(--transition);
}

.footer-back-top:hover {
    color: var(--footer-text) !important;
    border-color: rgba(255, 255, 255, 0.3);
}

.media-embed-card {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

.media-list {
    display: grid;
    gap: 0.75rem;
}

.media-item {
    display: grid;
    min-width: 0;
    gap: 0.45rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.media-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.media-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.media-thumb {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-sm);
    aspect-ratio: 16 / 9;
}

.media-thumb img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.media-actions,
.subscribe-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

.content-hub-viewall {
    margin-top: 0.6rem;
    font-size: 0.85rem;
}

.content-hub-viewall a {
    color: var(--color-yellow);
    text-decoration: none;
    font-weight: 500;
}

.content-hub-viewall a:hover {
    text-decoration: underline;
}

.subscribe-card {
    display: grid;
    gap: 0.8rem;
}

.media-library-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.media-library-item {
    padding: 1.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.audio-player {
    width: 100%;
    margin-top: 0.8rem;
}

.audio-player,
.wp-block-audio audio {
    color-scheme: light;
    accent-color: var(--link);
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
}

.audio-player::-webkit-media-controls-panel,
.wp-block-audio audio::-webkit-media-controls-panel {
    background: var(--surface-alt);
}

html[data-theme="dark"] .audio-player,
html[data-theme="dark"] .wp-block-audio audio {
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme]) .audio-player,
    html:not([data-theme]) .wp-block-audio audio {
        color-scheme: dark;
    }
}

.embed-frame {
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
}

.embed-frame iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.media-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.media-item-related {
    margin: 0.1rem 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

.media-item-related a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.media-item-related a:hover {
    color: var(--text-secondary);
}

/* Relative podcast mode — fills the video column height and clips overflow */
.media-hub-grid .content-panel {
    display: flex;
    flex-direction: column;
}

.media-embed-card--relative {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.media-embed-card--relative .media-list {
    flex: 1 1 0;
    overflow: hidden;
    min-height: 0;
}

.media-embed-card--relative .media-actions {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 0.4rem;
}

.related-post-list {
    display: grid;
    gap: 0.35rem;
    margin: 0.15rem 0 0;
    padding-left: 1rem;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.4;
}

.related-post-list--library {
    margin-top: 0.75rem;
}

.related-post-list li::marker {
    color: var(--text-muted);
}

.wp-block-image figcaption,
.wp-element-caption,
figcaption {
    margin-top: 0.65rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.wp-block-table {
    overflow-x: auto;
}

.wp-block-table table,
table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
}

.wp-block-table th,
.wp-block-table td,
table th,
table td {
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--border);
    text-align: left;
}

.wp-block-group,
.wp-block-columns {
    margin-bottom: 1.6em;
}

.wp-block-gallery {
    gap: 0.75rem;
}

.wp-block-embed iframe,
.wp-block-embed video,
.wp-block-embed audio {
    max-width: 100%;
}

/* ================================================================
   HubSpot Embedded Form — Brand Override
   Targets the inline form rendered by hbspt.forms.create().
   HubSpot renders markup directly into the page (not an iframe)
   so these rules take effect once their JS builds the DOM.
   ================================================================ */

.hs-form fieldset {
    border: none;
    margin: 0;
    padding: 0;
    max-width: 100% !important;
}

.hs-form-field {
    margin-bottom: var(--space-4);
}

.hs-form label,
.hs-form legend {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
}

.hs-form input[type="text"],
.hs-form input[type="email"],
.hs-form input[type="tel"],
.hs-form input[type="number"],
.hs-form input[type="url"],
.hs-form textarea,
.hs-form select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
    appearance: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.hs-form input[type="text"]::placeholder,
.hs-form input[type="email"]::placeholder,
.hs-form textarea::placeholder {
    color: var(--text-muted);
}

.hs-form input:focus,
.hs-form textarea:focus,
.hs-form select:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-blue) 18%, transparent);
}

.hs-form textarea {
    min-height: 130px;
    resize: vertical;
}

.hs-submit .hs-button,
.hs-button.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 2.2rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-navy) !important;
    background: var(--color-yellow) !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer;
    box-shadow: none !important;
    transition: background var(--transition), transform var(--transition);
}

.hs-submit .hs-button:hover,
.hs-button.primary:hover {
    background: color-mix(in srgb, var(--color-yellow) 82%, #000 18%) !important;
    transform: translateY(-1px);
}

/* Error messages */
.hs-error-msgs {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
}

.hs-error-msgs li label {
    font-size: 0.78rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--color-red);
}

/* Success message after submit */
.submitted-message,
.hs-form .submitted-message {
    padding: 1.2rem 1.5rem;
    background: var(--surface-alt);
    border-left: 3px solid var(--color-green);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
}

/* Privacy/legal consent copy */
.hs-richtext p,
.legal-consent-container p,
.legal-consent-container label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* Checkbox/radio inline labels */
.hs-form input[type="checkbox"],
.hs-form input[type="radio"] {
    accent-color: var(--color-blue);
    width: 1em;
    height: 1em;
    margin-right: 0.4em;
    vertical-align: middle;
}

/* HubSpot injects form markup/styles at runtime on Contact pages.
   Use stronger dark-mode selectors so embedded defaults do not stay light. */
html[data-theme="dark"] .full-width-page .hbspt-form,
html[data-theme="dark"] .full-width-page .hs-form {
    color: var(--text);
}

html[data-theme="dark"] .full-width-page .hs-form label,
html[data-theme="dark"] .full-width-page .hs-form legend,
html[data-theme="dark"] .full-width-page .hs-richtext,
html[data-theme="dark"] .full-width-page .hs-richtext p,
html[data-theme="dark"] .full-width-page .legal-consent-container p,
html[data-theme="dark"] .full-width-page .legal-consent-container label {
    color: var(--text-secondary) !important;
}

html[data-theme="dark"] .full-width-page .hs-form input[type="text"],
html[data-theme="dark"] .full-width-page .hs-form input[type="email"],
html[data-theme="dark"] .full-width-page .hs-form input[type="tel"],
html[data-theme="dark"] .full-width-page .hs-form input[type="number"],
html[data-theme="dark"] .full-width-page .hs-form input[type="url"],
html[data-theme="dark"] .full-width-page .hs-form textarea,
html[data-theme="dark"] .full-width-page .hs-form select {
    background: var(--surface-alt) !important;
    color: var(--text) !important;
    border-color: var(--border-strong) !important;
}

html[data-theme="dark"] .full-width-page .hs-form input::placeholder,
html[data-theme="dark"] .full-width-page .hs-form textarea::placeholder {
    color: var(--text-muted) !important;
}

html[data-theme="dark"] .full-width-page .hs-form input:focus,
html[data-theme="dark"] .full-width-page .hs-form textarea:focus,
html[data-theme="dark"] .full-width-page .hs-form select:focus {
    border-color: var(--color-yellow) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-yellow) 22%, transparent) !important;
}

html[data-theme="dark"] .full-width-page .hs-submit .hs-button,
html[data-theme="dark"] .full-width-page .hs-button.primary {
    background: var(--color-yellow) !important;
    color: var(--color-navy) !important;
}

html[data-theme="dark"] .full-width-page .submitted-message,
html[data-theme="dark"] .full-width-page .hs-form .submitted-message {
    background: var(--surface-alt) !important;
    color: var(--text) !important;
    border-left-color: var(--color-green) !important;
}

/* Contact page-specific hardening for HubSpot defaults in dark mode */
html[data-theme="dark"] .page-id-5918 .hs-form,
html[data-theme="dark"] .page-id-5918 .hbspt-form {
    color: var(--text) !important;
}

html[data-theme="dark"] .page-id-5918 .hs-form .hs-form-field > label,
html[data-theme="dark"] .page-id-5918 .hs-form .hs-form-field > label span,
html[data-theme="dark"] .page-id-5918 .hs-form .hs-form-required,
html[data-theme="dark"] .page-id-5918 .hs-form .inputs-list label,
html[data-theme="dark"] .page-id-5918 .hs-form .hs-richtext,
html[data-theme="dark"] .page-id-5918 .hs-form .hs-richtext p,
html[data-theme="dark"] .page-id-5918 .hs-form .legal-consent-container p,
html[data-theme="dark"] .page-id-5918 .hs-form .legal-consent-container label {
    color: var(--text-secondary) !important;
}

html[data-theme="dark"] .page-id-5918 .hs-form .hs-input,
html[data-theme="dark"] .page-id-5918 .hs-form input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] .page-id-5918 .hs-form textarea,
html[data-theme="dark"] .page-id-5918 .hs-form select {
    background-color: var(--surface-alt) !important;
    color: var(--text) !important;
    border-color: var(--border-strong) !important;
}

html[data-theme="dark"] .page-id-5918 .hs-form .hs-input::placeholder,
html[data-theme="dark"] .page-id-5918 .hs-form textarea::placeholder {
    color: var(--text-muted) !important;
}

html[data-theme="dark"] .page-id-5918 .hs-form .hs-input:focus,
html[data-theme="dark"] .page-id-5918 .hs-form input:focus,
html[data-theme="dark"] .page-id-5918 .hs-form textarea:focus,
html[data-theme="dark"] .page-id-5918 .hs-form select:focus {
    border-color: var(--color-yellow) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-yellow) 22%, transparent) !important;
}

html[data-theme="dark"] .page-id-5918 .hs-form .actions .hs-button,
html[data-theme="dark"] .page-id-5918 .hs-form .hs-submit .hs-button,
html[data-theme="dark"] .page-id-5918 .hs-form .hs-button.primary {
    background: var(--color-yellow) !important;
    color: var(--color-navy) !important;
    border: 1px solid color-mix(in srgb, var(--color-yellow) 75%, #000 25%) !important;
}

html[data-theme="dark"] .page-id-5918 .entry-content .wp-block-image img {
    filter: brightness(0.72) contrast(0.9);
    border-radius: var(--radius-md);
}

/* Fallback: when HubSpot renders the form inside a cross-origin iframe,
   direct field selectors cannot apply. In dark mode, tint the iframe itself. */
html[data-theme="dark"] .page-id-5918 .hbspt-form iframe,
html[data-theme="dark"] .page-id-5918 iframe[src*="hsforms"],
html[data-theme="dark"] .page-id-5918 iframe[id*="hs-form"],
html[data-theme="dark"] .page-id-5918 iframe[class*="hs-form"] {
    filter: invert(0.92) hue-rotate(180deg) saturate(0.92) contrast(0.96);
    border-radius: var(--radius-sm);
}

.comments-area {
    margin-top: 2rem;
}

.comments-area .comment-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.comments-area .comment-body {
    padding: 1rem 0;
    border-top: 1px solid var(--border);
}

.comments-area .comment-meta {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.not-found-card {
    width: min(780px, calc(100vw - 2rem));
    margin: var(--space-7) auto;
    text-align: center;
}

.not-found-code {
    color: var(--color-yellow);
    font-size: clamp(3rem, 10vw, 5.5rem);
    line-height: 1;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.screen-reader-text:focus {
    clip: auto !important;
    clip-path: none;
    height: auto;
    width: auto;
    margin: 0;
    padding: 0.5rem 0.8rem;
    background: var(--color-yellow);
    color: var(--color-navy);
}

:focus-visible {
    outline: 2px solid var(--color-yellow);
    outline-offset: 3px;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

@media (max-width: 1024px) {
    .featured-grid,
    .content-hub-grid,
    .media-hub-grid,
    .media-library-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    .footer-col {
        padding: 1.25rem 1.25rem;
    }

    .footer-col:first-child,
    .footer-col:last-child {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .footer-col + .footer-col {
        border-left: 0;
    }

    .footer-col:nth-child(odd) {
        border-right: 1px solid rgba(255, 255, 255, 0.07);
    }

    .footer-col:nth-child(1),
    .footer-col:nth-child(2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .entry-layout--editorial {
        width: var(--container);
        grid-template-columns: 1fr;
    }

    .authority-sidebar {
        min-height: auto;
        margin-top: 2rem;
        padding-left: 0;
        padding-top: 1.5rem;
        border-left: 0;
        border-top: 1px solid var(--border);
    }

    .authority-sidebar-sticky {
        position: static;
        padding-bottom: 0;
    }

    .authority-sidebar-toggle {
        display: none;
    }

    .authority-sidebar-panel {
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
    }

    .post-grid,
    .archive-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .header-inner {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .primary-navigation {
        position: absolute;
        inset: calc(100% + 1px) 0 auto 0;
        display: none;
        justify-self: stretch;
        padding: 0 1rem 1rem;
        background: var(--header-bg);
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .header-actions {
        gap: 0.4rem;
    }

    .header-search-panel {
        right: -0.2rem;
        width: min(24rem, calc(100vw - 1.25rem));
    }

    .site-header.is-menu-open .primary-navigation {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.75rem 0;
        flex-wrap: nowrap;
    }

    .nav-menu li + li {
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .nav-menu a {
        padding: 0.85rem 0;
    }

    .nav-menu a::after {
        bottom: 0.4rem;
    }

    .nav-menu .sub-menu {
        position: static;
        display: none;
        min-width: 0;
        margin: 0.35rem 0 0.75rem 0.8rem;
        padding: 0.35rem 0 0 0.75rem;
        border: 0;
        border-left: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .nav-menu .sub-menu li + li {
        border-top: 0;
    }

    .nav-menu .sub-menu a {
        color: rgba(255, 255, 255, 0.82);
        padding: 0.45rem 0;
    }

    .nav-menu > li.is-submenu-open > .sub-menu {
        display: block;
    }

    .author-strip,
    .author-box {
        grid-template-columns: 1fr;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 1rem;
    }

    .hero {
        padding: 2rem 0 1.7rem;
    }

    .section {
        padding: var(--space-5) 0;
    }

    .button,
    .wp-block-button__link {
        width: 100%;
    }

    .hero-actions {
        flex-direction: column;
    }

    .subscribe-links {
        flex-direction: column;
    }

    .site-description {
        display: none;
    }

    .header-search-panel {
        position: fixed;
        top: calc(48px + 0.65rem);
        right: 1rem;
        left: 1rem;
        width: auto;
    }

    .toc-heading {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
    }

    .toc-button {
        width: 100%;
        max-width: 100%;
        align-self: stretch;
        white-space: normal;
        line-height: 1.3;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-col:nth-child(odd) {
        border-right: 0;
    }

    .footer-col:nth-child(1),
    .footer-col:nth-child(2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .footer-col:nth-child(3) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }
}

/* ── Subscribe Modal ──────────────────────────────────────────────────────── */
.bim2-subscribe-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9950;
    align-items: center;
    justify-content: center;
}

.bim2-subscribe-modal.open {
    display: flex;
}

.bim2-subscribe-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 18, 30, 0.72);
    backdrop-filter: blur(3px);
}

.bim2-subscribe-modal__content {
    position: relative;
    z-index: 1;
    width: min(92vw, 480px);
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 2rem;
    border: 1px solid var(--border);
}

.bim2-subscribe-modal__content h2 {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 0.6rem;
}

.bim2-subscribe-modal__content > p {
    text-align: center;
    font-size: 0.93rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
}

.bim2-subscribe-modal__form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.bim2-subscribe-modal__form input[type="email"] {
    flex: 1 1 200px;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-strong);
    border-radius: 50px;
    font-size: 1rem;
    font-family: var(--font-sans);
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.bim2-subscribe-modal__form input[type="email"]:focus {
    border-color: var(--color-blue);
}

.bim2-subscribe-modal__form button[type="submit"] {
    padding: 0.75rem 1.5rem;
    background: var(--color-blue);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: background 0.2s;
}

.bim2-subscribe-modal__form button[type="submit"]:hover {
    background: var(--color-navy);
}

.bim2-subscribe-modal__close {
    text-align: center;
    margin: 1.25rem 0 0;
    font-size: 0.875rem;
}

.bim2-subscribe-modal__close a {
    color: var(--text-muted);
    text-decoration: underline;
}

.bim2-subscribe-modal__close a:hover {
    color: var(--text-secondary);
}

@media (max-width: 480px) {
    .bim2-subscribe-modal__form {
        flex-direction: column;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   Contact Page — Split-panel layout
   ══════════════════════════════════════════════════════════════════════════ */

.contact-page-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    align-items: stretch;
    padding-top: 3rem;
    padding-bottom: 5rem;
}

/* ── Left: author identity panel ── */

.contact-author-panel {
    background: var(--color-navy);
    border-radius: var(--radius-md);
    padding: 2rem 1.75rem;
    color: var(--footer-text);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
}

.contact-author-panel__header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1.25rem;
}

.contact-page-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-yellow);
    margin-bottom: 0.5rem;
}

.contact-page-title {
    font-size: clamp(1.5rem, 3.5vw, 1.9rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.5rem;
    line-height: 1.15;
}

.contact-page-tagline {
    font-size: 0.83rem;
    color: rgba(232, 237, 243, 0.55);
    line-height: 1.6;
    margin: 0;
}

/* Headshot */

.contact-author-photo-wrap {
    display: flex;
    justify-content: center;
}

.contact-author-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 0 0 2px var(--hero-card-border), 0 6px 20px rgba(0, 0, 0, 0.22);
}

/* Name + credibility */

.contact-author-identity {
    text-align: center;
}

.contact-author-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.4rem;
    line-height: 1.2;
}

.contact-author-cred {
    font-size: 0.78rem;
    color: rgba(232, 237, 243, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 0;
}

.contact-cred-badge {
    background: var(--color-yellow);
    color: var(--color-navy);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.12rem 0.38rem;
    border-radius: var(--radius-sm);
    line-height: 1.3;
    flex-shrink: 0;
}

/* "How I can help" bullet list */

.contact-reason-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.35rem;
}

.contact-reason-list li {
    font-size: 0.82rem;
    color: rgba(232, 237, 243, 0.68);
    padding-left: 1.35rem;
    position: relative;
    line-height: 1.45;
}

.contact-reason-list li::before {
    content: '\25C8';
    position: absolute;
    left: 0;
    color: var(--color-yellow);
    font-size: 0.7rem;
    top: 0.12em;
}

/* Social / connect icons row */

.contact-connect-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.35rem;
}

/* Social icons: reuse footer-social-link styles — no extra rules needed */
.contact-connect-row .footer-social-link:hover {
    transform: translateY(-2px);
}

/* ── Right: form panel ── */

.contact-form-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 2.25rem 2.5rem;
}

.contact-form-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding-left: 0.9rem;
    border-left: 3px solid var(--color-yellow);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

/* Strip article chrome inside the form panel */
.contact-form-panel .full-width-page {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

/* Dark-mode adjustments for the author panel
   (already dark so no colour flip needed, but ensure text stays legible) */
html[data-theme="dark"] .contact-author-panel {
    background: color-mix(in srgb, var(--color-navy) 70%, #04090f 30%);
    border: 1px solid rgba(241, 208, 70, 0.1);
}

html[data-theme="dark"] .contact-form-panel {
    background: var(--surface);
    border-color: var(--border);
}

/* ── Responsive ── */

@media (max-width: 820px) {
    .contact-page-layout {
        grid-template-columns: 1fr;
        padding-top: 2rem;
    }

    .contact-author-panel {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .contact-author-panel__header {
        flex: 1 1 100%;
        padding-bottom: 0;
        border-bottom: none;
    }

    .contact-author-photo-wrap {
        flex: 0 0 auto;
    }

    .contact-author-photo {
        width: 90px;
        height: 90px;
    }

    .contact-author-identity {
        flex: 1 1 0;
        text-align: left;
        align-self: center;
    }

    .contact-author-cred {
        justify-content: flex-start;
    }

    .contact-reason-list {
        flex: 1 1 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 1rem;
    }

    .contact-connect-row {
        flex: 1 1 100%;
    }

    .contact-form-panel {
        padding: 1.5rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .contact-author-panel {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        text-align: center;
    }

    .contact-author-identity {
        text-align: center;
    }

    .contact-author-cred {
        justify-content: center;
        flex-wrap: wrap;
    }

    .contact-form-panel {
        padding: 1.25rem 1rem;
    }
}

/* Defensive: prevent any contact-page child from forcing horizontal overflow */
.contact-page-layout > * {
    min-width: 0;
}
