/* =========================================================================
   BASS DIFFUSION & INNOVATION FORECASTING LAB — STYLES
   MktPraxis Design System Standards
   ========================================================================= */

/* Lens Navigation Strip */
.lens-nav-section {
  margin: 1.5rem 0 2rem;
}

.lens-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  background: var(--app-card-bg, #ffffff);
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: 14px;
  padding: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.lens-pill {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--app-muted, #64748b);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.lens-pill:hover {
  background: var(--app-bg-subtle, #f8fafc);
  color: var(--app-text, #1e293b);
  border-color: var(--app-border, #e2e8f0);
}

.lens-pill.active {
  background: var(--app-accent, #2563eb);
  color: #ffffff;
  border-color: var(--app-accent, #2563eb);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.lens-pill .lens-icon {
  font-size: 1.15rem;
}

/* Mode Toggle Buttons */
.mode-toggle {
  display: inline-flex;
  background: var(--app-bg-subtle, #f1f5f9);
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
}

.mode-button {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--app-muted, #64748b);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-button:hover {
  color: var(--app-text, #1e293b);
}

.mode-button.active {
  background: #ffffff;
  color: var(--app-accent, #2563eb);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Slider Controls & Headers */
.slider-group {
  margin-bottom: 1.15rem;
}

.slider-group:last-child {
  margin-bottom: 0;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--app-text, #1e293b);
}

.slider-badge {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.85rem;
  background: var(--app-bg-subtle, #f1f5f9);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--app-border, #e2e8f0);
  color: var(--app-accent, #2563eb);
  font-weight: 700;
}

.slider-group input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--app-border, #e2e8f0);
  outline: none;
  cursor: pointer;
}

.slider-hint {
  font-size: 0.78rem;
  color: var(--app-muted, #64748b);
  margin-top: 0.25rem;
  line-height: 1.35;
}

.compact-input {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.88rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--app-border, #cbd5e1);
  border-radius: 6px;
  background: #ffffff;
  color: var(--app-text, #1e293b);
  text-align: right;
}

/* Toggles and checkboxes */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.85rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--app-accent, #2563eb);
  cursor: pointer;
}

/* Sub-panel collapsible controls */
.subpanel-controls {
  background: var(--app-bg-subtle, #f8fafc);
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: 8px;
  padding: 0.85rem;
  margin-top: 0.5rem;
}

/* =========================================================================
   DATA SOURCE CHOOSER (Canonical MKTPraxis Dual-Panel UX)
   ========================================================================= */
.data-source-chooser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .data-source-chooser {
    grid-template-columns: 1fr;
  }
}

.dsc-panel {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}

.dsc-panel__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.dsc-panel__header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--app-text, #1e293b);
}

.dsc-panel__icon {
  font-size: 1.35rem;
}

.dsc-panel.minimized {
  opacity: 0.6;
  background: var(--app-bg-subtle, #f8fafc);
  cursor: pointer;
}

.dsc-panel.minimized:hover {
  opacity: 0.85;
  border-color: var(--app-accent, #2563eb);
}

.dsc-panel.minimized .dsc-panel__body {
  display: none;
}

.dsc-panel.minimized .dsc-panel__minimized-cta {
  display: flex;
}

.dsc-panel__minimized-cta {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  text-align: center;
  gap: 0.5rem;
}

.dsc-panel__minimized-icon {
  font-size: 2.5rem;
}

.dsc-panel__minimized-label {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--app-text, #1e293b);
}

.dsc-panel__minimized-hint {
  font-size: 0.82rem;
  color: var(--app-accent, #2563eb);
  text-decoration: underline;
}

.scenario-controls label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.preset-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--app-border, #cbd5e1);
  background: var(--app-bg, #ffffff);
  color: var(--app-text, #1e293b);
  font-size: 0.92rem;
  cursor: pointer;
  margin-bottom: 0.65rem;
}

.scenario-info-box {
  background: var(--app-bg-subtle, #f8fafc);
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-top: 0.5rem;
}

.scenario-info-box h4 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: var(--app-text, #1e293b);
}

.scenario-info-box p {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--app-text, #334155);
}

.scenario-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--app-border, #cbd5e1);
  border-radius: 12px;
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  background: var(--app-bg-subtle, #f8fafc);
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--app-accent, #2563eb);
  background: #eff6ff;
}

.dropzone-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--app-text, #1e293b);
}

.dropzone-note {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--app-muted, #64748b);
}

/* =========================================================================
   MATHEMATICAL SPECIFICATION CARDS & EQUATIONS (KaTeX)
   ========================================================================= */
.equation-block {
  background: var(--app-bg-subtle, #f8fafc);
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin: 0.65rem 0;
  overflow-x: auto;
  font-size: 0.92rem;
}

/* Per-lens "Show the math" panels: closed until the student asks */
.lens-math {
  margin-top: 1.25rem;
}

.lens-math__body {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.lens-math__body h4 {
  margin: 1.1rem 0 0.35rem;
  font-size: 0.95rem;
}

.lens-math__body h4:first-child {
  margin-top: 0;
}

.lens-math__plain {
  color: var(--app-muted, #475569);
}

.overview-math-pointer {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.equation-definitions.compact {
  font-size: 0.82rem;
  color: var(--app-muted, #475569);
  line-height: 1.45;
  margin-top: 0.65rem;
}

.equation-definitions.compact ul {
  margin: 0.25rem 0 0 1.25rem;
  padding: 0;
}

/* =========================================================================
   VISUAL ANALYTICS & SCORECARDS
   ========================================================================= */
.chart-tab-strip {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--app-border, #e2e8f0);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.chart-tab {
  background: none;
  border: none;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--app-muted, #64748b);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.chart-tab:hover {
  color: var(--app-text, #1e293b);
  background: var(--app-bg-subtle, #f1f5f9);
}

.chart-tab.active {
  color: #ffffff;
  background: var(--app-accent, #2563eb);
}

.plot-container {
  width: 100%;
  min-height: 480px;
}

/* Scorecard Grid */
.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.scorecard-card {
  background: var(--app-bg-subtle, #f8fafc);
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.scorecard-label {
  font-size: 0.78rem;
  color: var(--app-muted, #64748b);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scorecard-value {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--app-text, #1e293b);
}

.scorecard-sub {
  font-size: 0.75rem;
  color: var(--app-muted, #64748b);
}

/* Diagnostic Alerts */
.chasm-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  margin: 1.25rem 0;
  color: #92400e;
  font-size: 0.88rem;
  line-height: 1.5;
}

.chasm-alert strong {
  color: #78350f;
}

/* Strategic Summary Snapshot */
.strategic-summary {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.strategic-summary__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.strategic-summary__icon {
  font-size: 1.35rem;
}

.strategic-summary__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e3a8a;
}

/* Dual Strategic Panels */
.dual-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 860px) {
  .dual-panels {
    grid-template-columns: 1fr;
  }
}

.dual-panel {
  background: var(--app-card-bg, #ffffff);
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: 12px;
  padding: 1.25rem;
}

/* =========================================================================
   WHAT-IF HERO LIFT BANNER
   ========================================================================= */
.clv-hero-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
}

.clv-hero__eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.clv-hero__compare {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

@media (max-width: 680px) {
  .clv-hero__compare {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

.clv-hero__pole {
  flex: 1;
}

.clv-hero__pole-value {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 2rem;
  font-weight: 800;
  color: #f8fafc;
}

.clv-hero__pole-label {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.clv-hero__pole--scenario .clv-hero__pole-value {
  color: #38bdf8;
}

.clv-hero__middle {
  text-align: center;
}

.clv-hero__lift-badge {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  padding: 0.6rem 1.25rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.clv-hero__lift-value {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 1.25rem;
  font-weight: 800;
  color: #38bdf8;
}

.clv-hero__lift-pct {
  font-size: 0.85rem;
  font-weight: 700;
  color: #7dd3fc;
}

.clv-hero__lift-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-top: 0.2rem;
}

/* Coefficient & Forecast Tables */
.coef-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin-top: 0.5rem;
}

.coef-table th, .coef-table td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--app-border, #e2e8f0);
  text-align: left;
}

.coef-table th {
  background: var(--app-bg-subtle, #f1f5f9);
  color: var(--app-text, #1e293b);
  font-weight: 700;
}

.coef-table tbody tr:hover {
  background: var(--app-bg-subtle, #f8fafc);
}

/* Action button strip */
.action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.btn-secondary, .secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: var(--app-bg, #ffffff);
  border: 1px solid var(--app-border, #cbd5e1);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--app-text, #334155);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-secondary:hover, .secondary:hover {
  background: var(--app-bg-subtle, #f1f5f9);
  border-color: var(--app-accent, #2563eb);
  color: var(--app-accent, #2563eb);
}

.btn-primary, .primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--app-accent, #2563eb);
  border: 1px solid var(--app-accent, #2563eb);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary:hover, .primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.hidden {
  display: none !important;
}

/* Professor Mode styles are in shared/css/main.css (the shared engine builds the sidebar). */

/* =========================================================================
   PEDAGOGICAL PARAMETER INSPECTOR & BENCHMARK ANALOGIES
   ========================================================================= */
.pedagogical-inspector {
  background: var(--app-card-bg, #ffffff);
  border: 1px solid var(--app-border, #cbd5e1);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.pedagogical-inspector:hover {
  border-color: var(--app-accent, #2563eb);
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.08);
}

.how-do-we-know-card summary:hover {
  color: var(--app-accent, #2563eb);
}

.analogy-preset-btn {
  background: var(--app-bg-subtle, #f8fafc);
  border: 1px solid var(--app-border, #cbd5e1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.analogy-preset-btn:hover {
  background: #eff6ff;
  border-color: var(--app-accent, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.analogy-preset-btn:active {
  transform: translateY(0);
}


/* ── Model honesty notes, fit source panel, disabled tabs and levers ── */
.model-note {
  font-size: 0.85rem;
  color: var(--app-muted, #475569);
  margin: 0.25rem 0 0.75rem;
}
.fit-source-panel {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--app-border, #cbd5e1);
  border-left: 4px solid var(--app-accent, #2563eb);
  border-radius: 8px;
  background: var(--app-bg-subtle, #f8fafc);
  font-size: 0.88rem;
  line-height: 1.5;
}
.fit-source-panel[hidden] { display: none; }
.fit-misfit-note {
  border-left: 3px solid #b45309;
  padding-left: 0.6rem;
  color: #78350f;
}
.chart-tab:disabled,
.chart-tab[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}
.chart-tab-note,
.chart-definition {
  margin: 0.4rem 0;
  line-height: 1.45;
}
.whatif-lever-note {
  margin: 0.5rem 0 0;
  line-height: 1.4;
}
.calibration-reason {
  font-size: 0.85rem;
  color: #78350f;
  background: #fffbeb;
}
