/* NABLA — ode.css  (depends on workspace.css only) */

.ode-body { grid-template-columns: 35fr 25fr 40fr; }

/* ── Equation system ── */
.eq-system-block { display: flex; flex-direction: column; gap: 0.65rem; }
.eq-list         { display: flex; flex-direction: column; gap: 0.45rem; }

.eq-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.48rem 0.58rem;
  transition: border-color 0.15s;
}
.eq-row:focus-within { border-color: var(--orange); }

.eq-row-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--orange-bright);
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.eq-row-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  min-width: 0;
}

.eq-row-remove {
  width: 22px; height: 22px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
}
.eq-row-remove:hover { color: #F87171; background: rgba(248,113,113,0.1); }
.eq-row-remove svg { width: 12px; height: 12px; }

.eq-list-actions { display: flex; }

.eq-add-btn {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  background: var(--surface-raised);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-md);
  padding: 0.46rem 0.75rem;
  cursor: pointer;
  transition: all 0.18s;
}
.eq-add-btn:hover { color: var(--orange-bright); border-color: var(--orange); background: rgba(255,106,26,0.05); }
.eq-add-btn svg { width: 13px; height: 13px; }

.eq-syntax-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 0.55rem 0.72rem;
  background: var(--surface-raised);
  border-radius: var(--radius-sm);
}
.eq-syntax-hint code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-code);
  background: rgba(255,180,84,0.08);
  padding: 0.04em 0.28em;
  border-radius: 3px;
}

/* ── Initial conditions ── */
.ic-block  { display: flex; flex-direction: column; }
.ic-list   { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.ic-field {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.38rem 0.58rem;
}
.ic-field-label { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-muted); }
.ic-field-input {
  width: 58px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: right;
}

/* ── Time domain ── */
.time-block { display: flex; flex-direction: column; }
.time-col   { display: flex; max-width: 10rem; flex-direction: column; gap: 0.65rem; }

.time-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.46rem 0.7rem;
}
.time-field-label { font-family: var(--font-mono); font-size: 0.8rem; color: var(--orange-bright); font-weight: 600; flex-shrink: 0; }

/* ── Method groups ── */
.method-group-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.1rem 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.method-group-label:first-of-type { margin-top: 0; }
.method-group-label .field-hint { text-transform: none; letter-spacing: 0; }
.method-group-label--future { opacity: 0.55; }

.op-rail--ghost { margin-bottom: 0.45rem; }
.op-card--ghost {
  border-style: dashed;
  opacity: 0.5;
  cursor: default;
  padding: 0.65rem 0.95rem;
}
.op-card--ghost:hover { transform: none; background: var(--surface); border-color: var(--border); }

/* ── Plot toggle ── */
.plot-toggle {
  display: flex;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 2px;
}
.plot-toggle-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s;
}
.plot-toggle-btn.active { background: var(--grad-brand); color: #fff; font-weight: 700; }
.plot-toggle-btn:not(.active):hover { color: var(--text-secondary); }

/* ── ODE plot card ── */
.ode-plot-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.ode-plot-canvas {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
  background: var(--void);
}

.plot-legend { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.plot-legend-item { display: flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-secondary); }
.plot-legend-swatch { width: 14px; height: 3px; border-radius: 2px; }

@media (max-width: 1100px) { .ode-body { grid-template-columns: 1fr; } }
