/*
 * Forecast Starter — tool-specific styles only.
 *
 * The design system (cards, hero, dropzone, buttons, tables, pills, professor mode,
 * data-source chooser) lives in shared/css/main.css and is not duplicated here.
 */

:root {
  --fs-accent: #0f766e;
  --fs-accent-soft: #ccfbf1;
  --fs-warn: #b45309;
  --fs-bad: #b91c1c;
  --fs-good: #15803d;
}

/* ── The three-step explainer ─────────────────────────────────────── */

.fs-acts {
  list-style: none;
  margin: 1.25rem 0 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.fs-acts li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.fs-act-num {
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--fs-accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.fs-callout {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  border-left: 4px solid var(--fs-accent);
  background: var(--fs-accent-soft);
}

.fs-callout p { margin: 0; }

/* ── Act headings ─────────────────────────────────────────────────── */

.fs-act-section { margin-top: 2rem; }

.fs-act-badge {
  display: inline-block;
  background: var(--fs-accent);
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  margin-right: 0.6rem;
  vertical-align: middle;
}

.fs-section-lede {
  margin-top: 0;
  color: #475569;
}

/* ── Column pickers ───────────────────────────────────────────────── */

.fs-column-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 700px) {
  .fs-column-grid { grid-template-columns: 1fr; }
}

/* ── Act 1: the shape ─────────────────────────────────────────────── */

.fs-shape-summary {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.fs-finding {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.fs-finding__icon { flex: 0 0 auto; font-size: 1.1rem; line-height: 1.5; }
.fs-finding__text { margin: 0; }
.fs-finding--strong { background: var(--fs-accent-soft); border-color: #5eead4; }
.fs-finding--none { background: #f8fafc; color: #475569; }
.fs-finding--warn { background: #fffbeb; border-color: #fcd34d; }

.fs-cycle-control,
.fs-model-toggle,
.fs-horizon-control,
.fs-holdout-control {
  margin: 1.25rem 0;
  padding: 0.9rem 1.1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.fs-cycle-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.fs-cycle-row input[type="number"] { width: 7rem; }

.fs-model-toggle__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.fs-pill-group { display: inline-flex; gap: 0.4rem; flex-wrap: wrap; }

.fs-pill {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.fs-pill:hover { border-color: var(--fs-accent); }

.fs-pill.active {
  background: var(--fs-accent);
  border-color: var(--fs-accent);
  color: #fff;
}

.fs-decomp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

@media (max-width: 900px) {
  .fs-decomp-grid { grid-template-columns: 1fr; }
}

.fs-decomp-grid .chart-placeholder { min-height: 210px; }

/* ── Act 2: method cards ──────────────────────────────────────────── */

.fs-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}

.fs-method-card {
  text-align: left;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.fs-method-card:hover:not(:disabled) { border-color: #5eead4; }

.fs-method-card[aria-checked="true"] {
  border-color: var(--fs-accent);
  background: var(--fs-accent-soft);
}

.fs-method-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f1f5f9;
}

.fs-method-card__label {
  display: block;
  font-weight: 650;
  margin-bottom: 0.2rem;
}

.fs-method-card__jargon {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.fs-method-card__blurb {
  display: block;
  font-size: 0.88rem;
  color: #475569;
  margin: 0;
}

.fs-method-card__why {
  display: block;
  font-size: 0.82rem;
  color: var(--fs-warn);
  margin-top: 0.45rem;
}

.fs-params {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.fs-param {
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.fs-param label { font-weight: 600; display: block; margin-bottom: 0.3rem; }
.fs-param input[type="range"] { width: 100%; }
.fs-param .hint { margin: 0.35rem 0 0 0; }
.fs-param__ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #64748b;
}

/* ── Act 3: the verdict + score table ─────────────────────────────── */

.fs-verdict {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border-radius: 10px;
  border-left: 5px solid #cbd5e1;
  background: #f8fafc;
}

.fs-verdict h3 { margin: 0 0 0.4rem 0; font-size: 1.05rem; }
.fs-verdict p { margin: 0.35rem 0 0 0; }
.fs-verdict--good { border-left-color: var(--fs-good); background: #f0fdf4; }
.fs-verdict--warn { border-left-color: var(--fs-warn); background: #fffbeb; }
.fs-verdict--bad { border-left-color: var(--fs-bad); background: #fef2f2; }

.fs-table-wrap { overflow-x: auto; }

.fs-score-table td.fs-num { text-align: right; font-variant-numeric: tabular-nums; }
.fs-score-table tr.fs-selected { background: var(--fs-accent-soft); }
.fs-score-table tr.fs-unavailable td { color: #94a3b8; }

.fs-ratio { font-weight: 700; font-variant-numeric: tabular-nums; }
.fs-ratio--good { color: var(--fs-good); }
.fs-ratio--bad { color: var(--fs-bad); }

.fs-badge-best {
  display: inline-block;
  background: var(--fs-good);
  color: #fff;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.45rem;
  vertical-align: middle;
}

/* ── The rule, written out ────────────────────────────────────────── */

.fs-equation-block {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.fs-equation-block--live {
  background: var(--fs-accent-soft);
  border-color: #99f6e4;
}

.fs-equation-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 0.4rem;
}

/* Long seasonal expansions must scroll rather than burst the card. */
.fs-equation {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.15rem 0;
}

.fs-equation-key {
  margin: 0.6rem 0 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.6rem;
  font-size: 0.86rem;
}

.fs-equation-key dt {
  font-weight: 650;
  color: #0f172a;
  white-space: nowrap;
}

.fs-equation-key dd {
  margin: 0;
  color: #475569;
}

/* ── The on-ramp to ARX ───────────────────────────────────────────── */

.fs-next-step {
  border-left: 4px solid var(--fs-accent);
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
}

.fs-ramp-link {
  display: inline-block;
  font-weight: 650;
  margin-right: 1.25rem;
}

/* ── Print ────────────────────────────────────────────────────────── */

@media print {
  .fs-method-grid,
  .fs-cycle-control,
  .fs-model-toggle,
  .fs-horizon-control,
  .fs-holdout-control,
  .professor-mode-banner,
  .data-source-section { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .fs-method-card { transition: none; }
}

/* batch-8 brief: the scenario card's answers sit behind a reveal; naive's own verdict is neutral. */
.fs-reveal > summary { cursor: pointer; color: #004085; font-weight: 600; font-size: 0.95rem; }
.fs-reveal[open] > summary { margin-bottom: 0.5rem; }
.fs-tuning-note { margin-top: 0.5rem; }
.fs-verdict--bar { border-left-color: var(--fs-accent); background: #f0fdfa; }
