/* Stoxly.io — DCF Calculator Stylesheet
   Dark glassmorphic adaptation of the CPO prototype.
   All tokens reference hub.css :root variables.
   ================================================== */

/* ==========================================
   1. DCF Layout Shell
   ========================================== */
.dcf-app {
    max-inline-size: 1200px;
    margin-inline: auto;
    padding-block-end: 4rem;
}

/* ==========================================
   2. Top Bar — ticker pill + mode toggle
   ========================================== */
.dcf-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 0;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-glass);
}

.dcf-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.dcf-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dcf-ticker-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.dcf-ticker-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(249, 184, 47, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--color-yellow);
}

.dcf-ticker-name {
    font-weight: 600;
    color: var(--text-white);
    line-height: 1.15;
}

.dcf-ticker-meta {
    font-size: 11px;
    color: var(--text-inactive);
    line-height: 1.15;
}

/* Mode Toggle */
.dcf-mode-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 999px;
    padding: 3px;
    font-size: 13px;
    font-weight: 500;
}

.dcf-mode-toggle button {
    padding: 7px 16px;
    border-radius: 999px;
    color: var(--text-inactive);
    transition: all 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
}

.dcf-mode-toggle button.active {
    background: var(--gradient-yellow);
    color: var(--bg-dark-deep);
    box-shadow: 0 2px 10px rgba(249, 184, 47, 0.25);
}

.dcf-mode-toggle button:hover:not(.active) {
    color: var(--text-muted);
}

/* Custom badge */
.dcf-custom-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 16px;
    background: rgba(249, 115, 22, 0.06);
    color: var(--text-primary);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(249, 115, 22, 0.18);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.dcf-custom-badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
}

.dcf-custom-badge-dot {
    color: var(--color-orange);
    font-size: 8px;
    display: inline-block;
    animation: dcf-pulse-orange 2s infinite ease-in-out;
}

.dcf-custom-badge-separator {
    color: rgba(255, 255, 255, 0.15);
    font-weight: 300;
    user-select: none;
    margin: 0 2px;
}

.dcf-custom-badge .dcf-reset-link {
    font-size: 11px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--color-orange);
    font-family: inherit;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    transition: all 0.15s ease;
    text-decoration: none;
}

.dcf-custom-badge .dcf-reset-link:hover {
    color: var(--color-yellow);
    transform: translateY(-0.5px);
}

@keyframes dcf-pulse-orange {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 4px rgba(249, 115, 22, 0.6);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.25);
        text-shadow: 0 0 10px rgba(249, 115, 22, 1);
        opacity: 1;
    }
}

/* Demo Switcher */
.dcf-demo-switcher {
    font-size: 11px;
    color: var(--text-inactive);
    border: 1px dashed var(--border-glass-focus);
    padding: 5px 10px;
    border-radius: 6px;
    background: var(--bg-dark-card);
}

.dcf-demo-switcher select {
    border: none;
    background: transparent;
    font: inherit;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
}

.dcf-demo-switcher select option {
    background: var(--bg-dark-surface);
    color: var(--text-white);
}

/* Help icon */
.dcf-help-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-inactive);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.dcf-help-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}

/* ==========================================
   3. View Switching
   ========================================== */
.dcf-view { display: none; }
.dcf-view.active { display: block; }

.dcf-section-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-inactive);
    margin-bottom: 12px;
}

/* ==========================================
   4. Verdict Card (Snapshot)
   ========================================== */
.dcf-verdict-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: clip;
}

.dcf-verdict-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.dcf-verdict-label {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-inactive);
    margin-bottom: 8px;
    font-weight: 600;
}

.dcf-verdict-row {
    display: flex;
    align-items: baseline;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.dcf-verdict-value {
    font-family: var(--font-headings);
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    background: var(--gradient-yellow);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dcf-verdict-vs {
    font-size: 15px;
    color: var(--text-muted);
}

.dcf-verdict-vs strong {
    color: var(--text-white);
}

.dcf-verdict-delta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.dcf-verdict-delta.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.dcf-verdict-delta.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.dcf-verdict-delta.neutral {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
}

/* Confidence bar */
.dcf-confidence-bar {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    margin-bottom: 10px;
}

.dcf-confidence-range {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(249, 184, 47, 0.15);
    border-radius: 999px;
}

.dcf-confidence-marker {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 16px;
    background: var(--text-white);
    border-radius: 2px;
}

.dcf-confidence-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-inactive);
    margin-bottom: 20px;
}

.dcf-confidence-labels strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Narrative */
.dcf-verdict-narrative {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
}

.dcf-verdict-narrative strong {
    font-weight: 600;
    color: var(--text-white);
}

.dcf-verdict-narrative em {
    font-style: normal;
    background: rgba(249, 184, 47, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--color-yellow);
}

/* ==========================================
   5. Assumption Cards (Snapshot)
   ========================================== */
.dcf-assumption-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 0;
}

.dcf-assumption-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.dcf-assumption-card:hover {
    border-color: var(--border-glass-focus);
    background: rgba(20, 18, 30, 0.65);
}

.dcf-assumption-card.active {
    border-color: var(--color-orange);
    box-shadow: 0 0 0 1px var(--color-orange), 0 4px 20px rgba(249, 115, 22, 0.12);
    background: rgba(249, 115, 22, 0.04);
}

.dcf-assumption-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.dcf-assumption-icon {
    width: 14px;
    height: 14px;
    color: var(--text-inactive);
    font-size: 14px;
}

.dcf-assumption-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dcf-assumption-value {
    font-family: var(--font-headings);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-white);
    margin-bottom: 4px;
}

.dcf-assumption-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 14px;
}

.dcf-assumption-position {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    margin-bottom: 12px;
}

.dcf-assumption-position-marker {
    position: absolute;
    top: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-orange);
    border: 2px solid var(--bg-dark-deep);
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
}

.dcf-assumption-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-inactive);
    gap: 6px;
    min-height: 24px;
}

/* Source tags */
.dcf-source-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.dcf-source-tag.hybrid { background: rgba(31, 78, 122, 0.2); color: #5ba3d9; }
.dcf-source-tag.fmp { background: rgba(31, 78, 122, 0.2); color: #5ba3d9; }
.dcf-source-tag.anchor { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }
.dcf-source-tag.calc { background: rgba(142, 45, 226, 0.15); color: #b07de8; }
.dcf-source-tag.edited { background: rgba(249, 184, 47, 0.15); color: var(--color-yellow); }

/* Card toggle label */
.dcf-card-toggle-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-orange);
    transition: opacity 0.2s ease;
}

.dcf-assumption-card:hover .dcf-card-toggle-label {
    opacity: 0.85;
}

/* ==========================================
   5b. Shared Detail Panel (below card grid)
   ========================================== */
.dcf-assumption-detail-container {
    margin-bottom: 32px;
}

.dcf-assumption-detail-container:empty {
    display: none;
}

.dcf-detail-panel {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass-focus);
    border-top: 2px solid var(--color-orange);
    border-radius: 0 0 14px 14px;
    padding: 28px 24px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: dcfDetailSlideIn 0.3s ease;
}

@keyframes dcfDetailSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dcf-detail-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-glass);
}

.dcf-detail-panel-icon {
    font-size: 18px;
}

.dcf-detail-panel-title {
    font-family: var(--font-headings);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-white);
    letter-spacing: -0.01em;
}


.dcf-detail-section { margin-bottom: 20px; }
.dcf-detail-section:last-child { margin-bottom: 0; }

.dcf-detail-section-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-inactive);
    margin-bottom: 8px;
    font-weight: 600;
}

.dcf-detail-section-body {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-muted);
}

.dcf-detail-breakdown {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 13px;
    line-height: 1.9;
}

.dcf-detail-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    padding: 2px 0;
}

.dcf-detail-breakdown-row .label {
    color: var(--text-muted);
    font-size: 13px;
}

.dcf-detail-breakdown-row .tabular {
    font-family: var(--font-headings);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: -0.01em;
}

.dcf-detail-breakdown-row.divider {
    border-top: 1px solid var(--border-glass-focus);
    padding-top: 8px;
    margin-top: 8px;
    font-weight: 600;
}

.dcf-detail-breakdown-row.divider .tabular {
    color: var(--color-orange);
    font-weight: 600;
}

.dcf-why-matters {
    background: rgba(249, 184, 47, 0.06);
    border: 1px solid rgba(249, 184, 47, 0.1);
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-yellow);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.dcf-why-matters-icon {
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 14px;
}

.dcf-edit-in-expert {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--color-orange);
    margin-top: 20px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    text-decoration: none;
    padding: 0;
    transition: opacity 0.2s ease;
}

.dcf-edit-in-expert:hover {
    text-decoration: underline;
    opacity: 0.85;
}

/* ==========================================
   6. Expert View — Results Bar
   ========================================== */
.dcf-results-bar {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 16px 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: stretch;
    gap: 24px;
    flex-wrap: wrap;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-premium);
}

.dcf-result-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dcf-result-stat-label {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-inactive);
    margin-bottom: 4px;
    font-weight: 600;
}

.dcf-result-stat-value {
    font-family: var(--font-headings);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-white);
}

.dcf-result-stat-value.positive { color: var(--color-success); }
.dcf-result-stat-value.negative { color: #f87171; }

.dcf-result-divider {
    width: 1px;
    align-self: stretch;
    background: var(--border-glass-focus);
    margin: 4px 0;
}


/* ==========================================
   7. Expert View — Layout
   ========================================== */
.dcf-expert-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
    align-items: stretch;
}

.dcf-expert-main {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.dcf-expert-side {
    grid-column: 2;
    grid-row: 1;
    width: 280px;
    flex-shrink: 0;
    height: 0;
    min-height: 100%;
}

/* ==========================================
   8. Editable Legend
   ========================================== */
.dcf-editable-legend {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 24px;
    padding: 16px 24px;
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    margin-bottom: 16px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-premium);
}

.dcf-legend-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 0;
}

.dcf-legend-vertical-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.06);
    align-self: stretch;
    margin: 4px 0;
}

.dcf-legend-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dcf-legend-icon {
    font-size: 12px;
    color: var(--color-orange);
}

.dcf-legend-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.dcf-legend-items {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.dcf-editable-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dcf-legend-item-text {
    font-size: 11px;
    color: var(--text-inactive);
}

.dcf-editable-legend-sample {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.dcf-editable-legend-sample.editable-sample {
    border-bottom: 1.5px dotted var(--color-orange);
    color: var(--text-primary);
    background: rgba(249, 115, 22, 0.04);
}

.dcf-editable-legend-sample.edited-sample {
    background: rgba(249, 184, 47, 0.12);
    color: var(--color-yellow);
    border-bottom: 1.5px dotted var(--color-yellow);
}

.dcf-editable-legend-sample.derived-sample {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
}

.lock-icon {
    font-size: 9px;
    margin-left: 2px;
    opacity: 0.6;
    display: inline-block;
    vertical-align: middle;
}

.dcf-legend-note {
    font-size: 11px;
    color: var(--text-inactive);
    line-height: 1.6;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.dcf-legend-note .badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dcf-legend-note .badge.fmp {
    background: rgba(31, 78, 122, 0.2);
    color: #5ba3d9;
    border: 1px solid rgba(31, 78, 122, 0.3);
}

.dcf-legend-note .badge.stoxly {
    background: rgba(142, 45, 226, 0.15);
    color: #b07de8;
    border: 1px solid rgba(142, 45, 226, 0.25);
}

.dcf-legend-note .separator-dot {
    color: rgba(255, 255, 255, 0.15);
    margin: 0 2px;
}

.dcf-legend-edit-hint {
    color: var(--text-muted);
}

/* ==========================================
   9. Panel (shared card container)
   ========================================== */
.dcf-panel {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 20px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.dcf-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dcf-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dcf-unit-tag {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border-radius: 4px;
    font-weight: 500;
}

/* Legend */
.dcf-legend {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-inactive);
}

.dcf-btn-csv-download {
    background: none;
    border: 1px solid var(--border-glass-focus);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 11px;
    padding: 4px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.dcf-btn-csv-download:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    border-color: var(--border-glass);
}

.dcf-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dcf-legend-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.dcf-legend-swatch.fmp { background: rgba(31, 78, 122, 0.3); }
.dcf-legend-swatch.stoxly { background: rgba(142, 45, 226, 0.3); }
.dcf-legend-swatch.edited { background: rgba(249, 184, 47, 0.3); }

/* ==========================================
   10. Projections Table
   ========================================== */
.dcf-projections-wrap {
    overflow-x: auto;
}

.dcf-projections {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
    min-width: 650px;
}

.dcf-projections th,
.dcf-projections td {
    padding: 8px 4px;
    text-align: center;
    border-bottom: 1px solid var(--border-glass);
}

.dcf-projections th:first-child,
.dcf-projections td:first-child {
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
    width: 110px;
}

.dcf-projections th {
    font-weight: 600;
    color: var(--text-inactive);
    font-size: 11px;
}

.dcf-projections th.fmp {
    background: rgba(31, 78, 122, 0.15);
    color: #5ba3d9;
    border-radius: 4px 4px 0 0;
}

.dcf-projections th.stoxly {
    background: rgba(142, 45, 226, 0.1);
    color: #b07de8;
    border-radius: 4px 4px 0 0;
}

.dcf-projections td {
    color: var(--text-primary);
}

.dcf-projections .fcf-row {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 600;
}

.dcf-projections .fcf-row td:first-child {
    font-weight: 600;
    color: var(--text-white);
}

.dcf-table-footer {
    font-size: 11px;
    color: var(--text-inactive);
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================
   11. Editable Cells
   ========================================== */
.dcf-editable {
    cursor: pointer;
    border-radius: 4px;
    padding: 4px 6px;
    transition: all 0.15s ease;
    border-bottom: 1.5px dotted var(--color-orange);
    position: relative;
    display: inline-block;
    color: var(--text-primary);
}

.dcf-editable::after {
    content: "✎";
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-orange);
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

tr:hover .dcf-editable::after,
.dcf-editable:hover::after,
.dcf-wacc-table tr:hover .dcf-editable::after {
    opacity: 0.7;
}

.dcf-editable:hover {
    background: rgba(249, 115, 22, 0.1);
    border-bottom-color: var(--color-orange);
}

.dcf-editable:hover::after { opacity: 1; }

.dcf-editable.selected {
    background: rgba(249, 115, 22, 0.15);
    outline: 2px solid var(--color-orange);
    border-bottom-color: transparent;
}

.dcf-editable.selected::after { opacity: 1; }

.dcf-editable.edited {
    background: rgba(249, 184, 47, 0.15);
    color: var(--color-yellow);
    border-bottom-color: var(--color-yellow);
}

.dcf-editable.edited::after {
    content: "●";
    color: var(--color-yellow);
    font-size: 8px;
    opacity: 1;
}

/* Mini pencil icon for editable table cells */
.dcf-cell-pencil {
    font-size: 10px;
    color: var(--color-orange);
    opacity: 0;
    margin-right: 3px;
    margin-left: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

tr:hover .dcf-cell-pencil,
.editable:hover .dcf-cell-pencil {
    opacity: 0.6;
}

.editable.selected .dcf-cell-pencil {
    opacity: 1;
}

.editable.edited .dcf-cell-pencil {
    color: var(--color-yellow);
}

/* Projections table editable cells */
.dcf-projections .editable {
    cursor: pointer;
    border-bottom: 1.5px dotted var(--color-orange);
    border-radius: 3px;
    padding: 2px 4px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.dcf-wacc-table .editable {
    cursor: pointer;
    border-bottom: 1.5px dotted var(--color-orange);
    border-radius: 3px;
    padding: 2px 0 2px 4px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.dcf-projections .editable:hover,
.dcf-wacc-table .editable:hover {
    background: rgba(249, 115, 22, 0.1);
}

.dcf-projections .editable.selected,
.dcf-wacc-table .editable.selected {
    background: rgba(249, 115, 22, 0.15);
    outline: 2px solid var(--color-orange);
    border-bottom-color: transparent;
}

.dcf-projections .editable.edited {
    background: rgba(249, 184, 47, 0.15);
    color: var(--color-yellow);
    border-bottom-color: var(--color-yellow);
}

/* Derived values */
.dcf-derived-value {
    color: var(--text-muted);
    font-style: normal;
}

.dcf-derived-tag {
    font-size: 9px;
    padding: 1px 5px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-inactive);
    border-radius: 3px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-left: 4px;
    vertical-align: 1px;
}

/* ==========================================
   12. WACC Builder & Growth Viz
   ========================================== */
.dcf-two-col {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dcf-wacc-table {
    width: 100%;
    font-size: 13px;
}

.dcf-wacc-table tr td {
    padding: 7px 0;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.dcf-wacc-table tr:last-child td { border-bottom: none; }
.dcf-wacc-table td:first-child { color: var(--text-muted); }
.dcf-wacc-table td:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; width: 90px; }
.dcf-wacc-table td:nth-child(3) { text-align: right; width: 88px; }
.dcf-wacc-table .derived td { font-weight: 600; color: var(--text-white); }

.dcf-panel-stat {
    font-family: var(--font-headings);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-white);
}

/* Growth visualization */
.dcf-growth-viz {
    position: relative;
    height: 110px;
    margin-bottom: 12px;
}

.dcf-growth-viz svg { width: 100%; height: 100%; }

.dcf-heavy-flag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(249, 184, 47, 0.12);
    color: var(--color-yellow);
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    margin-left: 4px;
}

/* ==========================================
   13. Sidebar (contextual edit panel)
   ========================================== */
.dcf-sidebar-panel {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 22px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-sizing: border-box;
    overflow-y: auto;
}

/* Custom scrollbar for sidebar panel */
.dcf-sidebar-panel::-webkit-scrollbar {
    width: 4px;
}
.dcf-sidebar-panel::-webkit-scrollbar-track {
    background: transparent;
}
.dcf-sidebar-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}
.dcf-sidebar-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dcf-sidebar-empty {
    text-align: center;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dcf-empty-icon-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.06);
    border: 1px solid rgba(249, 115, 22, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.08);
}

.dcf-empty-icon {
    font-size: 20px;
    color: var(--color-orange);
    z-index: 2;
    animation: dcf-icon-float 3s infinite ease-in-out;
}

.dcf-empty-glow {
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.15) 0%, transparent 70%);
    z-index: 1;
    animation: dcf-glow-pulse 2s infinite ease-in-out;
}

.dcf-empty-title {
    font-family: var(--font-headings);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-white);
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.dcf-empty-desc {
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0 0 24px 0;
    max-width: 240px;
}

.dcf-empty-dotted-text {
    color: var(--color-orange);
    border-bottom: 1.5px dotted var(--color-orange);
    font-weight: 500;
}

.dcf-empty-steps {
    width: 100%;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
    backdrop-filter: blur(4px);
    box-sizing: border-box;
}

.dcf-empty-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.dcf-empty-step-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.dcf-empty-step-content {
    flex: 1;
    min-width: 0;
}

.dcf-empty-step-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
}

.dcf-empty-step-desc {
    font-size: 10px;
    color: var(--text-inactive);
    display: block;
    line-height: 1.4;
}

@keyframes dcf-icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes dcf-glow-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.dcf-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.dcf-sidebar-title {
    font-family: var(--font-headings);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

.dcf-sidebar-close {
    color: var(--text-inactive);
    font-size: 18px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dcf-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
}

.dcf-sidebar-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-glass-focus);
    border-radius: 10px;
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-white);
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.dcf-sidebar-input:focus {
    border-color: var(--color-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.dcf-sidebar-section {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 16px;
    margin-bottom: 18px;
}

.dcf-sidebar-section-label {
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-orange);
    margin-bottom: 8px;
    font-weight: 600;
}

.dcf-sidebar-section-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.dcf-company-highlight {
    color: var(--color-yellow);
    font-weight: 600;
}

/* Sparkline */
.dcf-sparkline {
    height: 48px;
    margin: 8px 0;
}

.dcf-sparkline svg { width: 100%; height: 100%; }

.dcf-sparkline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-inactive);
    margin-top: 2px;
}

.dcf-learn-more-link {
    font-size: 12px;
    color: var(--color-orange);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    text-decoration: none;
    cursor: pointer;
}

.dcf-learn-more-link:hover { text-decoration: underline; }

/* ==========================================
   14. Tools Row
   ========================================== */
.dcf-tools-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;
}

.dcf-tools-label {
    font-size: 11px;
    color: var(--text-inactive);
    margin-right: 4px;
}

.dcf-tool-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    font-family: var(--font-body);
}

.dcf-tool-pill:hover {
    border-color: var(--border-glass-focus);
    color: var(--text-white);
}

/* ==========================================
   15. Not Suitable View
   ========================================== */
.dcf-not-suitable-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(249, 184, 47, 0.1);
    color: var(--color-yellow);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(249, 184, 47, 0.15);
}

.dcf-explanation-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-premium);
}

.dcf-explanation-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-inactive);
    margin-bottom: 12px;
    font-weight: 600;
}

.dcf-explanation-headline {
    font-family: var(--font-headings);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    line-height: 1.25;
    color: var(--text-white);
}

.dcf-explanation-body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.dcf-explanation-body:last-child { margin-bottom: 0; }

.dcf-explanation-body em {
    font-style: italic;
    color: var(--text-primary);
}

.dcf-explanation-body strong {
    color: var(--text-white);
}

.dcf-trust-line {
    font-style: italic;
    color: var(--text-muted);
    border-left: 3px solid var(--color-orange);
    padding-left: 14px;
    margin-top: 14px;
    font-size: 15px;
}

/* Alternative metrics */
.dcf-alternatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.dcf-alt-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.dcf-alt-label {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
}

.dcf-alt-value {
    font-family: var(--font-headings);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-white);
    margin-bottom: 4px;
}

.dcf-alt-comparison {
    font-size: 11px;
    color: var(--text-inactive);
    margin-bottom: 10px;
}

.dcf-alt-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Redirect cards */
.dcf-redirect-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.dcf-redirect-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: border-color 0.2s ease;
    backdrop-filter: blur(10px);
}

.dcf-redirect-card:hover {
    border-color: var(--border-glass-focus);
}

.dcf-redirect-card-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-white);
}

.dcf-redirect-card-subtitle {
    font-size: 12px;
    color: var(--text-inactive);
    margin-top: 2px;
}

.dcf-redirect-card-arrow {
    color: var(--color-orange);
    font-size: 18px;
}

/* ==========================================
   16. Quick Model View
   ========================================== */
.dcf-qm-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.dcf-qm-left,
.dcf-qm-right {
    display: flex;
    flex-direction: column;
}

.dcf-qm-left .dcf-qm-card,
.dcf-qm-right .dcf-qm-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}


.dcf-qm-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 28px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-premium);
}

.dcf-qm-model-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(249, 115, 22, 0.1);
    color: var(--color-orange);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.dcf-qm-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    margin-bottom: 12px;
}

.dcf-qm-download-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    background: var(--bg-dark-card);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s;
}

.dcf-qm-download-btn:hover { background: rgba(255, 255, 255, 0.05); }

/* Bordered Current Box */
.dcf-qm-current-box {
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.01);
}

.dcf-qm-current-title {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-white);
    margin-bottom: 16px;
    opacity: 0.9;
    letter-spacing: 0.02em;
}

.dcf-qm-current-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* Alignment for items inside the row */
.dcf-qm-current-row .dcf-qm-current-item:nth-child(1) {
    text-align: left;
}
.dcf-qm-current-row .dcf-qm-current-item:nth-child(2) {
    text-align: center;
}
.dcf-qm-current-row .dcf-qm-current-item:nth-child(3) {
    text-align: right;
}

.dcf-qm-current-label {
    font-size: 11px;
    color: var(--text-inactive);
    margin-bottom: 4px;
}

.dcf-qm-current-value {
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-headings);
    color: var(--text-white);
}

/* Inputs */
.dcf-qm-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dcf-qm-input-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dcf-qm-input-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.dcf-qm-input-sublabel {
    font-size: 11px;
    color: var(--text-inactive);
    line-height: 1.4;
    margin-top: -2px;
}

.dcf-qm-input-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 6px;
}

.dcf-qm-input-control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dcf-qm-input-value-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass-focus);
    border-radius: 8px;
    height: 32px;
    padding: 0 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dcf-qm-input-value-box:focus-within {
    border-color: var(--color-orange);
    box-shadow: 0 0 0 1px var(--color-orange);
}

.dcf-qm-input-field {
    width: 48px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-white);
    font-family: var(--font-body);
    font-weight: 600;
    text-align: left;
    padding: 0;
}

.dcf-qm-stepper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass-focus);
    border-radius: 8px;
    height: 32px;
    overflow: hidden;
}

.dcf-qm-step-btn {
    width: 32px;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.dcf-qm-step-btn:first-child {
    border-right: 1px solid var(--border-glass);
}

.dcf-qm-step-btn:hover {
    background: rgba(249, 115, 22, 0.15);
    color: var(--color-orange);
}

.dcf-qm-step-btn i {
    font-size: 10px;
}

/* Hide default HTML5 number input spinner arrows */
.dcf-qm-input-field::-webkit-outer-spin-button,
.dcf-qm-input-field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dcf-qm-input-field[type=number] {
    -moz-appearance: textfield;
}

.dcf-qm-input-suffix {
    font-size: 13px;
    color: var(--text-inactive);
    user-select: none;
    margin-left: 2px;
}

/* Premium Custom Range Slider */
.dcf-qm-slider-wrap {
    margin-top: 6px;
    padding: 0 4px;
    width: 100%;
}

.dcf-qm-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    margin: 6px 0 10px 0;
}

/* Chrome/Safari thumb */
.dcf-qm-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-orange);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
    transition: transform 0.1s, background 0.1s;
}

.dcf-qm-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    background: #fb923c;
}

/* Firefox thumb */
.dcf-qm-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: var(--color-orange);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
    transition: transform 0.1s, background 0.1s;
}

.dcf-qm-slider::-moz-range-thumb:hover {
    transform: scale(1.3);
    background: #fb923c;
}

/* Results */
.dcf-qm-results-header {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-inactive);
    margin-bottom: 16px;
}

.dcf-qm-results-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-glass);
}

.dcf-qm-result-item {
    display: flex;
    flex-direction: column;
}

.dcf-qm-results-row .dcf-qm-result-item:nth-child(1) {
    align-items: flex-start;
    text-align: left;
}

.dcf-qm-results-row .dcf-qm-result-item:nth-child(2) {
    align-items: flex-end;
    text-align: right;
}

.dcf-qm-result-label {
    font-size: 12px;
    color: var(--text-inactive);
    margin-bottom: 6px;
    line-height: 1.3;
}

.dcf-qm-result-value {
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
}

.dcf-qm-result-value.positive { color: var(--color-success); }
.dcf-qm-result-value.negative { color: #f87171; }

.dcf-qm-chart-wrap {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dcf-qm-chart-area {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dcf-qm-chart-area svg {
    width: 100%;
    height: auto;
    max-height: 100%;
    display: block;
    overflow: visible;
}

/* Method toggle */
.dcf-qm-method-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.dcf-qm-method-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dcf-qm-method-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-inactive);
}

.dcf-qm-method-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 999px;
    padding: 3px;
    font-size: 13px;
    font-weight: 500;
}

.dcf-qm-method-toggle button {
    padding: 6px 16px;
    border-radius: 999px;
    color: var(--text-inactive);
    transition: all 0.15s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
}

.dcf-qm-method-toggle button.active {
    background: var(--gradient-orange);
    color: white;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.dcf-qm-method-toggle button.qm-method-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dcf-qm-method-toggle button.qm-method-disabled.active {
    background: transparent;
    box-shadow: none;
}

.dcf-qm-method-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* EPS note */
.dcf-qm-eps-note {
    display: flex;
    gap: 8px;
    background: rgba(249, 184, 47, 0.08);
    color: var(--color-yellow);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 20px;
    border: 1px solid rgba(249, 184, 47, 0.12);
}

.dcf-qm-eps-note::before { content: "⚠"; flex-shrink: 0; }

/* Cross-method note */
.dcf-qm-method-note {
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.dcf-qm-method-note-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    color: var(--text-muted);
    transition: background 0.15s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.dcf-qm-method-note-toggle:hover {
    background: rgba(255, 255, 255, 0.03);
}

.dcf-qm-method-note-icon {
    flex-shrink: 0;
    color: #5ba3d9;
}

.dcf-qm-method-note-summary {
    flex: 1;
    color: var(--text-muted);
}

.dcf-qm-method-note-summary strong {
    color: var(--text-white);
    font-weight: 600;
}

.dcf-qm-method-note-chevron {
    flex-shrink: 0;
    color: var(--text-inactive);
    transition: transform 0.2s ease;
}

.dcf-qm-method-note-chevron.open { transform: rotate(180deg); }

.dcf-qm-method-note-body {
    display: none;
    padding: 0 14px 12px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-muted);
}

.dcf-qm-method-note-body.open { display: block; }

/* ==========================================
   17. Tour Overlay
   ========================================== */
.dcf-tour-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.dcf-tour-backdrop.active { display: flex; }

.dcf-tour-modal {
    background: var(--bg-dark-surface);
    border: 1px solid var(--border-glass-focus);
    border-radius: 20px;
    padding: 32px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
}

.dcf-tour-step-counter {
    font-size: 12px;
    color: var(--text-inactive);
    margin-bottom: 16px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
}

.dcf-tour-step-title {
    font-family: var(--font-headings);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    color: var(--text-white);
}

.dcf-tour-step-body {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.dcf-tour-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

.dcf-tour-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-glass-focus);
}

.dcf-tour-dot.active {
    background: var(--color-orange);
    width: 18px;
    border-radius: 999px;
}

.dcf-tour-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dcf-tour-skip {
    font-size: 13px;
    color: var(--text-inactive);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.dcf-tour-skip:hover { color: var(--text-white); }

.dcf-tour-next {
    padding: 10px 20px;
    background: var(--gradient-orange);
    color: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dcf-tour-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* ==========================================
   18. Utility Classes
   ========================================== */
.dcf-text-positive { color: var(--color-success); }
.dcf-text-negative { color: #f87171; }
.dcf-text-secondary { color: var(--text-muted); }
.dcf-text-tertiary { color: var(--text-inactive); }
.dcf-tabular { font-variant-numeric: tabular-nums; }
.dcf-hidden { display: none !important; }

/* ==========================================
   19. Responsive
   ========================================== */
@media (max-width: 900px) {
    .dcf-expert-grid { grid-template-columns: 1fr; }
    .dcf-expert-main {
        grid-column: auto;
        grid-row: auto;
    }
    .dcf-expert-side {
        grid-column: auto;
        grid-row: auto;
        width: 100%;
        height: auto;
        position: static;
    }
    .dcf-two-col {
        grid-column: auto;
        grid-row: auto;
        grid-template-columns: 1fr;
    }
    .dcf-redirect-row { grid-template-columns: 1fr; }
    .dcf-verdict-value { font-size: 42px; }
    .dcf-qm-layout { grid-template-columns: 1fr; }
    .dcf-editable-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .dcf-legend-vertical-divider {
        display: none;
    }
    .dcf-legend-label {
        margin-top: 4px;
    }
    .dcf-legend-label:first-child {
        margin-top: 0;
    }
}

@media (max-width: 576px) {
    .dcf-topbar { flex-direction: column; align-items: flex-start; }
    .dcf-assumption-grid { grid-template-columns: 1fr; }
    .dcf-alternatives-grid { grid-template-columns: 1fr; }
}

/* ==========================================
   20. Custom Premium Modal (copied from portfolio.css)
   ========================================== */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 3, 6, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.custom-modal-card {
    background: #0e0d14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    padding: 2.25rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transform: scale(0.9) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal-overlay.active .custom-modal-card {
    transform: scale(1) translateY(0);
}

.modal-glow-effect {
    position: absolute;
    top: -30%;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.15) 0%, transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--text-white);
}

.modal-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fb7185;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.2);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(244, 63, 94, 0);
    }
}

.modal-title {
    font-family: var(--font-headings);
    color: var(--text-white);
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.modal-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 1.75rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.btn-modal-cancel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-body);
    width: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-white);
    border-color: var(--border-glass-focus);
}

.btn-modal-confirm {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    border: none;
    color: var(--text-white);
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-body);
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(190, 18, 60, 0.25);
    transition: all 0.25s ease;
}

.btn-modal-confirm:hover {
    box-shadow: 0 4px 18px rgba(190, 18, 60, 0.45);
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-modal-confirm:active {
    transform: translateY(0);
}

/* Tooltip styling */
.info-tooltip-trigger {
    position: relative;
    color: var(--text-inactive);
    font-size: 0.82rem;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    text-transform: none;
}

.info-tooltip-trigger:hover {
    color: var(--color-orange);
}

.info-tooltip-trigger::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: rgba(10, 8, 16, 0.98);
    border: 1px solid var(--border-glass-focus);
    color: var(--text-primary);
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
    inline-size: 220px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    text-align: center;
}

.info-tooltip-trigger::before {
    content: '';
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    border-width: 6px;
    border-style: solid;
    border-color: var(--border-glass-focus) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.info-tooltip-trigger:hover::after,
.info-tooltip-trigger:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}


