/* main_neural_network_lab.css — Neural Network Lab.
 *
 * Tool-local rules only; nothing here is added to shared CSS (Brief 11 P3). Cards, the data-source
 * chooser, chart cards, summary tables, the readout and its metric-headline cards come from
 * shared/css. The blocks marked "copied from" are house patterns that are tool-local by convention
 * (briefs README rule 13), copied from the tool named rather than reinvented.
 */

/* ---------------------------------------------------------------- teaching scaffold
   Copied from apps/time_series/dynamic_logit/main_dynamic_logit.css (itself from TURF). */

.act-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
  margin-right: 0.6rem;
  vertical-align: middle;
}

.act-narrative {
  font-size: 0.94rem;
  color: #4b5563;
  line-height: 1.65;
  margin: 0 0 1rem;
  max-width: 760px;
}

.chart-explainer {
  font-size: 0.9rem;
  color: var(--app-muted, #5f6b7a);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.results-step-heading { margin-top: 1.75rem; }

.callout-box {
  border-left: 4px solid #d1d5db;
  background: #f9fafb;
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.callout-box p { margin: 0 0 0.5rem; }
.callout-box ol, .callout-box ul { margin: 0; padding-left: 1.3rem; }
.callout-box li { margin-bottom: 0.4rem; }

.callout-amber {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.exploratory-questions {
  margin: 0;
  padding-left: 1.4rem;
  line-height: 1.65;
}

.exploratory-questions li { margin-bottom: 0.85rem; }

.money-opener {
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 1rem;
}

/* ---------------------------------------------------------------- scenario descriptions
   Copied from apps/time_series/dynamic_logit/main_dynamic_logit.css. */

.scenario-var-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.scenario-var-table tr { border-bottom: 1px solid #e5e7eb; }
.scenario-var-table tr:last-child { border-bottom: none; }

.scenario-var-table td {
  padding: 0.5rem 0.5rem 0.5rem 0;
  vertical-align: middle;
}

.scenario-var-table td:first-child {
  width: 190px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.var-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.var-tag.outcome { background: #dcfce7; color: #166534; }
.var-tag.predictor { background: #dbeafe; color: #1e40af; }
.var-tag.binary { background: #fef3c7; color: #92400e; }

/* ---------------------------------------------------------------- predictor grid
   Copied from apps/regression/ml_regression/main_ml_regression.css (DECISIONS B11-c10). */

.picker-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 0.35rem;
}

.picker-toolbar__btn {
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.picker-toolbar__btn:hover { background: #f1f5f9; border-color: #94a3b8; }

.picker-toolbar__search {
  flex: 1 1 10rem;
  min-width: 8rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.82rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.picker-toolbar__count {
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  color: #64748b;
}

.picker-toolbar__count--warn { color: #b45309; font-weight: 600; }

.predictor-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 26rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.predictor-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.predictor-row--disabled { opacity: 0.6; }

.predictor-name { margin: 0; overflow-wrap: anywhere; }

.predictor-badge {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  background: #e2e8f0;
  color: #334155;
}

.predictor-badge--numeric { background: #dbeafe; color: #1d4ed8; }
.predictor-badge--categorical { background: #ede9fe; color: #6d28d9; }
.predictor-badge--warn { background: #fef3c7; color: #92400e; }

/* ---------------------------------------------------------------- run controls
   Copied from apps/time_series/dynamic_logit/main_dynamic_logit.css. */

.run-analysis-btn { font-size: 1rem; padding: 0.55rem 1.4rem; }
.run-analysis-btn--stale { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35); }

.run-analysis-status {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: #475569;
}

.run-analysis-status.error { color: #b91c1c; }

/* ---------------------------------------------------------------- this tool's layout */

.nn-columns-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(260px, 2fr);
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.nn-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem 1.5rem;
  align-items: end;
  margin-bottom: 1rem;
}

.nn-columns-grid label,
.nn-settings-grid label {
  display: block;
  font-weight: 600;
  margin: 0.5rem 0 0.25rem;
}

.nn-columns-grid select,
.nn-settings-grid select,
.nn-settings-grid input[type="number"] { width: 100%; }

.nn-settings-grid .switch-option { font-weight: 600; }

.nn-advanced { margin: 0.5rem 0 0; }
.nn-advanced summary { cursor: pointer; font-weight: 600; }

.nn-term-list { list-style: none; padding: 0; margin: 0 0 0.5rem; }

.nn-term-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.75rem;
  background: #f1f5f9;
  border-radius: 6px;
  margin-bottom: 0.35rem;
}

.nn-train-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nn-gentle-note {
  margin: 0.5rem 0 1rem;
  padding: 0.6rem 0.9rem;
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
  border-radius: 6px;
  font-size: 0.9rem;
}

.nn-inline-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 0.75rem;
}

.nn-inline-control label { font-weight: 600; }

.nn-png { margin: 0.25rem 0 0.75rem; font-size: 0.82rem; }

/* The row the student should look at: the network's own line. */
.nn-row-emphasis td,
.nn-row-emphasis th { font-weight: 700; background: #eff6ff; }
.nn-row-reference td,
.nn-row-reference th { color: var(--app-muted, #5f6b7a); }

/* Copied from apps/time_series/dynamic_logit/main_dynamic_logit.css (diagnostics list). */
.nn-diagnostics-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }

.nn-diagnostics-list li {
  border-left: 4px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.6rem;
  line-height: 1.55;
}

/* Status is carried by a text label too, never by colour alone. */
.nn-diagnostics-list li.nn-status-watch { border-left-color: #f59e0b; background: #fffbeb; }
.nn-diagnostics-list li.nn-status-warn { border-left-color: #dc2626; background: #fef2f2; }
.nn-diagnostics-list li.nn-status-info { border-left-color: #2563eb; background: #eff6ff; }

.nn-status-label { font-weight: 700; margin-right: 0.4rem; }

.nn-reveal-table { margin-top: 1rem; }

@media (max-width: 720px) {
  .nn-columns-grid { grid-template-columns: 1fr; }
  .predictor-row { grid-template-columns: auto minmax(0, 1fr); }
}
