/* CSS RESET & VARIABLES */
:root {
    --bg-color: #0e0e0f;
    --text-color: #ffffff;
    --muted-color: #8a8a8c;
    --accent-color: #4a9c8c;
    /* muted green */
    --accent-hover: #5ab3a2;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.4;
    overflow: hidden;
    /* Prevent native scroll */
}

/* VIEWS - State Management */
.view {
    display: none;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 100vh;
}

.view.active {
    display: block;
    opacity: 1;
}

/* Entry flow progress bar */
.entry-progress {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 255, 65, 0.6), rgba(255, 255, 255, 0.8));
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.3);
}

/* Entry stage label */
.entry-stage-label {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    z-index: 99998;
    transition: opacity 0.3s ease;
}

#auth-view.active,
#case-viewer-view.active {
    display: flex;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 500;
    letter-spacing: -0.02em;
}

p {
    font-weight: 300;
    margin-bottom: 1.2rem;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    line-height: 1.4;
}

.large-text {
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: -0.03em;
    font-weight: 400;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.myth-text {
    color: var(--muted-color);
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    line-height: 1.4;
}

.highlight {
    color: var(--text-color);
    font-weight: 600;
}

/* COMMON CONTAINERS */
.content-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* ======== STORY SECTION FLIP ======== */
.flip-wrapper {
    position: relative;
    perspective: 1500px;
    height: 100vh;
}

.flip-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 4rem;
    backface-visibility: hidden;
    /* Cinematic flip transition */
    transition: transform 1.2s cubic-bezier(0.86, 0, 0.07, 1), opacity 1s ease, filter 1s ease;
    will-change: transform, opacity, filter;
}

/* Section 1 State */
.flip-section#home-section-1 {
    transform: rotateX(0deg);
    opacity: 1;
    z-index: 2;
    filter: blur(0);
}

.flip-section#home-section-1.flipped {
    transform: rotateX(90deg) scale(0.9);
    opacity: 0;
    filter: blur(10px);
    pointer-events: none;
}

/* Section 2 State */
.flip-section#home-section-2 {
    transform: rotateX(-90deg) scale(0.9);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    filter: blur(10px);
}

.flip-section#home-section-2.active {
    transform: rotateX(0deg);
    opacity: 1;
    pointer-events: auto;
    filter: blur(0);
}

.scroll-hint {
    font-size: 0.9rem;
    color: var(--accent-color);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 4rem;
}

.up-hint {
    margin-top: 1rem;
    opacity: 0.5;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

.bounce {
    animation: bounce 2s infinite ease-in-out;
}

.list-block ul {
    list-style-type: none;
}

.investigate-list {
    list-style-type: none;
    margin-bottom: 2rem;
}

.investigate-list li {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--muted-color);
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 2rem;
}

.investigate-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.cta-container {
    margin-top: 2rem;
    padding-bottom: 1rem;
}

.text-button {
    background: none;
    border: none;
    color: var(--accent-color);
    font-family: var(--font-family);
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.text-button:hover {
    color: var(--accent-hover);
    border-bottom: 1px solid var(--accent-hover);
}

/* AUTH OVERLAY
-------------------------------------------------- */
#auth-view {
    justify-content: center;
    align-items: center;
}

.auth-box {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.auth-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-subtext {
    color: var(--muted-color);
    margin-bottom: 3rem;
}

.accent-button {
    background-color: transparent;
    border: 1px solid var(--muted-color);
    color: var(--text-color);
    padding: 1rem 2rem;
    font-family: var(--font-family);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 1rem;
}

.accent-button:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.auth-muted {
    font-size: 0.85rem;
    color: var(--muted-color);
}

/* ARCHIVE VIEW
-------------------------------------------------- */
#archive-view {
    overflow-y: auto;
}

.archive-header {
    text-align: center;
    padding: 6rem 2rem 4rem;
}

.archive-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.archive-subtext {
    color: var(--muted-color);
    font-weight: 300;
}

.archive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 8rem;
}

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

.archive-block {
    display: flex;
    flex-direction: column;
}

.block-series {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--muted-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.block-label {
    font-weight: 400;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.block-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.view-link {
    background: none;
    border: none;
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    transition: color 0.3s ease;
    width: fit-content;
}

.view-link:hover {
    color: var(--accent-color);
}


/* CASE VIEWER VIEW
-------------------------------------------------- */
#case-viewer-view {
    flex-direction: row;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.viewer-layout {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    position: relative;
    z-index: 10;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.viewer-layout.shifted {
    transform: translateX(-30%);
    opacity: 0.3;
}

.viewer-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-left {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--muted-color);
}

.top-right {
    background: none;
    border: none;
    color: var(--muted-color);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.top-right:hover {
    color: var(--accent-color);
}

.viewer-center {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.case-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.case-subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    color: var(--muted-color);
    margin-bottom: 2rem;
}

.case-summary {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
}

.viewer-bottom-hints {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--muted-color);
}

/* DEEP DIVE PANEL */
.deep-dive-panel {
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 800px;
    height: 100%;
    background-color: var(--bg-color);
    padding: 4rem 2rem;
    overflow-y: auto;
    transition: right 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 20;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.deep-dive-panel.open {
    right: 0;
}

.top-back {
    background: none;
    border: none;
    color: var(--muted-color);
    font-family: var(--font-family);
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 4rem;
    transition: color 0.3s ease;
}

.top-back:hover {
    color: var(--accent-color);
}

.dive-section {
    margin-bottom: 4rem;
}

.dive-section h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.dive-section p {
    font-size: 1.1rem;
}

/* ======== BOOK HEADER ======== */
.book-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10;
}

.book-header-brand {
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1;
}

.book-header-dot {
    opacity: 0.4;
}

.book-header-stream-btn {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 14px;
    cursor: pointer;
    transition: all 350ms ease;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 2px;
    animation: streamBtnPulse 3s ease-in-out infinite;
}

.book-header-stream-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.04);
}

.stream-btn-icon {
    font-size: 0.85rem;
    line-height: 1;
    display: inline-block;
    animation: streamIconBounce 2s ease-in-out infinite;
}

@keyframes streamBtnPulse {

    0%,
    100% {
        box-shadow: 0 0 4px rgba(255, 255, 255, 0.05);
    }

    50% {
        box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
    }
}

@keyframes streamIconBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* ======== BOOK WRAPPER ======== */
.book-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    perspective: 1200px;
}

.book-spine-shadow {
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.5), transparent);
    z-index: 3;
    pointer-events: none;
}

/* ======== STREAM WATERMARK ======== */
.stream-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-18deg);
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.2rem, 8vw, 4.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    user-select: none;
    line-height: 1;
    text-align: center;
    max-width: 120%;
    overflow: hidden;
}

/* ======== BOOK PAGE ======== */
.book-page {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    --stream-color: #00FF41;
    transform-origin: left center;
    will-change: transform, opacity;
}

.book-page::-webkit-scrollbar {
    display: none;
}

.book-page {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ======== COVER PAGE ======== */
.book-cover {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
}

.book-cover-glow {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, var(--stream-color) 0%, transparent 70%);
    opacity: 0.06;
    pointer-events: none;
}

.book-cover .stream-badge {
    margin-bottom: 2rem;
}

.book-cover-id {
    font-family: 'DM Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--stream-color, #00FF41);
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

.book-cover-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 7vw, 3.6rem);
    line-height: 1.08;
    color: rgba(255, 255, 255, 0.95);
    max-width: 520px;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.book-cover-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 2rem;
}

.book-cover-pages {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.book-cover-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--stream-color, #00FF41), transparent);
    opacity: 0.3;
    margin: 1.5rem 0;
}

.book-cover-prompt {
    font-family: 'DM Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    animation: coverPromptPulse 2.5s ease-in-out infinite;
}

@keyframes coverPromptPulse {

    0%,
    100% {
        opacity: 0.45;
    }

    50% {
        opacity: 0.75;
    }
}

/* ======== INTERIOR PAGE ======== */
.book-interior {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem 2rem 4rem 2.5rem;
    position: relative;
}

.book-interior-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.2rem;
}

.book-interior-step {
    font-family: 'DM Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    color: var(--stream-color, #00FF41);
    opacity: 0.6;
    white-space: nowrap;
}

.book-interior-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
    color: var(--stream-color, #00FF41);
    line-height: 1;
}

.book-interior-bar {
    width: 50px;
    height: 2px;
    background: var(--stream-color, #00FF41);
    opacity: 0.4;
    margin-bottom: 1.5rem;
    border-radius: 1px;
}

.book-interior-case-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.book-interior-content {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.85);
    max-width: 540px;
}

/* ======== PSY COVER — TENSION PAGE ======== */
.book-cover-psy {
    justify-content: center;
    gap: 0;
    padding: 3rem 2.5rem;
}

.book-cover-psy-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    opacity: 0.55;
    margin-bottom: 2rem;
}

.book-cover-psy-id {
    font-family: 'DM Mono', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0.4;
    margin-bottom: 1.5rem;
}

.book-cover-psy-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.6rem, 9vw, 4.2rem);
    line-height: 1.05;
    color: rgba(255, 255, 255, 0.96);
    max-width: 480px;
    text-align: center;
    position: relative;
    z-index: 1;
    margin-bottom: auto;
    padding-top: 1rem;
}

.book-cover-psy-prompt {
    font-family: 'DM Mono', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-top: auto;
    animation: coverPromptPulse 2.5s ease-in-out infinite;
}

/* ======== PSY INTERIOR PAGE LAYOUTS ======== */

/* — The Hook — */
.page-psy-hook .psy-hook-quote {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
    border-left: 3px solid var(--stream-color, #ffb800);
    padding-left: 1.5rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.page-psy-hook .psy-hook-note {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
    letter-spacing: 0.02em;
}

/* — The Trigger — */
.page-psy-trigger .psy-trigger-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 7vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    margin-bottom: 1.8rem;
}

.page-psy-trigger .psy-trigger-explanation {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.7);
    max-width: 440px;
}

/* — The Mechanism — */
.page-psy-mechanism .psy-mech-chain {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
    padding-left: 0.5rem;
}

.page-psy-mechanism .psy-mech-step {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    line-height: 1.15;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.04em;
}

.page-psy-mechanism .psy-mech-step:first-child {
    color: var(--stream-color, #ffb800);
}

.page-psy-mechanism .psy-mech-capstone {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
    max-width: 400px;
    font-style: italic;
}

/* — Structural Insight — */
.page-psy-insight .psy-insight-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 2rem;
}

.page-psy-insight .psy-insight-bullet {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
}

.page-psy-insight .psy-insight-dot {
    color: var(--stream-color, #ffb800);
    opacity: 0.7;
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1.55;
}

.page-psy-insight .psy-insight-capstone {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    margin-top: 1rem;
    font-style: italic;
    max-width: 360px;
}

/* — Apply This — */
.page-psy-apply .psy-apply-instructions {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-bottom: 2.5rem;
    padding-left: 0.5rem;
}

.page-psy-apply .psy-apply-step {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    padding-left: 1rem;
}

.page-psy-apply .psy-apply-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    border-radius: 1px;
    background: var(--stream-color, #ffb800);
    opacity: 0.5;
}

.page-psy-apply .psy-apply-hook {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--stream-color, #ffb800);
    opacity: 0.5;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 1.5rem;
    animation: coverPromptPulse 3s ease-in-out infinite;
}

/* ======== PER-STREAM PAGE LAYOUTS ======== */
.page-pullquote .book-interior-content {
    font-size: 1.1rem;
    border-left: 3px solid var(--stream-color, #ffb800);
    padding-left: 1.5rem;
    font-style: italic;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.page-trigger .book-interior-content {
    background: rgba(255, 184, 0, 0.04);
    border: 1px solid rgba(255, 184, 0, 0.1);
    border-radius: 4px;
    padding: 1.2rem 1.5rem;
    line-height: 1.8;
}

.page-analysis .book-interior-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--stream-color, #ffb800);
    border-radius: 2px;
    padding: 1.5rem;
    line-height: 1.85;
}

.page-variations .variation-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-variations .variation-item:last-child {
    border-bottom: none;
}

.page-variations .variation-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--stream-color, #ffb800);
    opacity: 0.5;
    line-height: 1;
    min-width: 30px;
}

.page-variations .variation-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.page-stat-grid .stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.page-stat-grid .stat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 12px 14px;
}

.page-stat-grid .stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    color: var(--stream-color, #c8ff00);
    line-height: 1;
    margin-bottom: 4px;
}

.page-stat-grid .stat-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.page-stat-grid .stat-narrative {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
}

.page-bullet-list .bullet-item {
    display: flex;
    gap: 12px;
    margin-bottom: 0.8rem;
    align-items: flex-start;
}

.page-bullet-list .bullet-marker {
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--stream-color, #c8ff00);
    opacity: 0.6;
    margin-top: 8px;
    flex-shrink: 0;
}

.page-bullet-list .bullet-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.page-callout .book-interior-content {
    border-left: 3px solid var(--stream-color, #c8ff00);
    padding-left: 1.5rem;
    line-height: 1.85;
}

.page-actionable .action-section {
    margin-bottom: 1.4rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-actionable .action-section:last-child {
    border-bottom: none;
}

.page-actionable .action-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--stream-color, #c8ff00);
    opacity: 0.7;
    margin-bottom: 6px;
}

.page-actionable .action-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.page-stats-bar .stats-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-stats-bar .stat-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    padding: 6px 12px;
    text-align: center;
}

.page-stats-bar .stat-chip-val {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: var(--stream-color, #ff2d55);
    line-height: 1;
}

.page-stats-bar .stat-chip-lbl {
    font-family: 'DM Mono', monospace;
    font-size: 0.45rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.page-stats-bar .stats-narrative {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.page-timeline .timeline-entry {
    display: flex;
    gap: 14px;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.page-timeline .timeline-marker {
    font-family: 'DM Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    color: var(--stream-color, #ff2d55);
    opacity: 0.7;
    min-width: 50px;
    text-align: right;
    padding-top: 3px;
    white-space: nowrap;
}

.page-timeline .timeline-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 14px;
}

.page-metrics .metric-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.page-metrics .metric-key {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--stream-color, #ff2d55);
    white-space: nowrap;
    min-width: 70px;
}

.page-metrics .metric-val {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
}

/* ======== 3D PAGE TURN ANIMATIONS ======== */
@keyframes pageTurnIn {
    from {
        opacity: 0;
        transform: rotateY(-25deg) translateX(40px);
    }

    to {
        opacity: 1;
        transform: rotateY(0deg) translateX(0);
    }
}

@keyframes pageTurnBack {
    from {
        opacity: 0;
        transform: rotateY(25deg) translateX(-40px);
    }

    to {
        opacity: 1;
        transform: rotateY(0deg) translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.case-content-area {
    --stream-color: #00FF41;
}

.case-content-area.slide-right {
    animation: pageTurnIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.case-content-area.slide-left {
    animation: pageTurnBack 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.case-content-area.slide-up {
    animation: slideInUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.case-content-area.slide-down {
    animation: slideInDown 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.book-page::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(270deg, rgba(0, 0, 0, 0.15), transparent);
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book-page.slide-right::after,
.book-page.slide-left::after {
    opacity: 1;
}

/* ======== NAV HINTS ======== */
@keyframes hintPulse {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(0, 255, 65, 0.15), inset 0 0 6px rgba(0, 255, 65, 0.05);
    }

    50% {
        box-shadow: 0 0 16px rgba(0, 255, 65, 0.3), inset 0 0 10px rgba(0, 255, 65, 0.08);
    }
}

@keyframes hintArrowBounceV {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(3px);
    }
}

@keyframes hintArrowBounceH {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(3px);
    }
}

.nav-hint-vertical {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 1;
    pointer-events: auto;
    white-space: nowrap;
    color: #00FF41;
    z-index: 5;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid;
    border-radius: 6px;
    padding: 10px 8px;
    animation: hintPulse 3s ease-in-out infinite;
}

.nav-hint-vertical span:first-child,
.nav-hint-vertical span:last-child {
    font-size: 0.85rem;
    animation: hintArrowBounceV 2s ease-in-out infinite;
    cursor: pointer;
    pointer-events: auto;
}

.nav-hint-vertical span:last-child {
    animation-delay: 0.3s;
}

.nav-hint-vertical-label {
    font-size: 0.45rem;
    letter-spacing: 0.2em;
    writing-mode: vertical-lr;
    text-orientation: mixed;
}

.nav-case-counter {
    font-family: 'DM Mono', monospace;
    font-size: 0.45rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
    writing-mode: vertical-lr;
    text-orientation: mixed;
}

.nav-hint-horizontal {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 1;
    pointer-events: auto;
    color: #00FF41;
    z-index: 5;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid;
    border-radius: 6px;
    padding: 1px 14px;
    animation: hintPulse 3s ease-in-out infinite;
    animation-delay: 1.5s;
}

.nav-hint-horizontal span:first-child,
.nav-hint-horizontal span:last-child {
    font-size: 0.85rem;
    animation: hintArrowBounceH 2s ease-in-out infinite alternate;
    cursor: pointer;
    pointer-events: auto;
}

.nav-hint-horizontal span:first-child {
    animation-direction: alternate-reverse;
}

.nav-hint-horizontal-label {
    font-size: 0.5rem;
    letter-spacing: 0.2em;
}

/* Page Indicator — inline inside Deep Dive box */
.book-page-indicator {
    display: flex;
    gap: 5px;
    align-items: center;
    margin: 0 4px;
}

.book-page-indicator .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.15);
}

.book-page-indicator .dot.active {
    background: var(--stream-color, #00FF41);
    box-shadow: 0 0 6px var(--stream-color, rgba(0, 255, 65, 0.4));
    transform: scale(1.3);
}

.book-page-indicator .dot.dot-cover {
    width: 6px;
    height: 6px;
    border-radius: 0;
    transform: rotate(45deg);
}

.book-page-indicator .dot.dot-cover.active {
    transform: rotate(45deg) scale(1.3);
}

/* Bottom Nav Stack — Deep Dive + Page Dots */
.nav-bottom-stack {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.nav-bottom-stack .nav-hint-horizontal {
    position: static;
    transform: none;
}

/* ======== STREAM BADGE ======== */
.stream-badge {
    display: inline-block;
    width: fit-content;
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--stream-color, #00FF41);
    border: 1px solid;
    border-color: var(--stream-color, rgba(0, 255, 65, 0.25));
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 14px;
    border-radius: 2px;
    margin-bottom: 16px;
    opacity: 0.9;
    transition: color 0.3s ease, border-color 0.3s ease;
}

/* ======== STREAM OVERLAY ======== */
.stream-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 350ms ease;
    overflow-y: auto;
    padding: 2rem 0;
}

.stream-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.stream-overlay-inner {
    text-align: center;
    max-width: 560px;
    width: 92%;
    padding: 1rem 0 3rem;
}

.stream-overlay-title {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 2rem;
}

.stream-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Stream Card ── */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stream-card {
    display: flex;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    transition: all 300ms ease;
    background: rgba(255, 255, 255, 0.02);
    cursor: default;
    opacity: 0;
    transform: translateY(24px);
}

.stream-card.appearing {
    animation: slideUpFade 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.stream-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.stream-card.active {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.stream-card-accent {
    width: 4px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 300ms ease;
}

.stream-card:hover .stream-card-accent,
.stream-card.active .stream-card-accent {
    opacity: 1;
}

.stream-card-content {
    padding: 20px 24px;
    flex: 1;
    min-width: 0;
}

.stream-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.stream-card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1;
}

.stream-card-cadence {
    font-family: 'DM Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border: 1px solid;
    padding: 3px 10px;
    border-radius: 2px;
    opacity: 0.8;
    white-space: nowrap;
}

.stream-card-subtitle {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    line-height: 1.5;
}

.stream-card-desc {
    font-family: 'DM Mono', monospace;
    font-size: 0.68rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 14px;
}

.stream-card-counters {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stream-card-counter {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stream-card-counter .counter-val {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    line-height: 1;
    letter-spacing: 0.04em;
}

.stream-card-counter .counter-lbl {
    font-family: 'DM Mono', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.stream-card-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.stream-card-select {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 250ms ease;
    border-radius: 2px;
}

.stream-card-select:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.stream-card-select.current {
    cursor: default;
    background: transparent;
}

.stream-card-learn {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: opacity 250ms ease;
    opacity: 0.7;
}

.stream-card-learn:hover {
    opacity: 1;
}

.stream-overlay-close {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 28px;
    cursor: pointer;
    margin-top: 2rem;
    transition: all 250ms ease;
}

.stream-overlay-close:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ======== APP HEADER STREAM ACCENT ======== */
.app-header-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--stream-color, #00FF41), transparent);
    opacity: 0.4;
}

/* Subtle glow behind case title */
.case-title-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 300px;
    height: 200px;
    background: radial-gradient(ellipse, var(--stream-color, rgba(0, 255, 65, 0.04)) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* ======== GAP FIX: Boundary Shake Animation ======== */
@keyframes boundaryShake {

    0%,
    100% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-6px);
    }

    30% {
        transform: translateX(5px);
    }

    45% {
        transform: translateX(-4px);
    }

    60% {
        transform: translateX(3px);
    }

    75% {
        transform: translateX(-2px);
    }

    90% {
        transform: translateX(1px);
    }
}

@keyframes boundaryShakeV {

    0%,
    100% {
        transform: translateY(0);
    }

    15% {
        transform: translateY(-6px);
    }

    30% {
        transform: translateY(5px);
    }

    45% {
        transform: translateY(-4px);
    }

    60% {
        transform: translateY(3px);
    }

    75% {
        transform: translateY(-2px);
    }

    90% {
        transform: translateY(1px);
    }
}

.case-content-area.shake-h {
    animation: boundaryShake 0.5s ease both;
}

.case-content-area.shake-v {
    animation: boundaryShakeV 0.5s ease both;
}

/* ======== GAP FIX: End-of-Stream Toast ======== */
.boundary-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 10px 24px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 100;
    white-space: nowrap;
}

.boundary-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ======== GAP FIX: Next Case Prompt on Last Page ======== */
.next-case-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.next-case-prompt-btn {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 22px;
    cursor: pointer;
    transition: all 300ms ease;
    border-radius: 2px;
}

.next-case-prompt-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: var(--stream-color, rgba(255, 255, 255, 0.4));
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.05);
}

.end-of-stream-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

/* Stream name removed from header — watermark used instead */

/* ======== GAP FIX: Stream Badge on Cover Page ======== */
.book-cover-stream {
    font-family: 'DM Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--stream-color, #00FF41);
    opacity: 0.7;
    margin-bottom: 0.5rem;
    border: 1px solid;
    border-color: var(--stream-color, rgba(0, 255, 65, 0.2));
    padding: 4px 14px;
    border-radius: 2px;
    display: inline-block;
}

/* ======== GAP FIX: Return to Home (brand clickable) ======== */
.book-header-brand.clickable {
    cursor: pointer;
    transition: all 300ms ease;
}

.book-header-brand.clickable:hover {
    opacity: 1 !important;
    color: rgba(255, 255, 255, 0.95);
}

/* ======== GAP FIX: Adaptive Nav Hints ======== */
.nav-hint-vertical.at-start span:first-child,
.nav-hint-horizontal.at-start span:first-child {
    opacity: 0.15;
    animation: none !important;
}

.nav-hint-vertical.at-end span:nth-child(3),
.nav-hint-horizontal.at-end span:last-child {
    opacity: 0.15;
    animation: none !important;
}

.nav-hint-horizontal .deep-dive-label {
    transition: opacity 0.3s ease;
}

/* ======== GAP FIX: Cross-Case Progress Bar ======== */
.stream-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--stream-color, #00FF41);
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 11;
    opacity: 0.5;
    border-radius: 0 1px 1px 0;
}

/* Header — compact without stream name */
.book-header {
    padding-bottom: 10px;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .flip-section {
        padding: 0 2rem;
    }

    .viewer-layout.shifted {
        transform: translateX(-100%);
    }

    .nav-hint-vertical {
        right: 4px;
        font-size: 0.6rem;
        padding: 8px 6px;
    }



    .boundary-toast {
        font-size: 0.5rem;
        padding: 8px 16px;
    }
}

/* ==========================================
   STREAM vs VAULT MODE TOGGLE & LAYOUT
   ========================================== */

.app-mode-toggle {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-toggle-bg {
    position: absolute;
    top: 3px;
    left: 3px;
    height: calc(100% - 6px);
    width: calc(50% - 3px);
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 0;
}

.app-mode-toggle[data-mode="vault"] .mode-toggle-bg {
    transform: translateX(100%);
}

.mode-toggle-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 6px 16px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.mode-toggle-btn.active {
    color: #fff;
}

/* STREAM VIEW */
.stream-view-container {
    flex: 1;
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    -webkit-scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    -webkit-transform: translateZ(0);
}

.stream-feed-card {
    min-height: calc(100vh - 61px);
    /* fallback for older iOS */
    min-height: calc(100svh - 61px);
    height: calc(100vh - 61px);
    /* fallback for older iOS */
    height: calc(100svh - 61px);
    flex-shrink: 0;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 2.5rem;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stream-feed-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.stream-feed-tag {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stream-feed-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 6vw, 3rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.stream-feed-hook {
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 2px solid;
}

.stream-feed-insight {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-top: 1.5rem;
}

.stream-engagement-bar {
    position: absolute;
    bottom: 4rem;
    left: 2.5rem;
    right: 2.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.engagement-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.engagement-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

.engagement-btn.active {
    background: var(--home-accent, #00FF41);
    color: #000;
    border-color: var(--home-accent, #00FF41);
}

/* VAULT SEARCH */
.vault-search-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2.5rem;
    z-index: 20;
    pointer-events: none;
    /* Let clicks pass through except on input */
}

.vault-search-input {
    width: 60%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 10px 16px 10px 40px;
    color: #fff;
    font-size: 0.8rem;
    outline: none;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.vault-search-input:focus {
    border-color: var(--home-accent, #00FF41);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.2);
    width: 100%;
}

.vault-search-icon {
    position: absolute;
    left: 3.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    font-family: sans-serif;
    pointer-events: none;
}

/* PAYWALL OVERLAY */
.paywall-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.4s ease;
}

.paywall-inner {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    border-top: 2px solid var(--home-accent, #00FF41);
}

.paywall-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite ease-in-out;
}

/* ===================== ENGAGEMENT PLAYBOOK STYLES ===================== */

/* Modal Overlay */
.ep-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 300ms ease;
}

.ep-modal-overlay.ep-visible {
    opacity: 1;
}

/* Modal Sheet */
.ep-modal-sheet {
    width: 100%;
    max-width: 408px;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    padding: 24px 28px 32px;
    transform: translateY(100%);
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    text-align: center;
}

.ep-modal-overlay.ep-visible .ep-modal-sheet {
    transform: translateY(0);
}

/* Handle */
.ep-modal-handle {
    width: 48px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 0 auto 16px;
}

/* Close */
.ep-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: color 200ms ease;
    line-height: 1;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.ep-modal-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Typography */
.ep-modal-emoji {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.ep-modal-title {
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    color: var(--home-accent, #00FF41);
    margin-bottom: 8px;
}

.ep-modal-desc {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    letter-spacing: 0.04em;
    margin-bottom: 20px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.ep-modal-footnote {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 12px;
    letter-spacing: 0.06em;
}

/* CTA Button */
.ep-modal-cta {
    width: 100%;
    margin-top: 8px;
}

.ep-modal-skip {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 12px 0 4px;
    transition: color 200ms ease;
}

.ep-modal-skip:hover {
    color: rgba(255, 255, 255, 0.6);
}

.ep-modal-secondary {
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 12px 0;
    margin-top: 8px;
    transition: all 200ms ease;
    border-radius: 2px;
}

.ep-modal-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ---- WhatsApp Input ---- */
.ep-whatsapp-input-group {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0;
    margin: 0 auto 8px;
    max-width: 280px;
    overflow: hidden;
    transition: border-color 300ms ease;
}

.ep-whatsapp-input-group:focus-within {
    border-color: #25D366;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.1);
}

.ep-whatsapp-prefix {
    padding: 14px 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    letter-spacing: 0.05em;
}

.ep-whatsapp-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 1rem;
    padding: 14px 12px;
    letter-spacing: 0.1em;
}

.ep-whatsapp-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.ep-error {
    color: #ff4444;
    font-size: 0.6rem;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

/* ---- Push Benefits ---- */
.ep-push-benefits {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 auto 20px;
    max-width: 300px;
}

.ep-push-benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.04em;
    text-align: left;
}

.ep-benefit-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ---- A2HS Steps ---- */
.ep-a2hs-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 auto 20px;
    max-width: 320px;
}

.ep-a2hs-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: left;
    letter-spacing: 0.03em;
}

.ep-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--home-accent, #00FF41);
    color: black;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ep-step-icon {
    font-size: 1rem;
}

/* ---- Star Rating ---- */
.ep-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 16px;
}

.ep-star {
    font-size: 2rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.2);
    transition: all 200ms ease;
    user-select: none;
}

.ep-star:hover,
.ep-star.active {
    color: #FFD700;
    transform: scale(1.15);
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.ep-testimonial-textarea {
    width: 100%;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    font-size: 0.75rem;
    outline: none;
    resize: none;
    margin: 0 auto 16px;
    display: block;
    letter-spacing: 0.03em;
    transition: border-color 300ms ease;
}

.ep-testimonial-textarea:focus {
    border-color: var(--home-accent, #00FF41);
    box-shadow: 0 0 0 2px rgba(0, 255, 65, 0.08);
}

.ep-testimonial-textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* ---- Promo Card ---- */
.ep-promo-card {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 0 auto 20px;
    max-width: 320px;
    position: relative;
    overflow: hidden;
}

.ep-promo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.08), transparent);
    pointer-events: none;
}

.ep-promo-badge {
    font-size: 0.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--home-accent, #00FF41);
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
}

.ep-promo-title-text {
    font-size: 0.8rem;
    color: white;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    position: relative;
}

.ep-promo-hook {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    position: relative;
}

/* ---- Success Toast ---- */
.ep-success-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--home-accent, #00FF41);
    color: black;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 32px rgba(0, 255, 65, 0.3);
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ep-success-toast.ep-toast-visible {
    transform: translateX(-50%) translateY(0);
}

/* ===================== END ENGAGEMENT PLAYBOOK STYLES ===================== */
/* Dashboard Cards */
.dashboard-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--home-accent-dim), transparent);
}

.dashboard-card:hover {
    border-color: rgba(0, 255, 204, 0.3);
    transform: translateY(-2px);
}

.dashboard-card-title {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--home-accent);
    text-transform: uppercase;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard-card-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: white;
    letter-spacing: 0.05em;
    line-height: 1.2;
    margin-bottom: 8px;
}

.dashboard-card-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.dashboard-card-stat {
    display: flex;
    flex-direction: column;
}

.dashboard-card-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

/* Modal specific for Surprise Me */
.surprise-me-modal {
    background: #0a0a0a;
    border: 1px solid var(--home-accent);
    box-shadow: 0 0 40px rgba(0, 255, 204, 0.1);
}
