/* CFO Speaks landing page — black & gold */

.page-template-page-cfo-speaks #cfo-premium-body,
.page-template-page-master-classes #cfo-premium-body,
.tax-efcfo_masterclass_cat #cfo-premium-body {
    background: #050505 !important;
}

.page-template-page-cfo-speaks .cfo-top-bar,
.page-template-page-master-classes .cfo-top-bar,
.tax-efcfo_masterclass_cat .cfo-top-bar {
    display: none;
}

.mcca-count {
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cs-gold);
    margin: 0;
}

.mcca-grid {
    margin-bottom: 2rem;
}

.cs-page {
    --cs-black: #050505;
    --cs-black-soft: #0a0a0a;
    --cs-black-card: #0d0d0d;
    --cs-black-elevated: #111111;
    --cs-gold: #b8943f;
    --cs-gold-light: #d4bc6e;
    --cs-gold-dim: rgba(184, 148, 63, 0.12);
    --cs-gold-border: rgba(184, 148, 63, 0.22);
    --cs-cream: #f5f0e6;
    --cs-muted: #8a8694;

    background: var(--cs-black);
    color: var(--cs-cream);
    padding-top: 0;
    margin-top: 0;
}

.cs-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(184, 148, 63, 0.14) 0%, transparent 55%),
        linear-gradient(180deg, var(--cs-black-soft) 0%, var(--cs-black) 100%);
    border-bottom: 1px solid var(--cs-gold-border);
    padding-top: 40px;
}

body.admin-bar .cs-hero {
    /* padding-top: calc(32px + 104px); */
}

@media screen and (max-width: 782px) {
    body.admin-bar .cs-hero {
        /* padding-top: calc(46px + 104px); */
    }
}

.cs-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 0%, rgba(184, 148, 63, 0.05) 50%, transparent 100%),
        repeating-linear-gradient(
            90deg,
            rgba(184, 148, 63, 0.03) 0,
            rgba(184, 148, 63, 0.03) 1px,
            transparent 1px,
            transparent 48px
        );
    opacity: 0.7;
    pointer-events: none;
}

.cs-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 100%, rgba(184, 148, 63, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.cs-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.75rem 2rem 2.75rem;
    text-align: center;
}

.cs-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--cs-cream);
    margin: 0 0 0.75rem;
    line-height: 1.05;
}

.cs-tagline {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-style: italic;
    color: var(--cs-gold);
    margin: 0 0 1.25rem;
}

.cs-desc {
    max-width: 640px;
    margin: 0 auto 2.5rem;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(245, 240, 230, 0.78);
}

.cs-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.cs-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.cs-stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cs-gold-dim);
    border: 1px solid var(--cs-gold-border);
    border-radius: 8px;
    font-size: 1.25rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cs-stat-num {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--cs-cream);
}

.cs-stat-sub {
    display: block;
    font-size: 12px;
    color: var(--cs-muted);
}

/* Results bar */
.cs-results {
    background:
        radial-gradient(ellipse 60% 100% at 0% 50%, rgba(184, 148, 63, 0.08) 0%, transparent 50%),
        linear-gradient(90deg, var(--cs-black-card) 0%, var(--cs-black-elevated) 100%);
    border-bottom: 1px solid var(--cs-gold-border);
}

.cs-results-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.75rem 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem 3rem;
}

.cs-results-label {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--cs-gold);
    margin: 0;
    flex: 0 0 auto;
}

.cs-results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem 2rem;
    flex: 1;
    min-width: 0;
}

.cs-result-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cs-result-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cs-gold-dim);
    border: 1px solid var(--cs-gold-border);
    border-radius: 50%;
    font-size: 1.1rem;
}

.cs-result-item strong {
    display: block;
    font-size: 13px;
    color: var(--cs-cream);
    margin-bottom: 4px;
}

.cs-result-item span {
    font-size: 12px;
    line-height: 1.45;
    color: var(--cs-muted);
}

/* Explore grid — black & gold */
.cs-explore {
    padding: 4rem 0 5rem;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(184, 148, 63, 0.1) 0%, transparent 55%),
        linear-gradient(180deg, var(--cs-black-soft) 0%, var(--cs-black) 100%);
    border-top: 1px solid var(--cs-gold-border);
}

.cs-explore-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cs-explore-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--cs-gold);
    text-align: center;
    margin: 0 0 1rem;
    text-transform: uppercase;
}

.cs-explore-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.85rem, 3.2vw, 2.75rem);
    font-weight: 700;
    color: var(--cs-cream);
    text-align: center;
    margin: 0 0 0.65rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.cs-explore-sub {
    text-align: center;
    font-size: 16px;
    line-height: 1.65;
    color: rgba(245, 240, 230, 0.72);
    margin: 0 auto 2rem;
    max-width: 620px;
}

/* Category archive hero (masterclass-category/*) — compact banner */
.mcca-hero.cs-hero {
    border-bottom: 1px solid var(--cs-gold-border);
    padding-top: 80px;
}

body.admin-bar .mcca-hero.cs-hero {
    padding-top: calc(32px + 80px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .mcca-hero.cs-hero {
        padding-top: calc(46px + 80px);
    }
}

.mcca-hero-inner {
    max-width: 1100px;
    padding: 0.65rem 1.5rem 1.35rem;
    text-align: center;
}

.mcca-hero-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
    text-align: left;
}

.mcca-eyebrow {
    margin: 0 !important;
    flex: 1;
    min-width: 0;
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 10px !important;
    font-style: normal !important;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cs-gold) !important;
    text-align: left;
}

.mcca-hero-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    padding: 0.35rem 0.75rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cs-gold);
    text-decoration: none !important;
    background: var(--cs-gold-dim);
    border: 1px solid var(--cs-gold-border);
    border-radius: 999px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.mcca-hero-back:hover {
    color: var(--cs-gold-light);
    border-color: var(--cs-gold);
    background: rgba(184, 148, 63, 0.18);
}

.mcca-hero-back:focus-visible {
    outline: 2px solid rgba(184, 148, 63, 0.55);
    outline-offset: 3px;
}

.mcca-title {
    font-size: clamp(1.5rem, 3.5vw, 2.35rem) !important;
    letter-spacing: -0.02em;
    margin: 0 0 0.45rem !important;
    line-height: 1.12 !important;
}

.mcca-desc {
    max-width: 680px;
    margin: 0 auto 0.5rem !important;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(245, 240, 230, 0.78);
}

.mcca-hero .mcca-count {
    margin-top: 0.35rem;
}

.mcca-grid-section {
    padding-top: 1.5rem;
}

.mcca-grid-section .cs-explore-inner {
    max-width: 1400px;
}

@media (max-width: 640px) {
    .mcca-hero.cs-hero {
        padding-top: 72px;
    }

    body.admin-bar .mcca-hero.cs-hero {
        padding-top: calc(46px + 72px);
    }

    .mcca-hero-inner {
        padding: 0.5rem 1rem 1.1rem;
    }

    .mcca-hero-bar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .mcca-eyebrow {
        flex: 1 1 100%;
        text-align: center;
    }

    .mcca-hero-back {
        margin: 0 auto;
    }
}

/* Category tabs — full width above search */
.cs-category-tabs {
    max-width: 100%;
    margin: 0 auto 1.5rem;
}

.cs-category-tabs .cs-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding-bottom: 2px;
}

.cs-explore-toolbar {
    max-width: 900px;
    margin: 0 auto 1.25rem;
}

.cs-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    background: var(--cs-black-card);
    border: 1px solid var(--cs-gold-border);
    border-radius: 999px;
    margin-bottom: 1.25rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cs-search-icon {
    display: flex;
    color: var(--cs-muted);
    flex-shrink: 0;
}

.cs-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 0;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 15px;
    color: var(--cs-cream);
    outline: none;
}

.cs-search-input::placeholder {
    color: var(--cs-muted);
}

.cs-filter-status {
    text-align: center;
    font-size: 13px;
    color: var(--cs-muted);
    margin: 0 0 1rem;
    min-height: 1.25rem;
}

.cs-no-results {
    text-align: center;
    padding: 2rem;
    color: var(--cs-muted);
    font-size: 15px;
}

.cs-no-results.is-hidden {
    display: none;
}

/* Filter tabs — All + Most Popular */
.cs-tabs-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--cs-gold-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.cs-tabs-wrap::-webkit-scrollbar {
    display: none;
}

.cs-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    min-width: min-content;
}

.cs-tab {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 0.85rem 1.35rem 1rem;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--cs-muted);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.cs-tab:hover {
    color: var(--cs-cream);
}

.cs-tab.is-active {
    color: var(--cs-gold-light);
    font-weight: 600;
}

.cs-tab.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--cs-gold);
}

.cs-tab:focus-visible {
    outline: 2px solid rgba(184, 148, 63, 0.55);
    outline-offset: 2px;
}

/* Category cards grid (domain data only) */
.cs-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0 auto;
}

.cs-category-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.35rem 1.25rem;
    background: var(--cs-black-card);
    border: 1px solid var(--cs-gold-border);
    border-radius: 10px;
    text-decoration: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 180px;
}

.cs-category-card:hover {
    border-color: var(--cs-gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(184, 148, 63, 0.15);
}

.cs-category-card.is-hidden {
    display: none;
}

.cs-category-card-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--cs-gold);
    margin-bottom: 10px;
}

.cs-category-card-title {
    margin: 0 0 0.65rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cs-cream);
    line-height: 1.3;
}

.cs-category-card-sub {
    margin: -0.35rem 0 0.65rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cs-gold);
}

.cs-category-card-desc {
    margin: 0 0 0.75rem;
    font-size: 13px;
    line-height: 1.55;
    color: var(--cs-muted);
    flex-grow: 1;
}

.cs-category-card-meta {
    margin: 0 0 0.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(138, 134, 148, 0.85);
}

.cs-category-card-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--cs-gold);
}

.cs-tab.is-hidden {
    display: none;
}

/* Legacy tile grid (unused on CFO Speaks) */
.cs-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 18px;
    margin-top: 0;
}

.cs-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 14px 18px;
    background: var(--cs-black-card);
    border: 1px solid var(--cs-gold-border);
    border-radius: 10px;
    text-decoration: none !important;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 168px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cs-tile:hover {
    border-color: var(--cs-gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(184, 148, 63, 0.15);
}

.cs-tile:focus-visible {
    outline: 2px solid rgba(184, 148, 63, 0.6);
    outline-offset: 3px;
}

.cs-tile.is-hidden {
    display: none;
}

.cs-tile-id {
    align-self: flex-start;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--cs-muted);
    margin-bottom: 6px;
}

.cs-tile-cat {
    align-self: flex-start;
    display: block;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cs-gold);
    margin-bottom: 10px;
    line-height: 1.3;
}

.cs-tile-icon {
    width: 52px;
    height: 52px;
    margin: 2px 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--cs-gold-dim);
    border: 1px solid var(--cs-gold-border);
    overflow: hidden;
}

.cs-tile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cs-tile-icon span {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cs-gold);
}

.cs-tile-title {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--cs-cream);
    margin: 0;
    letter-spacing: 0;
}

.cs-empty {
    text-align: center;
    padding: 3rem;
    color: var(--cs-muted);
    background: var(--cs-black-card);
    border: 1px dashed var(--cs-gold-border);
    border-radius: 8px;
}

@media (max-width: 1400px) {
    .cs-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1100px) {
    .cs-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .cs-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cs-hero {
        padding-top: 100px;
    }

    body.admin-bar .cs-hero {
        padding-top: calc(46px + 100px);
    }

    .cs-hero-inner {
        padding: 1.25rem 1.25rem 2rem;
    }

    .cs-explore-inner {
        padding: 0 1.25rem;
    }

    .cs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-results-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cs-results-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .cs-tabs-wrap,
    .cs-category-tabs {
        justify-content: flex-start;
    }

    .cs-tabs {
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .cs-category-tabs .cs-tabs {
        justify-content: flex-start;
    }

    .cs-tab {
        padding: 0.75rem 1rem 0.95rem;
        font-size: 13px;
    }

    .cs-explore-toolbar {
        max-width: 100%;
    }

    .cs-search-input {
        font-size: 14px;
    }

    .cs-category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 520px) {
    .cs-category-grid {
        grid-template-columns: 1fr;
    }
}
