/* ForecastLab demo, chart, controls and metrics. */

.controls {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.control { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.control.grow { flex: 1; }
.control label { font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.control label .mono { color: var(--gold); margin-left: 4px; text-transform: none; letter-spacing: 0; }
.control input[type="range"] { accent-color: var(--gold); margin: 8px 0 2px; }

.legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); }
.legend i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: middle; }
.lg-history { background: var(--gold); }
.lg-forecast { background: #8fb4ff; }
.lg-band { background: rgba(58, 123, 255, 0.35); height: 9px !important; border-radius: 3px !important; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.metric { display: flex; flex-direction: column; gap: 3px; }
.metric-value { font: 600 20px var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
.metric-label { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

#chart svg { width: 100%; height: auto; display: block; }
.fl-axis { stroke: var(--line); stroke-width: 1; }
.fl-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; opacity: 0.55; }
.fl-label { fill: var(--muted); font: 500 10px var(--font-sans); }
.fl-history { fill: none; stroke: var(--gold); stroke-width: 2.1; stroke-linejoin: round; stroke-linecap: round; }
.fl-forecast { fill: none; stroke: #8fb4ff; stroke-width: 2.1; stroke-linecap: round; }
.fl-band { fill: rgba(58, 123, 255, 0.14); stroke: rgba(58, 123, 255, 0.28); stroke-width: 1; }
.fl-forecast-zone { fill: rgba(58, 123, 255, 0.035); }
.fl-anomaly { fill: var(--red); stroke: var(--bg); stroke-width: 1.6; }
.fl-last { fill: var(--gold); stroke: var(--bg); stroke-width: 2; }

#forecast-list { display: flex; flex-direction: column; gap: 7px; }
.forecast-row { display: flex; align-items: baseline; gap: 10px; font-size: 12px; }
.forecast-row .date { width: 72px; color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; }
.forecast-row .value { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.forecast-row .band { margin-left: auto; color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; }

#anomalies { display: flex; flex-direction: column; }
.anomaly-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.anomaly-row:last-child { border-bottom: 0; }
.anomaly-row .when { width: 96px; color: var(--muted); font: 10.5px var(--font-mono); }
.anomaly-row .val { color: var(--text); font-variant-numeric: tabular-nums; }
.anomaly-row .z { margin-left: auto; font: 600 10.5px var(--font-mono); color: var(--red); }

.step-bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; margin-top: 6px; }
.step-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; }
.step-bar > i { width: 100%; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--gold), rgba(245, 194, 107, 0.25)); min-height: 2px; }
.step-bar.next > i { background: linear-gradient(180deg, #5b90ff, rgba(58, 123, 255, 0.25)); }
.step-bar span { font: 10px var(--font-mono); color: var(--muted); }

.method-list { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); line-height: 1.65; }
.method-list li { margin-bottom: 8px; }
.dataset-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.dataset-card:last-child { margin-bottom: 0; }
.dataset-name { font-size: 12.5px; color: var(--text); font-weight: 600; }
.dataset-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.dataset-desc { font-size: 11.5px; color: var(--text-2); margin-top: 5px; line-height: 1.45; }

@media (max-width: 1080px) {
  .controls { flex-wrap: wrap; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
