/* ==========================================================================
   HeliosDB Dual-View System: Floating Switcher + Business ROI + Tech Explorers
   ========================================================================== */

/* 1. Zero-Flicker Visibility Rules */
html[data-audience="technical"] [data-only="business"] {
    display: none !important;
}

html[data-audience="business"] [data-only="technical"] {
    display: none !important;
}

/* Default fallback if attribute not yet set */
html:not([data-audience]) [data-only="business"] {
    display: none !important;
}

/* 2. Floating Business / Technical Switcher Dock */
.hdb-floating-dock {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(8, 11, 19, 0.94);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(110, 231, 255, 0.45);
    border-radius: 999px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 18px 48px rgba(0, 0, 0, 0.82),
        4px 4px 0 rgba(110, 231, 255, 0.22);
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

html[data-audience="business"] .hdb-floating-dock {
    border-color: rgba(200, 245, 66, 0.65);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 18px 48px rgba(0, 0, 0, 0.85),
        4px 4px 0 rgba(200, 245, 66, 0.26);
}

.hdb-dock-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    padding-left: 8px;
    white-space: nowrap;
}

.hdb-dock-buttons {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 3px;
    gap: 4px;
}

.hdb-dock-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.hdb-dock-btn:hover {
    color: #ffffff;
}

.hdb-dock-btn[data-mode="business"].active {
    background: linear-gradient(135deg, #c8f542 0%, #6ee7ff 100%);
    color: #05070c;
    box-shadow: 0 4px 16px rgba(200, 245, 66, 0.35);
}

.hdb-dock-btn[data-mode="technical"].active {
    background: linear-gradient(135deg, #a594ff 0%, #6ee7ff 100%);
    color: #05070c;
    box-shadow: 0 4px 16px rgba(165, 148, 255, 0.35);
}

.hdb-dock-kbd {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    padding: 3px 7px;
    margin-right: 4px;
}

/* 3. Business View Sections & Architecture Comparison */
.biz-section {
    padding: 96px 0;
    border-top: 2px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.biz-hero-wrap {
    padding: 128px 0 72px;
    position: relative;
}

.biz-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
}

.biz-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 2px solid rgba(200, 245, 66, 0.45);
    background: rgba(200, 245, 66, 0.1);
    color: var(--neon-lime);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 20px;
    box-shadow: 3px 3px 0 rgba(200, 245, 66, 0.2);
}

.biz-headline {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.4vw, 3.85rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.035em;
    margin-bottom: 20px;
    color: #ffffff;
}

.biz-subhead {
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--text-secondary);
    max-width: 60ch;
    margin-bottom: 28px;
}

.biz-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 36px;
}

.biz-kpi-card {
    background: rgba(16, 21, 35, 0.92);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 4px 4px 0 rgba(110, 231, 255, 0.14);
}

.biz-kpi-val {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--neon-lime);
    line-height: 1.1;
    margin-bottom: 6px;
}

.biz-kpi-lbl {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

/* Sprawl vs Unified Visual Panel */
.sprawl-vs-unified {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 36px;
}

.arch-compare-panel {
    background: rgba(14, 18, 30, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 28px;
    box-shadow: var(--shadow-card);
}

.arch-compare-panel.sprawl {
    border-color: rgba(255, 107, 107, 0.42);
    box-shadow: 5px 5px 0 rgba(255, 107, 107, 0.16);
}

.arch-compare-panel.unified {
    border-color: rgba(200, 245, 66, 0.55);
    box-shadow: 5px 5px 0 rgba(200, 245, 66, 0.22);
}

/* 4. Interactive Protocol-to-Tier ROI & Architecture Configurator */
.roi-configurator {
    background: #0a0d16;
    border: 2px solid rgba(110, 231, 255, 0.38);
    border-radius: 22px;
    padding: 32px;
    box-shadow: 8px 8px 0 rgba(110, 231, 255, 0.15), 0 28px 64px rgba(0, 0, 0, 0.75);
    margin-top: 36px;
}

.roi-presets-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 22px;
    margin-bottom: 26px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.roi-preset-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.roi-preset-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 8px 14px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s ease;
}

.roi-preset-btn:hover,
.roi-preset-btn.active {
    background: rgba(200, 245, 66, 0.14);
    color: #ffffff;
    border-color: var(--neon-lime);
    box-shadow: 3px 3px 0 rgba(200, 245, 66, 0.25);
}

.roi-main-grid {
    display: grid;
    grid-template-columns: 370px 1fr;
    gap: 28px;
    align-items: start;
}

/* Left Panel: Clickable Protocols + Separate CDC & Ops Factors */
.roi-left-panel {
    background: rgba(16, 21, 35, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 22px;
}

.roi-group-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--neon-blue);
    margin: 16px 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.roi-group-title:first-child {
    margin-top: 0;
}

.roi-protocol-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.roi-proto-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 9px 11px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.roi-proto-btn:hover {
    border-color: rgba(110, 231, 255, 0.45);
    color: #ffffff;
}

.roi-proto-btn.selected {
    background: rgba(110, 231, 255, 0.14);
    border-color: var(--neon-blue);
    color: #ffffff;
    box-shadow: 2px 2px 0 rgba(110, 231, 255, 0.28);
}

.roi-proto-btn.selected[data-tier-scope="lite"] {
    background: rgba(165, 148, 255, 0.16);
    border-color: var(--neon-purple);
    box-shadow: 2px 2px 0 rgba(165, 148, 255, 0.3);
}

.roi-proto-btn.selected[data-tier-scope="full"] {
    background: rgba(200, 245, 66, 0.15);
    border-color: var(--neon-lime);
    box-shadow: 2px 2px 0 rgba(200, 245, 66, 0.3);
}

.roi-proto-cost {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-tertiary);
}

.roi-proto-btn.selected .roi-proto-cost {
    color: var(--neon-lime);
}

/* Separate Factor Boxes: CDC Pipelines & Operations/Admin */
.roi-factor-box {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.roi-cdc-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.roi-cdc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 11px;
    border-radius: 9px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.roi-cdc-item.active {
    background: rgba(255, 174, 66, 0.13);
    border-color: var(--neon-orange);
    color: #ffffff;
}

.roi-slider-row {
    margin-top: 10px;
}

.roi-slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.roi-slider-input {
    width: 100%;
    accent-color: var(--neon-lime);
    cursor: pointer;
}

/* Right Panel: Dynamic Edition Columns (Proxy + Nano | Lite | Full) */
.roi-right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.roi-proxy-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-radius: 16px;
    border: 2px dashed rgba(255, 174, 66, 0.35);
    background: rgba(255, 174, 66, 0.05);
    transition: all 0.22s ease;
}

.roi-proxy-banner.active {
    border-style: solid;
    border-color: var(--neon-orange);
    background: linear-gradient(135deg, rgba(255, 174, 66, 0.16), rgba(16, 21, 35, 0.95));
    box-shadow: 4px 4px 0 rgba(255, 174, 66, 0.25);
}

.roi-columns-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.roi-db-col {
    background: rgba(15, 19, 32, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    padding: 20px;
    opacity: 0.48;
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.roi-db-col.active {
    opacity: 0.92;
    border-color: rgba(110, 231, 255, 0.45);
}

.roi-db-col.recommended {
    opacity: 1;
    border-color: var(--neon-lime);
    background: linear-gradient(180deg, rgba(200, 245, 66, 0.1) 0%, rgba(15, 19, 32, 0.98) 100%);
    box-shadow: 5px 5px 0 rgba(200, 245, 66, 0.28), 0 18px 40px rgba(0, 0, 0, 0.65);
    transform: translateY(-4px);
}

.roi-col-status {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 9px;
    border-radius: 6px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-tertiary);
}

.roi-db-col.recommended .roi-col-status {
    background: var(--neon-lime);
    color: #05070c;
}

.roi-db-col.active:not(.recommended) .roi-col-status {
    background: rgba(110, 231, 255, 0.18);
    color: var(--neon-blue);
}

.roi-proto-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 12px 0;
}

.roi-proto-chip {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    padding: 3px 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.roi-proto-chip.matched {
    background: rgba(200, 245, 66, 0.18);
    color: var(--neon-lime);
    border-color: rgba(200, 245, 66, 0.5);
    font-weight: 700;
}

/* 3-Pillar ROI Output Strip */
.roi-pillars-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.roi-pillar-card {
    background: rgba(16, 21, 35, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 16px;
}

.roi-pillar-card.total {
    border-color: var(--neon-lime);
    background: linear-gradient(135deg, rgba(200, 245, 66, 0.14), rgba(110, 231, 255, 0.1));
    box-shadow: 4px 4px 0 rgba(200, 245, 66, 0.25);
}

.roi-pillar-lbl {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    display: block;
    margin-bottom: 6px;
}

.roi-pillar-val {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 800;
    color: #ffffff;
    display: block;
}

.roi-pillar-card.total .roi-pillar-val {
    color: var(--neon-lime);
    font-size: 1.75rem;
}

.roi-pillar-sub {
    font-size: 0.74rem;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
}

/* 5. 5-Rung Adoption Ladder */
.rung-ladder-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 32px;
}

.rung-card {
    background: rgba(15, 19, 32, 0.94);
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rung-card:hover {
    transform: translateY(-4px);
    border-color: var(--neon-blue);
}

.rung-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    background: rgba(110, 231, 255, 0.14);
    color: var(--neon-blue);
    border: 1.5px solid rgba(110, 231, 255, 0.35);
}

/* 6. Technical View Interactive Explorers (Lite vs Full & Rung 4 Frontier Lab) */
.tech-explorer-shell {
    background: #090c15;
    border: 2px solid rgba(165, 148, 255, 0.42);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 7px 7px 0 rgba(165, 148, 255, 0.18), 0 24px 60px rgba(0, 0, 0, 0.75);
    margin-top: 32px;
}

.tech-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tech-tab-btn {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    padding: 10px 16px;
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s ease;
}

.tech-tab-btn:hover,
.tech-tab-btn.active {
    background: rgba(165, 148, 255, 0.18);
    color: #ffffff;
    border-color: var(--neon-purple);
    box-shadow: 3px 3px 0 rgba(165, 148, 255, 0.28);
}

.tech-sim-stage {
    background: rgba(15, 20, 34, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 24px;
}

.storage-col-pills {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.storage-col-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.16s ease;
    color: var(--text-secondary);
}

.storage-col-pill.active,
.storage-col-pill:hover {
    background: rgba(110, 231, 255, 0.14);
    border-color: var(--neon-blue);
    color: #ffffff;
    box-shadow: 3px 3px 0 rgba(110, 231, 255, 0.25);
}

/* Tenant Hibernation Grid */
.tenant-hibernation-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px;
    margin: 18px 0;
}

.tenant-cell {
    height: 28px;
    border-radius: 6px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    transition: all 0.25s ease;
}

.tenant-cell.hot {
    background: rgba(200, 245, 66, 0.25);
    border-color: var(--neon-lime);
    color: var(--neon-lime);
}

.tenant-cell.warm {
    background: rgba(110, 231, 255, 0.18);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.tenant-cell.cold {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-tertiary);
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
    .roi-main-grid {
        grid-template-columns: 1fr;
    }
    .roi-columns-grid,
    .roi-pillars-strip,
    .biz-kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    .rung-ladder-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .biz-hero-grid,
    .sprawl-vs-unified,
    .roi-columns-grid,
    .roi-pillars-strip,
    .biz-kpi-strip,
    .rung-ladder-grid,
    .storage-col-pills {
        grid-template-columns: 1fr;
    }
    .tenant-hibernation-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .hdb-dock-label,
    .hdb-dock-kbd {
        display: none;
    }
    .hdb-floating-dock {
        bottom: 14px;
        padding: 6px 8px;
    }
    .hdb-dock-btn {
        padding: 7px 14px;
        font-size: 0.78rem;
    }
}
