/* ChainCast Premium Glass UI */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;600;700&display=swap');

:root {
    --bg-main: #060913;
    --glass-bg: rgba(20, 25, 40, 0.45);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-border-hover: rgba(255, 255, 255, 0.18);
    --text-primary: #f0f4f8;
    --text-secondary: #a0aec0;
    --text-muted: #718096;

    --accent-cyan: #00E5FF;
    --accent-purple: #9D4EDD;
    --accent-gold: #FFD600;
    --accent-orange: #FF9800;
    --accent-green: #00E676;

    --success: #00E676;
    --warning: #FFD600;
    --danger: #FF1744;
    --gold: #FFD600;

    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 229, 255, 0.25);
    --shadow-glow-purple: 0 0 20px rgba(157, 78, 221, 0.25);

    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'Space Grotesk', monospace;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 229, 255, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(157, 78, 221, 0.08), transparent 25%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.03em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--text-primary); }

a { color: var(--accent-cyan); text-decoration: none; transition: 0.3s ease; }
a:hover { color: #fff; text-shadow: var(--shadow-glow); }

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}
.container-fluid {
    width: 100%;
    margin: 0 auto;
    padding: 0 4rem;
}

.section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header p { color: var(--text-secondary); font-size: 1.1rem; }

/* Gradients */
.grad-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Glass panel utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: 0.3s ease;
}


/* Final Polish: Header & Navigation */

@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px rgba(255, 214, 0, 0.4); }
    50% { box-shadow: 0 0 20px rgba(255, 214, 0, 0.7); }
    100% { box-shadow: 0 0 5px rgba(255, 214, 0, 0.4); }
}

/* Final Polish: Welcome Guide */
.welcome-guide {
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}
.guide-box {
    padding: 2rem;
    border: 1px solid var(--accent-cyan);
    box-shadow: var(--shadow-glow);
}
.guide-steps {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 1rem;
}
.g-step {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.g-icon { font-size: 2rem; }
.g-text strong { display: block; color: var(--accent-cyan); font-size: 1rem; }
.g-text span { font-size: 0.85rem; color: var(--text-secondary); }
.g-arrow { font-size: 1.5rem; color: var(--text-muted); }

/* Core Intelligence Grid (3.4.5 Upgrade) */
#intelligence-section { margin-top: -3rem; margin-bottom: 4rem; position: relative; z-index: 10; }
.intel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.intel-card { padding: 2.5rem 2rem; text-align: center; border-radius: 20px; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s; border: 1px solid rgba(255,255,255,0.03); }
.intel-card:hover { transform: translateY(-12px); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 229, 255, 0.1); border-color: rgba(0, 229, 255, 0.2); }
.intel-icon { font-size: 3rem; margin-bottom: 1.5rem; display: block; filter: drop-shadow(0 0 15px rgba(255,255,255,0.2)); }
.intel-card h3 { font-size: 1.4rem; margin-bottom: 1rem; color: #fff; font-weight: 700; }
.intel-card p { font-size: 1rem; color: var(--text-muted); line-height: 1.6; }

@media (max-width: 900px) {
    .intel-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    #intelligence-section { margin-top: 2rem; }
}

/* Final Polish: Executive Summary */
.exec-summary-wrap {
    margin-bottom: 2rem;
}
.exec-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--accent-cyan);
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.05), transparent);
}
.exec-icon { font-size: 2.5rem; filter: drop-shadow(0 0 10px var(--accent-cyan)); }
.exec-content h4 { margin-bottom: 0.2rem; color: var(--accent-cyan); text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.1em; }
.exec-summary-wrap p { font-size: 1.2rem; font-weight: 500; color: #fff; }

/* Step Badges */
.step-badge {
    background: rgba(0, 229, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 229, 255, 0.2);
    padding: 0.3rem 1.2rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-glow);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(6, 9, 19, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.2rem 2rem;
    z-index: 100;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* AI Intelligence Board (3.4.7 Upgrade) */
.intel-board-wrap { margin-bottom: 2.5rem; }
.intel-board-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.narrative-card { padding: 1.8rem; border-radius: 16px; border-left: 4px solid var(--accent-cyan); transition: transform 0.3s ease; display: flex; flex-direction: column; gap: 1rem; }
.narrative-card:hover { transform: translateY(-5px); border-color: #fff; }
.narrative-card[data-type="behavior"] { border-left-color: var(--accent-cyan); }
.narrative-card[data-type="risk"] { border-left-color: var(--accent-purple); }
.narrative-card[data-type="advice"] { border-left-color: var(--accent-blue); }

.intel-card-header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.2rem; }
.intel-card-icon { font-size: 1.5rem; }
.intel-card-label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.15em; color: var(--text-muted); text-transform: uppercase; }
.narrative-card p { font-size: 1.05rem; font-weight: 500; line-height: 1.5; color: #fff; }

/* Visual Color Pointers (3.4.9 Upgrade) */
.text-cyan { color: var(--accent-cyan); font-weight: 700; }
.text-purple { color: var(--accent-purple); font-weight: 700; }
.text-orange { color: var(--accent-orange); font-weight: 700; }

@media (max-width: 1000px) {
    .intel-board-grid { grid-template-columns: 1fr; }
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.05em;
}

.logo svg {
    width: 28px;
    height: 28px;
    fill: url(#logoGradient);
}

.header-nav { display: flex; gap: 2.5rem; }
.header-nav a { color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; }
.header-nav a:hover { color: var(--accent-cyan); }

/* Hero */
.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4rem;
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content { flex: 1; min-width: 300px; }
.hero-badge {
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.03);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    display: inline-block;
    color: var(--text-secondary);
}

.hero-title { font-size: 4rem; line-height: 1.1; margin-bottom: 1.5rem; }
.hero-sub {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin-bottom: 3rem;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}
.hstat { display: flex; flex-direction: column; }
.hstat-n { font-size: 2.5rem; font-weight: 700; color: var(--text-primary); font-family: var(--font-mono);}
.hstat-n span { color: var(--accent-cyan); }
.hstat-l { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px;}

.hero-visual { flex: 1; min-width: 300px; position: relative;}
.hero-visual::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.2) 0%, transparent 70%);
    z-index: -1;
    filter: blur(40px);
}

.hero-chart-mock {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    background-image: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
}

.mock-line {
    height: 120px;
    background: linear-gradient(90deg, rgba(157, 78, 221, 0.8), var(--accent-cyan));
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.2);
    clip-path: polygon(0% 100%, 0% 80%, 20% 70%, 40% 90%, 60% 40%, 80% 60%, 100% 20%, 100% 100%);
}

.mock-labels { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); font-family: var(--font-mono);}

/* Tabs & UI controls */
.tab-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    justify-content: center;
}

.tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: 0.3s;
    font-family: var(--font-sans);
    position: relative;
}

.tab::after {
    content: '';
    position: absolute;
    bottom: -17px; left: 0; width: 0%; height: 2px;
    background: var(--accent-cyan);
    transition: 0.3s;
}

.tab.active { color: var(--text-primary); }
.tab.active::after { width: 100%; box-shadow: var(--shadow-glow); }
.tab:hover { color: var(--text-primary); }

.tab-panel { display: none; animation: fadeIn 0.4s ease-out; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Upload Zone */
.upload-zone {
    background: rgba(10, 15, 30, 0.6);
    border: 1px dashed var(--glass-border-hover);
    border-radius: 30px;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--accent-cyan);
    background: rgba(0, 229, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.upload-icon svg {
    width: 64px; height: 64px;
    fill: none; stroke: var(--text-secondary);
    stroke-width: 1.5;
    margin-bottom: 1.5rem;
    transition: 0.3s;
}
.upload-zone:hover .upload-icon svg { stroke: var(--accent-cyan); }

.upload-text { font-size: 1.3rem; font-weight: 300; margin-bottom: 0.5rem; color: var(--text-primary);}
.upload-text strong { font-weight: 600; color: var(--accent-cyan); margin-right: 8px;}
.upload-hint { font-size: 0.85rem; color: var(--text-muted); font-family: var(--font-mono); }

/* Samples Grid */
.samples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.sample-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.sample-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.sample-card-icon svg { width: 32px; height: 32px; fill: var(--accent-cyan); margin-bottom: 1rem; }
.sample-card-name { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text-primary);}
.sample-card-desc { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1.2rem; }
.smeta { background: rgba(255,255,255,0.05); padding: 0.3rem 0.8rem; border-radius: 6px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted);}

/* Mapping Table */
.mapping-card {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    padding: 2.5rem;
}

.preview-table-wrap { flex: 2; min-width: 300px; }
.table-scroll { overflow-x: auto; border-radius: 12px; border: 1px solid var(--glass-border); }

table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.85rem; }
th, td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--glass-border); }
th { background: rgba(255,255,255,0.03); color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: 0.75rem;}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

.mapping-form { flex: 1; min-width: 300px; }
.map-row { margin-bottom: 1.5rem; }
.map-row label { display: block; font-weight: 500; margin-bottom: 0.5rem; color: var(--text-primary); }
.map-row select, .param-row input, .param-row select {
    width: 100%;
    background: rgba(10, 15, 25, 0.8);
    border: 1px solid var(--glass-border-hover);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: 0.3s;
    outline: none;
}
.map-row select:focus, .param-row input:focus, .param-row select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 1px var(--accent-cyan);
}
.map-hint { font-size: 0.8rem; color: var(--text-muted); display: block; margin-top: 0.4rem; }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), #00B8D4);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-sans);
    width: 100%;
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 229, 255, 0.5); }

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border-hover);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); border-color: var(--text-secondary); }

.btn-ghost { background: none; border: none; color: var(--text-secondary); cursor: pointer; transition: 0.2s;}
.btn-ghost:hover { color: var(--accent-cyan); }

/* Settings / Parameters */
.mode-toggle { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 2.5rem; }
.mode-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.2rem 2rem;
    cursor: pointer;
    transition: 0.3s;
    text-align: left;
    min-width: 200px;
    color: var(--text-primary);
}
.mode-btn.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 229, 255, 0.05);
    box-shadow: inset 0 0 0 1px var(--accent-cyan);
}
.mode-icon svg { width: 24px; height: 24px; fill: var(--text-muted); margin-bottom: 0.8rem; transition: 0.3s;}
.mode-btn.active .mode-icon svg { fill: var(--accent-cyan); }
.mode-label { font-weight: 600; display: block; font-size: 1.1rem; font-family: var(--font-sans); }
.mode-sub { font-size: 0.8rem; color: var(--text-secondary); font-family: var(--font-sans); }

.param-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.param-group { background: rgba(0,0,0,0.2); border-radius: 16px; padding: 1.5rem; border: 1px solid var(--glass-border); }
.param-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.param-row label { color: var(--text-secondary); font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem;}
.param-row input, .param-row select { width: 110px; padding: 0.5rem; text-align: right; }

.auto-summary { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.auto-item { background: rgba(0,0,0,0.3); padding: 0.6rem 1.2rem; border-radius: 8px; border: 1px solid var(--glass-border); display: flex; gap: 1rem; font-size: 0.9rem;}
.auto-item .av { color: var(--accent-cyan); font-family: var(--font-mono); font-weight: 600; }

.series-checks label { background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); border-radius: 8px; padding: 0.5rem 1rem; cursor: pointer;}
.series-checks input { margin-right: 0.5rem; }

/* Step 3: Detected Banner Dashboard */
.detected-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
}
.det-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    min-width: 180px;
    transition: all 0.3s;
}
.det-card:hover { 
    background: rgba(255,255,255,0.05); 
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}
.det-icon svg { width: 20px; height: 20px; fill: var(--accent-cyan); filter: drop-shadow(0 0 5px var(--accent-cyan)); }
.det-body { display: flex; flex-direction: column; }
.det-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-family: var(--font-mono); margin-bottom: 0.2rem;}
.det-value { font-size: 1rem; font-weight: 700; color: var(--text-primary); font-family: var(--font-mono); }

/* Loading State */
.loading-card { background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid var(--glass-border-hover); padding: 3rem; border-radius: 24px; text-align: center; max-width: 600px; margin: 0 auto;}
.spinner-ring {
    width: 60px; height: 60px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin: 0 auto 2rem;
}

.loading-steps { text-align: left; margin-top: 2rem; font-family: var(--font-mono); font-size: 0.85rem;}
.lstep { padding: 0.8rem 0; border-bottom: 1px solid var(--glass-border); color: var(--text-muted); display: flex; align-items: center; gap: 1rem;}
.lstep:last-child { border: none; }
.lstep svg { width: 16px; height: 16px; fill: currentColor; }
.lstep.active { color: var(--accent-cyan); font-weight: 600; }
.lstep.done { color: var(--success); opacity: 0.8; }

/* Charts */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.chart-card { background: var(--glass-bg); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 24px; padding: 2rem; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.full-width { grid-column: 1 / -1; width: 100%; }
.chart-title { font-weight: 700; margin-bottom: 2rem; font-size: 1.3rem; color: var(--text-primary); border-bottom: 1px solid var(--glass-border); padding-bottom: 1rem; letter-spacing: 0.5px;}
.chart-container { height: 400px; width: 100%; transition: height 0.3s ease;}
.chart-main { height: 550px; }
.chart-half { height: 350px; }

.top-charts-row {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
    grid-column: 1 / -1;
}
@media (max-width: 1200px) {
    .top-charts-row { grid-template-columns: 1fr; }
}

/* Metrics */
.metrics-card, .sc-metrics-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 24px; padding: 2rem; margin-top: 2rem; }
.metrics-table-wrap { overflow-x: auto; }

/* Toast */
.toast { position: fixed; bottom: 2rem; right: 2rem; background: rgba(20, 0, 0, 0.9); border: 1px solid var(--danger); backdrop-filter: blur(10px); padding: 1rem 1.5rem; border-radius: 12px; display: flex; gap: 1rem; align-items: flex-start; box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2); z-index: 1000; animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.toast-icon svg { width: 20px; height: 20px; fill: var(--danger); }
.toast-body hstrong { display: block; color: var(--danger); margin-bottom: 0.2rem; }
.toast-body p { color: var(--text-primary); font-size: 0.9rem; margin:0;}
.toast-close { background: none; border: none; color: white; cursor: pointer; opacity: 0.5; font-size: 1.2rem; }
.toast-close:hover { opacity: 1; }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Theory */
.theory-placeholder { color: var(--text-muted); font-style: italic; }
.theory-body { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.theory-item { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--glass-border); border-radius: 12px; padding: 1.2rem; display: flex; gap: 1.2rem; align-items: flex-start; transition: transform 0.3s; }
.theory-item:hover { transform: translateX(5px); background: rgba(255, 255, 255, 0.05); }
.theory-step-num { min-width: 32px; height: 32px; background: var(--accent-cyan); color: black; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-family: var(--font-mono); font-size: 0.9rem; }
.theory-content h4 { color: var(--text-primary); margin-bottom: 0.4rem; font-size: 1rem; }
.theory-content p { color: var(--text-muted); font-size: 0.9rem; margin: 0; line-height: 1.5; }

.hidden { display: none !important; }

/* Supply Chain Metrics Grid */
.sc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.sc-tile { background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border); padding: 1.5rem; border-radius: 16px; text-align: center; }
.sc-tile.hl { border-color: var(--accent-cyan); background: rgba(0, 229, 255, 0.05); }
.sc-tile-label { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.8rem; text-transform: uppercase; font-family: var(--font-mono); }
.sc-tile-value { font-size: 2rem; font-weight: 700; color: var(--text-primary); font-family: var(--font-mono); }
.sc-tile.hl .sc-tile-value { color: var(--accent-cyan); text-shadow: var(--shadow-glow); }
.sc-tile-unit { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; }
.sc-tile-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--glass-border);
    line-height: 1.4;
    transition: color 0.3s;
}
.sc-tile:hover .sc-tile-desc { color: var(--text-secondary); }

.cost-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.cost-item { background: rgba(157, 78, 221, 0.05); border: 1px solid rgba(157, 78, 221, 0.2); padding: 1.5rem; border-radius: 16px; display: flex; justify-content: space-between; align-items: center;}
.cost-label { color: var(--text-secondary); font-family: var(--font-sans); font-weight: 500; }
.cost-value { color: var(--accent-purple); font-size: 1.4rem; font-weight: 700; font-family: var(--font-mono); }

/* Chart Explanations */
.chart-explanation {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(0,0,0,0.2);
    border-left: 3px solid var(--accent-cyan);
    border-radius: 4px 12px 12px 4px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.chart-explanation strong {
    color: var(--text-primary);
}

/* Noob-Friendly Executive Summary Card */
.sc-executive-summary {
    margin-bottom: 2rem;
}
.summary-card {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(157, 78, 221, 0.1));
    border: 1px solid var(--accent-cyan);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
}
.summary-icon svg { width: 32px; height: 32px; fill: var(--accent-cyan); }
.summary-text { font-size: 1.1rem; line-height: 1.6; color: var(--text-primary); }
.summary-text strong { color: var(--accent-cyan); text-shadow: 0 0 10px rgba(0, 229, 255, 0.5); }

/* AI Trust / Reliability Meter */
.trust-score-bar {
    margin: 1rem 0 1.5rem;
}
.trust-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem 1.75rem;
    backdrop-filter: blur(12px);
}
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.insight-pill {
    background: rgba(0, 229, 255, 0.05);
    border-left: 3px solid var(--accent-blue);
    padding: 0.35rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
    border-radius: 4px;
    letter-spacing: 0.5px;
    display: flex;
    gap: 0.5rem;
}
.insight-pill span { color: var(--accent-blue); }
.trust-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.trust-score {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}
.trust-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.trust-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.trust-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   DATA TRANSPARENCY MODAL
═══════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeInOverlay 0.3s ease;
}
@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }
.modal-overlay.hidden { display: none; }

.modal-panel {
    background: linear-gradient(145deg, rgba(15, 20, 38, 0.98), rgba(22, 28, 50, 0.98));
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 780px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 60px rgba(0, 229, 255, 0.08), 0 30px 80px rgba(0,0,0,0.6);
    animation: slideUpModal 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slideUpModal {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.75rem 2rem 1rem;
    border-bottom: 1px solid var(--glass-border);
}
.modal-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.modal-icon {
    width: 28px;
    height: 28px;
    fill: var(--accent-cyan);
    filter: drop-shadow(0 0 6px var(--accent-cyan));
}
.modal-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.modal-close {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,23,68,0.15); border-color: var(--danger); }
.modal-close svg { width: 18px; height: 18px; stroke: var(--text-secondary); }
.modal-close:hover svg { stroke: var(--danger); }

/* ═══════════════════════════════════════════════════════════
   CHART FOOTER CONTROLS (RESTORED BELOW GRAPH)
   ═══════════════════════════════════════════════════════════ */
.chart-footer-toolbar {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--panel-border);
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.btn-range {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-main);
}

.btn-range:hover {
    border-color: var(--accent-blue);
    color: #fff;
    background: rgba(0, 229, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════
   DIAGNOSTIC MODAL (3.1.3 UPGRADE)
   ═══════════════════════════════════════════════════════════ */
.diagnostic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.diag-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    padding: 1rem;
    border-radius: 6px;
}

.diag-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.diag-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-mono);
}

.diag-full-section {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.diag-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.strategy-callout {
    background: rgba(0, 229, 255, 0.08);
    border-left: 4px solid var(--accent-blue);
    padding: 0.75rem 1rem;
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0 4px 4px 0;
}

.diag-status-excellent { color: #00E676; }
.diag-status-caution { color: #FFD600; }

.modal-subtitle {
    padding: 0.75rem 2rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,229,255,0.2) transparent;
}
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(0,229,255,0.2); border-radius: 99px; }

.modal-footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
}

/* Report Sections */
.report-section { display: flex; flex-direction: column; gap: 0.5rem; }
.report-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-sm);
}
.report-icon { font-size: 1.1rem; }
.report-section-title { font-weight: 700; font-size: 0.95rem; letter-spacing: 0.3px; }

.report-table { width: 100%; border-collapse: collapse; }
.report-table tr { border-bottom: 1px solid rgba(255,255,255,0.04); }
.report-table tr:last-child { border-bottom: none; }
.report-key {
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: var(--font-mono);
    width: 38%;
    vertical-align: top;
}
.report-val {
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.5;
    vertical-align: top;
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL POLISH UPGRADES
═══════════════════════════════════════════════════════════ */

/* Better button states */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), #0096aa);
    color: #000;
    font-weight: 700;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 99px;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    transition: all 0.25s;
    box-shadow: 0 0 20px rgba(0,229,255,0.25);
    letter-spacing: 0.3px;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0,229,255,0.45);
}

/* Improved chart card hover */
.chart-card {
    transition: border-color 0.3s, box-shadow 0.3s;
}
.chart-card:hover {
    border-color: rgba(0,229,255,0.15);
    box-shadow: 0 12px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,229,255,0.06);
}

/* Enhanced section borders */
.section { border-bottom: 1px solid rgba(255,255,255,0.04); }

/* Glowing SC tiles */
.sc-tile.hl {
    background: linear-gradient(135deg, rgba(0,229,255,0.08), rgba(157,78,221,0.08));
    border-color: rgba(0,229,255,0.25);
    box-shadow: 0 0 24px rgba(0,229,255,0.08);
}
.sc-tile.hl:hover {
    box-shadow: 0 0 32px rgba(0,229,255,0.18);
    transform: translateY(-4px);
}

/* ═══════════════════════════════════════════════════════════
   SMART TOOLTIP (3-second delay hover)
═══════════════════════════════════════════════════════════ */
.smart-tooltip {
    position: absolute;
    top: 0; left: 0;
    z-index: 9999;
    max-width: 280px;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(15, 20, 40, 0.97), rgba(25, 30, 58, 0.97));
    border: 1px solid rgba(0, 229, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(0,229,255,0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: normal;
    word-break: break-word;
}
.smart-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   MANUAL MODE PARAMETER GUIDE
═══════════════════════════════════════════════════════════ */
.manual-guide {
    background: linear-gradient(135deg, rgba(157,78,221,0.07), rgba(0,229,255,0.05));
    border: 1px solid rgba(157,78,221,0.25);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: 2rem;
}
.guide-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    color: var(--accent-purple);
    font-size: 1rem;
}
.guide-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    fill: var(--accent-purple);
}
.guide-intro {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.guide-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: border-color 0.2s;
}
.guide-item:hover { border-color: rgba(157,78,221,0.3); }
.guide-param {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-purple);
    font-family: var(--font-mono);
    margin-bottom: 0.35rem;
}
.guide-explain {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.guide-rec {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--accent-cyan);
    opacity: 0.85;
}
.guide-warning {
    background: rgba(255,23,68,0.07);
    border: 1px solid rgba(255,23,68,0.2);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-size: 0.83rem;
    color: #FF6B6B;
    line-height: 1.5;
}

/* Trust score warning sub-line */
.trust-warning {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--accent-orange);
    background: rgba(255,152,0,0.08);
    border-radius: 6px;
    padding: 0.4rem 0.7rem;
    line-height: 1.4;
    border-left: 2px solid var(--accent-orange);
}
/* ═══════════════════════════════════════════════════════════
   DATA SOURCES RECOMMENDATION (3.1.5)
   ═══════════════════════════════════════════════════════════ */
.data-sources-tip {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.data-sources-tip strong {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.source-cards {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.source-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    min-width: 140px;
    justify-content: center;
}
.source-card svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    opacity: 0.8;
}
.source-card:hover {
    background: rgba(0, 229, 255, 0.08);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 229, 255, 0.1);
}
.source-card:hover svg {
    opacity: 1;
}
.chip-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE DESIGN SYSTEM (3.2)
   ═══════════════════════════════════════════════════════════ */

/* --- Tablet (1024px) --- */
@media screen and (max-width: 1024px) {
    .container-fluid { padding: 0 2rem; }
    h1 { font-size: 2.8rem; }
    .guide-steps { flex-wrap: wrap; gap: 2rem; }
    .dashboard-container { flex-direction: column; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--glass-border); }
}

/* --- Mobile (768px) --- */
@media screen and (max-width: 768px) {
    :root {
        --radius-lg: 16px;
    }

    /* Core Layout */
    .container { padding: 0 1rem; }
    .container-fluid { padding: 0 1rem; }
    .section { padding: 2.5rem 0; }

    /* Typography */
    h1 { font-size: 2rem; line-height: 1.2; }
    h2 { font-size: 1.6rem; }
    .hero-title { font-size: 2.2rem !important; }
    .hero-subtitle { font-size: 1rem; }

    /* Header Navigation */
    .site-header { padding: 1rem; }
    .header-inner { flex-direction: column; gap: 1rem; text-align: center; }
    .header-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; font-size: 0.85rem; }

    /* Hero Section */
    .hero { padding: 4rem 0 2rem 0; text-align: center; }
    .hero-content { align-items: center; }

    /* Guide & Features */
    .welcome-guide { margin-top: 1rem; }
    .guide-steps { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .g-arrow { display: none; } /* Hide arrows on vertical stack */

    /* Dashboard & Tabs */
    .dashboard-tabs { 
        display: flex; 
        overflow-x: auto; 
        padding-bottom: 0.5rem; 
        -webkit-overflow-scrolling: touch; 
        justify-content: flex-start;
        gap: 0.5rem;
    }
    .tab-btn { white-space: nowrap; padding: 0.6rem 1rem; font-size: 0.8rem; }

    /* Source Cards (REDESIGN) */
    .source-cards { flex-direction: column; gap: 0.75rem; }
    .source-card { width: 100%; min-width: 0; }

    /* Modals & Forms */
    .modal-content { width: 95% !important; margin: 5vh auto; padding: 1.5rem; }
    .insight-grid { grid-template-columns: 1fr !important; }
    
    /* Charts */
    .chart-container { height: 350px !important; }
}

/* --- Small Mobile (480px) --- */
@media screen and (max-width: 480px) {
    .logo span { font-size: 1.2rem; }
    .hero-title { font-size: 1.8rem !important; }
    .exec-card { flex-direction: column; text-align: center; padding: 1rem; }
    .exec-icon { font-size: 2rem; }
}

/* ═══════════════════════════════════════════════════════════
   DIAGNOSTIC MODAL REFINEMENTS (3.1.5)
   ═══════════════════════════════════════════════════════════ */
.diag-sub-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    line-height: 1.4;
    font-weight: 400;
}
.diag-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.diag-value {
    transition: all 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════
   DATASET REQUIREMENTS GUIDE (3.2)
   ═══════════════════════════════════════════════════════════ */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    margin-bottom: 3rem;
}

.requirements-card {
    padding: 1.8rem;
    background: rgba(0, 229, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.requirements-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--accent-cyan);
    opacity: 0.5;
}

.requirements-card h4 {
    color: var(--accent-cyan);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.2rem;
}

.req-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.req-list li strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.req-list li span {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: block;
}

.map-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

@media screen and (max-width: 900px) {
    .upload-grid { grid-template-columns: 1fr; }
    .requirements-card { order: 2; }
}

/* ═══════════════════════════════════════════════════════════
   PRODUCTION FOOTER (3.4)
   ═══════════════════════════════════════════════════════════ */
.main-footer {
    padding: 4rem 0 3rem;
    margin-top: 6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    background: linear-gradient(to bottom, transparent, rgba(10, 15, 45, 0.4));
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-info strong {
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    background: linear-gradient(90deg, #fff, #a0aec0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-dot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4ade80 !important;
    font-weight: 500;
}

@media screen and (max-width: 600px) {
    .footer-grid {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Strategic Highlights for Narrative (3.7.0) */
.hl-red { color: #FF1744; font-weight: 700; text-shadow: 0 0 8px rgba(255, 23, 68, 0.3); }
.hl-green { color: #00E676; font-weight: 700; text-shadow: 0 0 8px rgba(0, 230, 118, 0.3); }
.hl-gold { color: #FFD600; font-weight: 700; text-shadow: 0 0 8px rgba(255, 214, 0, 0.3); }
.hl-purple { color: #9D4EDD; font-weight: 700; text-shadow: 0 0 8px rgba(157, 78, 221, 0.3); }
.hl-cyan { color: #00E5FF; font-weight: 700; text-shadow: 0 0 8px rgba(0, 229, 255, 0.3); }
.hl-orange { color: #FF9800; font-weight: 700; text-shadow: 0 0 8px rgba(255, 152, 0, 0.3); }

/* Results Actions Distributed Layout */
.results-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.results-actions button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 140px;
}

.results-actions button:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.btn-icon {
    width: 28px;
    height: 28px;
    fill: currentColor;
    opacity: 0.9;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.1));
}

.results-actions button span {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.results-actions button:hover span {
    color: #fff;
}

/* --- Forecast Spotlight (3.4.14 Upgrade) --- */
.spotlight-row {
  width: 100%;
  margin-top: 2rem;
  margin-bottom: 3rem;
  animation: slideUp 0.8s ease-out;
}

.spotlight-card {
  border: 1px solid rgba(157, 78, 221, 0.2) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3) !important;
}

.spotlight-title {
  color: #FFD600 !important;
  font-size: 1.4rem !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.chart-spotlight {
  height: 500px !important;
}

.chart-subtitle {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: -10px;
  margin-bottom: 20px;
}

/* Strategy Insights Upgrade (3.4.19) */
.strategy-insights-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 1.5rem;
}

.strategy-insights-row {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.insight-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    min-width: 220px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.insight-badge::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--primary);
    opacity: 0.6;
}

.insight-badge:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.insight-icon {
    width: 18px;
    height: 18px;
    fill: var(--text-dim);
    opacity: 0.8;
}

.insight-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #a0aec0;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.insight-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    animation: insightScale 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes insightScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Strategic Risk Status Colors */
.risk-safe {
    border-left: 4px solid #00E676;
    background: rgba(0, 230, 118, 0.05) !important;
}

.risk-warning {
    border-left: 4px solid #FFD600;
    background: rgba(255, 214, 0, 0.05) !important;
}

.risk-danger {
    border-left: 4px solid #FF1744;
    background: rgba(255, 23, 68, 0.05) !important;
}

.risk-alert { /* Legacy support */
    border-left: 4px solid #FF1744;
    background: rgba(255, 23, 68, 0.03);
}
