/*
 Theme Name:   Innervation Child
 Theme URI:    https://innervationai.com
 Description:  Child theme for GeneratePress - Innervation AI website
 Author:       Innervation
 Author URI:   https://innervationai.com
 Template:     generatepress
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  innervation-child
*/

/* ==========================================================================
   FONTS
   ========================================================================== */

/* Option 1: Inter - Popular with tech startups (Figma, Linear) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Option 2: IBM Plex Sans - Clean, professional, technical feel */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* Option 3: Space Grotesk - Modern, geometric, distinctive */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* FONT COMPARISON - Add class to <body> to test different fonts:
   - Default: Inter
   - body.font-ibm: IBM Plex Sans
   - body.font-space: Space Grotesk
   - body.font-helvetica: Helvetica (system font)
*/

/* ==========================================================================
   DESIGN SYSTEM TOKENS
   A unified spacing and sizing system based on an 8px grid.
   All values derive from these tokens for visual consistency.
   ========================================================================== */

:root {
    /* Spacing Scale (8px base) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 96px;
    --space-10: 128px;

    /* Layout */
    --container-max: 1200px;
    --container-padding: var(--space-6);  /* 32px */
    --section-padding: var(--space-8);    /* 64px vertical */
    --section-padding-lg: var(--space-9); /* 96px for hero/CTA */

    /* Grid */
    --grid-gap: var(--space-6);           /* 32px between cards */
    --card-min-width: 320px;              /* Unified card minimum */

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Borders */
    --border-light: 1px solid #e0e0e0;
    --border-dark: 1px solid #333;

    /* Brand Colors (for reference) */
    --color-brand: #355E3B;
    --color-brand-dark: #2a4a2f;
    --color-text: #1a1a1a;
    --color-text-muted: #666;
    --color-text-light: #888;
    --color-bg: #ffffff;
    --color-bg-subtle: #f8f9fa;
}

@media (prefers-color-scheme: dark) {
    :root {
        --border-light: 1px solid #333;
        --color-text: #e0e0e0;
        --color-text-muted: #999;
        --color-text-light: #777;
        --color-bg: #1a1a1a;
        --color-bg-subtle: #0d0d0d;
    }
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; margin: 0; padding: 0; }
section *:last-child { margin-bottom: 0 !important; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #ffffff;
    overflow-x: hidden;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 { font-weight: 700; letter-spacing: -0.03em; }
h2 { font-weight: 600; letter-spacing: -0.02em; }

/* Green bullet/number markers site-wide */
li::marker {
    color: var(--color-brand);
}

/* Font comparison classes - works on html or body */
.font-ibm body, body.font-ibm,
.font-ibm h1, .font-ibm h2, .font-ibm h3,
.font-ibm h4, .font-ibm h5, .font-ibm h6,
body.font-ibm h1, body.font-ibm h2, body.font-ibm h3,
body.font-ibm h4, body.font-ibm h5, body.font-ibm h6 {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-space body, body.font-space,
.font-space h1, .font-space h2, .font-space h3,
.font-space h4, .font-space h5, .font-space h6,
body.font-space h1, body.font-space h2, body.font-space h3,
body.font-space h4, body.font-space h5, body.font-space h6 {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-helvetica body, body.font-helvetica,
.font-helvetica h1, .font-helvetica h2, .font-helvetica h3,
.font-helvetica h4, .font-helvetica h5, .font-helvetica h6,
body.font-helvetica h1, body.font-helvetica h2, body.font-helvetica h3,
body.font-helvetica h4, body.font-helvetica h5, body.font-helvetica h6 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    body { color: #e0e0e0; background: #1a1a1a; }
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    overflow-x: hidden;
    max-height: none !important;
    height: auto !important;
}

h1, h2, h3, p, a { word-wrap: break-word; overflow-wrap: break-word; }

/* ==========================================================================
   GENERATEPRESS OVERRIDES
   Prevent parent theme button styles from affecting our custom elements
   ========================================================================== */

/* Global: Prevent grey hover backgrounds on all custom buttons */
.innervation-theme button:not(.cta-button):not(.sticky-cta):hover,
.innervation-theme button:not(.cta-button):not(.sticky-cta):focus {
    background-color: transparent;
}

/* Accordion headers should NEVER have a background */
.accordion-header,
button.accordion-header {
    background: transparent !important;
    background-color: transparent !important;
}

.accordion-header:hover,
.accordion-header:focus,
.accordion-header:active,
.accordion-header:visited,
button.accordion-header:hover,
button.accordion-header:focus,
button.accordion-header:active {
    background: transparent !important;
    background-color: transparent !important;
}

/* Tab buttons should have transparent background except underline */
.tab-btn,
button.tab-btn {
    background: transparent !important;
    background-color: transparent !important;
}

.tab-btn:hover,
.tab-btn:focus,
.tab-btn:active {
    background: transparent !important;
    background-color: transparent !important;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

header.iv-header {
    padding: var(--space-7) 0;
    border-bottom: var(--border-light);
    text-align: center;
    margin-top: 0;
}

/* ==========================================================================
   AUDIENCE SELECTION — Card-Based Selector
   ========================================================================== */

.audience-selector {
    padding: var(--space-7) 0;
    text-align: center;
}

/* Card container */
.audience-cards {
    display: flex;
    gap: var(--space-6);
    justify-content: center;
    flex-wrap: wrap;
}

/* Individual card */
.audience-card {
    flex: 0 1 320px;
    max-width: 320px;
    padding: var(--space-6);
    border: var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.audience-card:hover {
    border-color: var(--color-brand);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.audience-card.active {
    border-left: 4px solid var(--color-brand);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.audience-card.dimmed {
    opacity: 0.55;
}
.audience-card.dimmed:hover {
    opacity: 0.85;
}

/* Card content */
.audience-card-eyebrow {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-brand);
    margin-bottom: var(--space-3);
}
.audience-card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-3) 0;
}
.audience-card.active .audience-card-title {
    color: var(--color-brand);
}
.audience-card-desc {
    font-size: 15px;
    line-height: 1.5;
    color: var(--color-text-muted);
    margin: 0;
}

/* Dark mode — cards */
@media (prefers-color-scheme: dark) {
    .audience-card {
        background: #1a1a1a;
        border-color: #333;
    }
    .audience-card:hover {
        border-color: var(--color-brand);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    .audience-card.active {
        border-left-color: var(--color-brand);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    .audience-card-title {
        color: #e0e0e0;
    }
    .audience-card.active .audience-card-title {
        color: var(--color-brand);
    }
    .audience-card-desc {
        color: #999;
    }
}

/* ==========================================================================
   DETAIL LEVEL TOGGLE — Card-Based
   ========================================================================== */

.detail-toggle {
    display: none;
    gap: var(--space-5);
    justify-content: center;
    margin-top: var(--space-6);
    flex-wrap: wrap;
    max-width: 448px;
    margin-left: auto;
    margin-right: auto;
}
.detail-toggle.active {
    display: flex;
}

/* Detail card — compact variant of audience card */
.detail-card {
    flex: 1;
    min-width: 0;
    padding: var(--space-4) var(--space-5);
    border: var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.detail-card:hover {
    border-color: var(--color-brand);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.detail-card.active {
    border-left: 4px solid var(--color-brand);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.detail-card.dimmed {
    opacity: 0.55;
}
.detail-card.dimmed:hover {
    opacity: 0.85;
}

/* Detail card content */
.detail-card-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-brand);
    margin-bottom: var(--space-2);
}
.detail-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-2) 0;
}
.detail-card.active .detail-card-title {
    color: var(--color-brand);
}
.detail-card-desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-muted);
    margin: 0;
}

/* Dark mode — detail cards */
@media (prefers-color-scheme: dark) {
    .detail-card {
        background: #1a1a1a;
        border-color: #333;
    }
    .detail-card:hover {
        border-color: var(--color-brand);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    .detail-card.active {
        border-left-color: var(--color-brand);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    .detail-card-title {
        color: #e0e0e0;
    }
    .detail-card.active .detail-card-title {
        color: var(--color-brand);
    }
    .detail-card-desc {
        color: #999;
    }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
    padding: var(--space-9) 0 var(--space-8);
    text-align: center;
}
.hero h1 {
    font-size: 42px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-5);
    letter-spacing: -1px;
}
.hero .subtitle {
    font-size: 22px;
    line-height: 1.5;
    color: var(--color-text-muted);
    margin-bottom: var(--space-7);
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */

.content-section {
    padding: var(--space-8) 0;
    border-bottom: var(--border-light);
}
.content-section:last-of-type { border-bottom: none; }
.content-section h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: var(--space-5);
    letter-spacing: -0.5px;
}
.content-section p {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: var(--space-5);
    color: var(--color-text);
}
.content-section strong {
    font-weight: 600;
    color: var(--color-text);
}

.content-version, .detail-content {
    display: none;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}
.content-version.active, .detail-content.active { display: block; }
.detail-content.active {
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
}

/* ==========================================================================
   CAPABILITIES SECTION
   ========================================================================== */

.capabilities {
    padding: var(--space-8) 0;
    border-bottom: var(--border-light);
}
.capabilities h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: var(--space-4);
    letter-spacing: -0.5px;
}
.capabilities .intro {
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: var(--space-7);
}
.capability-item { margin-bottom: var(--space-7); }
.capability-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: var(--space-3);
    letter-spacing: -0.3px;
}
.capability-item p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text);
}

/* ==========================================================================
   CTA SECTION
   ========================================================================== */

.cta-section {
    padding: var(--space-9) 0;
    text-align: center;
}
.cta-section h2 {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: var(--space-5);
    letter-spacing: -0.5px;
}
.cta-text {
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto var(--space-7);
}
.cta-button {
    display: inline-block;
    padding: var(--space-4) var(--space-7);
    font-size: 18px;
    font-weight: 600;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}
.cta-button:hover {
    background: var(--color-brand);
    color: white;
    transform: translateY(-2px);
}
@media (prefers-color-scheme: dark) {
    .cta-button { background: #e0e0e0; color: #1a1a1a; }
    .cta-button:hover { background: var(--color-brand); color: white; }
}

/* Hero CTA Button Override */
.hero .cta-button {
    background: transparent !important;
    border: 2px solid var(--color-brand);
    color: var(--color-text);
}
.hero .cta-button:hover {
    background: var(--color-brand) !important;
    color: white;
}
@media (prefers-color-scheme: dark) {
    .hero .cta-button { border: 2px solid #e0e0e0; color: #e0e0e0; }
    .hero .cta-button:hover { background: var(--color-brand) !important; color: white; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer.iv-footer {
    padding: var(--space-5) 0;
    text-align: center;
    border-top: var(--border-light);
    margin-top: auto;
}

.footer-nav a {
    text-decoration: none;
    color: inherit;
    margin: 0 var(--space-4);
    font-weight: 500;
    transition: text-decoration 0.2s ease;
}
.footer-nav a:hover {
    text-decoration: underline;
    text-decoration-color: var(--color-brand);
    text-underline-offset: var(--space-1);
}
.footer-nav a[style*="font-weight: 600"] {
    color: var(--color-brand);
}

/* ==========================================================================
   LOGOS
   ========================================================================== */

.logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
.logo-light { display: block; }
.logo-dark { display: none; }

@media (max-width: 768px) {
    :root {
        --container-padding: var(--space-5);  /* 24px on mobile */
    }
    .logo { max-width: 300px; }
    .hero h1 { font-size: 32px; }
    .hero .subtitle { font-size: 18px; }
    .audience-cards { flex-direction: column; align-items: center; }
    .audience-card { width: 100%; max-width: 320px; flex-basis: auto; }
    .detail-toggle { max-width: 100%; }
    .detail-card { min-width: 0; }
    .cta-section h2 { font-size: 28px; }
    .cta-text { font-size: 16px; }
}

@media (prefers-color-scheme: dark) {
    .logo-light { display: none; }
    .logo-dark { display: block; }
}

.footer-logo { width: 80px; height: auto; }
.footer-logo-light { display: block; margin: 0 auto; }
.footer-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
    .footer-logo-light { display: none; }
    .footer-logo-dark { display: block; margin: 0 auto; }
}

/* ==========================================================================
   STICKY NAV
   ========================================================================== */

.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: var(--border-light);
    z-index: 1000;
    padding: var(--space-2) 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}
.sticky-nav.visible { transform: translateY(0); }
@media (prefers-color-scheme: dark) {
    .sticky-nav { background: rgba(26, 26, 26, 0.95); }
}

.sticky-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 0;
}

.sticky-logo {
    height: 100%;
    max-height: 48px;
    width: auto;
    object-fit: contain;
}
.sticky-logo-light { display: block; }
.sticky-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
    .sticky-logo-light { display: none; }
    .sticky-logo-dark { display: block; }
}

.sticky-cta {
    padding: var(--space-2) var(--space-5);
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    border: 2px solid var(--color-brand);
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}
.sticky-cta:hover { background: var(--color-brand); color: white !important; text-decoration: none !important; }
@media (prefers-color-scheme: dark) {
    .sticky-cta { border: 2px solid #e0e0e0; color: #e0e0e0; }
    .sticky-cta:hover { background: var(--color-brand); color: white !important; text-decoration: none !important; }
}

.sticky-nav-links {
    display: flex;
    gap: var(--space-5);
    align-items: center;
}
.sticky-nav-links a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
}
.sticky-nav-links a:hover {
    text-decoration: underline;
    text-decoration-color: var(--color-brand);
    text-underline-offset: var(--space-1);
}
.sticky-nav-links a[style*="font-weight: 600"] {
    color: var(--color-brand);
}

/* ---------- Nav Dropdown (About menu) ---------- */
.sticky-nav .container {
    overflow: visible;
}

.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown-trigger {
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    color: inherit;
    text-decoration: none;
}

.nav-dropdown:hover .nav-dropdown-trigger {
    text-decoration: underline;
    text-decoration-color: var(--color-brand);
    text-underline-offset: var(--space-1);
}

.nav-dropdown-trigger::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 5px;
    vertical-align: 2px;
    transition: transform 0.2s ease;
}

/* Chevron points up only when on an active About sub-page */
.nav-dropdown-trigger[style*="font-weight: 600"]::after {
    transform: rotate(-135deg);
}

/* Active state for trigger when on About sub-pages */
.nav-dropdown-trigger[style*="font-weight: 600"] {
    color: var(--color-brand);
}

/* Invisible bridge prevents menu from closing when cursor crosses gap */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
    display: none;
}

.nav-dropdown:hover::before {
    display: block;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg);
    border: var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: var(--space-2) 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown-menu a {
    display: block;
    padding: var(--space-2) var(--space-5);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text) !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.nav-dropdown-menu a:hover {
    background: var(--color-bg-subtle);
    color: var(--color-brand) !important;
    text-decoration: none !important;
}

.nav-dropdown-menu a[style*="font-weight: 600"] {
    color: var(--color-brand) !important;
}

@media (prefers-color-scheme: dark) {
    .nav-dropdown-menu {
        background: #1a1a1a;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
    .nav-dropdown-menu a:hover {
        background: #2a2a2a;
    }
}

/* ---------- Hamburger / Mobile Navigation ---------- */

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    padding: 6px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: inherit;
}
.nav-hamburger:hover,
.nav-hamburger:focus,
.nav-hamburger:active {
    color: var(--color-brand);
    background-color: transparent;
}
.nav-hamburger svg { display: block; }

@media (max-width: 768px) {
    .nav-hamburger {
        display: flex;
    }

    .sticky-nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        padding: var(--space-5) var(--space-6);
        gap: var(--space-4);
        border-bottom: 1px solid #e0e0e0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    .sticky-nav-links.mobile-open {
        display: flex;
    }
    .sticky-nav-links a,
    .sticky-nav-links .nav-dropdown-trigger {
        font-size: 16px;
        padding: var(--space-2) 0;
    }
    .sticky-nav-links .sticky-cta {
        text-align: center;
        margin-top: var(--space-2);
    }

    /* About dropdown: no hover on mobile, tap to toggle */
    .nav-dropdown {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        padding-left: var(--space-5);
        min-width: 0;
    }
    .nav-dropdown.open .nav-dropdown-menu {
        display: flex;
        flex-direction: column;
        gap: var(--space-2);
    }
    .nav-dropdown-menu a {
        padding: var(--space-1) 0;
        font-size: 15px;
    }
    .nav-dropdown-menu a:hover {
        background: transparent;
    }

    /* Dropdown chevron rotates when open */
    .nav-dropdown.open .nav-dropdown-trigger::after {
        transform: rotate(-135deg);
    }

    /* Invisible bridge not needed on mobile */
    .nav-dropdown::before {
        display: none !important;
    }

    /* Theme toggle in mobile menu */
    .sticky-nav-links .theme-toggle {
        align-self: flex-start;
    }
}

@media (max-width: 768px) and (prefers-color-scheme: dark) {
    .sticky-nav-links {
        background: rgba(26, 26, 26, 0.98);
        border-bottom-color: #333;
    }
    .nav-hamburger { color: #e0e0e0; }
}

/* ==========================================================================
   ACCORDION STYLES
   ========================================================================== */

.accordion-item {
    border: var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    padding: 0 var(--space-5);
    position: relative;
    transition: all 0.2s ease;
    background: var(--color-bg);
}

/* Green top border accent (hidden by default) */
.accordion-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--space-1);
    background: var(--color-brand);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* HOVER: MAS card-like effect (not on already-open items) */
.accordion-item:not(.active-item):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--color-brand);
}

.accordion-item:not(.active-item):hover::before {
    opacity: 1;
}

/* ACTIVE ITEM: Green border all around */
.accordion-item.active-item {
    border-color: var(--color-brand);
    box-shadow: 0 4px 12px rgba(53, 94, 59, 0.15);
}

.accordion-item.active-item::before {
    opacity: 1;
}

@media (prefers-color-scheme: dark) {
    .accordion-item:not(.active-item):hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }
}

.accordion-header {
    width: 100%;
    padding: var(--space-5) 0;
    background: transparent !important;
    background-color: transparent !important;
    border: none;
    outline: none;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text);
    transition: color 0.2s ease;
}

.accordion-header:hover { color: var(--color-brand); }
.accordion-header.active { color: var(--color-brand); }

/* Icon Styles */
.accordion-header::after {
    content: '+';
    font-size: 24px;
    font-weight: 400;
    transition: transform 0.3s ease;
    color: var(--color-text);
}

.accordion-header:hover::after { color: var(--color-brand); }
.accordion-header.active::after {
    content: '\2212';
    transform: rotate(0deg);
    color: var(--color-brand);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out, padding 0.3s ease;
    padding-left: 0;
    padding-right: 0;
}
.accordion-content.open {
    max-height: 3000px;
    opacity: 1;
    padding-bottom: var(--space-6);
}

.accordion-content .content-section,
.accordion-content .capabilities {
    padding: var(--space-3) 0 !important;
    border-bottom: none;
}
.accordion-content .cta-section { padding: var(--space-5) 0 !important; }

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

.content-section, .capabilities, .cta-section, .capability-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.content-section.visible, .capabilities.visible, .cta-section.visible, .capability-item.visible {
    opacity: 1;
    transform: translateY(0);
}
.capability-item:nth-child(1) { transition-delay: 0.1s; }
.capability-item:nth-child(2) { transition-delay: 0.2s; }
.capability-item:nth-child(3) { transition-delay: 0.3s; }

/* ==========================================================================
   MAS GRID LAYOUT
   ========================================================================== */

.mas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
    padding: var(--space-7) 0 var(--space-8);
}

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

.mas-card {
    background: var(--color-bg);
    border: var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

/* Green top border for style */
.mas-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: var(--space-1);
    background: var(--color-brand);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mas-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: var(--color-brand);
}

.mas-card:hover::before { opacity: 1; }

@media (prefers-color-scheme: dark) {
    .mas-card:hover {
        box-shadow: 0 12px 24px rgba(0,0,0,0.3);
    }
}

.mas-icon {
    width: 50px;
    height: 50px;
    background: var(--color-bg-subtle);
    color: var(--color-brand);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: var(--space-5);
}

.mas-card h3 {
    font-size: 22px;
    margin-bottom: var(--space-3);
    color: var(--color-text);
}
.mas-card p {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-5);
}

.mas-card-body {
    flex: 1;
}

.mas-card-preview {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    height: 50%;
    border-radius: var(--radius-md) 0 0 0;
    border-top: var(--border-light);
    border-left: var(--border-light);
    background: var(--color-bg-subtle);
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

/* Adjust card layout when preview image is present */
.mas-card:has(.mas-card-preview) .mas-card-body {
    padding-right: 52%;
    padding-bottom: 0;
}

.mas-card:has(.mas-card-preview) .mas-card-cta {
    max-width: 45%;
}

.mas-card:hover .mas-card-preview {
    opacity: 1;
}

.mas-card-cta {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-brand);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.mas-card-cta::after {
    content: '\2192';
    transition: transform 0.2s ease;
}
.mas-card:hover .mas-card-cta::after {
    transform: translateX(var(--space-1));
}

/* ==========================================================================
   MAS GALLERY - Auto-scrolling image showcase
   ========================================================================== */

.mas-gallery-wrapper {
    width: 100%;
    overflow: hidden;
    background: var(--color-bg-subtle);
    border-top: var(--border-light);
    border-bottom: var(--border-light);
}

.mas-gallery {
    display: flex;
    gap: var(--space-5);
    padding: var(--space-5) var(--space-4) var(--space-3); /* Less bottom padding for visual balance */
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.mas-gallery::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.mas-gallery-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.mas-gallery-img {
    height: 200px;
    width: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mas-gallery-item:hover .mas-gallery-img {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.mas-gallery-name {
    margin-top: var(--space-2);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    max-width: 180px;
}

@media (prefers-color-scheme: dark) {
    .mas-gallery-wrapper {
        background: rgba(0,0,0,0.2);
    }

    .mas-gallery-img {
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    .mas-gallery-img:hover {
        box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    }
}

/* Larger images on bigger screens */
@media (min-width: 768px) {
    .mas-gallery-img {
        height: 280px;
    }

    .mas-gallery {
        padding: var(--space-6) var(--space-6) var(--space-4); /* Less bottom padding for visual balance */
        gap: var(--space-6);
    }

    .mas-gallery-name {
        font-size: 14px;
        max-width: 240px;
    }
}

/* ==========================================================================
   MAS LIGHTBOX - Enlarged image popup
   ========================================================================== */

.mas-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: var(--space-6);
}

.mas-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.mas-lightbox-close {
    position: absolute;
    top: var(--space-5);
    right: var(--space-5);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.mas-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mas-lightbox img {
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.mas-lightbox-caption {
    margin-top: var(--space-5);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

/* ==========================================================================
   MAS SLIDE-OUT PANEL
   ========================================================================== */

.mas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.mas-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 60%;
    max-width: 800px;
    height: 100%;
    background: var(--color-bg);
    z-index: 2001;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .mas-panel { width: 90%; }
}

/* Open State */
.mas-overlay.active { opacity: 1; visibility: visible; }
.mas-panel.active { transform: translateX(0); }

/* Panel Header */
.panel-header {
    padding: var(--space-6);
    border-bottom: var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: var(--color-bg-subtle);
}
.panel-title h2 {
    font-size: 28px;
    margin-bottom: var(--space-2);
    color: var(--color-text);
}
.panel-title span {
    background: var(--color-brand);
    color: white;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.close-panel {
    background: transparent;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.close-panel:hover { color: #1a1a1a; }

/* Panel Tabs */
.panel-tabs {
    display: flex;
    border-bottom: var(--border-light);
    padding: 0 var(--space-6);
    background: var(--color-bg);
}

.tab-btn {
    padding: var(--space-5) 0;
    margin-right: var(--space-6);
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.tab-btn:hover { color: var(--color-brand); }
.tab-btn.active { color: var(--color-brand); }
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-brand);
}

/* Panel Content Body */
.panel-body {
    padding: var(--space-7) var(--space-6);
    overflow-y: auto;
    flex-grow: 1;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}
.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Content Styling inside tabs */
.tab-content h3 {
    font-size: 18px;
    margin-bottom: var(--space-7);
    color: var(--color-text);
    border-left: 4px solid var(--color-brand);
    padding: var(--space-3) var(--space-6) var(--space-3) calc(var(--space-6) - 4px);
    margin-top: var(--space-7);
    margin-left: calc(-1 * var(--space-6));
    margin-right: calc(-1 * var(--space-6));
    background: var(--color-bg-subtle);
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}
.tab-content h3:first-child {
    margin-top: 0;
    border-top: none;
}
.tab-content p {
    margin-bottom: var(--space-5);
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.7;
}
.tab-content ul {
    padding-left: var(--space-4);
    margin-bottom: var(--space-5);
}
.tab-content li {
    margin-bottom: var(--space-3);
    color: var(--color-text-muted);
}

.mas-endorsement {
    background: var(--color-bg-subtle);
    border-left: 4px solid var(--color-brand);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}
.mas-endorsement p {
    font-size: 15px;
    line-height: 1.7;
    font-style: italic;
    color: var(--color-text);
    margin-bottom: var(--space-3);
}
.mas-endorsement cite {
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
    color: var(--color-text-muted);
    display: block;
}
.mas-endorsement .endorsement-context {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-top: 2px;
    line-height: 1.5;
    display: block;
}
.mas-endorsement .endorsement-context a {
    color: var(--color-brand);
    text-decoration: none;
}
.mas-endorsement .endorsement-context a:hover {
    text-decoration: underline;
}

.sample-output-box {
    background: var(--color-bg-subtle);
    border: var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--color-text);
    white-space: pre-wrap;
}

/* --- MAS Sample Output Accordion & Document Modal --- */

.mas-sample-accordion {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.mas-sample-item {
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    background: var(--color-bg);
}

.mas-sample-item:hover {
    border-color: var(--color-brand);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.mas-sample-item-btn {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.mas-sample-item-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.mas-sample-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    transition: color 0.2s;
}

.mas-sample-item-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-top: 2px;
    line-height: 1.4;
}

.mas-sample-item:hover .mas-sample-item-title {
    color: var(--color-brand);
}

.mas-sample-item-arrow {
    font-size: 20px;
    color: var(--color-text-muted);
    transition: transform 0.2s, color 0.2s;
    flex-shrink: 0;
    margin-left: var(--space-3);
}

.mas-sample-item:hover .mas-sample-item-arrow {
    transform: translateX(4px);
    color: var(--color-brand);
}

/* Document Modal Overlay */
.mas-doc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 3000;
}

.mas-doc-overlay.active {
    display: block;
}

/* Document Modal */
.mas-doc-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    z-index: 3001;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mas-doc-modal.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Close button (removed — modal closes on outside click) */

/* Modal Header */
.mas-doc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    padding-right: 60px; /* space for close button */
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.mas-doc-modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

/* Download button */
.mas-doc-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--color-brand);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.mas-doc-download-btn:hover {
    opacity: 0.85;
    color: #fff;
}

/* Modal Body — document typography */
.mas-doc-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-6);
    line-height: 1.7;
}

.mas-doc-modal-body h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-brand);
    border-left: 3px solid var(--color-brand);
    padding-left: var(--space-3);
    margin: var(--space-6) 0 var(--space-4);
}

.mas-doc-modal-body h3:first-child {
    margin-top: 0;
}

.mas-doc-modal-body h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin: var(--space-5) 0 var(--space-3);
}

.mas-doc-modal-body p {
    font-size: 15px;
    color: var(--color-text);
    margin-bottom: var(--space-4);
    line-height: 1.7;
}

.mas-doc-modal-body ul,
.mas-doc-modal-body ol {
    padding-left: var(--space-5);
    margin-bottom: var(--space-4);
}

.mas-doc-modal-body li {
    margin-bottom: var(--space-2);
    font-size: 15px;
    color: var(--color-text);
}

/* Document modal accordion (debiaser sample outputs) */
.doc-accordion-item {
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    overflow: hidden;
}
.doc-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    background: var(--color-bg-subtle);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-brand);
    transition: background 0.2s;
}
.doc-accordion-header:hover,
.doc-accordion-header:focus,
.doc-accordion-header:active {
    background: #eef2ef;
    color: var(--color-brand);
}
.doc-accordion-chevron {
    transition: transform 0.2s;
    flex-shrink: 0;
}
.doc-accordion-item.active .doc-accordion-chevron {
    transform: rotate(180deg);
}
.doc-accordion-body {
    display: none;
    padding: var(--space-5);
}
.doc-accordion-item.active .doc-accordion-body {
    display: block;
}

/* Document modal table */
.doc-modal-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-5) 0;
    font-size: 14px;
}

.doc-modal-table th {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    border-bottom: 2px solid var(--color-brand);
    font-weight: 700;
    color: var(--color-text);
    background: var(--color-bg-subtle);
}

.doc-modal-table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid #e0e0e0;
    color: var(--color-text);
}

.doc-modal-table tr:hover td {
    background: var(--color-bg-subtle);
}

/* Modal Footer */
.mas-doc-modal-footer {
    border-top: 1px solid #e0e0e0;
    padding: var(--space-4) var(--space-6);
    flex-shrink: 0;
}

.mas-doc-modal-footer:empty {
    display: none;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .mas-sample-item {
        border-color: #333;
        background: #1a1a1a;
    }

    .mas-sample-item:hover {
        border-color: var(--color-brand);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .mas-doc-overlay {
        background: rgba(0, 0, 0, 0.6);
    }

    .mas-doc-modal {
        background: #1a1a1a;
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    }

    .mas-doc-modal-header {
        border-bottom-color: #333;
    }

    .mas-doc-modal-body h4 {
        color: #e0e0e0;
    }

    .mas-doc-modal-body p,
    .mas-doc-modal-body li {
        color: #ccc;
    }

    .doc-accordion-item { border-color: #333; }
    .doc-accordion-header { background: #222; }
    .doc-accordion-header:hover,
    .doc-accordion-header:focus,
    .doc-accordion-header:active { background: #2a2a2a; color: var(--color-brand); }

    .doc-modal-table th {
        background: #222;
        color: #e0e0e0;
        border-bottom-color: var(--color-brand);
    }

    .doc-modal-table td {
        border-bottom-color: #333;
        color: #ccc;
    }

    .doc-modal-table tr:hover td {
        background: #222;
    }

    .mas-doc-modal-footer {
        border-top-color: #333;
    }
}

/* Responsive — mobile */
@media (max-width: 768px) {
    .mas-doc-modal {
        width: 95%;
        max-height: 85vh;
    }

    .mas-doc-modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
        padding: var(--space-4) var(--space-5);
        padding-right: 50px;
    }

    .mas-doc-modal-header h2 {
        font-size: 18px;
    }

    .mas-doc-modal-body {
        padding: var(--space-4) var(--space-5);
    }

    .mas-doc-modal-body h3 {
        font-size: 16px;
    }

    .mas-doc-modal-body p,
    .mas-doc-modal-body li {
        font-size: 14px;
    }

    .doc-modal-table {
        font-size: 13px;
    }

    .doc-modal-table th,
    .doc-modal-table td {
        padding: var(--space-2) var(--space-3);
    }
}

/* ==========================================================================
   VIDEO PLAYER STYLES
   ========================================================================== */

.mas-video-container {
    width: 100%;
    margin-bottom: var(--space-5);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: #000;
    border: var(--border-light);
}

video.mas-video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

/* Static architecture image (replaces video for now) */
.mas-arch-image {
    position: relative;
    width: calc(100% + 2 * var(--space-6));
    margin-left: calc(-1 * var(--space-6));
    margin-right: calc(-1 * var(--space-6));
    margin-top: calc(-1 * var(--space-7));
    margin-bottom: var(--space-5);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
    border: 1px solid #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.mas-arch-image:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.mas-arch-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    background: #1a1a1a;
}

.mas-arch-image-hint {
    position: absolute;
    bottom: var(--space-2);
    right: var(--space-2);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.mas-arch-image:hover .mas-arch-image-hint {
    opacity: 1;
}

/* Architecture image in case study panel (top of "What We Built" section) */
.panel-arch-image {
    margin-top: 0;
    margin-bottom: var(--space-5);
    border-radius: 0;
}

/* Architecture image modal — image-first layout */
.mas-doc-modal--arch {
    padding: 0;
    background: #1a1a1a;
    width: min(80vh, 90vw);
    max-width: min(80vh, 900px);
}

.mas-doc-modal--arch .mas-doc-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    border-bottom: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
    padding: var(--space-4) var(--space-6);
    padding-right: var(--space-9);
}

.mas-doc-modal--arch .mas-doc-modal-header h2 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.mas-doc-modal--arch .mas-doc-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex: 1;
}


.mas-arch-image-full {
    width: 100%;
    height: 100%;
    max-height: 80vh;
    display: block;
    object-fit: contain;
}

/* ==========================================================================
   WORDPRESS OVERRIDES
   ========================================================================== */

/* Hide GeneratePress default elements on custom pages */
.page-template-page-home .site-header,
.page-template-page-mas .site-header,
.page-template-page-team .site-header,
.page-template-page-home .site-footer,
.page-template-page-mas .site-footer,
.page-template-page-team .site-footer,
.page-template-page-home #primary,
.page-template-page-mas #primary,
.page-template-page-team #primary {
    display: none;
}

/* Ensure our custom content takes full width */
.page-template-page-home .site-content,
.page-template-page-mas .site-content,
.page-template-page-team .site-content {
    padding: 0;
    margin: 0;
}

/* Dark mode for MAS panel */
@media (prefers-color-scheme: dark) {
    .panel-header { background: #111; }
    .close-panel { color: #666; }
    .close-panel:hover { color: var(--color-text); }
}

/* ==========================================================================
   BLOG STYLES
   ========================================================================== */

/* Blog Header */
.blog-header {
    text-align: center;
    padding: var(--space-8) 0 var(--space-7);
}

.blog-header h1 {
    font-size: clamp(36px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: var(--space-4);
    color: var(--color-text);
}

.blog-header-subtitle {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--color-text-muted);
    margin: 0 auto;
    line-height: 1.6;
}

/* Featured Post */
.blog-featured {
    margin-bottom: var(--space-7);
}

.blog-featured-label {
    display: inline-block;
    background: var(--color-brand);
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-5);
}

.blog-featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--color-bg);
    border: var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 380px;
}

.blog-featured-card:hover {
    border-color: var(--color-brand);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

@media (max-width: 900px) {
    .blog-featured-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

@media (prefers-color-scheme: dark) {
    .blog-featured-card:hover {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }
}

.blog-featured-image {
    overflow: hidden;
    background: var(--color-bg-subtle);
    min-height: 380px;
}

.blog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-featured-image .blog-card-placeholder {
    min-height: 380px;
}

.blog-featured-card:hover .blog-featured-image img {
    transform: scale(1.05);
}

@media (max-width: 900px) {
    .blog-featured-image {
        min-height: 240px;
    }
    .blog-featured-image .blog-card-placeholder {
        min-height: 240px;
    }
}

.blog-featured-content {
    padding: var(--space-7);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 900px) {
    .blog-featured-content {
        padding: var(--space-6);
    }
}

.blog-featured-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.blog-featured-title {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
    margin-bottom: var(--space-5);
    letter-spacing: -0.5px;
}

.blog-featured-excerpt {
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
    flex-grow: 1;
}

/* Category Badge */
.blog-category-badge {
    background: rgba(53, 94, 59, 0.1);
    color: var(--color-brand);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (prefers-color-scheme: dark) {
    .blog-category-badge {
        background: rgba(53, 94, 59, 0.3);
        color: #6b9b6f;
    }
}

/* Meta Styles */
.blog-meta-date,
.blog-meta-author,
.blog-meta-read-time {
    font-size: 13px;
    color: var(--color-text-light);
}

.blog-meta-read-time {
    display: inline-flex;
    align-items: center;
}

.blog-meta-read-time::before {
    content: "•";
    margin-right: var(--space-2);
}

.blog-meta-audio {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 13px;
    color: var(--color-brand);
    font-weight: 500;
}

.blog-meta-audio svg {
    color: var(--color-brand);
}

/* Clickable audio links */
.blog-audio-link {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    margin: calc(var(--space-1) * -1) calc(var(--space-2) * -1);
}

.blog-audio-link:hover {
    background: rgba(53, 94, 59, 0.15);
    transform: scale(1.05);
}

/* Audio Icon in Title */
.blog-audio-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(53, 94, 59, 0.1);
    border-radius: var(--radius-full);
    margin-right: var(--space-2);
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-audio-icon:hover {
    background: rgba(53, 94, 59, 0.3);
    transform: scale(1.1);
}

.blog-audio-icon svg {
    color: var(--color-brand);
}

@media (prefers-color-scheme: dark) {
    .blog-meta-audio {
        color: #6b9b6f;
    }

    .blog-meta-audio svg {
        color: #6b9b6f;
    }

    .blog-audio-icon {
        background: rgba(53, 94, 59, 0.3);
    }

    .blog-audio-icon svg {
        color: #6b9b6f;
    }
}

/* Audio Player (Single Post) */
.blog-audio-player {
    background: var(--color-bg-subtle);
    border: var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-5);
    margin: var(--space-6) 0;
}

.blog-audio-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    color: var(--color-brand);
    font-weight: 600;
    font-size: 15px;
}

.blog-audio-header svg {
    color: var(--color-brand);
}

.blog-audio-element {
    width: 100%;
    height: 40px;
    border-radius: var(--radius-md);
}

/* Custom audio player styling */
.blog-audio-element::-webkit-media-controls-panel {
    background: var(--color-bg);
    border-radius: var(--radius-md);
}

.blog-audio-element::-webkit-media-controls-play-button {
    background-color: var(--color-brand);
    border-radius: var(--radius-full);
}

.blog-audio-element::-webkit-media-controls-current-time-display,
.blog-audio-element::-webkit-media-controls-time-remaining-display {
    color: var(--color-text);
}

@media (prefers-color-scheme: dark) {
    .blog-audio-header {
        color: #6b9b6f;
    }

    .blog-audio-header svg {
        color: #6b9b6f;
    }
}

/* Read More */
.blog-read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-brand);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.blog-read-more .arrow {
    transition: transform 0.2s ease;
}

.blog-featured-card:hover .blog-read-more .arrow,
.blog-card:hover .blog-read-more .arrow {
    transform: translateX(var(--space-1));
}

/* Category Filters */
.blog-filters {
    margin-bottom: var(--space-7);
    padding-bottom: var(--space-6);
    border-bottom: var(--border-light);
}

.blog-filter-buttons {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.blog-filter-btn {
    padding: var(--space-3) var(--space-5);
    border: var(--border-light);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent !important;
    background-color: transparent !important;
}

.blog-filter-btn:hover,
.blog-filter-btn:focus {
    background: transparent !important;
    background-color: transparent !important;
    border-color: var(--color-brand);
    color: var(--color-brand);
}

.blog-filter-btn.active {
    background: var(--color-brand) !important;
    background-color: var(--color-brand) !important;
    border-color: var(--color-brand);
    color: white;
}

@media (prefers-color-scheme: dark) {
    .blog-filter-btn:hover {
        color: #6b9b6f;
    }
}

/* Blog Grid */
.blog-grid-section {
    padding-bottom: var(--space-7);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width), 1fr));
    gap: var(--grid-gap);
}

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

/* Blog Card */
.blog-card {
    background: var(--color-bg);
    border: var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.25s ease;
}

.blog-card:hover {
    border-color: var(--color-brand);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

@media (prefers-color-scheme: dark) {
    .blog-card:hover {
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    }
}

.blog-card-link {
    display: block;
    text-decoration: none;
    height: 100%;
}

/* Blog Card Image */
.blog-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--color-bg-subtle);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.08);
}

.blog-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
    color: white;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 2px;
}

@media (prefers-color-scheme: dark) {
    .blog-card-image {
        background: #111;
    }
}

/* Blog Card Content */
.blog-card-content {
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    height: calc(100% - 180px);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}

.blog-card-title {
    font-size: clamp(16px, 2vw, 18px);
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text);
    margin-bottom: var(--space-3);
}

.blog-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-4);
    border-top: var(--border-light);
    margin-top: auto;
}

/* Blog Pagination */
.blog-pagination {
    padding: var(--space-5) 0 var(--space-8);
    text-align: center;
}

.blog-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-4);
    border: var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.blog-pagination a:hover {
    border-color: var(--color-brand);
    color: var(--color-brand);
}

.blog-pagination .current {
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: white;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: var(--space-10) var(--space-5);
}

.no-posts h2 {
    font-size: 28px;
    margin-bottom: var(--space-3);
    color: var(--color-text);
}

.no-posts p {
    color: var(--color-text-muted);
    font-size: 16px;
}

/* Blog CTA Section */
.blog-cta-section {
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
    padding: var(--space-9) 0;
    margin-top: var(--space-7);
}

.blog-cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.blog-cta-content h2 {
    font-size: clamp(26px, 4vw, 32px);
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-4);
    letter-spacing: -0.5px;
}

.blog-cta-content p {
    font-size: clamp(16px, 2vw, 18px);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: var(--space-6);
}

.blog-cta-content .cta-button {
    background: white;
    color: var(--color-brand);
    padding: var(--space-4) var(--space-7);
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.blog-cta-content .cta-button:hover {
    background: white;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .blog-cta-section {
        padding: var(--space-8) 0;
    }
}

/* ==========================================================================
   SINGLE BLOG POST STYLES
   ========================================================================== */

.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-7) 0 var(--space-7);
}

/* Back Link */
.blog-post-back {
    margin-bottom: var(--space-7);
}

.blog-post-back a {
    color: var(--color-brand);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.blog-post-back a:hover {
    color: var(--color-brand-dark);
}

/* Post Header */
.blog-post-header {
    margin-bottom: var(--space-6);
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    font-size: 14px;
    flex-wrap: wrap;
}

.blog-post-category {
    background: var(--color-brand);
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.blog-post-date,
.blog-post-author {
    color: var(--color-text-muted);
}

.blog-post-author a,
.blog-post-author a:visited {
    color: var(--color-brand);
    text-decoration: none;
}

.blog-post-title {
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -1px;
    color: var(--color-text);
}

/* Post Image */
.blog-post-image {
    margin-bottom: var(--space-7);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.blog-post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-post-placeholder {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
    color: white;
    font-size: 64px;
    font-weight: 700;
    letter-spacing: 4px;
}

/* Post Content */
.blog-post-content {
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.8;
    color: var(--color-text);
}

.blog-post-content h2 {
    font-size: clamp(24px, 3vw, 28px);
    font-weight: 600;
    color: var(--color-brand);
    border-left: 4px solid var(--color-brand);
    padding: var(--space-3) var(--space-5) var(--space-3) calc(var(--space-5) - 4px);
    margin: var(--space-7) 0 var(--space-5);
    background: var(--color-bg-subtle);
}
.blog-post-content h2:first-child {
    margin-top: 0;
}

/* Reset separator bar for h2 inside special containers */
.blog-post-content .blog-key-takeaways h2,
.blog-post-content .blog-faq-section h2,
.blog-post-content .blog-citations-section h2 {
    border-left: none;
    background: none;
    padding: 0;
    margin: 0 0 var(--space-5);
}

/* Blog intro summary — bordered callout like ecosystem hero */
.blog-post-content .blog-intro-summary {
    margin-bottom: var(--space-7);
}

.blog-intro-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

/* Hide stray <br> wpautop injects inside flex header */
.blog-intro-summary-header br {
    display: none;
}

.blog-intro-summary-title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-brand);
}

.blog-post-content .blog-tldr-btn,
.blog-post-content .blog-tldr-btn:hover,
.blog-post-content .blog-tldr-btn:visited {
    display: inline-block;
    background: var(--color-brand);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none !important;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.blog-post-content .blog-tldr-btn:hover {
    background: var(--color-brand-dark, #2a4a2f);
}

.blog-post-content .blog-intro-summary p:last-child {
    margin-bottom: 0;
}

/* Blog Key Takeaways — case study results style */
.blog-post-content .blog-key-takeaways {
    background: var(--color-bg-subtle);
    border-top: 3px solid var(--color-brand);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: var(--space-6);
    margin: var(--space-7) 0;
}

.blog-post-content .blog-key-takeaways h2 {
    font-size: clamp(22px, 2.5vw, 26px);
    margin: 0 0 var(--space-5);
}

.blog-post-content .blog-key-takeaways ul {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-5);
}

.blog-post-content .blog-key-takeaways li {
    padding: var(--space-3) 0 var(--space-3) var(--space-5);
    position: relative;
    font-size: 15px;
    line-height: 1.6;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 0;
}

.blog-post-content .blog-key-takeaways li:last-child {
    border-bottom: none;
}

.blog-post-content .blog-key-takeaways li::before {
    content: '';
    position: absolute;
    left: 0;
    top: calc(var(--space-3) + 0.55em);
    width: 8px;
    height: 8px;
    background: var(--color-brand);
    border-radius: 50%;
}

.blog-post-content .blog-key-takeaways li::marker {
    content: none;
}

.blog-post-content .blog-key-takeaways li strong {
    color: var(--color-brand);
}

.blog-post-content .blog-key-takeaways-footer {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

.blog-post-content .blog-key-takeaways .blog-back-to-top {
    margin-bottom: 0;
}

/* Remove extra space below last element in key takeaways */
.blog-post-content .blog-key-takeaways > *:last-child {
    margin-bottom: 0 !important;
}

.blog-post-content .blog-back-to-top,
.blog-post-content .blog-back-to-top:hover,
.blog-post-content .blog-back-to-top:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-brand);
    color: #fff !important;
    border-radius: var(--radius-sm);
    text-decoration: none !important;
    margin-left: auto;
    margin-top: var(--space-4);
    transition: background 0.2s ease;
}

.blog-post-content .blog-back-to-top:hover {
    background: var(--color-brand-dark, #2a4a2f);
}

@media (prefers-color-scheme: dark) {
    .blog-post-content .blog-key-takeaways {
        background: rgba(255, 255, 255, 0.03);
    }
    .blog-post-content .blog-key-takeaways li {
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }
}

/* Blog CTA Callout */
.blog-post-content .blog-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    background: var(--color-bg-subtle);
    border-left: 4px solid var(--color-brand);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-5) var(--space-6);
    margin: var(--space-7) 0;
}

.blog-post-content .blog-cta p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
}

.blog-post-content .blog-cta-btn,
.blog-post-content .blog-cta-btn:hover,
.blog-post-content .blog-cta-btn:visited {
    display: inline-block;
    background: var(--color-brand);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s ease;
}
#tldr {
    scroll-margin-top: 150px;
}

.blog-post-content .blog-cta-btn:hover {
    background: var(--color-brand-dark, #2a4a2f);
}

@media (max-width: 600px) {
    .blog-post-content .blog-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }
}

@media (prefers-color-scheme: dark) {
    .blog-post-content .blog-cta {
        background: rgba(255, 255, 255, 0.03);
    }
    .blog-post-content h2 {
        background: rgba(255, 255, 255, 0.03);
    }
}

.blog-post-content h3 {
    font-size: clamp(20px, 2.5vw, 22px);
    font-weight: 600;
    margin: var(--space-6) 0 var(--space-4);
    color: var(--color-text);
}

.blog-post-content p {
    margin-bottom: var(--space-5);
}

.blog-post-content figure {
    margin: var(--space-6) 0;
}

.blog-post-content figure img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.blog-post-content figcaption {
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--space-2);
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: var(--space-5);
    padding-left: var(--space-5);
}

.blog-post-content li {
    margin-bottom: var(--space-2);
}

.blog-post-content blockquote {
    border-left: var(--space-1) solid var(--color-brand);
    padding-left: var(--space-5);
    margin: var(--space-6) 0;
    font-style: italic;
    color: var(--color-text-muted);
}

.blog-post-content a {
    color: var(--color-brand);
    text-decoration: underline;
}

.blog-post-content a:hover {
    color: var(--color-brand-dark);
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--space-5) 0;
}

/* Blog Post FAQ & Citations Accordions */
.blog-faq-section,
.blog-citations-section {
    margin-top: var(--space-7);
    padding-top: var(--space-6);
    border-top: var(--border-light);
}

.blog-post-content .blog-citations-section .accordion-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-brand);
}

.blog-faq-section h2 {
    font-size: clamp(20px, 2.5vw, 24px);
    margin-bottom: var(--space-5);
}

.blog-post-content .accordion-item {
    margin-bottom: var(--space-3);
}

.blog-post-content .accordion-header {
    font-size: 16px;
    font-weight: 600;
    padding: var(--space-4) 0;
}

.blog-post-content .accordion-header::after {
    font-size: 18px;
}

.blog-post-content .accordion-content {
    font-size: 15px;
    line-height: 1.6;
}

.blog-post-content .accordion-inner {
    padding: var(--space-2) 0;
}

.blog-post-content .accordion-inner p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: var(--space-3);
}

.blog-post-content .accordion-inner p:last-child {
    margin-bottom: 0;
}

/* Citation reference superscripts */
.citation-ref {
    color: var(--color-brand);
    text-decoration: none;
    font-size: 0.75em;
    cursor: pointer;
}

.citation-ref:hover {
    text-decoration: underline;
}

/* Citation tooltip */
.citation-tooltip {
    position: absolute;
    z-index: 9999;
    display: flex;
    align-items: stretch;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-brand);
    overflow: hidden;
    font-size: 13px;
    line-height: 1.5;
    max-width: 360px;
    box-shadow: 0 4px 16px rgba(53, 94, 59, 0.15);
    pointer-events: none;
}

.citation-tooltip::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid var(--color-brand);
}

.citation-tooltip-num {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-brand);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    padding: 8px 10px;
    flex-shrink: 0;
}

.citation-tooltip-source {
    display: block;
    background: #fff;
    color: #1a1a1a;
    padding: 8px 12px;
}

@media (prefers-color-scheme: dark) {
    .citation-tooltip {
        border-color: var(--color-brand);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }
    .citation-tooltip-source {
        background: #1a1a1a;
        color: #e0e0e0;
    }
}

/* Citation list in accordion */
.citation-list {
    padding-left: var(--space-5);
    font-size: 14px;
    line-height: 1.8;
}

.citation-list li {
    margin-bottom: var(--space-2);
    padding-left: var(--space-2);
}

.citation-list a {
    color: var(--color-brand);
    text-decoration: none;
    word-break: break-word;
}

.citation-list a:hover {
    text-decoration: underline;
}

/* Post Tags */
.blog-post-tags {
    margin-top: var(--space-7);
    padding-top: var(--space-5);
    border-top: var(--border-light);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.tags-label {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 14px;
}

.blog-tag {
    background: var(--color-bg-subtle);
    color: var(--color-text);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.blog-tag:hover {
    background: var(--color-brand);
    color: white;
}

@media (prefers-color-scheme: dark) {
    .blog-tag {
        background: #333;
    }
}

/* Post Navigation */
.blog-post-nav {
    margin-top: var(--space-7);
    padding-top: var(--space-6);
    border-top: var(--border-light);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}

@media (max-width: 600px) {
    .blog-post-nav {
        grid-template-columns: 1fr;
    }
}

.blog-post-nav-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.blog-post-nav-next {
    text-align: right;
}

@media (max-width: 600px) {
    .blog-post-nav-next {
        text-align: left;
    }
}

.nav-label {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.nav-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-title:hover {
    color: var(--color-brand);
}

/* ==========================================================================
   TEAM PAGE STYLES
   ========================================================================== */

/* Team Section */
.team-section {
    padding: var(--space-7) 0 var(--space-8);
    border-bottom: var(--border-light);
}

.team-section:last-of-type {
    border-bottom: none;
}

.advisors-section {
    padding-top: var(--space-8);
}

.team-section-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: var(--space-4);
    letter-spacing: -0.5px;
    color: var(--color-text);
}

.team-section-intro {
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: var(--space-7);
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--grid-gap);
}

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

/* Team Card */
.team-card {
    background: var(--color-bg);
    border: var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    border-color: var(--color-brand);
}

@media (prefers-color-scheme: dark) {
    .team-card:hover {
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    }
}

/* Team Photo */
.team-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--color-bg-subtle);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.4s ease;
}

.team-card:hover .team-photo img {
    transform: scale(1.05);
}

.team-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
    color: white;
    font-size: 64px;
    font-weight: 700;
    letter-spacing: 2px;
}

@media (max-width: 480px) {
    .team-photo-placeholder {
        font-size: 36px;
    }
}

@media (prefers-color-scheme: dark) {
    .team-photo {
        background: #111;
    }
}

/* Team Info */
.team-info {
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.team-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-1);
}

.team-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.team-linkedin {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0077b5;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.team-linkedin:hover {
    color: #005885;
    transform: scale(1.1);
}

.team-role {
    font-size: 14px;
    color: var(--color-brand);
    font-weight: 600;
    margin-bottom: var(--space-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-short-bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
    flex-grow: 1;
}

.team-card-cta {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-brand);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: auto;
}

.team-card-cta::after {
    content: '\2192';
    transition: transform 0.2s ease;
}

.team-card:hover .team-card-cta::after {
    transform: translateX(var(--space-1));
}

/* Team Overlay & Panel (reusing MAS panel styles) */
.team-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.team-overlay.active {
    opacity: 1;
    visibility: visible;
}

.team-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 50%;
    max-width: 700px;
    height: 100%;
    background: var(--color-bg);
    z-index: 2001;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.team-panel.active {
    transform: translateX(0);
}

@media (max-width: 1024px) {
    .team-panel {
        width: 70%;
    }
}

@media (max-width: 768px) {
    .team-panel {
        width: 90%;
    }
}

/* Panel Header */
.team-panel .panel-header {
    padding: var(--space-6);
    border-bottom: var(--border-light);
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
    background: var(--color-bg-subtle);
}

@media (prefers-color-scheme: dark) {
    .team-panel .panel-header {
        background: #111;
    }
}

.panel-photo-container {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-bg-subtle);
}

.panel-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.panel-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
    color: white;
    font-size: 32px;
    font-weight: 700;
}

.team-panel .panel-title {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.team-panel .panel-title h2 {
    font-size: 26px;
    margin-bottom: 0;
    color: var(--color-text);
}

.team-panel .panel-title span#panelRole {
    display: inline-block;
    width: fit-content;
    background: var(--color-brand);
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: var(--space-1);
    padding: var(--space-2) var(--space-3);
    border: none;
    border-radius: var(--radius-sm);
}

.panel-linkedin {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: #0077b5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
    width: fit-content;
}

.panel-linkedin:hover {
    color: #005885;
}

.panel-linkedin svg {
    width: 18px;
    height: 18px;
}

/* Panel Body */
.team-panel .panel-body {
    padding: var(--space-7) var(--space-6);
    overflow-y: auto;
    flex-grow: 1;
}

.panel-bio p {
    margin-bottom: var(--space-5);
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.7;
}

.panel-bio h3 {
    font-size: 16px;
    font-weight: 600;
    margin: var(--space-6) 0 var(--space-3);
    color: var(--color-text);
    border-left: 2px solid var(--color-brand);
    padding-left: var(--space-3);
}

.panel-bio ul {
    padding-left: var(--space-5);
    margin-bottom: var(--space-5);
}

.panel-bio li {
    margin-bottom: var(--space-2);
    color: var(--color-text-muted);
    line-height: 1.6;
}

.panel-bio a {
    color: var(--color-brand);
    text-decoration: underline;
}

.panel-bio a:hover {
    color: var(--color-brand-dark);
}

/* Alumni Section - slightly muted styling */
.alumni-section {
    padding-top: var(--space-8);
}

.alumni-section .team-card {
    opacity: 0.85;
}

.alumni-section .team-card:hover {
    opacity: 1;
}

/* ==========================================================================
   CASE STUDIES PAGE STYLES
   ========================================================================== */

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
    margin-top: var(--space-7);
    padding: var(--space-6) 0;
    border-top: var(--border-light);
    border-bottom: var(--border-light);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-brand);
    margin-bottom: var(--space-1);
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .stats-bar {
        flex-direction: column;
        gap: var(--space-5);
    }
    .stat-number {
        font-size: 24px;
    }
}

/* Case Studies Section */
.case-studies-section {
    padding: var(--space-7) 0 var(--space-8);
}

/* Filters */
.filters-container {
    margin-bottom: var(--space-7);
    padding-bottom: var(--space-6);
    border-bottom: var(--border-light);
}

.filter-group {
    margin-bottom: var(--space-5);
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-3);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.filter-btn,
button.filter-btn {
    padding: var(--space-2) var(--space-4);
    border: var(--border-light);
    border-radius: var(--radius-full);
    background: transparent !important;
    background-color: transparent !important;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn:focus,
button.filter-btn:hover,
button.filter-btn:focus {
    background: transparent !important;
    background-color: transparent !important;
    border-color: var(--color-brand);
    color: var(--color-brand);
}

.filter-btn.active,
button.filter-btn.active {
    background: var(--color-brand) !important;
    background-color: var(--color-brand) !important;
    border-color: var(--color-brand);
    color: white;
}

@media (prefers-color-scheme: dark) {
    .filter-btn:hover,
    button.filter-btn:hover {
        color: #6b9b6f;
    }
}

/* Case Study Grid */
.case-study-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width), 1fr));
    gap: var(--grid-gap);
}

@media (max-width: 480px) {
    .case-study-grid {
        grid-template-columns: 1fr;
    }
}

/* Case Study Card */
.case-study-card {
    background: var(--color-bg);
    border: var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Client logo on card */
.case-study-logo {
    max-height: 36px;
    max-width: 160px;
    object-fit: contain;
    object-position: left;
    margin-bottom: var(--space-3);
}
.case-study-logo-light { display: inline; }
.case-study-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
    .case-study-logo-light { display: none; }
    .case-study-logo-dark { display: inline; }
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    border-color: var(--color-brand);
}

.case-study-card.featured {
    border-color: var(--color-brand);
    box-shadow: 0 4px 12px rgba(53, 94, 59, 0.1);
}

.case-study-card.featured::before {
    content: 'Featured';
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: var(--color-brand);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (prefers-color-scheme: dark) {
    .case-study-card:hover {
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    }
}

.case-study-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.industry-tag {
    background: rgba(53, 94, 59, 0.1);
    color: var(--color-brand);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

@media (prefers-color-scheme: dark) {
    .industry-tag {
        background: rgba(53, 94, 59, 0.25);
        color: #6b9b6f;
    }
}

.anonymous-badge {
    background: var(--color-bg-subtle);
    color: var(--color-text-light);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
}

@media (prefers-color-scheme: dark) {
    .anonymous-badge {
        background: #333;
    }
}

.case-study-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-3);
    line-height: 1.3;
}

.case-study-card p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: var(--space-5);
    flex-grow: 1;
}

.solution-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.solution-tag {
    background: var(--color-bg-subtle);
    color: var(--color-text-muted);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

@media (prefers-color-scheme: dark) {
    .solution-tag {
        background: #333;
    }
}

.case-study-cta {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-brand);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: auto;
}

.case-study-cta::after {
    content: '\2192';
    transition: transform 0.2s ease;
}

.case-study-card:hover .case-study-cta::after {
    transform: translateX(var(--space-1));
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-8) var(--space-5);
    color: var(--color-text-muted);
    font-size: 16px;
}

/* Case Study Panel */
.case-study-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.case-study-overlay.active {
    opacity: 1;
    visibility: visible;
}

.case-study-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 55%;
    max-width: 750px;
    height: 100%;
    background: var(--color-bg);
    z-index: 2001;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.case-study-panel.active {
    transform: translateX(0);
}

@media (max-width: 1024px) {
    .case-study-panel {
        width: 70%;
    }
}

@media (max-width: 768px) {
    .case-study-panel {
        width: 90%;
    }
}

.case-study-panel .panel-header {
    padding: var(--space-6);
    border-bottom: var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: var(--color-bg-subtle);
}

@media (prefers-color-scheme: dark) {
    .case-study-panel .panel-header {
        background: #111;
    }
}

.case-study-panel .panel-title {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.case-study-panel .panel-title h2 {
    font-size: 26px;
    margin: 0;
    color: var(--color-text);
}

.case-study-panel .panel-title span {
    display: inline-block;
    width: fit-content;
    background: var(--color-brand);
    color: white;
    font-size: 12px;
    font-weight: 500;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
}

.case-study-panel .panel-body {
    padding: var(--space-6);
    overflow-y: auto;
    flex-grow: 1;
}

/* Client logo in panel */
.panel-logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: calc(-1 * var(--space-4));
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-3);
    border-bottom: var(--border-light);
}
.panel-announcement-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-brand);
    text-decoration: none;
    white-space: nowrap;
    background: var(--color-bg-subtle);
    border-left: 3px solid var(--color-brand);
    padding: 0 var(--space-4);
    border-radius: 0;
    transition: all 0.2s ease;
    margin: calc(-1 * var(--space-3) - 10px) calc(-1 * var(--space-6)) calc(-1 * var(--space-3) - 1px) 0;
    padding-top: calc(var(--space-3) + 10px);
    padding-bottom: var(--space-3);
    align-self: stretch;
}
.panel-announcement-link:hover {
    background: var(--color-brand);
    color: white;
}
.panel-announcement-link svg {
    flex-shrink: 0;
}
@media (prefers-color-scheme: dark) {
    .panel-announcement-link { background: #2a2a2a; }
    .panel-announcement-link:hover { background: var(--color-brand); color: white; }
}
@media (max-width: 768px) {
    .panel-logo { flex-wrap: wrap; gap: var(--space-3); }
    .panel-announcement-link { margin-right: calc(-1 * var(--space-6)); }
}

.panel-logo img {
    max-height: 48px;
    max-width: 200px;
    object-fit: contain;
}
.panel-logo-light { display: inline; }
.panel-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
    .panel-logo-light { display: none; }
    .panel-logo-dark { display: inline; }
}

.panel-section {
    margin-bottom: var(--space-6);
}

.panel-section:last-child {
    margin-bottom: 0;
}

.panel-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-brand);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-3);
}

.panel-section p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 0;
}

.project-item {
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
}

.project-item:last-child {
    margin-bottom: 0;
}

.project-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.project-item p {
    font-size: 14px;
    color: var(--color-text-muted);
}

@media (prefers-color-scheme: dark) {
    .project-item {
        background: #252525;
    }
}

.panel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.panel-solution-tag {
    background: var(--color-bg-subtle);
    color: var(--color-text-muted);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
}

@media (prefers-color-scheme: dark) {
    .panel-solution-tag {
        background: #333;
    }
}

/* Panel Results List */
.case-study-panel #panelResults ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.case-study-panel #panelResults li {
    padding: var(--space-3) 0;
    padding-left: var(--space-5);
    position: relative;
    font-size: 15px;
    line-height: 1.5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.case-study-panel #panelResults li:last-child {
    border-bottom: none;
}

.case-study-panel #panelResults li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--color-brand);
    border-radius: 50%;
}

/* Panel Quote */
.case-study-quote {
    margin: 0;
    padding: var(--space-5);
    background: var(--color-bg-subtle);
    border-left: 3px solid var(--color-brand);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.case-study-quote p {
    font-size: 15px;
    line-height: 1.6;
    font-style: italic;
    color: var(--color-text);
    margin-bottom: var(--space-3);
}

.case-study-quote cite {
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
    color: var(--color-brand);
}

/* Cross-links between pages */
.cross-link {
    display: inline-block;
    padding: var(--space-3) var(--space-5);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-brand);
    border-radius: var(--radius-md);
    color: var(--color-brand);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cross-link:hover {
    background: var(--color-brand);
    color: #fff;
}

.panel-case-study-link {
    display: none;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    border-top: var(--border-light);
    border-bottom: var(--border-light);
}
.panel-case-study-link .cross-link-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-brand);
    letter-spacing: -0.02em;
}
.panel-case-study-link .cross-link {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
}
.panel-case-study-link .cross-link:hover {
    background: none;
    color: var(--color-brand);
}
.panel-case-study-link .cross-link:hover .cross-link-logo {
    filter: none;
}
.panel-case-study-link .cross-link-logo {
    height: 24px;
    opacity: 1;
}

.cross-link-logo {
    height: 20px;
    width: auto;
    vertical-align: middle;
    margin-right: var(--space-2);
    opacity: 0.8;
}
.cross-link-logo-light { display: inline; }
.cross-link-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
    .cross-link-logo-light { display: none; }
    .cross-link-logo-dark { display: inline; filter: none; opacity: 0.8; }
}

.cross-link:hover .cross-link-logo {
    opacity: 1;
    filter: brightness(0) invert(1);
}

@media (prefers-color-scheme: dark) {
    .panel-case-study-link {
        background: rgba(255, 255, 255, 0.03);
        border-bottom-color: #333;
    }
    .panel-case-study-link .cross-link,
    .panel-case-study-link .cross-link:hover {
        background: none;
        color: var(--color-brand);
    }
    .panel-case-study-link .cross-link:hover .cross-link-logo {
        filter: brightness(0) invert(1);
    }

    .cross-link {
        background: rgba(255, 255, 255, 0.05);
    }

    .cross-link:hover {
        background: var(--color-brand);
    }

    .cross-link-logo {
        filter: brightness(0) invert(1);
        opacity: 0.7;
    }

    .cross-link:hover .cross-link-logo {
        opacity: 1;
    }
}

/* Panel CTA */
.panel-cta {
    padding-top: var(--space-5);
    border-top: var(--border-light);
    text-align: center;
}

.panel-cta .cta-button {
    display: inline-block;
    width: 100%;
}

@media (prefers-color-scheme: dark) {
    .case-study-quote,
    .mas-endorsement {
        background: rgba(255, 255, 255, 0.05);
    }

    .case-study-panel #panelResults li {
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }
}

/* Case Study CTA Section */
.case-study-cta-section {
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
    padding: var(--space-9) 0;
    margin-top: var(--space-7);
}

.case-study-cta-section .cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.case-study-cta-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-4);
}

.case-study-cta-section p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: var(--space-6);
}

.case-study-cta-section .cta-button {
    background: white;
    color: var(--color-brand);
    padding: var(--space-4) var(--space-7);
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.case-study-cta-section .cta-button:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .case-study-cta-section {
        padding: var(--space-8) 0;
    }
    .case-study-cta-section h2 {
        font-size: 26px;
    }
}

/* Testimonials Section (for future use) */
.testimonials-section {
    padding: var(--space-8) 0;
    border-top: var(--border-light);
}

.testimonials-section h2 {
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--space-7);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width), 1fr));
    gap: var(--grid-gap);
}

.testimonial-card {
    background: var(--color-bg);
    border: var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.testimonial-quote {
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    font-style: italic;
    margin-bottom: var(--space-5);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.testimonial-photo {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--color-bg-subtle);
}

.testimonial-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-brand);
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.testimonial-name {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
}

.testimonial-title {
    font-size: 13px;
    color: var(--color-text-muted);
}

/* ==========================================================================
   404 PAGE STYLES
   ========================================================================== */

/* Sticky footer for 404 page */
.page-404 .page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-404 .page-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.page-404 .page-content .container {
    width: 100%;
}

.error-404-section {
    text-align: center;
    padding: var(--space-8) 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.error-404-section h1 {
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-5);
    letter-spacing: -0.5px;
}

.error-404-section p {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 500px;
    margin-bottom: var(--space-7);
}

.error-404-section .cta-button {
    background: transparent;
    border: 2px solid var(--color-brand);
    color: var(--color-text);
}

.error-404-section .cta-button:hover {
    background: var(--color-brand);
    color: white;
}

/* WordPress overrides for case studies page */
.page-template-page-case-studies .site-header,
.page-template-page-case-studies .site-footer,
.page-template-page-case-studies #primary {
    display: none;
}

.page-template-page-case-studies .site-content {
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   PARTNERS PAGE
   ========================================================================== */

/* WordPress overrides for partners page */
.page-template-page-partners .site-header,
.page-template-page-partners .site-footer,
.page-template-page-partners #primary {
    display: none;
}

.page-template-page-partners .site-content {
    padding: 0;
    margin: 0;
}

/* Partner hero breathing room */
.partner-section-alt + .partner-section,
.partner-section + .partner-section-alt {
    /* sections already have their own padding */
}

/* Partners hero: more vertical space + narrower subtitle */
body.page-template-page-partners .hero {
    padding-bottom: var(--space-9);
}

body.page-template-page-partners .hero .subtitle {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* Eyebrow text above hero H1 */
.partner-eyebrow {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-brand);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-4);
}

/* Dual CTA buttons in hero */
.partner-hero-ctas {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button-secondary {
    background: transparent !important;
    border: 2px solid var(--color-text);
    color: var(--color-text);
}

.cta-button-secondary:hover {
    border-color: var(--color-brand);
    background: var(--color-brand) !important;
    color: white;
}

@media (prefers-color-scheme: dark) {
    .cta-button-secondary {
        border-color: #e0e0e0;
        color: #e0e0e0;
    }
    .cta-button-secondary:hover {
        border-color: var(--color-brand);
        background: var(--color-brand) !important;
        color: white;
    }
}

/* Partner page sections */
.partner-section {
    padding: var(--space-8) 0;
    overflow: hidden;
}

.partner-section-alt {
    background: var(--color-bg-subtle);
}

.partner-section h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: var(--space-5);
    letter-spacing: -0.5px;
}

.partner-section-intro {
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: var(--space-7);
}

.partner-subheading {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: var(--space-6);
}

/* Benefits grid (3 columns) */
.partner-benefits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
    margin-bottom: var(--space-7);
}

.partner-benefits .partner-benefit-item {
    flex: 0 1 calc(33.333% - var(--space-6));
    min-width: 260px;
}

.partner-benefit-item {
    padding: var(--space-5);
    border: var(--border-light);
    border-radius: var(--radius-md);
}

.partner-benefit-item h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--color-brand);
}

.partner-benefit-item p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
}

/* Example callout box */
.partner-example {
    padding: var(--space-5);
    background: var(--color-bg);
    border-left: 4px solid var(--color-brand);
    border-radius: var(--radius-sm);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text-muted);
}

@media (prefers-color-scheme: dark) {
    .partner-example {
        background: #222;
    }
}

/* Partner cards grid (4 columns on desktop, 2 on tablet) */
.partner-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
    margin-bottom: var(--space-7);
}

.partner-cards .partner-card {
    flex: 0 1 calc(33.333% - var(--space-6));
    min-width: 260px;
}

.partner-card {
    padding: var(--space-6);
    border: var(--border-light);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease;
}

.partner-card:hover {
    border-color: var(--color-brand);
}

.partner-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.partner-card p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-muted);
}

/* Closing text after sections */
.partner-closing {
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Engagement model blocks */
.partner-engagement-blocks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
}

.partner-engagement-blocks .partner-engagement {
    flex: 0 1 calc(33.333% - var(--space-6));
    min-width: 280px;
}

.partner-engagement {
    padding: var(--space-6);
    background: var(--color-bg);
    border: var(--border-light);
    border-radius: var(--radius-md);
}

@media (prefers-color-scheme: dark) {
    .partner-engagement {
        background: #222;
    }
}

.partner-engagement h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--color-brand);
}

.partner-engagement-desc {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
    font-style: italic;
}

.partner-engagement ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.partner-engagement li {
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    padding: var(--space-2) 0;
    padding-left: var(--space-5);
    position: relative;
}

.partner-engagement li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 8px;
    height: 8px;
    background: var(--color-brand);
    border-radius: 50%;
}

/* Partner program table */
.partner-table-wrapper {
    overflow-x: auto;
}

.partner-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.partner-table th {
    text-align: left;
    padding: var(--space-4) var(--space-5);
    background: var(--color-brand);
    color: white;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.partner-table th:first-child {
    border-radius: var(--radius-md) 0 0 0;
    width: 180px;
}

.partner-table th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

.partner-table td {
    padding: var(--space-4) var(--space-5);
    border-bottom: var(--border-light);
    vertical-align: top;
    line-height: 1.6;
}

.partner-table tr:last-child td {
    border-bottom: var(--border-light);
}

.partner-table tbody tr:hover {
    background: var(--color-bg-subtle);
}

@media (prefers-color-scheme: dark) {
    .partner-table tbody tr:hover {
        background: #222;
    }
}

/* Differentiators grid */
.partner-differentiators {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
    margin-bottom: var(--space-7);
}

.partner-differentiators .partner-diff-item {
    flex: 0 1 calc(33.333% - var(--space-6));
    min-width: 260px;
}

.partner-diff-item {
    padding: var(--space-5);
    border-bottom: 3px solid var(--color-brand);
}

.partner-diff-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.partner-diff-item p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-muted);
}

/* Fit checklist */
.partner-fit-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-7);
    max-width: 800px;
}

.partner-fit-list li {
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text);
    padding: var(--space-3) 0;
    padding-left: var(--space-7);
    position: relative;
}

.partner-fit-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--color-brand);
    font-weight: 700;
    font-size: 20px;
}

/* Conversation starters */
.partner-conversation-starters {
    list-style: none;
    padding: 0;
    margin: 0 auto var(--space-7);
    max-width: 600px;
    text-align: left;
}

.partner-conversation-starters li {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-muted);
    padding: var(--space-2) 0;
    padding-left: var(--space-5);
    position: relative;
}

.partner-conversation-starters li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 8px;
    height: 8px;
    background: var(--color-brand);
    border-radius: 50%;
}

.partner-email-alt {
    margin-top: var(--space-5);
    font-size: 15px;
    color: var(--color-text-muted);
}

.partner-email-alt a {
    color: var(--color-brand);
    text-decoration: none;
}

.partner-email-alt a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .partner-section h2 {
        font-size: 26px;
    }

    .partner-cards .partner-card,
    .partner-engagement-blocks .partner-engagement,
    .partner-differentiators .partner-diff-item,
    .partner-benefits .partner-benefit-item {
        flex: 1 1 100%;
    }

    .partner-table th:first-child {
        width: 120px;
    }
}

/* ==========================================================================
   ECOSYSTEM PAGE STYLES
   ========================================================================== */

.ecosystem-hero-callout {
    color: var(--color-brand);
    font-size: 22px;
    line-height: 1.5;
    font-weight: 700;
    padding: var(--space-6) 0;
    margin: var(--space-6) 0;
    border-top: var(--border-light);
    border-bottom: var(--border-light);
    text-align: center;
}

/* Remove extra bottom margin on last subtitle — hero padding handles the gap */
.hero .ecosystem-hero-callout + .subtitle {
    margin-bottom: 0;
}

.ecosystem-section {
    padding: var(--space-8) 0;
    overflow: hidden;
}

.ecosystem-section-alt {
    background: var(--color-bg-subtle);
}

.ecosystem-section h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: var(--space-5);
    letter-spacing: -0.5px;
}

.ecosystem-section-intro {
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: var(--space-7);
}

/* Ecosystem cards grid */
.ecosystem-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
}

.ecosystem-grid .ecosystem-card {
    flex: 0 1 calc(50% - var(--space-6));
    min-width: 300px;
    height: 320px;
}

.ecosystem-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    border: var(--border-light);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease;
    position: relative;
}

.ecosystem-card:hover {
    border-color: var(--color-brand);
}

.ecosystem-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    min-height: 50px;
    flex-shrink: 0;
    flex-shrink: 0;
}

.ecosystem-card-logo-link {
    flex-shrink: 0;
    line-height: 0;
}

.ecosystem-card-logo {
    max-height: 48px;
    max-width: 120px;
    object-fit: contain;
    margin: 0;
}

.ecosystem-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.ecosystem-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px 2px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

.ecosystem-badge-ongoing {
    background: var(--color-brand);
    color: white;
}

.ecosystem-badge-completed {
    background: #DAA520;
    color: #fff;
}

.ecosystem-card p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0;
}

.ecosystem-card-footer {
    margin-top: var(--space-3);
    padding-left: var(--space-4);
    border-left: 3px solid var(--color-brand);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-2);
    flex-shrink: 0;
}

.ecosystem-card-footer .ecosystem-badge {
    margin-left: auto;
}

.ecosystem-card-detail {
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-text-muted);
    margin: 0;
    flex: 1 1 100%;
}

/* Card text — fills remaining space; JS applies -webkit-line-clamp when truncated */
.ecosystem-card-text {
    flex: 1 1 0%;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.ecosystem-read-more {
    position: absolute;
    bottom: 0;
    right: 0;
    background: linear-gradient(to right, transparent, var(--color-bg-subtle) 25%, var(--color-bg-subtle));
    padding-left: 2em;
    padding-right: 2px;
    color: var(--color-brand);
    font-size: inherit;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.6;
    display: none;
}

.ecosystem-read-more:hover {
    text-decoration: underline;
}

/* Modal logo dark/light variants */
.ecosystem-modal-logo-dark { display: none; }
.ecosystem-modal-logo-light { display: inline-block; }

@media (prefers-color-scheme: dark) {
    .ecosystem-modal-logo-dark { display: inline-block; }
    .ecosystem-modal-logo-light { display: none; }
}

/* Ecosystem modal overlay */
.ecosystem-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.ecosystem-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Ecosystem modal */
.ecosystem-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: var(--color-bg);
    z-index: 2001;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ecosystem-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Close button — top-right corner */
.ecosystem-modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    z-index: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ecosystem-modal-close:hover { color: var(--color-text); }

/* Modal header — logo + title */
.ecosystem-modal-header {
    padding: var(--space-5) var(--space-6) 0;
    text-align: center;
}

.ecosystem-modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: var(--color-text);
}

/* Centered clickable logo(s) */
.ecosystem-modal-logo-wrap {
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
}

.ecosystem-modal-logo-wrap a {
    display: inline-block;
}

.ecosystem-modal-logo {
    max-height: 80px;
    max-width: 320px;
    object-fit: contain;
}

/* Modal body */
.ecosystem-modal .panel-body {
    padding: var(--space-5) var(--space-6);
    overflow-y: auto;
    flex-grow: 1;
}

.ecosystem-modal .panel-body p {
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 var(--space-4) 0;
}

.ecosystem-modal .panel-body p:last-of-type {
    margin-bottom: 0;
}

.ecosystem-modal .panel-body ul {
    margin: 0 0 var(--space-4) 0;
    padding-left: var(--space-5);
    font-size: 16px;
    line-height: 1.7;
}

.ecosystem-modal .panel-body li {
    margin-bottom: var(--space-2);
    color: var(--color-text);
}

.ecosystem-modal .panel-body li::marker {
    color: var(--color-brand);
}

.ecosystem-modal .panel-body a {
    color: var(--color-brand);
    text-decoration: none;
    font-weight: 500;
}

.ecosystem-modal .panel-body a:hover {
    text-decoration: underline;
}

.ecosystem-modal-partner {
    margin-top: var(--space-4);
}

.ecosystem-modal-partner-logo {
    max-height: 36px;
    object-fit: contain;
}

/* Footer — badge bottom-right */
.ecosystem-modal-footer {
    padding: var(--space-5) var(--space-6);
    display: flex;
    justify-content: flex-end;
}

@media (prefers-color-scheme: dark) {
    .ecosystem-modal {
        background: #1a1a1a;
        box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    }
    .ecosystem-modal-close { color: #666; }
    .ecosystem-modal-close:hover { color: var(--color-text); }
}

/* Responsive */
@media (max-width: 768px) {
    .ecosystem-section h2 {
        font-size: 26px;
    }

    .ecosystem-grid .ecosystem-card {
        flex: 0 1 100%;
        min-width: 0;
        height: auto;
    }

    .ecosystem-modal {
        width: 95%;
        max-height: 85vh;
    }
}

/* ==========================================================================
   THEME TOGGLE BUTTON
   ========================================================================== */

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    margin-left: var(--space-3);
    color: var(--color-text-muted);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}
.theme-toggle:hover {
    color: var(--color-brand);
}
.theme-toggle svg {
    display: block;
}
/* Sun shown in dark, moon shown in light — JS handles display toggling */
.theme-toggle-sun { display: none; }
.theme-toggle-moon { display: block; }

@media (prefers-color-scheme: dark) {
    .theme-toggle { color: #999; }
    .theme-toggle:hover { color: var(--color-brand); }
}

/* ==========================================================================
   MANUAL DARK MODE — html[data-theme="dark"]
   Overrides light defaults when user explicitly selects dark mode.
   Higher specificity than bare selectors, so these always win.
   ========================================================================== */

/* Design tokens */
html[data-theme="dark"] {
    --border-light: 1px solid #333;
    --color-text: #e0e0e0;
    --color-text-muted: #999;
    --color-text-light: #777;
    --color-bg: #1a1a1a;
    --color-bg-subtle: #0d0d0d;
}
html[data-theme="dark"] body { color: #e0e0e0; background: #1a1a1a; }

/* Logo display toggles */
html[data-theme="dark"] .logo-light,
html[data-theme="dark"] .footer-logo-light,
html[data-theme="dark"] .sticky-logo-light,
html[data-theme="dark"] .case-study-logo-light,
html[data-theme="dark"] .panel-logo-light,
html[data-theme="dark"] .cross-link-logo-light,
html[data-theme="dark"] .ecosystem-modal-logo-light { display: none !important; }

html[data-theme="dark"] .logo-dark { display: block; }
html[data-theme="dark"] .footer-logo-dark { display: block; margin: 0 auto; }
html[data-theme="dark"] .sticky-logo-dark { display: block; }
html[data-theme="dark"] .case-study-logo-dark { display: inline; }
html[data-theme="dark"] .panel-logo-dark { display: inline; }
html[data-theme="dark"] .panel-announcement-link { background: #2a2a2a; }
html[data-theme="dark"] .panel-announcement-link:hover { background: var(--color-brand); color: white; }
html[data-theme="dark"] .cross-link-logo-dark { display: inline; filter: none; opacity: 0.8; }
html[data-theme="dark"] .ecosystem-modal-logo-dark { display: inline-block; }
html[data-theme="dark"] .ecosystem-modal-logo-light { display: none; }

/* Navigation */
html[data-theme="dark"] .sticky-nav { background: rgba(26, 26, 26, 0.95); }
html[data-theme="dark"] .sticky-cta { border: 2px solid #e0e0e0; color: #e0e0e0; }
html[data-theme="dark"] .sticky-cta:hover { background: var(--color-brand); color: white !important; }
html[data-theme="dark"] .nav-dropdown-menu { background: #1a1a1a; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
html[data-theme="dark"] .nav-dropdown-menu a:hover { background: #2a2a2a; }
html[data-theme="dark"] .theme-toggle { color: #999; }
html[data-theme="dark"] .nav-hamburger { color: #e0e0e0; }
@media (max-width: 768px) {
    html[data-theme="dark"] .sticky-nav-links { background: rgba(26, 26, 26, 0.98); border-bottom-color: #333; }
    html[data-theme="dark"] .nav-dropdown-menu { background: transparent; box-shadow: none; }
}

/* Audience cards */
html[data-theme="dark"] .audience-card { background: #1a1a1a; border-color: #333; }
html[data-theme="dark"] .audience-card:hover { border-color: var(--color-brand); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
html[data-theme="dark"] .audience-card.active { border-left-color: var(--color-brand); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
html[data-theme="dark"] .audience-card-title { color: #e0e0e0; }
html[data-theme="dark"] .audience-card.active .audience-card-title { color: var(--color-brand); }
html[data-theme="dark"] .audience-card-desc { color: #999; }

/* Detail cards */
html[data-theme="dark"] .detail-card { background: #1a1a1a; border-color: #333; }
html[data-theme="dark"] .detail-card:hover { border-color: var(--color-brand); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
html[data-theme="dark"] .detail-card.active { border-left-color: var(--color-brand); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
html[data-theme="dark"] .detail-card-title { color: #e0e0e0; }
html[data-theme="dark"] .detail-card.active .detail-card-title { color: var(--color-brand); }
html[data-theme="dark"] .detail-card-desc { color: #999; }

/* CTA buttons */
html[data-theme="dark"] .cta-button { background: #e0e0e0; color: #1a1a1a; }
html[data-theme="dark"] .cta-button:hover { background: var(--color-brand); color: white; }
html[data-theme="dark"] .hero .cta-button { border: 2px solid #e0e0e0; color: #e0e0e0; }
html[data-theme="dark"] .hero .cta-button:hover { background: var(--color-brand) !important; color: white; }
html[data-theme="dark"] .cta-button-secondary { border-color: #e0e0e0; color: #e0e0e0; }
html[data-theme="dark"] .cta-button-secondary:hover { border-color: var(--color-brand); background: var(--color-brand) !important; color: white; }

/* Accordions */
html[data-theme="dark"] .accordion-item:not(.active-item):hover { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); }

/* Panels */
html[data-theme="dark"] .panel-header { background: #111; }
html[data-theme="dark"] .close-panel { color: #666; }
html[data-theme="dark"] .close-panel:hover { color: #e0e0e0; }

/* MAS / Solutions */
html[data-theme="dark"] .mas-card:hover { box-shadow: 0 12px 24px rgba(0,0,0,0.3); }
html[data-theme="dark"] .mas-gallery-wrapper { background: rgba(0,0,0,0.2); }
html[data-theme="dark"] .mas-gallery-img { box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
html[data-theme="dark"] .mas-gallery-img:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
html[data-theme="dark"] .mas-sample-item { border-color: #333; background: #1a1a1a; }
html[data-theme="dark"] .mas-sample-item:hover { border-color: var(--color-brand); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
html[data-theme="dark"] .mas-doc-overlay { background: rgba(0, 0, 0, 0.6); }
html[data-theme="dark"] .mas-doc-modal { background: #1a1a1a; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] .mas-doc-modal--arch { background: #1a1a1a; }
html[data-theme="dark"] .doc-accordion-item { border-color: #333; }
html[data-theme="dark"] .doc-accordion-header { background: #222; }
html[data-theme="dark"] .doc-accordion-header:hover,
html[data-theme="dark"] .doc-accordion-header:focus,
html[data-theme="dark"] .doc-accordion-header:active { background: #2a2a2a; color: var(--color-brand); }

/* Blog */
html[data-theme="dark"] .blog-featured-card:hover { box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); }
html[data-theme="dark"] .blog-category-badge { background: rgba(53, 94, 59, 0.3); color: #6b9b6f; }
html[data-theme="dark"] .blog-meta-audio,
html[data-theme="dark"] .blog-meta-audio svg,
html[data-theme="dark"] .blog-audio-header,
html[data-theme="dark"] .blog-audio-header svg { color: #6b9b6f; }
html[data-theme="dark"] .blog-audio-icon { background: rgba(53, 94, 59, 0.3); }
html[data-theme="dark"] .blog-audio-icon svg { color: #6b9b6f; }
html[data-theme="dark"] .blog-filter-btn:hover { color: #6b9b6f; }
html[data-theme="dark"] .blog-card:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3); }
html[data-theme="dark"] .blog-card-image { background: #111; }
html[data-theme="dark"] .blog-post-content .blog-key-takeaways { background: rgba(255, 255, 255, 0.03); }
html[data-theme="dark"] .blog-post-content .blog-key-takeaways li { border-bottom-color: rgba(255, 255, 255, 0.08); }
html[data-theme="dark"] .blog-post-content .blog-cta { background: rgba(255, 255, 255, 0.03); }
html[data-theme="dark"] .blog-post-content h2 { background: rgba(255, 255, 255, 0.03); }
html[data-theme="dark"] .blog-tag { background: #333; }

/* Citations */
html[data-theme="dark"] .citation-tooltip { border-color: var(--color-brand); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); }
html[data-theme="dark"] .citation-tooltip-source { background: #1a1a1a; color: #e0e0e0; }

/* Team */
html[data-theme="dark"] .team-card:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3); }
html[data-theme="dark"] .team-photo { background: #111; }
html[data-theme="dark"] .team-panel .panel-header { background: #111; }

/* Case Studies */
html[data-theme="dark"] .filter-btn:hover,
html[data-theme="dark"] button.filter-btn:hover { color: #6b9b6f; }
html[data-theme="dark"] .case-study-card:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3); }
html[data-theme="dark"] .industry-tag { background: rgba(53, 94, 59, 0.25); color: #6b9b6f; }
html[data-theme="dark"] .anonymous-badge { background: #333; }
html[data-theme="dark"] .solution-tag { background: #333; }
html[data-theme="dark"] .case-study-panel .panel-header { background: #111; }
html[data-theme="dark"] .project-item { background: #252525; }
html[data-theme="dark"] .panel-solution-tag { background: #333; }
html[data-theme="dark"] .panel-case-study-link { background: rgba(255, 255, 255, 0.03); border-bottom-color: #333; }
html[data-theme="dark"] .panel-case-study-link .cross-link { background: none; color: var(--color-brand); }
html[data-theme="dark"] .panel-case-study-link .cross-link:hover { background: none; color: var(--color-brand); }
html[data-theme="dark"] .panel-case-study-link .cross-link:hover .cross-link-logo { filter: brightness(0) invert(1); }
html[data-theme="dark"] .cross-link { background: rgba(255, 255, 255, 0.05); }
html[data-theme="dark"] .cross-link:hover { background: var(--color-brand); }
html[data-theme="dark"] .cross-link-logo { filter: brightness(0) invert(1); opacity: 0.7; }
html[data-theme="dark"] .cross-link:hover .cross-link-logo { opacity: 1; }
html[data-theme="dark"] .case-study-quote { background: rgba(255, 255, 255, 0.05); }
html[data-theme="dark"] .mas-endorsement { background: rgba(255, 255, 255, 0.05); }
html[data-theme="dark"] .case-study-panel #panelResults li { border-bottom-color: rgba(255, 255, 255, 0.08); }

/* Partners */
html[data-theme="dark"] .partner-example { background: #222; }
html[data-theme="dark"] .partner-engagement { background: #222; }
html[data-theme="dark"] .partner-table tbody tr:hover { background: #222; }

/* Ecosystem */
html[data-theme="dark"] .ecosystem-modal { background: #1a1a1a; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
html[data-theme="dark"] .ecosystem-modal-close { color: #666; }
html[data-theme="dark"] .ecosystem-modal-close:hover { color: #e0e0e0; }

/* ==========================================================================
   MANUAL LIGHT MODE — html[data-theme="light"]
   Forces light mode when user explicitly selects it, even if system prefers dark.
   These override the @media (prefers-color-scheme: dark) rules via higher specificity.
   ========================================================================== */

/* Design tokens */
html[data-theme="light"] {
    --border-light: 1px solid #e0e0e0;
    --color-text: #1a1a1a;
    --color-text-muted: #666;
    --color-text-light: #888;
    --color-bg: #ffffff;
    --color-bg-subtle: #f8f9fa;
}
html[data-theme="light"] body { color: #1a1a1a; background: #ffffff; }

/* Logo display toggles — force light logos */
html[data-theme="light"] .logo-light,
html[data-theme="light"] .footer-logo-light,
html[data-theme="light"] .sticky-logo-light,
html[data-theme="light"] .case-study-logo-light,
html[data-theme="light"] .panel-logo-light,
html[data-theme="light"] .cross-link-logo-light { display: block !important; }

html[data-theme="light"] .logo-dark,
html[data-theme="light"] .footer-logo-dark,
html[data-theme="light"] .sticky-logo-dark,
html[data-theme="light"] .case-study-logo-dark,
html[data-theme="light"] .panel-logo-dark,
html[data-theme="light"] .cross-link-logo-dark,
html[data-theme="light"] .ecosystem-modal-logo-dark { display: none !important; }

html[data-theme="light"] .ecosystem-modal-logo-light { display: inline-block !important; }
html[data-theme="light"] .footer-logo-light { margin: 0 auto; }

/* Navigation */
html[data-theme="light"] .sticky-nav { background: rgba(255, 255, 255, 0.95); }
html[data-theme="light"] .sticky-cta { border: 2px solid var(--color-brand); color: #1a1a1a; }
html[data-theme="light"] .nav-dropdown-menu { background: #ffffff; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); }
html[data-theme="light"] .nav-dropdown-menu a:hover { background: #f5f5f5; }
html[data-theme="light"] .theme-toggle { color: #666; }
html[data-theme="light"] .nav-hamburger { color: #1a1a1a; }
@media (max-width: 768px) {
    html[data-theme="light"] .sticky-nav-links { background: rgba(255, 255, 255, 0.98); border-bottom-color: #e0e0e0; }
    html[data-theme="light"] .nav-dropdown-menu { background: transparent; box-shadow: none; }
}

/* Audience cards */
html[data-theme="light"] .audience-card { background: #ffffff; border-color: #e0e0e0; }
html[data-theme="light"] .audience-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
html[data-theme="light"] .audience-card.active { border-left-color: var(--color-brand); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
html[data-theme="light"] .audience-card-title { color: #1a1a1a; }
html[data-theme="light"] .audience-card.active .audience-card-title { color: var(--color-brand); }
html[data-theme="light"] .audience-card-desc { color: #666; }

/* Detail cards */
html[data-theme="light"] .detail-card { background: #ffffff; border-color: #e0e0e0; }
html[data-theme="light"] .detail-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
html[data-theme="light"] .detail-card.active { border-left-color: var(--color-brand); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
html[data-theme="light"] .detail-card-title { color: #1a1a1a; }
html[data-theme="light"] .detail-card.active .detail-card-title { color: var(--color-brand); }
html[data-theme="light"] .detail-card-desc { color: #666; }

/* CTA buttons */
html[data-theme="light"] .cta-button { background: #1a1a1a; color: white; }
html[data-theme="light"] .cta-button:hover { background: var(--color-brand); color: white; }
html[data-theme="light"] .hero .cta-button { background: transparent !important; border: 2px solid var(--color-brand); color: #1a1a1a; }
html[data-theme="light"] .hero .cta-button:hover { background: var(--color-brand) !important; color: white; }
html[data-theme="light"] .cta-button-secondary { border-color: var(--color-brand); color: var(--color-brand); }

/* Accordions */
html[data-theme="light"] .accordion-item:not(.active-item):hover { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); }

/* Panels */
html[data-theme="light"] .panel-header { background: #f8f9fa; }
html[data-theme="light"] .close-panel { color: #999; }

/* MAS */
html[data-theme="light"] .mas-card:hover { box-shadow: 0 12px 24px rgba(0,0,0,0.08); }
html[data-theme="light"] .mas-gallery-wrapper { background: transparent; }
html[data-theme="light"] .mas-sample-item { border-color: #e0e0e0; background: #ffffff; }
html[data-theme="light"] .mas-doc-overlay { background: rgba(0, 0, 0, 0.4); }
html[data-theme="light"] .mas-doc-modal { background: #ffffff; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2); }
html[data-theme="light"] .mas-doc-modal--arch { background: #1a1a1a; }
html[data-theme="light"] .doc-accordion-item { border-color: #e0e0e0; }
html[data-theme="light"] .doc-accordion-header { background: var(--color-bg-subtle); }
html[data-theme="light"] .doc-accordion-header:hover,
html[data-theme="light"] .doc-accordion-header:focus,
html[data-theme="light"] .doc-accordion-header:active { background: #eef0f2; color: var(--color-brand); }

/* Blog */
html[data-theme="light"] .blog-featured-card:hover { box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08); }
html[data-theme="light"] .blog-category-badge { background: rgba(53, 94, 59, 0.1); color: var(--color-brand); }
html[data-theme="light"] .blog-meta-audio,
html[data-theme="light"] .blog-meta-audio svg,
html[data-theme="light"] .blog-audio-header,
html[data-theme="light"] .blog-audio-header svg { color: var(--color-brand); }
html[data-theme="light"] .blog-audio-icon { background: rgba(53, 94, 59, 0.1); }
html[data-theme="light"] .blog-audio-icon svg { color: var(--color-brand); }
html[data-theme="light"] .blog-filter-btn:hover { color: var(--color-brand); }
html[data-theme="light"] .blog-card:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08); }
html[data-theme="light"] .blog-card-image { background: #f5f5f5; }
html[data-theme="light"] .blog-post-content .blog-key-takeaways { background: #f8f9fa; }
html[data-theme="light"] .blog-post-content .blog-key-takeaways li { border-bottom-color: #e0e0e0; }
html[data-theme="light"] .blog-post-content .blog-cta { background: #f8f9fa; }
html[data-theme="light"] .blog-tag { background: #f0f0f0; }

/* Citations */
html[data-theme="light"] .citation-tooltip { border-color: var(--color-brand); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); }
html[data-theme="light"] .citation-tooltip-source { background: #ffffff; color: #1a1a1a; }

/* Team */
html[data-theme="light"] .team-card:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08); }
html[data-theme="light"] .team-photo { background: #f5f5f5; }
html[data-theme="light"] .team-panel .panel-header { background: #f8f9fa; }

/* Case Studies */
html[data-theme="light"] .filter-btn:hover,
html[data-theme="light"] button.filter-btn:hover { color: var(--color-brand); }
html[data-theme="light"] .case-study-card:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08); }
html[data-theme="light"] .industry-tag { background: rgba(53, 94, 59, 0.1); color: var(--color-brand); }
html[data-theme="light"] .anonymous-badge { background: #f0f0f0; }
html[data-theme="light"] .solution-tag { background: #f0f0f0; }
html[data-theme="light"] .case-study-panel .panel-header { background: #f8f9fa; }
html[data-theme="light"] .project-item { background: #f8f9fa; }
html[data-theme="light"] .panel-solution-tag { background: #f0f0f0; }
html[data-theme="light"] .panel-case-study-link { background: #f8f9fa; border-bottom-color: #e0e0e0; }
html[data-theme="light"] .panel-case-study-link .cross-link { background: none; }
html[data-theme="light"] .panel-case-study-link .cross-link:hover { background: none; color: var(--color-brand); }
html[data-theme="light"] .panel-case-study-link .cross-link:hover .cross-link-logo { filter: none; }
html[data-theme="light"] .cross-link { background: #f8f9fa; }
html[data-theme="light"] .cross-link:hover { background: var(--color-brand); }
html[data-theme="light"] .cross-link-logo { filter: none; opacity: 1; }
html[data-theme="light"] .cross-link:hover .cross-link-logo { filter: brightness(0) invert(1); }
html[data-theme="light"] .case-study-quote { background: #f8f9fa; }
html[data-theme="light"] .mas-endorsement { background: #f8f9fa; }
html[data-theme="light"] .case-study-panel #panelResults li { border-bottom-color: #e0e0e0; }

/* Partners */
html[data-theme="light"] .partner-example { background: #f8f9fa; }
html[data-theme="light"] .partner-engagement { background: #f8f9fa; }
html[data-theme="light"] .partner-table tbody tr:hover { background: #f8f9fa; }

/* Ecosystem */
html[data-theme="light"] .ecosystem-modal { background: #ffffff; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
html[data-theme="light"] .ecosystem-modal-close { color: #999; }
