.is-embedded {
  height: 100%;
  overflow: hidden;
}

.quote-wizard-page {
  min-height: 100vh;
  background: #eef4f7;
  color: #17212f;
}

.quote-wizard-page.is-embedded {
  height: 100vh;
  min-height: auto;
  background: transparent;
  overflow: hidden;
}

.quote-wizard-page.is-embedded .site-header,
.quote-wizard-page.is-embedded .wizard-side,
.quote-wizard-page.is-embedded .wizard-debug {
  display: none;
}

.wizard-shell {
  display: grid;
  grid-template-columns: minmax(0, 820px) minmax(240px, 320px);
  gap: 22px;
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 56px;
  align-items: start;
}

.wizard-card,
.wizard-side,
.resume-panel,
.wizard-debug > div {
  border: 1px solid #d7e3eb;
  background: #fff;
  box-shadow: 0 18px 44px rgba(23, 33, 47, .08);
}

.wizard-card {
  border-radius: 12px;
  padding: 26px;
}

#wizardTitle:focus {
  outline: none;
}

.quote-wizard-page.is-embedded .wizard-shell {
  display: block;
  width: 100%;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

.quote-wizard-page.is-embedded .wizard-card {
  border-radius: 8px;
  min-height: 100vh;
  padding: clamp(14px, 2.4vw, 22px);
  box-shadow: 0 18px 44px rgba(23, 33, 47, .08);
  overflow: hidden;
}

.quote-wizard-page.is-embedded .wizard-topline {
  gap: 8px;
}

.quote-wizard-page.is-embedded .dev-pill {
  padding: 5px 9px;
  font-size: .72rem;
}

.quote-wizard-page.is-embedded .progress-wrap {
  margin-bottom: 18px;
}

.quote-wizard-page.is-embedded .progress-track {
  height: 8px;
  margin: 7px 0 8px;
}

.quote-wizard-page.is-embedded .stage-list {
  gap: 4px;
  font-size: .68rem;
}

.quote-wizard-page.is-embedded .stage-list li {
  padding: 5px 3px;
}

.wizard-side {
  border-radius: 10px;
  padding: 22px;
  position: sticky;
  top: 18px;
}

.wizard-side h2 {
  margin: 0 0 10px;
  color: #084669;
  font-size: 1.2rem;
}

.wizard-side p,
.wizard-side li {
  color: #4d5f73;
  line-height: 1.55;
}

.wizard-side ul {
  margin: 16px 0 0;
  padding-left: 20px;
}

.wizard-topline,
.stage-row,
.wizard-actions,
.resume-actions,
.summary-row,
.record-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.dev-pill {
  padding: 6px 10px;
  border-radius: 999px;
  color: #0e5d45;
  background: #e8f7ee;
  font-size: .78rem;
  font-weight: 900;
}

.resume-panel {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 18px;
  padding: 14px;
  border-radius: 8px;
  background: #f8fbfd;
}

.resume-panel span {
  display: block;
  color: #5f7084;
  font-weight: 700;
  margin-top: 3px;
}

.compact-action {
  width: auto;
  min-height: 38px;
  padding: 9px 13px;
  white-space: nowrap;
}

.progress-wrap {
  margin: 0 0 28px;
}

.stage-row {
  color: #084669;
  font-weight: 900;
}

.progress-track {
  height: 10px;
  margin: 10px 0 12px;
  border-radius: 999px;
  background: #dce7ef;
  overflow: hidden;
}

#progressBar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b5e8e, #237a57);
  transition: width .22s ease;
}

.stage-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #6b7c90;
  font-size: .76rem;
  font-weight: 900;
  text-align: center;
}

.stage-list li {
  padding: 6px 4px;
  border-radius: 999px;
}

.stage-list li.is-active,
.stage-list li.is-done {
  color: #fff;
  background: #0b5e8e;
}

.step-category {
  margin: 0 0 10px;
  color: #237a57;
  font-weight: 950;
  text-transform: uppercase;
  font-size: .78rem;
}

.wizard-card h1 {
  max-width: 720px;
  margin: 0 0 10px;
  color: #10244a;
  font-size: clamp(2rem, 4vw, 3.05rem);
  line-height: 1.02;
}

.quote-wizard-page.is-embedded .step-category {
  margin-bottom: 6px;
  font-size: .72rem;
}

.quote-wizard-page.is-embedded .wizard-card h1 {
  max-width: 760px;
  margin-bottom: 7px;
  font-size: clamp(1.75rem, 4.6vw, 2.75rem);
  line-height: 1.01;
}

.quote-wizard-page.is-embedded .wizard-help {
  margin: 0;
  font-size: .94rem;
  line-height: 1.45;
}

.quote-wizard-page.is-embedded .zip-start-row {
  margin: 14px 0 6px;
}

.quote-wizard-page.is-embedded .zip-start-row input {
  min-height: 48px;
  padding: 10px 12px;
  font-size: 1.02rem;
}

.quote-wizard-page.is-embedded .notice {
  margin-top: 12px;
  padding: 11px 12px;
  line-height: 1.36;
}

.quote-wizard-page.is-embedded .wizard-actions {
  margin-top: 16px;
}

.quote-wizard-page.is-embedded .privacy-note {
  margin-top: 12px;
  font-size: .78rem;
  line-height: 1.35;
}

.wizard-help {
  max-width: 700px;
  color: #4d5f73;
  font-size: 1.02rem;
  line-height: 1.6;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 8px;
}

.answer-card {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 88px;
  padding: 17px;
  border: 1px solid #ccdae5;
  border-radius: 8px;
  background: #fbfdff;
  color: #17212f;
  text-align: left;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.answer-card:hover,
.answer-card:focus-visible {
  transform: translateY(-1px);
  border-color: #0b5e8e;
  box-shadow: 0 14px 28px rgba(11, 94, 142, .13);
}

.answer-card.is-selected {
  border-color: #237a57;
  background: #effaf4;
  box-shadow: inset 0 0 0 2px rgba(35, 122, 87, .18);
}

.answer-card small,
.answer-card .tag {
  color: #5f7084;
  font-weight: 800;
}

.answer-card .tag {
  display: inline-block;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #0e5d45;
  background: #dff4e9;
  font-size: .72rem;
}

.field-grid,
.record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 10px;
}

.field-grid label,
.single-field label,
.record-grid label,
.consent-line {
  display: grid;
  gap: 7px;
  margin: 0;
  color: #586a80;
  font-weight: 800;
}

.field-grid input,
.field-grid select,
.field-grid textarea,
.single-field input,
.single-field select,
.single-field textarea,
.record-grid input,
.record-grid select,
.record-grid textarea {
  min-height: 48px;
  border: 1px solid #c9d8e5;
  border-radius: 8px;
  padding: 11px 12px;
  color: #17212f;
  font: inherit;
}

.wide-field,
.single-field,
.full-row {
  grid-column: 1 / -1;
}

.single-field {
  margin: 20px 0 6px;
}

.zip-start-row {
  margin: 22px 0 8px;
}

.zip-start-row label {
  display: grid;
  gap: 8px;
  max-width: 360px;
  color: #084669;
  font-weight: 900;
}

.zip-start-row input {
  min-height: 56px;
  border: 2px solid #b9d2e2;
  border-radius: 8px;
  padding: 13px 15px;
  color: #10244a;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 850;
  background: #fff;
}

.notice {
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid #cfe7dd;
  border-left: 5px solid #237a57;
  border-radius: 8px;
  color: #0e5d45;
  background: #f1fbf5;
  font-weight: 800;
  line-height: 1.5;
}

.warning-note {
  border-left-color: #d4a017;
  color: #7d5208;
  background: #fff9e9;
}

.record-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.record-card {
  border: 1px solid #d9e5ed;
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.record-card h3 {
  margin: 0;
  color: #10244a;
  font-size: 1rem;
}

.record-card p {
  margin: 5px 0 0;
  color: #5f7084;
  font-weight: 750;
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.text-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #c7dce8;
  border-radius: 7px;
  color: #0b5e8e;
  background: #eaf3f8;
  font-weight: 900;
}

.add-record-button {
  margin-top: 14px;
}

.consent-line {
  grid-template-columns: auto 1fr;
  align-items: start;
  padding: 14px;
  border: 1px solid #cfe1ea;
  border-radius: 8px;
  background: #f8fbfd;
  color: #17212f;
  line-height: 1.45;
}

.consent-line input {
  width: auto;
  margin-top: 4px;
}

.review-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.review-section {
  border: 1px solid #dbe8e2;
  border-radius: 8px;
  padding: 14px;
  background: #fbfffd;
}

.review-section h2 {
  margin: 0 0 10px;
  color: #084669;
  font-size: 1.05rem;
}

.summary-row {
  align-items: start;
  padding: 7px 0;
  border-top: 1px solid #edf2f5;
}

.summary-row:first-of-type {
  border-top: 0;
}

.summary-row span:first-child {
  color: #64758a;
  font-weight: 850;
}

.summary-row span:last-child {
  color: #17212f;
  text-align: right;
  overflow-wrap: anywhere;
}

.completion-panel {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.completion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wizard-error {
  min-height: 22px;
  margin: 14px 0 0;
  color: #a64034;
  font-weight: 850;
}

.field-error {
  color: #a64034;
  font-size: .82rem;
  font-weight: 850;
}

.wizard-actions {
  margin-top: 22px;
}

.wizard-actions button {
  width: auto;
  min-width: 150px;
}

.privacy-note {
  margin: 14px 0 0;
  color: #607184;
  text-align: center;
  font-size: .9rem;
  font-weight: 750;
}

.hidden {
  display: none !important;
}

.wizard-debug {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  width: min(420px, calc(100% - 32px));
}

.wizard-debug > button {
  float: right;
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
}

.wizard-debug > div {
  clear: both;
  margin-top: 48px;
  border-radius: 10px;
  padding: 14px;
}

.wizard-debug pre {
  max-height: 260px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: #17212f;
  color: #eef4f7;
  font-size: .75rem;
}

.debug-check {
  display: flex;
  gap: 8px;
  align-items: center;
}

@media (max-width: 900px) {
  .wizard-shell {
    grid-template-columns: 1fr;
  }

  .wizard-side {
    position: static;
  }
}

@media (max-width: 640px) {
  .wizard-shell {
    width: min(100% - 20px, 760px);
    margin-top: 14px;
  }

  .wizard-card {
    padding: 18px;
  }

  .answer-grid,
  .field-grid,
  .record-grid {
    grid-template-columns: 1fr;
  }

  .stage-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .wizard-actions,
  .resume-panel,
  .resume-actions,
  .completion-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .wizard-actions button,
  .compact-action {
    width: 100%;
  }
}
