/* ===================================================
   System Designer (configurator) — matches existing
   design tokens from style.css / guides.css.
   =================================================== */

.cfg-hero {
  background: var(--is-black); color: var(--is-white);
  padding: 4rem 2rem 2rem; text-align: center;
}
.cfg-hero .eyebrow { color: var(--is-red); }
.cfg-hero h1 {
  color: var(--is-white); font-size: clamp(1.8rem, 4vw, 2.8rem);
  max-width: 700px; margin: 0.75rem auto 1rem; line-height: 1.2;
}
.cfg-hero h1 .accent { color: var(--is-red); }
.cfg-hero-sub { max-width: 560px; margin: 0 auto; color: #C8C6CA; font-size: 1.05rem; line-height: 1.6; }

/* Progress bar */
.cfg-progress {
  display: flex; align-items: center; justify-content: center;
  padding-top: 2rem; padding-bottom: 2rem; flex-wrap: wrap; gap: 0.25rem;
}
.cfg-progress-step {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; font-weight: 600; color: var(--is-grey);
}
.cfg-progress-step span {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--is-line); display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: var(--is-grey);
}
.cfg-progress-step.active { color: var(--is-black); }
.cfg-progress-step.active span { border-color: var(--is-red); color: var(--is-red); }
.cfg-progress-step.done span { border-color: var(--is-black); background: var(--is-black); color: var(--is-white); }
.cfg-progress-line { width: 40px; height: 2px; background: var(--is-line); margin: 0 0.5rem; }

/* Steps */
.cfg-step { max-width: 760px; padding-top: 1rem; padding-bottom: 3rem; }
.cfg-step h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-bottom: 0.5rem; }
.cfg-step-sub { color: var(--is-grey); margin-bottom: 2rem; line-height: 1.6; }

.cfg-step-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--is-line);
}

/* Source / display rows */
.cfg-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 0.85rem;
  align-items: end; padding: 1.1rem; margin-bottom: 0.85rem;
  border: 1px solid var(--is-line); border-radius: var(--radius); background: var(--is-white);
}
.cfg-row-field label {
  display: block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--is-grey); margin-bottom: 0.35rem;
}
.cfg-select, .cfg-number {
  width: 100%; border: 1px solid var(--is-line); border-radius: var(--radius);
  padding: 0.55rem 0.7rem; font-family: var(--font-body); font-size: 0.92rem; background: var(--is-white);
}
.cfg-row-remove {
  background: transparent; border: 1px solid var(--is-line); border-radius: var(--radius);
  width: 34px; height: 34px; color: var(--is-grey); cursor: pointer; font-size: 1rem;
}
.cfg-row-remove:hover { border-color: var(--is-red); color: var(--is-red); }

@media (max-width: 760px) {
  .cfg-row { grid-template-columns: 1fr 1fr; }
}

/* Requirement questions (step 3) */
.cfg-question { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--is-line); }
.cfg-question:last-of-type { border-bottom: none; }
.cfg-question-label { display: block; font-weight: 700; margin-bottom: 0.4rem; font-size: 1rem; }
.cfg-question-hint { color: var(--is-grey); font-size: 0.88rem; margin-bottom: 0.85rem; line-height: 1.5; }
.cfg-radio-row { display: flex; gap: 1.5rem; }
.cfg-radio-row label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.94rem; cursor: pointer; }

/* Results (step 4) */
.cfg-summary {
  background: var(--is-offwhite); border: 1px solid var(--is-line); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 2rem; font-size: 0.94rem; line-height: 1.7;
}
.cfg-summary ul { margin: 0.5rem 0 0 1.2rem; }

.cfg-result-group { margin-bottom: 2.5rem; }
.cfg-result-group-title {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 0.3rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.cfg-result-group-note { color: var(--is-grey); font-size: 0.88rem; margin-bottom: 1rem; line-height: 1.5; }

.cfg-run-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.9rem; }
.cfg-run-table th, .cfg-run-table td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--is-line); }
.cfg-run-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--is-grey); }
.cfg-tag-cable { color: var(--is-black); font-weight: 600; }
.cfg-tag-extender { color: var(--is-red); font-weight: 700; }

.cfg-product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.cfg-product-card {
  border: 1px solid var(--is-line); border-radius: var(--radius); padding: 1rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.cfg-product-card img { width: 100%; height: 110px; object-fit: contain; margin-bottom: 0.5rem; background: var(--is-offwhite); border-radius: var(--radius); }
.cfg-product-brand { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--is-red); font-weight: 700; }
.cfg-product-title { font-weight: 700; font-size: 0.95rem; }
.cfg-product-sku { font-family: var(--font-mono); font-size: 0.76rem; color: var(--is-grey); }
.cfg-product-link { font-size: 0.85rem; font-weight: 700; margin-top: 0.4rem; }
.cfg-product-link:hover { color: var(--is-red); }

.cfg-generic-card {
  border: 1px dashed var(--is-grey); border-radius: var(--radius); padding: 1rem;
  background: var(--is-offwhite); display: flex; flex-direction: column; gap: 0.3rem;
}
.cfg-generic-tag {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--is-grey); font-weight: 700;
}
.cfg-generic-title { font-weight: 700; font-size: 0.95rem; color: var(--is-black); }
.cfg-generic-note { font-size: 0.85rem; color: var(--is-grey); line-height: 1.5; }

.cfg-cta {
  margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--is-line);
  display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
}
.cfg-cta p { font-weight: 600; margin: 0; }

.cfg-loading { color: var(--is-grey); font-size: 0.9rem; padding: 1rem 0; }
