/* Step-by-Step Equation Solver Scoped Styles */
.sbes-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1f2937;
  line-height: 1.5;
}

.sbes-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sbes-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.sbes-title-row h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
}

.sbes-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 20px;
  overflow-x: auto;
}

.sbes-tab-btn {
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sbes-tab-btn:hover {
  color: #2563eb;
}

.sbes-tab-btn.sbes-active-tab {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.sbes-eq-panel {
  display: none;
}

.sbes-eq-panel.sbes-active-panel {
  display: block;
}

/* Formula visual input */
.sbes-formula-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.sbes-coeff-input {
  width: 70px;
  padding: 8px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-size: 1.1rem;
  text-align: center;
  background: #f9fafb;
  color: inherit;
}

.sbes-coeff-input:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
}

.sbes-btn-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.sbes-btn {
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.sbes-btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.sbes-btn-primary:hover {
  background: #1d4ed8;
}

.sbes-btn-secondary {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

.sbes-btn-secondary:hover {
  background: #e5e7eb;
}

/* Steps Box */
.sbes-solution-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
}

.sbes-solution-header {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sbes-step-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sbes-step-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.sbes-step-title {
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.sbes-step-math {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.05rem;
  color: #1e40af;
  background: #eff6ff;
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-block;
  margin: 4px 0;
}

.sbes-step-note {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 4px;
}

.sbes-roots-banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 16px;
  color: #065f46;
  font-weight: 700;
  font-size: 1.1rem;
}

