/* ==========================================================================
   IQUANT ACADEMY — UNIFIED STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ARTICLE BASE LAYOUT & TYPOGRAPHY
   -------------------------------------------------------------------------- */
.article-header-block {
    padding: 60px 0 40px 0;
    border-bottom: 1px solid var(--bs-border-color);
    background: linear-gradient(180deg, rgba(var(--bs-primary-rgb), 0.03) 0%, transparent 100%);
    margin-bottom: 40px;
}

.article-container {
    max-width: 900px;
    margin: 0 auto;
}

.article-content p {
    color: var(--bs-body-color);
    opacity: 0.9;
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.article-content h3 {
    color: var(--bs-body-color);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    color: var(--bs-body-color);
    opacity: 0.9;
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   2. ARTICLE NAVIGATION & DIVIDERS
   -------------------------------------------------------------------------- */
.parts-navigator {
    background: rgba(128, 128, 128, 0.02);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 40px;
}

.part-nav-item {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--iq-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.part-nav-item.active {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

.part-divider {
    position: relative;
    text-align: center;
    margin: 50px 0;
}

.part-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--bs-border-color);
    z-index: 1;
}

.part-divider-btn {
    position: relative;
    z-index: 2;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 20px;
    padding: 6px 20px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: bold;
    font-size: 0.85rem;
    color: var(--iq-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Related articles recommendation cards */
.related-card {
    background-color: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--bs-body-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-card:hover {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.02);
    color: var(--bs-body-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.related-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
}

/* --------------------------------------------------------------------------
   3. UI COMPONENTS (Concept Cards, Callouts, CTA Banners)
   -------------------------------------------------------------------------- */
.article-widget {
    background-color: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.concept-card {
    background: rgba(128, 128, 128, 0.03);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.concept-card:hover {
    transform: translateY(-6px);
    border-color: var(--bs-primary);
    box-shadow: 0 12px 30px rgba(var(--bs-primary-rgb), 0.15);
}

.concept-card > div:not(.concept-icon) {
    flex: 1;
    min-width: 0;
}

.concept-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.article-callout {
    background: rgba(var(--bs-primary-rgb), 0.05);
    border-left: 4px solid var(--bs-primary);
    padding: 24px;
    border-radius: 0 16px 16px 0;
    margin: 30px 0;
}

.article-callout p {
    margin: 0;
    font-size: 1.05rem;
}

.cta-banner {
    background: var(--bs-card-bg);
    border: 2px solid var(--bs-primary);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(var(--bs-primary-rgb), 0.1);
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: var(--bs-primary);
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   4. CONSOLES, FORMS & RESULT CARDS (Calculators)
   -------------------------------------------------------------------------- */
.rentier-console,
.wi-console,
.margin-console,
.pnl-widget-box,
.dca-console,
.spec-widget-box,
.season-widget-box,
.radar-console,
.screener-console {
    background: rgba(128, 128, 128, 0.02);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 24px;
}

.rentier-form-grid,
.wi-form-grid,
.margin-form-grid,
.pnl-form-grid,
.spec-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.wi-sliders-row,
.rentier-form-row-full,
.pnl-form-row-full {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.dca-input-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
    align-items: center;
}

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

.rentier-result-card,
.wi-result-card,
.margin-result-card,
.pnl-result-card,
.dca-result-card,
.spec-result-card,
.receipt-box {
    background: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.rentier-result-row,
.wi-result-row,
.margin-result-row,
.pnl-result-row,
.dca-result-row,
.spec-result-row,
.receipt-row-scr,
.simulation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--bs-border-color);
}

.rentier-result-row:last-child,
.wi-result-row:last-child,
.margin-result-row:last-child,
.pnl-result-row:last-child,
.dca-result-row:last-child,
.spec-result-row:last-child,
.receipt-row-scr:last-child,
.simulation-row:last-child {
    border-bottom: none;
}

/* Range Inputs */
.rentier-range,
.wi-range,
.pnl-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(128, 128, 128, 0.2);
    outline: none;
    margin-top: 10px;
}

.rentier-range::-webkit-slider-thumb,
.wi-range::-webkit-slider-thumb,
.pnl-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bs-primary);
    cursor: pointer;
}

/* Gauges & Progress bars */
.riskometer-container,
.score-progress-container {
    height: 8px;
    background: rgba(128, 128, 128, 0.15);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 5px;
}

.riskometer-bar,
.score-progress-bar {
    height: 100%;
    width: 100%;
    background-color: #10b981;
    transition: width 0.5s ease-out, background-color 0.5s;
}

.iq-gauge-track-mock {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #10b981 0%, #f59e0b 70%, #ef4444 100%);
    position: relative;
    margin-top: 15px;
    margin-bottom: 10px;
}

.iq-gauge-marker-mock {
    position: absolute;
    top: -8px;
    width: 24px;
    height: 24px;
    background-color: var(--bs-card-bg);
    border: 5px solid #ef4444;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-50%);
    left: 95%;
}

.compounding-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.compounding-card {
    background: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    padding: 20px;
}

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

/* --------------------------------------------------------------------------
   5. SPECIFIC WIDGETS & DIAGRAMS
   -------------------------------------------------------------------------- */

/* A. Radar & Scores */
.radar-selector-btn,
.preset-selector-btn {
    width: 100%;
    text-align: left;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-card-bg);
    color: var(--bs-body-color);
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.radar-selector-btn.active,
.preset-selector-btn.active {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    color: var(--bs-primary);
}

.svg-grid-line {
    stroke: var(--bs-border-color);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.svg-axis-line {
    stroke: var(--bs-body-color);
    opacity: 0.3;
    stroke-width: 1.5;
    stroke-dasharray: 2 4;
}

.svg-dynamic-poly {
    stroke-width: 2.5;
    stroke-linejoin: round;
    transition: points 0.5s ease-out, fill 0.5s, stroke 0.5s;
}

.svg-radar-text {
    fill: var(--bs-body-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: bold;
    text-anchor: middle;
}

.svg-radar-val {
    fill: var(--iq-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    text-anchor: middle;
}

.svg-legend-text {
    fill: var(--bs-body-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: bold;
    text-anchor: start;
}

/* B. Linear Regression & Graham Value */
.linreg-svg-container {
    background: rgba(128, 128, 128, 0.02);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.svg-line-mediana { stroke: var(--bs-body-color); stroke-width: 2; stroke-dasharray: 6 6; opacity: 0.5; }
.svg-line-sigma15 { stroke: var(--bs-primary); stroke-width: 2; opacity: 0.7; }
.svg-line-sigma20 { stroke: #ef4444; stroke-width: 2; stroke-dasharray: 4 4; opacity: 0.8; }
.svg-area-buy { fill: rgba(16, 185, 129, 0.05); }
.svg-line-price { fill: none; stroke: var(--bs-body-color); stroke-width: 3; stroke-linejoin: round; }
.svg-line-graham { stroke: #10b981; stroke-width: 3; opacity: 0.9; }
.svg-text-label { fill: var(--bs-body-color); font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: bold; }

.math-formula-box {
    background: rgba(128, 128, 128, 0.03);
    border: 1px dashed var(--bs-border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
}

.math-formula {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--bs-body-color);
    letter-spacing: 2px;
}

.math-hl { color: var(--bs-primary); }

.fv-mockup-card {
    background: rgba(var(--bs-primary-rgb), 0.05);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

/* C. HFT Terminal & Anomaly Cards */
.hft-terminal {
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 24px;
    color: #c9d1d9;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    border-bottom: 1px solid #30363d;
    padding-bottom: 12px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #8b949e;
}

.terminal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.term-badge-alert {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ff7b72;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.prob-bar {
    height: 10px;
    background: #21262d;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 15px;
    margin-bottom: 5px;
}

.prob-fill {
    height: 100%;
    background: #58a6ff;
    width: 73%;
}

.anomaly-type-card {
    background: rgba(128, 128, 128, 0.02);
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
    padding: 24px;
    height: 100%;
    transition: transform 0.2s, border-color 0.2s;
}

.anomaly-type-card:hover {
    transform: translateY(-3px);
    border-color: var(--bs-primary);
}

.anomaly-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.hft-console {
    background: rgba(128, 128, 128, 0.02);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 24px;
}

.flow-bar-mock {
    height: 12px;
    border-radius: 6px;
    width: 100%;
    display: flex;
    overflow: hidden;
    margin: 10px 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.flow-buy-mock { background-color: #10b981; }
.flow-sell-mock { background-color: #ef4444; }

.spoof-card-mock {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
}

/* D. Swing Setup Tickets & VS Cards */
.setup-ticket {
    background: var(--bs-card-bg);
    border: 2px solid #10b981;
    border-radius: 14px;
    padding: 24px;
    position: relative;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.1);
}

.ticket-price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.ticket-price-box {
    background: rgba(128, 128, 128, 0.03);
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}

.vs-card {
    background: rgba(128, 128, 128, 0.03);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.vs-card.danger { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.05); }
.vs-card.success { border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.05); }
.vs-card.warning { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.05); }
.vs-card.info { border-color: rgba(59, 130, 246, 0.4); background: rgba(59, 130, 246, 0.05); }

.vs-metric { margin: 15px 0; }
.vs-metric-val { font-family: 'JetBrains Mono', monospace; font-size: 1.4rem; font-weight: 700; }
.vs-metric-lbl { font-size: 0.75rem; color: var(--iq-muted); text-transform: uppercase; font-weight: bold; letter-spacing: 0.5px; }

/* E. Pivots, PnF & Market Matrices */
.pivot-ladder {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 25px 0;
}

.ladder-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid var(--bs-border-color);
    background: rgba(128, 128, 128, 0.02);
    font-family: 'JetBrains Mono', monospace;
    transition: transform 0.2s ease;
}

.ladder-row:hover { transform: scale(1.01); }
.ladder-row.r2 { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.02); }
.ladder-row.r1 { border-color: rgba(239, 68, 68, 0.15); background: rgba(239, 68, 68, 0.01); }
.ladder-row.pivot { border-color: rgba(99, 102, 241, 0.3); background: rgba(99, 102, 241, 0.02); }
.ladder-row.s1 { border-color: rgba(16, 185, 129, 0.15); background: rgba(16, 185, 129, 0.01); }
.ladder-row.s2 { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.02); }

.ladder-row.current {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.08);
    box-shadow: 0 0 15px rgba(var(--bs-primary-rgb), 0.1);
    position: relative;
}

.pulse-dot-piv {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--bs-primary);
    box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0.7);
    animation: pulse-piv 1.5s infinite;
}

@keyframes pulse-piv {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(var(--bs-primary-rgb), 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0); }
}

.ladder-label { font-weight: 700; font-size: 0.9rem; }
.ladder-val { font-weight: 700; font-size: 1.1rem; }
.ladder-dist { font-size: 0.75rem; color: var(--iq-muted); margin-left: 10px; }

.piv-grid-compare {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

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

.piv-compare-card {
    background: rgba(128, 128, 128, 0.02);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.piv-compare-card.fibo { border-color: rgba(99, 102, 241, 0.3); }
.piv-compare-card.cama { border-color: rgba(245, 158, 11, 0.3); }
.piv-compare-card.wood { border-color: rgba(16, 185, 129, 0.3); }

.piv-card-header {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bs-border-color);
}

.piv-visual-ladder {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.piv-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--bs-border-color);
}

.piv-line.r { color: #ef4444; border-color: rgba(239, 68, 68, 0.2); background: rgba(239, 68, 68, 0.02); }
.piv-line.s { color: #10b981; border-color: rgba(16, 185, 129, 0.2); background: rgba(16, 185, 129, 0.02); }
.piv-line.p { color: #6366f1; border-color: rgba(99, 102, 241, 0.2); background: rgba(99, 102, 241, 0.02); }

.pnf-matrix-mock {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 25px 0;
    font-family: 'JetBrains Mono', monospace;
}

.pnf-col-mock {
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
    width: 32px;
}

.pnf-box-mock {
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    border: 1px solid var(--bs-border-color);
}

.pnf-box-mock.x { color: #10b981; background-color: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.25); }
.pnf-box-mock.o { color: #ef4444; background-color: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.25); }
.pnf-box-mock.breakout { color: #fff; background-color: #10b981; border-color: #10b981; box-shadow: 0 0 12px rgba(16, 185, 129, 0.4); }

/* F. Open Interest & Radar Components */
.oi-balance-mock {
    background: rgba(128, 128, 128, 0.02);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 24px;
}

.oi-bias-bar {
    height: 12px;
    border-radius: 6px;
    width: 100%;
    display: flex;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.bias-long { background-color: #10b981; }
.bias-short { background-color: #ef4444; }

.oi-legend-row {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.oi-participant-block { margin-bottom: 25px; }
.oi-participant-title { display: flex; align-items: center; margin-bottom: 15px; }
.oi-bar-container { display: flex; align-items: center; margin-bottom: 10px; gap: 15px; }
.oi-label { width: 60px; font-weight: bold; font-size: 0.85rem; color: var(--iq-muted); text-transform: uppercase; }
.oi-track { flex-grow: 1; height: 16px; background: rgba(128, 128, 128, 0.05); border-radius: 8px; overflow: hidden; border: 1px solid var(--bs-border-color); }
.oi-fill-long { background: linear-gradient(90deg, #10b981 0%, #059669 100%); height: 100%; border-radius: 8px; transition: width 1s ease; }
.oi-fill-short { background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%); height: 100%; border-radius: 8px; transition: width 1s ease; }
.oi-value { width: 80px; text-align: right; font-family: 'JetBrains Mono', monospace; font-weight: bold; color: var(--bs-body-color); font-size: 0.9rem; }

.whale-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.1) 0%, transparent 100%);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
}

.whale-multiplier {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--bs-primary);
    line-height: 1;
}

/* G. MTF & VDR Signal Matrices */
.mtf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.mtf-box {
    background: rgba(128, 128, 128, 0.03);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    transition: transform 0.2s ease;
}

.mtf-box.buy { background: rgba(16, 185, 129, 0.05); border-color: rgba(16, 185, 129, 0.4); }
.mtf-box.neutral { background: rgba(245, 158, 11, 0.05); border-color: rgba(245, 158, 11, 0.4); }
.mtf-label { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--bs-body-color); font-weight: bold; margin-bottom: 8px; }
.mtf-signal { font-family: 'JetBrains Mono', monospace; font-size: 1.3rem; font-weight: 800; }
.text-buy { color: #10b981; }
.text-neutral { color: #f59e0b; }

.mtf-mockup-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
@media (min-width: 576px) { .mtf-mockup-grid { grid-template-columns: repeat(5, 1fr); } }

.mtf-card-mock {
    background-color: rgba(128, 128, 128, 0.03);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.mtf-card-mock.active-buy { border-color: rgba(16, 185, 129, 0.5); background-color: rgba(16, 185, 129, 0.05); }
.mtf-card-mock.active-sell { border-color: rgba(239, 68, 68, 0.5); background-color: rgba(239, 68, 68, 0.05); }
.mtf-tf { font-size: 0.8rem; font-weight: bold; color: var(--bs-body-color); text-transform: uppercase; margin-bottom: 5px; }
.mtf-sig { font-family: 'JetBrains Mono', monospace; font-size: 1.2rem; font-weight: bold; margin: 0; }
.mtf-bars { font-size: 0.65rem; color: var(--iq-muted); font-family: 'JetBrains Mono', monospace; margin-top: 5px; }

/* H. Heatmaps (Seasonality) */
.hm-widget-grid {
    display: grid;
    grid-template-columns: 80px repeat(5, 1fr);
    gap: 8px;
    margin: 25px 0;
}

@media (max-width: 576px) {
    .hm-widget-grid { grid-template-columns: 50px repeat(5, 1fr); gap: 4px; }
}

.hm-header-col {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--iq-muted);
    text-align: center;
    padding-bottom: 5px;
}

.hm-label-row {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--bs-border-color);
    padding-right: 8px;
}

.hm-cell-mock {
    aspect-ratio: 1.5;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: #111 !important;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hm-cell-mock:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.cell-strong-up { background-color: rgba(16, 185, 129, 0.9); }
.cell-up { background-color: rgba(16, 185, 129, 0.45); }
.cell-neutral { background-color: rgba(128, 128, 128, 0.15); color: var(--bs-body-color) !important; }
.cell-down { background-color: rgba(239, 68, 68, 0.45); }
.cell-strong-down { background-color: rgba(239, 68, 68, 0.9); }

.hm-cell-tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #141414;
    border: 1px solid var(--bs-border-color);
    padding: 10px 14px;
    border-radius: 8px;
    width: 160px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, bottom 0.2s ease;
    z-index: 100;
    color: #fff;
}

.hm-cell-mock:hover .hm-cell-tooltip {
    opacity: 1;
    bottom: 140%;
}

.tt-title { font-size: 0.7rem; color: #888; text-transform: uppercase; margin-bottom: 4px; font-weight: bold; }
.tt-stat { display: flex; justify-content: space-between; font-size: 0.75rem; margin-bottom: 2px; }

/* I. Option Desk Specific Components */
.board-map-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 8px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    margin: 25px 0;
}

.bm-block { padding: 15px; border-radius: 8px; border: 1px solid var(--bs-border-color); font-weight: bold; }
.bm-calls { background: rgba(16, 185, 129, 0.05); color: #10b981; border-color: rgba(16, 185, 129, 0.2); }
.bm-puts { background: rgba(239, 68, 68, 0.05); color: #ef4444; border-color: rgba(239, 68, 68, 0.2); }
.bm-strikes { background: rgba(128, 128, 128, 0.05); color: var(--bs-body-color); }
.bm-atm { outline: 2px solid var(--bs-primary); background: rgba(var(--bs-primary-rgb), 0.15) !important; color: var(--bs-primary) !important; }

.balance-grid { display: flex; gap: 20px; margin: 30px 0; }
@media (max-width: 768px) { .balance-grid { flex-direction: column; } }

.bal-card {
    flex: 1;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--bs-border-color);
    background: rgba(128, 128, 128, 0.01);
    display: flex;
    flex-direction: column;
}

.bal-card.neutral { border-left: 4px solid var(--bs-primary); background: rgba(var(--bs-primary-rgb), 0.02); }
.bal-title { font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.bal-val { font-family: 'JetBrains Mono', monospace; font-size: 1.4rem; font-weight: 700; margin-bottom: 5px; }

.thermometer-container {
    height: 16px;
    border-radius: 8px;
    background: rgba(128, 128, 128, 0.2);
    overflow: hidden;
    position: relative;
    margin: 20px 0;
}

.thermo-bar {
    height: 100%;
    width: 95%;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
}

.pain-ledger { display: flex; flex-direction: column; gap: 15px; margin: 30px 0; }
.ledger-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: rgba(128, 128, 128, 0.02);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
}

.led-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}

.led-body { flex-grow: 1; }

.payoff-grid-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 30px 0;
}

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

.gallery-item {
    background: rgba(128, 128, 128, 0.02);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.gallery-svg {
    height: 100px;
    width: 100%;
    background: rgba(128, 128, 128, 0.01);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    margin-bottom: 12px;
}

.payoff-line { fill: none; stroke: var(--bs-primary); stroke-width: 3; stroke-linecap: round; }
.payoff-zero { stroke: var(--bs-border-color); stroke-width: 1.5; stroke-dasharray: 4 4; }
.payoff-fill-profit { fill: rgba(16, 185, 129, 0.15); }
.payoff-fill-loss { fill: rgba(239, 68, 68, 0.1); }

.decoder-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 30px 0;
}

.dec-block {
    padding: 10px 15px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 800;
    text-align: center;
    min-width: 60px;
}

.dec-underlying { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
.dec-strike { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.3); }
.dec-type { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.dec-year { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }

.dec-legend-item { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 0.95rem; }
.dec-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

.math-pipeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(128, 128, 128, 0.02);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
}

.pipe-step { display: flex; align-items: center; gap: 15px; }
.pipe-num { width: 32px; height: 32px; border-radius: 50%; background: var(--bs-primary); color: #111; display: flex; align-items: center; justify-content: center; font-weight: bold; font-family: 'JetBrains Mono', monospace; }
.pipe-text { font-size: 1.05rem; font-weight: 500; }

/* ==========================================================================
   HIGH-TECH SVG CHARTS (GAUSS & OPTION DESK)
   ========================================================================== */
.gauss-svg-container {
    position: relative;
    width: 100%;
    height: 260px;
    background-image: radial-gradient(rgba(128,128,128,0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 12px;
    border: 1px dashed var(--bs-border-color);
    padding: 20px 10px 10px;
}

.bell-curve-area {
    fill: url(#bell-gradient);
    opacity: 0.35;
}

.bell-curve-stroke {
    fill: none;
    stroke: var(--bs-primary);
    stroke-width: 3;
    stroke-linecap: round;
    filter: drop-shadow(0px 0px 12px rgba(var(--bs-primary-rgb), 0.6));
}

.sigma-line-v {
    stroke: var(--bs-border-color);
    stroke-width: 1;
    stroke-dasharray: 4 4;
    opacity: 0.5;
}

.sigma-line-v.zero {
    stroke: var(--bs-primary);
    stroke-width: 1.5;
    stroke-dasharray: none;
    opacity: 0.8;
}

.sigma-line-v.risk {
    stroke: #ef4444;
    stroke-width: 1.5;
    stroke-dasharray: 3 3;
    opacity: 0.7;
}

.sigma-text-lbl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    fill: var(--iq-muted);
    text-anchor: middle;
}

.sigma-text-lbl.zero {
    fill: var(--bs-primary);
}

.sigma-text-lbl.risk {
    fill: #ef4444;
}

.today-marker-dot {
    fill: #f59e0b;
    stroke: #ffffff;
    stroke-width: 2;
    filter: drop-shadow(0px 0px 10px rgba(245, 158, 11, 0.9));
}

.today-pulse-ring {
    fill: #f59e0b;
    opacity: 0.4;
    animation: gauss-pulse 1.8s infinite ease-out;
}

@keyframes gauss-pulse {
    0% { r: 5px; opacity: 0.8; }
    100% { r: 22px; opacity: 0; }
}

/* Дополнение для таб-сравнения МСФО / РСБУ */
.msfo-compare-box {
    background: rgba(128, 128, 128, 0.02);
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
    padding: 24px;
}
.msfo-nav-btn {
    border: 1px solid var(--bs-border-color);
    background: var(--bs-card-bg);
    color: var(--bs-body-color);
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.msfo-nav-btn.active {
    background: rgba(var(--bs-primary-rgb), 0.1);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

/* ==========================================================================
   ELEGANT TABLE OF CONTENTS (TOC GRID)
   ========================================================================== */
.toc-container {
    background: rgba(128, 128, 128, 0.02);
    border: 1px solid var(--bs-border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.toc-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--bs-primary);
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.toc-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    text-decoration: none;
    color: var(--bs-body-color);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.toc-item:hover {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.06);
    color: var(--bs-body-color);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.toc-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.1);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
    padding: 3px 8px;
    border-radius: 6px;
    margin-right: 12px;
    flex-shrink: 0;
}

.toc-text {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    flex-grow: 1;
}

.toc-arrow {
    font-size: 0.75rem;
    color: var(--iq-muted);
    transition: transform 0.2s ease, color 0.2s ease;
    margin-left: 8px;
    flex-shrink: 0;
}

.toc-item:hover .toc-arrow {
    transform: translateX(3px);
    color: var(--bs-primary);
}

/* Бейджи мультипликаторов */
.multiplier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    white-space: nowrap;
}
.multiplier-badge.primary {
    background: rgba(var(--bs-primary-rgb), 0.12);
    color: var(--bs-primary);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.25);
}
.multiplier-badge.success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.multiplier-badge.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.multiplier-badge.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}