/* Phase Wizard (scoped styles)
   This file is only included on the Single-phase vs Three-phase page. */

.phase-wizard {
  --pw-text: var(--text-color);
  --pw-muted: rgba(0,0,0,0.72);
  --pw-border: var(--border-color);
  --pw-border-strong: rgba(0,0,0,0.18);
  --pw-bg: var(--card-bg);
  --pw-bg-soft: rgba(0,0,0,0.02);
  --pw-bg-hover: rgba(0,0,0,0.03);
  --pw-progress: rgba(0,0,0,0.55);
  --pw-shadow: 0 6px 18px rgba(0,0,0,0.06);

  max-width: 920px;
  margin: 0 auto;
}

.phase-wizard, .phase-wizard * { box-sizing: border-box; }

.phase-wizard__h1 {
  margin: 0 0 8px 0;
  font-size: 1.35rem;
  color: var(--primary-color);
  font-family: 'Montserrat', sans-serif;
}

.phase-wizard__intro {
  margin: 0 0 16px 0;
  color: var(--pw-muted);
}

.phase-wizard__card {
  border: 1px solid var(--pw-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--pw-shadow);
  background: var(--pw-bg);
}

.phase-wizard__progress {
  height: 8px;
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.phase-wizard__progressBar {
  height: 100%;
  width: 0%;
  background: var(--pw-progress);
  transition: width 180ms ease;
}

.phase-wizard__title {
  margin: 0 0 10px 0;
  font-size: 1.05rem;
  font-family: 'Montserrat', sans-serif;
  color: var(--primary-color);
}

.phase-wizard__body {
  margin-bottom: 12px;
  line-height: 1.5;
}

.phase-wizard__options {
  margin: 12px 0 6px;
}

.phase-wizard__error {
  margin-top: 8px;
  color: #9b1c1c;
  min-height: 1.2em;
}

.pw-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.pw-legend {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pw-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 10px;
  border: 1px solid var(--pw-border);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
  background: rgba(255,255,255,0.45);
}

.pw-option:hover { background: var(--pw-bg-hover); }

.pw-option input { margin-top: 3px; }

.pw-option__label { display: block; }

.phase-wizard__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
  flex-wrap: wrap;
}

.phase-wizard__fineprint {
  margin-top: 10px;
  font-size: 0.95em;
  color: var(--pw-muted);
}

.pw-resultBox {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--pw-border);
  background: var(--pw-bg-soft);
}

.pw-summary {
  margin-top: 10px;
  font-size: 0.95em;
  color: var(--pw-muted);
}

.pw-summary ul { margin: 6px 0 0 18px; }

@media (max-width: 520px) {
  .phase-wizard__h1 { font-size: 1.2rem; }
  .phase-wizard__card { padding: 14px; }
}

/* Page-specific illustrations */
.phase-switch-figs {
  margin-top: 1rem;
  gap: 1rem;
  justify-items: center;
  align-items: start;
}

.phase-switch-figs img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.phase-figure {
  margin: 0;
}

.phase-figure figcaption {
  margin-top: 0.5rem;
  text-align: center;
  color: rgba(0,0,0,0.72);
  font-size: 0.95rem;
}

.phase-flowchart {
  margin: 1rem 0 1.25rem 0;
  text-align: center;
}

.phase-flowchart img {
  width: 100%;
  max-width: 1100px; /* override global max-width */
  height: auto;
  margin: 0 auto;
}

.phase-flowchart figcaption {
  text-align: center;
}
