/* ═══════════════════════════════════════════════════════
   COSMIC FORECAST — Civilizational Intelligence System
   LOCKED VIEWPORT — NO SCROLL — 3-COLUMN GRID
   SpaceX thin-line + Palantir gravitas + electric blue accent
   ═══════════════════════════════════════════════════════ */

:root {
    --cf-accent: #60a5fa;
    --cf-accent-dim: rgba(96, 165, 250, 0.4);
    --cf-accent-glow: rgba(96, 165, 250, 0.15);
    --cf-gold: #d4af37;
    --cf-gold-dim: rgba(212, 175, 55, 0.4);
    --cf-gold-glow: rgba(212, 175, 55, 0.15);
    --cf-teal: #64c8be;
    --cf-violet: #a870d0;
    --cf-red: #ef4444;
    --cf-amber: #f59e0b;
    --cf-bg: #050508;
    --cf-panel: rgba(8, 10, 18, 0.7);
    --cf-border: rgba(96, 165, 250, 0.08);
    --cf-border-hover: rgba(96, 165, 250, 0.2);
    --cf-text: #e4e6ed;
    --cf-text-muted: #5a5e72;
    --cf-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --cf-nav-h: 44px;
    --cf-shell-max: 1680px;
    --cf-page-pad: clamp(10px, 1.8vw, 22px);
    --cf-block-gap: clamp(10px, 1.4vw, 18px);
    --cf-panel-radius: 10px;
}

/* ═══ SATURN BACKGROUND IMAGE — REMOVED ═══ */
.cf-bg-saturn { display: none; }

/* ═══ KILL NAV LATENT SLOT — no buttons in the nav bar on this page ═══ */
#nav-latent-slot { display: none !important; }

/* ═══ HARD LOCK: NO SCROLL ═══ */
html, body {
    margin: 0; padding: 0;
    background: #000;
    color: var(--cf-text);
    font-family: var(--cf-mono);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    opacity: 1 !important;
    animation: none !important;
}

/* ═══ MAIN: 3-ROW GRID (intel / instruments / data strip) ═══ */
.cf-main {
    position: relative;
    z-index: 1;
    width: min(100%, var(--cf-shell-max));
    min-height: calc(100vh - var(--cf-nav-h));
    min-height: calc(100dvh - var(--cf-nav-h));
    height: auto;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto auto auto auto auto;
    gap: var(--cf-block-gap);
    padding: 8px var(--cf-page-pad) max(24px, env(safe-area-inset-bottom));
    box-sizing: border-box;
    overflow: visible;
    transition: opacity 0.8s ease;
}

.cf-main > * {
    min-width: 0;
    min-height: 0;
}

/* ═══════════════════════════════════════════════════════
   INTELLIGENCE STRIP — Top bar — ONE LINE: briefing + pills + chips
   ═══════════════════════════════════════════════════════ */
.cf-intel-strip {
    position: sticky;
    top: var(--cf-nav-h);
    z-index: 110;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    padding: 4px 12px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    border-radius: 0;
    gap: 8px;
    min-height: auto;
    height: auto;
    max-height: none;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
.cf-intel-strip::-webkit-scrollbar { display: none; }
@keyframes cf-live-pulse {
    0%, 100% { opacity: 0.7; }
    50%      { opacity: 1; }
}
/* ═══ TICKER NARRATIVE — fills available space ═══ */
.cf-intel-narrative {
    flex: 1 1 0; min-width: 80px;
    position: relative;
    font-family: var(--cf-mono);
    font-size: 0.46rem; color: rgba(147,184,232,0.6);
    letter-spacing: 0.03em; line-height: 1.3;
    padding: 0;
    height: 16px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* ═══ CONDITIONS CHIPS — floating over instrument grid ═══ */
#cf-conditions-hud {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    align-self: start;
    justify-self: center;
    z-index: 500;
    pointer-events: none;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    margin-top: 30px;
}
#cf-conditions-hud .me-hud {
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
}
#cf-conditions-hud .me-hud-header { display: none; }
#cf-conditions-hud .me-hud-canvas { display: none; }
#cf-conditions-hud .me-hud-gauges {
    display: flex;
    gap: 4px;
}
#cf-conditions-hud .me-hud-gauge {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 3px;
    background: rgba(6,10,18,0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.06);
    pointer-events: auto;
    flex-direction: row;
    overflow: visible;
}
#cf-conditions-hud .me-hud-gauge::after { display: none; }
#cf-conditions-hud .me-hud-gauge-label {
    font-size: 0.38rem;
    margin-bottom: 0;
    order: 2;
    line-height: 1;
    white-space: nowrap;
}
#cf-conditions-hud .me-hud-gauge-label::before { display: none; }
#cf-conditions-hud .me-hud-gauge-value {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    order: 1;
}
#cf-conditions-hud .me-hud-gauge-unit { display: none; }
.cf-intel-chip-val {
    font-family: var(--cf-mono); font-size: clamp(0.7rem, 1vw, 0.82rem);
    color: var(--chip-color, var(--cf-text)); font-weight: 600; line-height: 1;
    text-shadow: 0 0 10px var(--chip-color, rgba(96,165,250,0.3));
}
.cf-intel-chip {
    display: flex; flex-direction: column; align-items: center; gap: 0;
}
.cf-intel-chip-time {
    min-width: 0;
    max-width: 100%;
    flex-shrink: 1;
}
.cf-intel-chip-time .cf-mono {
    font-size: clamp(0.4rem, 0.55vw, 0.52rem); color: var(--cf-text-muted);
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cf-mono { font-family: var(--cf-mono); }
@keyframes cf-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }


/* ═══════════════════════════════════════════════════════
   3-COLUMN INSTRUMENT GRID — The heart of the layout
   ═══════════════════════════════════════════════════════ */
.cf-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "right"
        "center"
        "left";
    gap: var(--cf-block-gap);
    min-height: 0;
    min-width: 0;
    overflow: visible;
    padding: 0;
    box-sizing: border-box;
}

/* Columns */
.cf-col {
    min-height: 0;
    min-width: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

/* LEFT: Chronometer fills height */
.cf-col-left {
    grid-area: left;
    display: flex;
    flex-direction: column;
}
.cf-col-left .cf-panel-chronometer {
    flex: 1;
    min-height: 0;
}

/* CENTER: Convergence fills height */
.cf-col-center {
    grid-area: center;
    display: flex;
    flex-direction: column;
}
.cf-col-center .cf-panel-convergence {
    flex: 1;
    min-height: 0;
}

/* RIGHT: Gauge bank fills height */
.cf-col-right {
    grid-area: right;
    display: flex;
    flex-direction: column;
}

.cf-secondary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: clamp(4px, 0.4vw, 6px);
    flex: 1;
    min-height: 0;
    overflow: visible;
}


/* ═══════════════════════════════════════════════════════
   PANELS — Shared styling
   ═══════════════════════════════════════════════════════ */
.cf-panel {
    background: var(--cf-panel);
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-panel-radius);
    overflow: hidden;
    transition: border-color 0.3s;
    display: flex; flex-direction: column;
    min-height: 0;
    box-shadow: 0 12px 28px rgba(0,0,0,0.28);
}
.cf-panel:hover { border-color: var(--cf-border-hover); }
.cf-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--cf-border);
    flex-shrink: 0;
    min-height: 0;
    gap: 8px;
    min-width: 0;
}
.cf-panel-label {
    font-size: clamp(0.64rem, 0.95vw, 0.78rem); font-weight: 700;
    color: var(--cf-accent-dim);
    letter-spacing: 0.14em; text-transform: uppercase;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cf-panel-src {
    font-size: clamp(0.54rem, 0.78vw, 0.64rem); color: var(--cf-text-muted);
    letter-spacing: 0.06em;
    min-width: 0;
    max-width: 55%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cf-panel-body {
    padding: clamp(10px, 1.6vw, 16px);
    flex: 1; min-height: 0;
    overflow: hidden;
    display: flex; flex-direction: column;
}

/* Secondary panel body — center content */
.cf-secondary-body {
    align-items: center;
    justify-content: center;
}


/* ═══════════════════════════════════════════════════════
   GREAT YEAR CHRONOMETER — Left column, fills height
   ═══════════════════════════════════════════════════════ */
.cf-panel-chronometer {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.cf-panel-chronometer:hover {
    border-color: transparent !important;
}
.cf-panel-chronometer .cf-panel-header {
    border-bottom: none;
}
.cf-panel-chronometer .cf-panel-body {
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 1.8vw, 18px);
}
.cf-chronometer-svg {
    display: block;
    width: min(100%, 420px);
    height: auto;
    aspect-ratio: 1 / 1;
}
.cf-chrono-readout { display: none; }
.cf-chrono-pct {
    font-size: clamp(1.2rem, 2vw, 2.4rem); font-weight: 200; color: var(--cf-accent);
    letter-spacing: 0.05em; line-height: 1;
}
.cf-chrono-label {
    font-size: clamp(0.4rem, 0.55vw, 0.55rem); color: var(--cf-text-muted);
    letter-spacing: 0.1em; margin-top: 2px;
}
.cf-chrono-remaining {
    font-size: clamp(0.42rem, 0.58vw, 0.58rem); color: var(--cf-red);
    letter-spacing: 0.06em; margin-top: 3px; opacity: 0.8;
}


/* ═══════════════════════════════════════════════════════
   CONVERGENCE INDEX — Center column, HERO (biggest!)
   ═══════════════════════════════════════════════════════ */
.cf-convergence-body {
    display: flex; flex-direction: column;
    gap: 12px;
    align-items: center;
}
.cf-panel-convergence {
    min-height: clamp(280px, 64vw, 620px);
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.cf-panel-convergence:hover {
    border-color: transparent !important;
}
.cf-panel-convergence .cf-panel-header {
    border-bottom: none;
}

/* Hero gauge — override JS inline max-width so it fills */
.cf-gauge-hero {
    flex: 0 1 auto;
    min-height: clamp(180px, 44vw, 360px);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cf-gauge-hero .cf-gauge-svg {
    max-width: min(100%, 560px) !important;
    width: 100% !important;
    height: auto !important;
    max-height: min(56vw, 520px);
}

.cf-conv-score-wrap { text-align: center; }
.cf-conv-score {
    font-size: clamp(3rem, 5vw, 5.5rem); font-weight: 200; color: var(--cf-accent);
    line-height: 1; letter-spacing: 0.02em;
    animation: cf-pulse 12s ease-in-out infinite;
}
.cf-conv-level {
    font-size: clamp(0.65rem, 0.9vw, 0.9rem); letter-spacing: 0.2em;
    margin-top: 4px; font-weight: 700;
}
.cf-conv-level[data-level="HIGH"] { color: var(--cf-red); }
.cf-conv-level[data-level="ELEVATED"] { color: var(--cf-amber); }
.cf-conv-level[data-level="MODERATE"] { color: var(--cf-teal); }


/* Old compat bar styles */
.cf-comp { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cf-comp-label { font-size: clamp(0.5rem, 0.75vw, 0.72rem); color: var(--cf-text-muted); letter-spacing: 0.1em; width: 90px; text-align: right; }
.cf-comp-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: hidden; }
.cf-comp-fill { height: 100%; border-radius: 3px; transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1); }
.cf-comp[data-comp="precession"] .cf-comp-fill { background: var(--cf-accent); }
.cf-comp[data-comp="magnetic"] .cf-comp-fill { background: var(--cf-red); }
.cf-comp[data-comp="solar"] .cf-comp-fill { background: var(--cf-amber); }
.cf-comp[data-comp="orbital"] .cf-comp-fill { background: var(--cf-teal); }
.cf-comp-val { font-size: clamp(0.55rem, 0.8vw, 0.75rem); color: var(--cf-text-muted); width: 36px; }


/* ═══════════════════════════════════════════════════════
   SECONDARY GAUGES — 2x2 grid, right column (legacy)
   ═══════════════════════════════════════════════════════ */
.cf-panel-secondary {
    min-height: 0;
    min-width: 0;
}
.cf-panel-secondary .cf-panel-header {
    padding: 2px 6px;
    min-height: 16px;
}
.cf-panel-secondary .cf-panel-label {
    font-size: clamp(0.36rem, 0.5vw, 0.5rem);
}
.cf-gauge-secondary {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cf-gauge-secondary .cf-gauge-svg {
    max-width: none !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100%;
}

/* ═══════════════════════════════════════════════════════
   WATCH-FACE GAUGE BANK — Switchable instrument panel
   ═══════════════════════════════════════════════════════ */
.cf-panel-watchface {
    min-height: clamp(280px, 64vw, 520px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 !important;
    background: var(--cf-panel) !important;
    border: 1px solid var(--cf-border) !important;
    border-radius: var(--cf-panel-radius) !important;
}
#cf-gauge-bank {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    overflow: hidden;
}
.cf-watchface-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    flex: 1 1 auto;
    outline: none;
    overflow: hidden;
}

/* Tab bar */
.cf-wb-tabs {
    display: flex;
    gap: 12px;
    padding: 2px 8px;
    background: transparent;
    border-bottom: none;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.cf-wb-tabs::-webkit-scrollbar { display: none; }
.cf-wb-tab {
    flex: 0 0 auto;
    min-width: 0;
    padding: 2px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    color: rgba(255,255,255,0.3);
    font-size: 0.44rem;
    font-family: 'DM Mono', monospace;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}
.cf-wb-tab:hover {
    color: rgba(255,255,255,0.7);
}
.cf-wb-tab-active {
    color: #ef4444;
    border-bottom-color: #ef4444;
}
/* LIVE tab always red */
.cf-wb-tab[data-mode="LIVE"] { color: rgba(239,68,68,0.5); }
.cf-wb-tab[data-mode="LIVE"]:hover { color: #ef4444; }
.cf-wb-tab[data-mode="LIVE"].cf-wb-tab-active { color: #ef4444; border-bottom-color: #ef4444; }

/* Alert pulse on tab */
@keyframes wb-tab-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
    50% { box-shadow: 0 0 8px 2px rgba(239,68,68,0.4); }
}
.cf-wb-tab-alert {
    animation: wb-tab-pulse 1.5s ease-in-out infinite;
    color: #ef4444 !important;
}

/* SVG container */
.cf-wb-svg-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    min-width: 0;
    padding: 10px;
    overflow: hidden;
}
.cf-wb-svg {
    width: min(100%, 520px);
    height: auto;
    max-height: min(78vw, 520px);
    display: block;
}

/* LED blink animation */
@keyframes wb-led-glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
.wb-led {
    animation: wb-led-glow 2s ease-in-out infinite;
}


/* ═══════════════════════════════════════════════════════
   SPACE WEATHER HUD — fits in 2x2 cell
   ═══════════════════════════════════════════════════════ */
.cf-space-hud {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}


/* ═══════════════════════════════════════════════════════
   GAUGE SHARED STYLES
   ═══════════════════════════════════════════════════════ */
.cf-gauge-container {
    display: flex; justify-content: center; align-items: center;
}
.cf-gauge-svg {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
/* Kill the old sm/dual-gauge styles that were for the 4-panel layout */
.cf-gauge-sm .cf-gauge-svg { max-width: clamp(100px, 10vw, 160px) !important; }
.cf-dual-gauge-row { display: flex; gap: 8px; justify-content: center; align-items: center; }


/* ═══════════════════════════════════════════════════════
   BOTTOM DATA STRIP — Compact stats, no panels
   ═══════════════════════════════════════════════════════ */
.cf-data-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 0;
    background: none;
    border-top: none;
    flex-shrink: 0;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    min-width: 0;
    box-sizing: border-box;
}
.cf-strip-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 0;
    min-height: 48px;
    padding: 8px 6px;
    height: auto;
    overflow: hidden;
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-panel-radius);
    background: var(--cf-panel);
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}
.cf-data-strip .cf-strip-arc {
    width: 32px;
    max-width: 32px;
    height: auto;
    display: block;
    flex: 0 0 auto;
}
.cf-strip-val {
    font-family: var(--cf-mono);
    font-size: clamp(0.72rem, 1vw, 0.9rem);
    font-weight: 300;
    color: var(--cf-text);
    line-height: 1;
    white-space: nowrap;
    text-align: center;
}
.cf-strip-label {
    font-family: var(--cf-mono);
    font-size: clamp(0.42rem, 0.55vw, 0.5rem);
    color: var(--cf-accent-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 4px;
    text-align: center;
}
.cf-strip-divider {
    display: none;
}


/* ═══════════════════════════════════════════════════════
   OLD STAT / ARC / TREND STYLES — Kept for compat
   ═══════════════════════════════════════════════════════ */
.cf-stat { flex: 1; text-align: center; }
.cf-stat-val {
    font-size: clamp(1rem, 1.4vw, 1.6rem); font-weight: 300; color: var(--cf-text);
    line-height: 1.1; letter-spacing: 0.02em;
}
.cf-stat-val.cf-stat-warn { color: var(--cf-red); }
.cf-stat-unit { font-size: clamp(0.4rem, 0.55vw, 0.55rem); color: var(--cf-text-muted); letter-spacing: 0.06em; margin-top: 2px; }
.cf-stat-label { font-size: clamp(0.4rem, 0.55vw, 0.55rem); color: var(--cf-accent-dim); letter-spacing: 0.1em; margin-top: 4px; text-transform: uppercase; }
.cf-gauge-row { display: flex; gap: 8px; margin-bottom: 6px; }
.cf-trend-line { margin-top: 8px; }
.cf-trend-line canvas { width: 100%; height: 40px; display: block; }
.cf-trend-label { font-size: clamp(0.4rem, 0.55vw, 0.55rem); color: var(--cf-text-muted); text-align: center; margin-top: 2px; letter-spacing: 0.06em; }
.cf-arc-gauges { display: flex; gap: 16px; justify-content: center; }
.cf-arc-gauge { text-align: center; flex: 1; }
.cf-arc-svg { width: 100%; max-width: clamp(100px, 8vw, 140px); display: block; margin: 0 auto; }
.cf-arc-val { font-size: clamp(0.9rem, 1.2vw, 1.3rem); font-weight: 300; color: var(--cf-text); margin-top: -8px; }
.cf-arc-trend { font-size: clamp(0.4rem, 0.55vw, 0.55rem); color: var(--cf-text-muted); margin-top: 2px; }
.cf-arc-label { font-size: clamp(0.4rem, 0.55vw, 0.55rem); color: var(--cf-accent-dim); letter-spacing: 0.12em; margin-top: 3px; text-transform: uppercase; }
.cf-arc-range { display: flex; justify-content: space-between; font-size: clamp(0.36rem, 0.48vw, 0.48rem); color: var(--cf-text-muted); padding: 0 10%; }
.cf-precession-readout { margin-top: 8px; border-top: 1px solid var(--cf-border); padding-top: 8px; }
.cf-gsm-indicator { margin-top: 8px; border-top: 1px solid var(--cf-border); padding-top: 6px; }
.cf-gsm-label { font-size: clamp(0.4rem, 0.55vw, 0.55rem); color: var(--cf-accent-dim); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 3px; }
.cf-gsm-bar { position: relative; height: 5px; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: visible; }
.cf-gsm-fill { height: 100%; background: linear-gradient(90deg, var(--cf-teal), var(--cf-amber)); border-radius: 3px; transition: width 1s; }
.cf-gsm-marker { position: absolute; top: -3px; width: 2px; height: 11px; background: var(--cf-red); border-radius: 1px; transform: translateX(-1px); }
.cf-gsm-range { display: flex; justify-content: space-between; font-size: clamp(0.36rem, 0.48vw, 0.48rem); color: var(--cf-text-muted); margin-top: 2px; }
.cf-mag-globe { width: 100%; height: 80px; margin-bottom: 4px; border-radius: 3px; overflow: hidden; position: relative; background: rgba(0,0,0,0.3); flex-shrink: 0; }
.cf-mag-globe canvas { border-radius: 3px; }


/* ═══════════════════════════════════════════════════════
   POWER-ON SCANLINE
   ═══════════════════════════════════════════════════════ */
.cf-scanline {
    position: fixed; top: 50%; left: 50%; z-index: 10000;
    width: 0; height: 1px; background: var(--cf-accent);
    box-shadow: 0 0 12px var(--cf-accent), 0 0 30px rgba(96,165,250,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s cubic-bezier(0.2, 0, 0.1, 1);
    pointer-events: none;
}
.cf-scanline-active { width: 100vw; }
.cf-scanline-done { opacity: 0; transition: opacity 0.4s; }
.cf-grid-flash .cf-panel { border-color: rgba(96,165,250,0.35) !important; transition: border-color 0.4s ease-out; }


/* ═══════════════════════════════════════════════════════
   ENTRY EXPERIENCE (kept for JS compat)
   ═══════════════════════════════════════════════════════ */
.cf-entry {
    position: fixed; inset: 0; z-index: 9999;
    background: #000;
    display: flex; align-items: center; justify-content: center;
    animation: cf-entry-fade 3s ease-in-out forwards;
}
.cf-entry-text { text-align: center; }
.cf-entry-label { font-family: var(--cf-mono); font-size: 0.55rem; color: var(--cf-accent-dim); letter-spacing: 0.3em; animation: cf-entry-label 1s 0.3s ease both; opacity: 0; }
.cf-entry-title { font-family: var(--cf-mono); font-size: clamp(1.4rem, 4vw, 2.4rem); color: var(--cf-accent); letter-spacing: 0.15em; font-weight: 300; margin: 12px 0 6px; animation: cf-entry-label 1s 0.8s ease both; opacity: 0; }
.cf-entry-sub { font-family: var(--cf-mono); font-size: 0.6rem; color: var(--cf-text-muted); letter-spacing: 0.12em; animation: cf-entry-label 1s 1.3s ease both; opacity: 0; }
@keyframes cf-entry-label { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cf-entry-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; pointer-events: none; } }


/* ═══════════════════════════════════════════════════════
   INFO MODAL
   ═══════════════════════════════════════════════════════ */
/* Non-blocking tooltip panel — slides from right, no overlay */
.cf-gauge-tooltip-panel {
    position: fixed; top: 80px; right: -340px; z-index: 9999;
    width: 320px; max-height: calc(100vh - 120px);
    overflow-y: auto; scrollbar-width: none;
    background: rgba(8,10,18,0.96);
    border: 1px solid rgba(96,165,250,0.18);
    border-right: none; border-radius: 6px 0 0 6px;
    padding: 16px 20px 20px;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: -8px 0 40px rgba(0,0,0,0.5), 0 0 1px rgba(96,165,250,0.1);
    transition: right 0.35s cubic-bezier(0.22, 0.68, 0, 1.02);
    pointer-events: all;
}
.cf-gauge-tooltip-panel::-webkit-scrollbar { display: none; }
.cf-gauge-tooltip-visible { right: 0; }
.cf-gauge-tooltip-close {
    float: right; background: none; border: none; color: var(--cf-text-muted, #555);
    font-size: 1.2rem; cursor: pointer; padding: 0; line-height: 1;
    transition: color 0.2s;
}
.cf-gauge-tooltip-close:hover { color: var(--cf-accent, #60a5fa); }

/* Legacy overlay — keep for backward compat but hidden */
.cf-gauge-modal-overlay { display: none; }
.cf-gauge-modal-title {
    font-family: var(--cf-mono); font-size: clamp(0.8rem, 1.1vw, 1.1rem);
    color: var(--cf-accent); letter-spacing: 0.1em; margin: 0 0 8px;
    text-transform: uppercase;
}
.cf-gauge-modal-desc {
    font-size: clamp(0.6rem, 0.85vw, 0.82rem); color: var(--cf-text);
    line-height: 1.6; margin: 0 0 16px;
}
.cf-gauge-accordion { border-top: 1px solid var(--cf-border); }
.cf-gauge-accordion-btn {
    width: 100%; text-align: left; background: none; border: none;
    color: var(--cf-accent-dim); font-family: var(--cf-mono);
    font-size: clamp(0.55rem, 0.78vw, 0.75rem); padding: 10px 0;
    cursor: pointer; letter-spacing: 0.08em; display: flex; align-items: center; gap: 6px;
}
.cf-gauge-accordion-btn:hover { color: var(--cf-accent); }
.cf-gauge-accordion-chevron { display: inline-block; transition: transform 0.3s; font-size: 0.7em; }
.cf-gauge-accordion-open .cf-gauge-accordion-chevron { transform: rotate(90deg); }
.cf-gauge-accordion-body {
    max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
    font-size: clamp(0.52rem, 0.72vw, 0.7rem); color: var(--cf-text-muted);
    line-height: 1.7;
}
.cf-gauge-accordion-open .cf-gauge-accordion-body { max-height: 400px; padding-bottom: 12px; }


/* ═══════════════════════════════════════════════════════
   OLD STYLES KEPT FOR JS COMPAT
   ═══════════════════════════════════════════════════════ */
.cf-row { display: flex; gap: 8px; min-height: 0; overflow: hidden; }
.cf-row-hero { flex: 1; min-height: 0; }
.cf-row-instruments { min-height: 0; }
.cf-panel-chronometer-old { flex: 0.7; min-width: 0; }
.cf-panel-quarter { flex: 1; min-width: 0; }
.cf-panel-third { flex: 1; min-width: 0; }
.cf-panel-full { flex: 1; min-width: 0; }
.cf-explore-body { display: flex; flex-direction: column; gap: 8px; }
.cf-explore-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 4px; text-decoration: none; color: var(--cf-text); background: rgba(255,255,255,0.02); border: 1px solid var(--cf-border); transition: all 0.2s; }
.cf-explore-link:hover { border-color: var(--cf-accent-dim); background: var(--cf-accent-glow); }
.cf-explore-icon { font-size: 1.4rem; width: 32px; text-align: center; }
.cf-explore-text { display: flex; flex-direction: column; gap: 1px; }
.cf-explore-text strong { font-size: clamp(0.7rem, 0.95vw, 0.9rem); color: var(--cf-accent); letter-spacing: 0.06em; }
.cf-explore-text span { font-size: clamp(0.5rem, 0.7vw, 0.68rem); color: var(--cf-text-muted); }
.cf-btn { display: inline-block; padding: 8px 20px; font-family: var(--cf-mono); font-size: clamp(0.55rem, 0.75vw, 0.72rem); letter-spacing: 0.1em; border: none; border-radius: 3px; cursor: pointer; transition: all 0.2s; text-transform: uppercase; }
.cf-btn-primary { background: var(--cf-accent); color: #000; font-weight: 700; }
.cf-btn-primary:hover { background: #93c5fd; }
.cf-evidence-body { font-size: clamp(0.52rem, 0.72vw, 0.7rem); }
.cf-evidence-tier { margin-bottom: 12px; }
.cf-evidence-tier-label { font-size: clamp(0.48rem, 0.68vw, 0.65rem); color: var(--cf-accent-dim); letter-spacing: 0.1em; margin-bottom: 6px; text-transform: uppercase; border-bottom: 1px solid var(--cf-border); padding-bottom: 4px; }
.cf-evidence-item { color: var(--cf-text-muted); padding: 3px 0; line-height: 1.5; }
.cf-evidence-item a { color: var(--cf-teal); text-decoration: none; }
.cf-evidence-item a:hover { text-decoration: underline; }
.cf-evidence-item em { color: var(--cf-text); font-style: normal; }
.cf-evidence-paper { display: inline-block; margin-top: 10px; padding: 8px 18px; border: 1px solid var(--cf-accent-dim); border-radius: 3px; color: var(--cf-accent); text-decoration: none; font-size: clamp(0.5rem, 0.7vw, 0.68rem); letter-spacing: 0.08em; transition: all 0.2s; }
.cf-evidence-paper:hover { background: var(--cf-accent-glow); }
.cf-panel-audio { border-color: rgba(96, 165, 250, 0.15); }
.cf-audio-body { text-align: center; }
.cf-audio-tagline { font-size: clamp(0.75rem, 1vw, 1rem); color: var(--cf-text-muted); font-style: italic; margin-bottom: 14px; letter-spacing: 0.04em; }
.cf-footer { padding: 24px 0; text-align: center; border-top: 1px solid var(--cf-border); margin-top: 16px; }
.cf-footer-text { font-size: clamp(0.48rem, 0.65vw, 0.62rem); color: var(--cf-text-muted); letter-spacing: 0.04em; line-height: 1.6; }
.cf-footer-text a { color: var(--cf-accent-dim); }
.cf-timeline { min-height: 120px; position: relative; overflow-x: auto; }


/* ═══════════════════════════════════════════════════════
   RESPONSIVE LAYOUT TIERS
   Mobile-first stack, tablet split, desktop command wall
   ═══════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .cf-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
        grid-template-areas:
            "right center"
            "left left";
    }

    .cf-panel-convergence {
        min-height: 560px;
    }

    .cf-panel-watchface {
        min-height: 520px;
    }

    .cf-panel-chronometer {
        min-height: 380px;
    }

    .cf-data-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    html, body {
        overflow-y: auto;
    }

    .cf-main {
        min-height: calc(100vh - var(--cf-nav-h));
        min-height: calc(100dvh - var(--cf-nav-h));
        height: auto;
        gap: clamp(6px, 0.5vw, 10px);
        padding: 4px clamp(8px, 1vw, 16px);
        overflow: visible;
    }

    .cf-intel-strip {
        position: static;
        padding: 4px 12px;
        border: none;
        border-radius: 0;
        gap: 10px;
        min-height: 36px;
        height: 36px;
        max-height: 36px;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        overflow: hidden;
    }

    .cf-intel-narrative {
        font-size: 0.5rem;
        line-height: 18px;
        padding: 0;
        height: 18px;
    }

    #cf-conditions-hud .me-hud-gauge { padding: 5px 8px; gap: 4px; }
    #cf-conditions-hud .me-hud-gauge-value { font-size: 0.85rem; }
    #cf-conditions-hud .me-hud-gauge-label { font-size: 0.32rem; }

    .cf-grid {
        grid-template-columns: 0.45fr 1.4fr 0.85fr;
        grid-template-areas: "left right center";
        gap: clamp(6px, 0.6vw, 12px);
        overflow: hidden;
        padding: clamp(4px, 0.4vw, 6px) 0;
        max-height: calc(100vh - 160px);
        max-height: calc(100dvh - 160px);
    }

    .cf-col {
        overflow: hidden;
    }

    .cf-panel {
        border-radius: 3px;
        box-shadow: none;
    }

    .cf-panel-header {
        padding: 3px 8px;
    }

    .cf-panel-label {
        font-size: clamp(0.42rem, 0.6vw, 0.6rem);
    }

    .cf-panel-src {
        font-size: clamp(0.36rem, 0.48vw, 0.48rem);
        max-width: 50%;
    }

    .cf-panel-body {
        padding: clamp(4px, 0.5vw, 8px);
    }

    .cf-panel-chronometer,
    .cf-panel-convergence,
    .cf-panel-watchface {
        min-height: 0;
    }

    .cf-col-left .cf-panel-chronometer,
    .cf-col-center .cf-panel-convergence {
        flex: 1;
    }

    .cf-panel-watchface {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
    }

    .cf-chronometer-svg {
        width: 100%;
        height: 100%;
        max-width: none;
    }

    .cf-convergence-body {
        gap: 4px;
    }

    .cf-gauge-hero {
        flex: 1 1 auto;
        min-height: 0;
    }

    .cf-gauge-hero .cf-gauge-svg {
        max-width: none !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100%;
    }

    .cf-wb-tabs {
        overflow: visible;
        padding: 3px 4px;
        scrollbar-width: auto;
    }

    .cf-wb-tab {
        flex: 1;
        min-width: 0;
        padding: 3px 0;
        border-radius: 3px;
        font-size: clamp(0.4rem, 0.55vw, 0.55rem);
    }

    .cf-wb-svg-wrap {
        padding: 4px;
    }

    .cf-wb-svg {
        width: 100%;
        max-height: 100%;
    }

    .cf-data-strip {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: clamp(8px, 1.2vw, 20px);
        padding: 4px 12px;
        background: linear-gradient(180deg, rgba(96,165,250,0.03) 0%, var(--cf-bg) 100%);
        border-top: 1px solid var(--cf-border);
        height: clamp(56px, 7vh, 70px);
        min-height: 56px;
        max-height: 70px;
        overflow: hidden;
    }

    .cf-strip-cell {
        min-height: 0;
        padding: 0;
        height: 100%;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .cf-data-strip .cf-strip-arc {
        width: clamp(32px, 3.3vw, 48px);
        max-width: clamp(32px, 3.3vw, 48px);
    }

    .cf-strip-val {
        font-size: clamp(0.62rem, 0.9vw, 0.9rem);
    }

    .cf-strip-label {
        font-size: clamp(0.28rem, 0.4vw, 0.38rem);
        margin-top: 0;
    }

    .cf-strip-divider {
        display: block;
        width: 1px;
        height: 24px;
        background: var(--cf-border);
        flex-shrink: 0;
    }

    .cf-telemetry-strip {
        padding: 0 var(--cf-gutter, clamp(6px, 1vw, 12px));
        overflow: hidden;
    }

    .cf-telemetry-strip .me-hud {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .cf-impact-pills {
        overflow: hidden;
    }

    .cf-briefing-panel {
        left: 0;
        right: 0;
        max-width: none;
        border-radius: 0 0 10px 10px;
        max-height: 55vh;
    }

    .cf-briefing-body {
        font-size: clamp(0.42rem, 0.58vw, 0.56rem);
    }

    .cf-briefing-section-title {
        font-size: clamp(0.38rem, 0.52vw, 0.5rem);
    }

    .cf-briefing-meta {
        font-size: clamp(0.32rem, 0.44vw, 0.42rem);
    }
}

@media (max-width: 767px) {
    .cf-footer {
        display: none;
    }

    .cf-audio-tagline {
        display: none;
    }
}

@media (max-width: 480px) {
    .cf-main {
        padding-left: 8px;
        padding-right: 8px;
    }

    .cf-intel-strip {
        padding: 6px 10px;
        gap: 6px;
    }

    #cf-conditions-hud { top: 6px; }
    #cf-conditions-hud .me-hud-gauges { gap: 3px; }
    #cf-conditions-hud .me-hud-gauge { padding: 4px 6px; }
    #cf-conditions-hud .me-hud-gauge-value { font-size: 0.72rem; }
    #cf-conditions-hud .me-hud-gauge-label { font-size: 0.30rem; }

    .cf-intel-narrative {
        font-size: 0.42rem;
        padding: 0;
        height: 14px;
    }

    .cf-panel-header {
        padding: 8px 10px;
    }

    .cf-panel-label {
        font-size: 0.56rem;
    }

    .cf-panel-src {
        font-size: 0.5rem;
        max-width: 46%;
    }

    .cf-panel-body {
        padding: 10px;
    }

    .cf-panel-convergence {
        min-height: 260px;
    }

    .cf-gauge-hero {
        min-height: 160px;
    }

    .cf-panel-watchface {
        min-height: 260px;
    }

    .cf-wb-svg {
        max-height: min(72vw, 360px);
    }

    .cf-panel-chronometer {
        min-height: 240px;
    }

    .cf-chronometer-svg {
        width: min(100%, 320px);
    }

    .cf-data-strip {
        gap: 8px;
    }

    .cf-strip-cell {
        min-height: 44px;
        padding: 6px 4px;
    }

    .cf-strip-val {
        font-size: 0.62rem;
    }

    .cf-strip-label {
        font-size: 0.34rem;
    }

    .cf-telemetry-strip .me-hud {
        width: max(100%, 560px);
        min-width: 560px;
    }

    .cf-gauge-tooltip-panel {
        width: calc(100vw - 16px);
        max-width: 320px;
    }
}

@media (max-width: 359px) {
    .cf-intel-strip {
        flex-wrap: wrap;
    }

    .cf-data-strip {
        grid-template-columns: minmax(0, 1fr);
    }

    .cf-telemetry-strip .me-hud {
        width: max(100%, 520px);
        min-width: 520px;
    }
}

@media (max-height: 740px) and (max-width: 767px) {
    .cf-main {
        gap: 6px;
    }

    .cf-panel-convergence {
        min-height: 220px;
    }

    .cf-panel-watchface {
        min-height: 240px;
    }

    .cf-panel-chronometer {
        min-height: 200px;
    }

}

/* ═══════════════════════════════════════════════════════
   LIVE TELEMETRY STRIP — full-width above instruments
   ═══════════════════════════════════════════════════════ */
.cf-telemetry-strip {
    padding: 0;
    margin-bottom: 0;
    flex-shrink: 0;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
.cf-telemetry-strip::-webkit-scrollbar { display: none; }

.cf-telemetry-strip .me-hud {
    border-radius: var(--cf-panel-radius);
    border-color: rgba(96,165,250,0.12);
    width: max(100%, 640px);
    min-width: 640px;
    max-width: none;
}

/* Right column: 3 panels stacked (Space Wx moved to telemetry strip) */
.cf-col-right .cf-secondary-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr 1fr;
}

/* ═══════════════════════════════════════════════════════
   INTELLIGENCE TICKER — Rotating slide-up messages
   ═══════════════════════════════════════════════════════ */
.cf-ticker-line {
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    display: flex; align-items: center;
    white-space: pre;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--cf-mono);
    font-size: inherit;
    color: rgba(147, 184, 232, 0.75);
    letter-spacing: 0.03em;
    transition: transform 0.4s cubic-bezier(0.22, 0.68, 0, 1.02), opacity 0.4s ease;
}
.cf-ticker-exit {
    transform: translateY(-100%);
    opacity: 0;
}
.cf-ticker-enter {
    transform: translateY(100%);
    opacity: 0;
}
.cf-ticker-active {
    transform: translateY(0);
    opacity: 1;
}

/* Typewriter cursor */
.cf-tw-cursor {
    display: inline-block;
    width: 1px;
    height: 1em;
    background: var(--cf-accent);
    margin-left: 1px;
    vertical-align: text-bottom;
    animation: cf-tw-blink 0.6s step-end infinite;
}
@keyframes cf-tw-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Typewriter leading gold glow on fresh characters */
.cf-tw-hot {
    color: var(--cf-accent);
    text-shadow: 0 0 6px rgba(96,165,250,0.5);
    transition: color 0.8s ease, text-shadow 0.8s ease;
}
.cf-tw-cool {
    color: var(--cf-text);
    text-shadow: none;
}


/* ═══════════════════════════════════════════════════════
   BRIEFING TRIGGER — minimal text, gold accent
   ═══════════════════════════════════════════════════════ */
.cf-briefing-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    opacity: 0;
    animation: cf-briefing-fadein 0.6s ease 0.3s forwards;
}
@keyframes cf-briefing-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}
.cf-briefing-trigger:hover { opacity: 1; }
.cf-briefing-trigger:hover .cf-briefing-trigger-label { color: #d4af37; }
.cf-briefing-trigger[aria-expanded="true"] .cf-briefing-trigger-label { color: #d4af37; }
.cf-briefing-trigger-dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: #d4af37;
    box-shadow: 0 0 4px rgba(212,175,55,0.5);
    animation: cf-pulse 3s ease-in-out infinite;
    flex-shrink: 0;
}
.cf-briefing-trigger-label {
    font-family: var(--cf-mono);
    font-size: 0.44rem;
    color: rgba(212,175,55,0.55);
    letter-spacing: 0.1em;
    font-weight: 600;
    line-height: 1;
    transition: color 0.2s ease;
}
.cf-briefing-trigger-arrow {
    font-size: 0.36rem;
    color: rgba(212,175,55,0.3);
    transition: transform 0.25s ease, color 0.25s ease;
    line-height: 1;
}
.cf-briefing-trigger[aria-expanded="true"] .cf-briefing-trigger-arrow {
    transform: rotate(180deg);
    color: rgba(212,175,55,0.6);
}

/* ═══════════════════════════════════════════════════════
   HUMAN IMPACT PILLS — always-visible status badges
   ═══════════════════════════════════════════════════════ */
.cf-impact-pills {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0;
    scrollbar-width: none;
}
.cf-impact-pills::-webkit-scrollbar { display: none; }
.cf-impact-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    border: none;
    background: none;
    font-family: var(--cf-mono);
    font-size: 0.42rem;
    color: var(--pill-color, rgba(228,230,237,0.45));
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
    animation: cf-pill-enter 0.4s ease forwards;
    opacity: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}
.cf-impact-pill:hover {
    color: var(--pill-color, var(--cf-teal));
    filter: brightness(1.3);
}
.cf-impact-pill-icon {
    font-size: 0.42rem;
    line-height: 1;
    opacity: 0.6;
}
@keyframes cf-pill-enter {
    from { opacity: 0; transform: translateX(-6px); }
    to { opacity: 1; transform: translateX(0); }
}
/* Pill variants */
.cf-impact-pill[data-type="sleep"]    { --pill-color: #a78bfa; --pill-border: rgba(167,139,250,0.3); --pill-bg: rgba(167,139,250,0.06); }
.cf-impact-pill[data-type="gps"]      { --pill-color: #f59e0b; --pill-border: rgba(245,158,11,0.3); --pill-bg: rgba(245,158,11,0.06); }
.cf-impact-pill[data-type="aurora"]    { --pill-color: #34d399; --pill-border: rgba(52,211,153,0.3); --pill-bg: rgba(52,211,153,0.06); }
.cf-impact-pill[data-type="seismic"]  { --pill-color: #ef4444; --pill-border: rgba(239,68,68,0.3); --pill-bg: rgba(239,68,68,0.06); }
.cf-impact-pill[data-type="nominal"]  { --pill-color: var(--cf-text-muted); --pill-border: rgba(90,94,114,0.2); --pill-bg: rgba(90,94,114,0.04); }

/* ═══ SOFIA'S DAILY — audio button in intel strip ═══ */
.cf-sofia-daily-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    height: auto;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: linear-gradient(135deg, rgba(212,175,55,0.12) 0%, rgba(212,175,55,0.04) 100%);
    font-family: var(--cf-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--cf-gold);
    letter-spacing: 0.1em;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.25s ease;
    animation: cf-pill-enter 0.4s ease 0.5s forwards;
    opacity: 0;
}
.cf-sofia-daily-btn:hover {
    border-color: var(--cf-gold);
    background: linear-gradient(135deg, rgba(212,175,55,0.2) 0%, rgba(212,175,55,0.08) 100%);
    box-shadow: 0 0 12px rgba(212,175,55,0.2);
}
.cf-sofia-daily-btn.is-playing {
    border-color: var(--cf-gold);
    background: rgba(212,175,55,0.15);
    box-shadow: 0 0 16px rgba(212,175,55,0.25);
}
.cf-sofia-daily-btn.is-playing svg {
    animation: cf-pulse 2s ease-in-out infinite;
}
.cf-sofia-daily-btn.is-loading {
    opacity: 0.4;
    pointer-events: none;
}
.cf-sofia-daily-btn svg {
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════
   BRIEFING PANEL — Expandable intelligence summary
   ═══════════════════════════════════════════════════════ */
.cf-briefing-panel {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    z-index: 150;
    display: block;
    background: rgba(8,8,14,0.94);
    border: none;
    border-radius: 12px;
    width: auto;
    max-width: min(var(--cf-shell-max), calc(100vw - 24px));
    max-height: min(72vh, calc(100dvh - var(--cf-nav-h) - 24px));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(212,175,55,0.15) transparent;
    transform: scaleY(0);
    transform-origin: top center;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.22, 0.68, 0, 1.02), opacity 0.25s ease;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 1px rgba(212,175,55,0.1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}
.cf-briefing-panel::-webkit-scrollbar { width: 3px; }
.cf-briefing-panel::-webkit-scrollbar-track { background: transparent; }
.cf-briefing-panel::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.12); border-radius: 2px; }

.cf-briefing-panel[aria-hidden="false"] {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: all;
}

/* No corner brackets — clean edges */
.cf-briefing-panel::before,
.cf-briefing-panel::after {
    display: none;
}

.cf-briefing-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
}
.cf-briefing-status {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: #d4af37;
    box-shadow: 0 0 4px rgba(212,175,55,0.4);
    animation: cf-pulse 3s ease-in-out infinite;
    flex-shrink: 0;
}
.cf-briefing-title {
    font-family: var(--cf-mono);
    font-size: clamp(0.42rem, 0.6vw, 0.56rem);
    color: rgba(212,175,55,0.7);
    letter-spacing: 0.14em;
    font-weight: 600;
    flex: 1;
    z-index: 1;
}
.cf-briefing-date {
    font-family: var(--cf-mono);
    font-size: clamp(0.36rem, 0.5vw, 0.48rem);
    color: var(--cf-text-muted);
    letter-spacing: 0.06em;
    z-index: 1;
}
.cf-briefing-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.25);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.2s;
    z-index: 1;
}
.cf-briefing-close:hover {
    color: rgba(212,175,55,0.7);
}
.cf-briefing-audio-btn {
    background: none;
    border: none;
    color: var(--cf-gold, #d4af37);
    border-radius: 50%;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 1;
    padding: 0;
}
.cf-briefing-audio-btn:hover { filter: brightness(1.3); }
.cf-briefing-audio-btn.is-playing .ms-ring { opacity: 0.35; }

/* ═══ MAGNA SIGNAL — Iconic 3-bar audio visualizer ═══ */
.magna-signal { overflow: visible; }
.magna-signal .ms-bar {
    transform-origin: center bottom;
    transition: opacity 0.3s ease;
}
.magna-signal .ms-ring { transition: opacity 0.4s ease; }

/* ─── IDLE: gentle breathing ─── */
.magna-signal-idle .ms-bar { opacity: 0.35; }
.magna-signal-idle .ms-bar-1 { animation: ms-breathe-1 3s ease-in-out infinite; }
.magna-signal-idle .ms-bar-2 { animation: ms-breathe-2 3.5s ease-in-out infinite 0.3s; }
.magna-signal-idle .ms-bar-3 { animation: ms-breathe-3 2.8s ease-in-out infinite 0.7s; }
@keyframes ms-breathe-1 { 0%,100%{transform:scaleY(1)} 50%{transform:scaleY(0.85)} }
@keyframes ms-breathe-2 { 0%,100%{transform:scaleY(1)} 50%{transform:scaleY(1.1)} }
@keyframes ms-breathe-3 { 0%,100%{transform:scaleY(1)} 50%{transform:scaleY(0.9)} }

/* ─── LOADING: uniform fast pulse ─── */
.magna-signal-loading .ms-bar { opacity: 0.55; }
.magna-signal-loading .ms-bar-1 { animation: ms-load 0.6s ease-in-out infinite; }
.magna-signal-loading .ms-bar-2 { animation: ms-load 0.6s ease-in-out infinite 0.1s; }
.magna-signal-loading .ms-bar-3 { animation: ms-load 0.6s ease-in-out infinite 0.2s; }
@keyframes ms-load { 0%,100%{transform:scaleY(0.5)} 50%{transform:scaleY(1.3)} }

/* ─── PLAYING: bars dance independently ─── */
.magna-signal-playing .ms-bar { opacity: 1; filter: url(#ms-glow); }
.magna-signal-playing .ms-bar-1 { animation: ms-dance-1 0.8s ease-in-out infinite; }
.magna-signal-playing .ms-bar-2 { animation: ms-dance-2 0.5s ease-in-out infinite 0.05s; }
.magna-signal-playing .ms-bar-3 { animation: ms-dance-3 0.65s ease-in-out infinite 0.15s; }
.magna-signal-playing .ms-ring { opacity: 0.35; animation: ms-ring-pulse 2s ease-in-out infinite; }
@keyframes ms-dance-1 { 0%,100%{transform:scaleY(0.4)} 50%{transform:scaleY(1.4)} }
@keyframes ms-dance-2 { 0%,100%{transform:scaleY(0.3)} 35%{transform:scaleY(1.5)} 70%{transform:scaleY(0.7)} }
@keyframes ms-dance-3 { 0%,100%{transform:scaleY(0.5)} 40%{transform:scaleY(1.3)} 75%{transform:scaleY(0.6)} }
@keyframes ms-ring-pulse { 0%,100%{opacity:0.2;stroke-width:0.5} 50%{opacity:0.45;stroke-width:0.8} }

/* ─── PAUSED: frozen mid-dance, dimmed ─── */
.magna-signal-paused .ms-bar {
    opacity: 0.45;
    animation-play-state: paused !important;
}
.magna-signal-paused .ms-ring { opacity: 0.1; }

/* Deep section inside briefing panel */
.cf-deep-section {
    padding: 0 16px 8px;
}
.cf-deep-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.15), transparent);
    margin: 8px 0 12px;
}

.cf-briefing-body {
    padding: 12px 16px 16px;
    font-family: var(--cf-mono);
    font-size: clamp(0.82rem, 1vw, 0.94rem);
    color: var(--cf-text-muted);
    line-height: 1.75;
}
.cf-briefing-section {
    margin-bottom: 12px;
}
.cf-briefing-section:last-child {
    margin-bottom: 0;
}
.cf-briefing-section-title {
    font-size: clamp(0.6rem, 0.8vw, 0.72rem);
    color: var(--cf-accent);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 600;
}
.cf-briefing-section-title::before {
    content: '\25B8 ';
    opacity: 0.6;
}
.cf-briefing-section-text {
    color: var(--cf-text);
    line-height: 1.7;
}

.cf-briefing-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 10px;
    border-top: 1px solid rgba(255,255,255,0.03);
    flex-shrink: 0;
}
.cf-briefing-meta {
    font-family: var(--cf-mono);
    font-size: clamp(0.58rem, 0.72vw, 0.68rem);
    color: var(--cf-text-muted);
    letter-spacing: 0.06em;
    opacity: 0.6;
}


/* Old nav-daily-report-btn and cf-report-mobile removed — Sofia button now lives in intel strip as .cf-sofia-daily-btn */


/* ═══════════════════════════════════════════════════════
   BRIEFING PANEL — Responsive overrides
   ═══════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .cf-briefing-trigger { gap: 4px; }
    .cf-briefing-trigger-label { font-size: 0.44rem; }
    .cf-impact-pills { gap: 6px; }
    .cf-impact-pill { min-height: 22px; padding: 2px 8px; font-size: 0.5rem; }
    .cf-sofia-daily-btn { min-height: 38px; padding: 0 12px; font-size: 0.62rem; }
    .cf-briefing-panel { max-height: min(78vh, calc(100dvh - var(--cf-nav-h) - 18px)); }
    .cf-briefing-body { padding: 12px 14px 16px; font-size: 0.86rem; }
    .cf-briefing-header { padding: 10px 14px; gap: 8px; }
    .cf-briefing-title { font-size: 0.62rem; letter-spacing: 0.14em; }
    .cf-briefing-date { display: none; }
    .cf-briefing-meta { font-size: 0.64rem; }
}
@media (max-width: 480px) {
    .cf-briefing-trigger-label { font-size: 0.4rem; }
    .cf-briefing-trigger-arrow { display: none; }
    .cf-impact-pill { min-height: 20px; padding: 2px 7px; font-size: 0.46rem; }
    .cf-sofia-daily-btn { min-height: 36px; padding: 0 10px; font-size: 0.58rem; }
    .cf-briefing-panel { max-height: min(82vh, calc(100dvh - var(--cf-nav-h) - 12px)); }
    .cf-briefing-body { padding: 12px; font-size: 0.82rem; }
    .cf-briefing-title { font-size: 0.58rem; }
}

/* ═══ DEEP REPORT — inside briefing panel ═══ */
.cf-deep-trigger-sub {
    font-size: 0.5rem; letter-spacing: 0.1em;
    color: rgba(255,255,255,0.3); margin-left: auto;
}
.cf-deep-panel {
    padding: 0.75rem 0 0;
    max-height: 40vh; overflow-y: auto;
}
.cf-deep-header {
    display: flex; align-items: center; gap: 0.75rem;
    padding-bottom: 0.75rem; margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cf-deep-title {
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem; letter-spacing: 0.15em;
    color: var(--cf-gold, #d4af37); text-transform: uppercase;
}
.cf-deep-date {
    font-family: 'Space Mono', monospace;
    font-size: 0.45rem; color: rgba(255,255,255,0.25);
    margin-left: auto;
}
.cf-deep-audio-btn {
    background: none; border: 1px solid rgba(212,175,55,0.2);
    color: var(--cf-gold, #d4af37); border-radius: 50%;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease;
}
.cf-deep-audio-btn:hover {
    border-color: var(--cf-gold, #d4af37);
    box-shadow: 0 0 12px rgba(212,175,55,0.15);
}
.cf-deep-audio-btn.playing {
    border-color: var(--cf-gold, #d4af37);
    box-shadow: 0 0 16px rgba(212,175,55,0.25);
    animation: cf-deep-audio-pulse 1.5s ease-in-out infinite;
}
@keyframes cf-deep-audio-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(212,175,55,0.15); }
    50% { box-shadow: 0 0 20px rgba(212,175,55,0.35); }
}
.cf-deep-body {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.72rem; line-height: 1.85;
    color: rgba(255,255,255,0.75);
    white-space: pre-wrap;
}
.cf-deep-body p { margin-bottom: 0.8rem; }
.cf-deep-footer {
    margin-top: 0.75rem; padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.04);
    font-family: 'Space Mono', monospace;
    font-size: 0.4rem; color: rgba(255,255,255,0.2);
    letter-spacing: 0.08em;
}

/* Deep report gate (free users) */
.cf-deep-gate {
    margin-top: 0.5rem; padding: 1.5rem;
    background: rgba(6,10,22,0.9);
    border: 1px solid rgba(212,175,55,0.08);
    border-radius: 6px; text-align: center;
}
.cf-deep-gate-text {
    font-size: 0.7rem; line-height: 1.7;
    color: rgba(255,255,255,0.5); margin-bottom: 1rem;
    max-width: 500px; margin-left: auto; margin-right: auto;
}
.cf-deep-gate-btn {
    display: inline-block; padding: 0.6rem 1.5rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem; letter-spacing: 0.12em;
    color: var(--cf-gold, #d4af37); text-transform: uppercase;
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 4px; text-decoration: none;
    transition: all 0.3s ease;
}
.cf-deep-gate-btn:hover {
    border-color: var(--cf-gold, #d4af37);
    background: rgba(212,175,55,0.06);
    box-shadow: 0 0 16px rgba(212,175,55,0.1);
}

@media (max-width: 640px) {
    .cf-deep-panel { padding: 0.5rem 0 0; }
    .cf-deep-body { font-size: 0.6rem; line-height: 1.75; }
    .cf-deep-section { padding: 0 8px 6px; }
}

@media (min-width: 1280px) {
    .cf-telemetry-strip {
        padding: 0 var(--cf-gutter, clamp(6px, 1vw, 12px));
        overflow: hidden;
    }

    .cf-telemetry-strip .me-hud {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .cf-impact-pills {
        overflow: hidden;
    }

    .cf-briefing-trigger {
        gap: 3px;
    }

    .cf-impact-pill,
    .cf-sofia-daily-btn {
        min-height: 18px;
        height: 18px;
    }

    .cf-briefing-panel {
        left: 0;
        right: 0;
        max-width: none;
        border-radius: 0 0 10px 10px;
        max-height: 55vh;
    }

    .cf-briefing-body {
        font-size: clamp(0.42rem, 0.58vw, 0.56rem);
    }

    .cf-briefing-section-title {
        font-size: clamp(0.38rem, 0.52vw, 0.5rem);
    }

    .cf-briefing-meta {
        font-size: clamp(0.32rem, 0.44vw, 0.42rem);
    }
}
