/* =============================================================================
   🌀 CHAOS FORECAST — fitted SDE + KFE-style forward bands CSS
   ============================================================================= */

.panel-cf {
    background:
        radial-gradient(ellipse at top right, rgba(255,157,107,0.07), transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(136,216,176,0.06), transparent 60%),
        linear-gradient(180deg, rgba(28,20,55,0.94), rgba(10,8,24,0.97));
    border: 1px solid rgba(255,157,107,0.30);
    border-radius: 14px;
    padding: 22px 26px;
    margin-top: 18px;
    box-shadow:
        0 10px 32px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,157,107,0.10);
}

.cf-headline-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 12px 0 16px;
}

.cf-headline-card {
    background: linear-gradient(180deg, rgba(255,157,107,0.06), rgba(10,8,24,0.50));
    border: 1px solid rgba(255,157,107,0.22);
    border-radius: 10px;
    padding: 12px 14px;
}

.cf-headline-label {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 10.5px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #b095f5;
    margin-bottom: 4px;
}

.cf-headline-value {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: #ff9d6b;
    line-height: 1.2;
    letter-spacing: 0.8px;
}

.cf-headline-sub {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11px;
    color: #888aa0;
    font-style: italic;
    margin-top: 4px;
}

/* Regime badge */
.cf-regime-now {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-top: 4px;
}
.cf-regime-stable   { background: rgba(136,216,176,0.18); color: #88d8b0; border: 1px solid rgba(136,216,176,0.40); }
.cf-regime-preshift { background: rgba(255,216,107,0.18); color: #ffd86b; border: 1px solid rgba(255,216,107,0.40); }
.cf-regime-shift    { background: rgba(255,123,157,0.18); color: #ff7b9d; border: 1px solid rgba(255,123,157,0.40); }

/* ── FORECAST CANVAS ───────────────────────────────────────────────────── */

.cf-canvas-wrap {
    background: rgba(10,8,24,0.55);
    border: 1px solid rgba(212,175,55,0.14);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}

.cf-canvas-title {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    color: #ddc88a;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}

.cf-forecast-canvas {
    width: 100%;
    height: 380px;
    display: block;
    border-radius: 6px;
}

.cf-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11px;
    color: #888aa0;
}

.cf-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cf-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 4px currentColor;
}

.cf-dot-history  { background: #88d8b0; color: #88d8b0; }
.cf-dot-forecast { background: #ff9d6b; color: #ff9d6b; }
.cf-dot-band     { background: rgba(255,157,107,0.32); color: rgba(255,157,107,0.55); }

/* ── DETAIL CARDS ──────────────────────────────────────────────────────── */

.cf-detail-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 14px;
    margin-bottom: 16px;
}

.cf-detail-card {
    background: rgba(10,8,24,0.55);
    border: 1px solid rgba(212,175,55,0.14);
    border-radius: 10px;
    padding: 12px 14px;
}

.cf-detail-title {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    color: #ddc88a;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
}

.cf-ou-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
}

.cf-ou-item {
    display: grid;
    grid-template-columns: 130px 1fr 80px;
    align-items: center;
    gap: 8px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    padding: 3px 0;
    border-bottom: 1px dashed rgba(212,175,55,0.07);
}

.cf-ou-item:last-child { border-bottom: none; }

.cf-ou-name {
    color: #b095f5;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.cf-ou-desc {
    color: #888aa0;
    font-size: 11px;
    font-style: italic;
}

.cf-ou-val {
    text-align: right;
    color: #ffd86b;
    font-variant-numeric: tabular-nums;
    font-size: 11.5px;
    font-weight: 600;
}

/* Per-tick regime probability bars */
.cf-prob-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cf-prob-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 8px;
    align-items: center;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
}

.cf-prob-label {
    color: #b095f5;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.cf-prob-bar {
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    display: flex;
    background: rgba(255,255,255,0.04);
}

.cf-prob-stable   { background: linear-gradient(90deg, rgba(136,216,176,0.45), rgba(136,216,176,0.85)); }
.cf-prob-preshift { background: linear-gradient(90deg, rgba(255,216,107,0.45), rgba(255,216,107,0.85)); }
.cf-prob-shift    { background: linear-gradient(90deg, rgba(255,123,157,0.55), rgba(255,123,157,0.95)); }

.cf-prob-pct {
    color: #ddc88a;
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
    text-align: right;
    display: inline-block;
    min-width: 30px;
}

/* ── INTERPRETATION + FOOT ─────────────────────────────────────────────── */

.cf-interp {
    background: linear-gradient(90deg, rgba(255,157,107,0.07), transparent 80%);
    border-left: 2px solid rgba(255,157,107,0.50);
    border-radius: 0 6px 6px 0;
    padding: 10px 16px;
    font-family: "Times New Roman", Georgia, serif;
    font-style: italic;
    font-size: 13px;
    color: #ddc88a;
    line-height: 1.5;
    margin-bottom: 12px;
}

.cf-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(212,175,55,0.14);
}

.cf-refresh-btn {
    background: rgba(255,157,107,0.10);
    color: #ff9d6b;
    border: 1px solid rgba(255,157,107,0.30);
    border-radius: 999px;
    padding: 5px 14px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.cf-refresh-btn:hover:not(:disabled) {
    background: rgba(255,157,107,0.20);
    transform: translateY(-1px);
}
.cf-refresh-btn:disabled { opacity: 0.55; cursor: progress; }

.cf-foot-note {
    font-family: "Times New Roman", Georgia, serif;
    font-style: italic;
    font-size: 11px;
    color: #888aa0;
}

@media (max-width: 900px) {
    .cf-headline-row { grid-template-columns: repeat(2, 1fr); }
    .cf-detail-row { grid-template-columns: 1fr; }
    .cf-forecast-canvas { height: 300px; }
}
