/* Presentation only: the existing four-step controller owns every state. */
.quote-card,
.privacy-page {
  --form-paper: #fffef9;
  --form-ink: #18241f;
  --form-muted: #667169;
  --form-green: #c6e995;
  --form-deep: #254b37;
  --form-line: #d8dfd3;
  --form-soft: #f3f6ed;
  --form-error: #a52e25;
  font-family: 'DM Sans', sans-serif;
  color: var(--form-ink);
}

.contact .quote-card {
  align-self: start;
  position: relative;
  width: 100%;
  min-width: 0;
  padding: clamp(26px, 3.2vw, 46px);
  border: 1px solid rgba(216, 223, 211, .9);
  border-radius: 24px;
  background: var(--form-paper);
  box-shadow: 0 24px 72px rgba(0, 0, 0, .12);
  scroll-margin-top: 112px;
}

.quote-card [hidden] { display: none !important; }
.quote-card :is(p, li, dl, dt, dd, label, summary, legend) { color: var(--form-ink); }
.quote-card p { max-width: none; }
.quote-card .eyebrow,
.quote-card #quote-form > p.eyebrow {
  margin: 0 0 16px;
  color: var(--form-deep);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: .15em;
}

.quote-card #quote-intro h3,
.quote-card #step-title {
  margin: 0 0 20px;
  color: var(--form-ink);
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.045em;
  overflow-wrap: break-word;
}

.quote-card #quote-intro > p:not(.eyebrow):not(.field-help) {
  margin: 0 0 24px;
  color: #526057;
  font-size: 1rem;
  line-height: 1.75;
}

.quote-card .field-help,
.quote-card #quote-intro > .field-help {
  margin: 8px 0 0;
  color: var(--form-muted);
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
}

.quote-card .button,
.quote-card #start-quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 15px 23px;
  border: 1px solid var(--form-green);
  border-radius: 10px;
  background: var(--form-green);
  color: var(--form-ink);
  font-family: 'DM Sans', sans-serif;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.01em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-shadow: none;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.quote-card .button:hover,
.quote-card #start-quote:hover {
  border-color: #b9df84;
  background: #b9df84;
  transform: translateY(-1px);
}

.quote-card #start-quote {
  width: 100%;
  margin: 5px 0 18px;
}

.quote-card :is(button, input, select, textarea, a, summary):focus-visible {
  outline: 3px solid var(--form-deep);
  outline-offset: 4px;
}

.quote-card #step-title:focus-visible {
  outline: 3px solid var(--form-deep);
  outline-offset: 6px;
  border-radius: 3px;
}

.quote-card #quote-form {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--form-ink);
  box-shadow: none;
  scroll-margin-top: 112px;
}

.quote-card #step-progress {
  margin: 0 0 10px;
  color: var(--form-muted);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .025em;
}

.quote-card #quote-progress {
  display: block;
  width: 100%;
  height: 5px;
  margin: 0 0 18px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #e7ebdf;
  color: var(--form-deep);
  accent-color: var(--form-deep);
  appearance: none;
}

.quote-card #quote-progress::-webkit-progress-bar { background: #e7ebdf; border-radius: 10px; }
.quote-card #quote-progress::-webkit-progress-value { background: var(--form-deep); border-radius: 10px; transition: width .25s ease; }
.quote-card #quote-progress::-moz-progress-bar { background: var(--form-deep); border-radius: 10px; }
.quote-card #quote-form > .field-help { margin: 0 0 26px; }

.quote-card .wizard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 20px;
}

.quote-card .wizard-field { min-width: 0; margin: 0; }
.quote-card .wizard-field.field-wide,
.quote-card .contact-help { grid-column: 1 / -1; }
.quote-card fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.quote-card legend { margin-bottom: 12px; padding: 0; font-size: .9375rem; font-weight: 600; }
.quote-card .wizard-field label,
.quote-card .bill-upload > label {
  display: block;
  margin: 0 0 8px;
  color: var(--form-ink);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0;
}

.quote-card .wizard-field :is(input, select, textarea) {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid #82927a;
  border-radius: 9px;
  background: #fff;
  color: var(--form-ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.quote-card .wizard-field select { padding-right: 32px; cursor: pointer; }
.quote-card .wizard-field textarea { min-height: 116px; resize: vertical; }
.quote-card .wizard-field :is(input, textarea)::placeholder { color: #788177; opacity: 1; }
.quote-card .wizard-field :is(input, select, textarea):hover { border-color: #647c59; }
.quote-card .wizard-field :is(input, select, textarea):focus {
  border-color: var(--form-deep);
  box-shadow: 0 0 0 1px var(--form-deep);
}
.quote-card .wizard-field :is(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--form-error);
  background: #fff7f3;
  box-shadow: 0 0 0 1px var(--form-error);
}
.quote-card .wizard-field :is(input, select, textarea)[aria-invalid="true"]:focus-visible { outline-color: var(--form-error); }
.quote-card .wizard-field :is(input, select, textarea):disabled { background: #edf0e8; color: #657164; cursor: wait; }
.quote-card .wizard-field :is(input[type="checkbox"], input[type="radio"]) {
  display: inline-block;
  width: 22px;
  min-height: 22px;
  height: 22px;
  margin: 0 10px 0 0;
  padding: 0;
  vertical-align: middle;
  accent-color: var(--form-deep);
}
.quote-card .wizard-field .field-help { margin: 8px 0 0; }
.quote-card .field-error {
  display: block;
  margin-top: 8px;
  color: var(--form-error);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.55;
}
.quote-card .field-error:empty { display: none; }
.quote-card .contact-help {
  margin: 0;
  padding: 12px 15px;
  border-left: 3px solid #7d9f5f;
  border-radius: 0 8px 8px 0;
  background: var(--form-soft);
  color: #51644c;
  font-size: .875rem;
  line-height: 1.55;
}

.quote-card :is(.technical-details, .summary-technical) {
  margin: 24px 0 0;
  padding: 0 16px;
  border: 1px solid var(--form-line);
  border-radius: 12px;
  background: #f7f8f2;
}
.quote-card :is(.technical-details, .summary-technical, .file-limits) > summary {
  min-height: 50px;
  padding: 13px 0;
  color: var(--form-deep);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
}
.quote-card :is(.technical-details, .summary-technical)[open] > summary {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--form-line);
}
.quote-card .technical-details > .field-help { margin: 0 0 18px; }
.quote-card .technical-details > .wizard-grid { padding-bottom: 20px; }
.quote-card .summary-technical > dl { margin-bottom: 18px; }

.quote-card .bill-upload {
  margin: 0 0 24px;
  padding: 22px;
  border: 1px solid var(--form-line);
  border-radius: 14px;
  background: var(--form-soft);
}
.quote-card .bill-upload .field-help { margin: 0 0 14px; }
.quote-card #bill {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 76px;
  margin: 0;
  padding: 12px;
  border: 1px dashed #82927a;
  border-radius: 9px;
  background: var(--form-paper);
  color: #56634f;
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  line-height: 1.6;
  box-sizing: border-box;
  cursor: pointer;
}
.quote-card #bill::file-selector-button {
  min-height: 44px;
  margin: 0 12px 0 0;
  padding: 10px 13px;
  border: 0;
  border-radius: 7px;
  background: #e4edda;
  color: var(--form-deep);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.quote-card #bill::file-selector-button:hover { background: #d8e5c9; }
.quote-card #bill-status {
  margin: 12px 0;
  color: #53634c;
  font-size: .875rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.quote-card .bill-upload:has(> button:not([hidden])) {
  border-color: #a1bd87;
  background: #eff5e7;
}
.quote-card .bill-upload:has(> button:not([hidden])) #bill-status { color: var(--form-deep); font-weight: 500; }
.quote-card .file-limits {
  margin: 16px 0 0;
  padding: 3px 0 0;
  border-top: 1px solid #d1ddc6;
}
.quote-card .file-limits > summary { min-height: 44px; padding: 10px 0; font-size: .8125rem; }
.quote-card .file-limits .field-help { margin: 0 0 8px; font-size: .8125rem; }

.quote-card .secondary-button,
.quote-card .edit-step {
  min-height: 48px;
  padding: 12px 17px;
  border: 1px solid #bbcbb0;
  border-radius: 9px;
  background: transparent;
  color: var(--form-deep);
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.quote-card .secondary-button:hover,
.quote-card .edit-step:hover { border-color: #839d72; background: #edf3e5; }
.quote-card .bill-upload > .secondary-button { min-height: 44px; padding: 9px 13px; }

.quote-card .estimate-panel {
  margin: 0 0 26px;
  padding: 25px;
  border: 1px solid #cbd9bd;
  border-radius: 14px;
  background: #eff5e6;
  color: var(--form-deep);
}
.quote-card .estimate-panel h4 {
  margin: 0 0 17px;
  color: var(--form-deep);
  font-family: 'Manrope', sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.015em;
}
.quote-card .estimate-panel :is(p, li) { color: #4f6247; font-size: .875rem; line-height: 1.7; }
.quote-card .estimate-panel p { margin: 12px 0; }
.quote-card .estimate-panel .estimate-label { color: var(--form-deep); font-size: .9375rem; font-weight: 600; }
.quote-card .estimate-panel .estimate-value {
  margin: 8px 0 16px;
  color: var(--form-deep);
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.quote-card .estimate-panel ul { margin: 12px 0 0; padding-left: 19px; }
.quote-card .estimate-panel li + li { margin-top: 8px; }
.quote-card .estimate-panel details { margin-top: 18px; padding-top: 9px; border-top: 1px solid #c9d7bc; }
.quote-card .estimate-panel summary { min-height: 44px; padding: 10px 0; color: var(--form-deep); font-size: .8125rem; font-weight: 600; cursor: pointer; }

.quote-card .summary-section { margin: 0; padding: 22px 0; border-top: 1px solid var(--form-line); }
.quote-card .summary-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; }
.quote-card .summary-heading h4 {
  margin: 0;
  color: var(--form-ink);
  font-family: 'Manrope', sans-serif;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.015em;
}
.quote-card .summary-heading .edit-step { min-height: 44px; padding: 8px 10px; border-color: transparent; font-size: .8125rem; text-decoration: underline; text-underline-offset: 4px; }
.quote-card .summary-section dl {
  display: grid;
  grid-template-columns: minmax(90px, .7fr) minmax(0, 1fr);
  gap: 11px 20px;
  margin: 16px 0 0;
  font-size: .875rem;
}
.quote-card .summary-section :is(dt, dd) { min-width: 0; margin: 0; line-height: 1.6; }
.quote-card .summary-section dt { color: var(--form-muted); font-size: .8125rem; font-weight: 400; }
.quote-card .summary-section dd { color: var(--form-ink); font-size: .875rem; font-weight: 500; overflow-wrap: anywhere; }
.quote-card .summary-section .summary-technical { margin-top: 17px; }

.quote-card .form-notice {
  margin: 22px 0;
  padding: 15px 17px;
  border: 1px solid var(--form-line);
  border-left: 3px solid #87a46a;
  border-radius: 0 9px 9px 0;
  background: #f5f7ef;
  color: #59674f;
  font-size: .8125rem;
  line-height: 1.75;
}
.quote-card .form-notice a { color: var(--form-deep); text-decoration: underline; text-underline-offset: 3px; }
.quote-card #quote-captcha { min-width: 0; max-width: 100%; margin: 20px 0 8px; overflow-x: auto; }
.quote-card #quote-captcha:empty { display: none; }
.quote-card #captcha-help { margin: 8px 0 0; color: var(--form-muted); font-size: .8125rem; line-height: 1.6; }
.quote-card #captcha-help:empty { display: none; }

.quote-card #form-status {
  margin: 0;
  color: var(--form-ink);
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.quote-card #form-status:not(:empty) {
  margin: 22px 0 0;
  padding: 15px 17px;
  border: 1px solid #eccbc1;
  border-left: 3px solid var(--form-error);
  border-radius: 0 9px 9px 0;
  background: #fff3ed;
  color: var(--form-error);
}
.quote-card #quote-form[aria-busy="true"] #form-status:not(:empty) {
  border-color: #c4d4b5;
  border-left-color: #62864b;
  background: #eff5e7;
  color: var(--form-deep);
}
.quote-card #quote-form[aria-busy="true"] #form-status::before {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 10px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  content: '';
  animation: se-form-busy .8s linear infinite;
}
.quote-card #quote-form:has(.wizard-actions[hidden]) #form-status:not(:empty) {
  border-color: #b6cf9f;
  border-left-color: #4c7c37;
  background: #eaf4e1;
  color: var(--form-deep);
}
.quote-card #quote-form:has(.wizard-actions[hidden]) #wizard-fields > .button { width: 100%; margin: 12px 0 16px; }
.quote-card #quote-form:has(.wizard-actions[hidden]) #wizard-fields > p { color: var(--form-muted); font-size: .875rem; line-height: 1.75; }
.quote-card .wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--form-line);
}
.quote-card .wizard-actions .button { flex: 1; min-width: 0; width: auto; margin: 0; white-space: normal; }
.quote-card .wizard-actions .secondary-button { flex: 0 0 auto; min-width: 108px; }
.quote-card .button:disabled,
.quote-card :is(.secondary-button, .edit-step):disabled { opacity: .58; cursor: wait; transform: none; }

/* The privacy page shares the same quiet, readable paper treatment. */
body:has(> .privacy-page) { background: #f2f4ed; }
body .privacy-page {
  width: calc(100% - 48px);
  max-width: 900px;
  margin: clamp(28px, 5vw, 72px) auto;
  padding: clamp(28px, 5.5vw, 62px);
  border: 1px solid #dce3d6;
  border-radius: 24px;
  background: var(--form-paper);
  color: var(--form-ink);
  box-shadow: 0 16px 64px rgba(24, 36, 31, .035);
  box-sizing: border-box;
}
body .privacy-page > a:first-child {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 0 28px;
  padding: 10px 14px;
  border: 1px solid #cbd7c4;
  border-radius: 8px;
  color: var(--form-deep);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}
body .privacy-page > .eyebrow { margin: 0 0 18px; color: var(--form-deep); font-size: .72rem; font-weight: 700; letter-spacing: .15em; }
body .privacy-page h1 {
  max-width: 19ch;
  margin: 0 0 24px;
  color: var(--form-ink);
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2.1rem, 4.5vw, 3.15rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.045em;
}
body .privacy-page h2 {
  margin: 38px 0 16px;
  padding-top: 26px;
  border-top: 1px solid #e0e6da;
  color: var(--form-deep);
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.12rem, 2vw, 1.3rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.02em;
}
body .privacy-page :is(p, li) { margin: 16px 0; color: #526055; font-size: .975rem; font-weight: 400; line-height: 1.85; letter-spacing: 0; }
body .privacy-page h1 + p { color: var(--form-muted); font-size: .875rem; }
body .privacy-page a:not(.button) { color: var(--form-deep); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
body .privacy-page a:not(.button):hover { color: #142c1d; text-decoration-thickness: 2px; }
body .privacy-page ul { padding-left: 22px; }
body .privacy-page .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 28px;
  padding: 14px 22px;
  border: 1px solid var(--form-green);
  border-radius: 10px;
  background: var(--form-green);
  color: var(--form-ink);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}
body .privacy-page .button:hover { background: #b9df84; border-color: #b9df84; }
body .privacy-page a:focus-visible { outline: 3px solid var(--form-deep); outline-offset: 4px; }

@keyframes se-form-busy { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .contact .quote-card { padding: 30px; border-radius: 20px; }
  .quote-card #quote-intro h3,
  .quote-card #step-title { font-size: 2rem; }
}

@media (max-width: 700px) {
  .contact .quote-card { padding: 26px 22px; border-radius: 16px; scroll-margin-top: 96px; }
  .quote-card #quote-intro h3,
  .quote-card #step-title { margin-bottom: 18px; font-size: 1.8rem; line-height: 1.18; }
  .quote-card #quote-intro > p:not(.eyebrow):not(.field-help) { font-size: .9375rem; }
  .quote-card .wizard-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .quote-card .wizard-field :is(input, select, textarea) { min-height: 52px; font-size: 1rem; }
  .quote-card .bill-upload { padding: 17px; }
  .quote-card #bill { padding: 10px; font-size: .8125rem; }
  .quote-card #bill::file-selector-button { margin-right: 9px; padding: 9px 10px; }
  .quote-card .estimate-panel { padding: 20px; }
  .quote-card .summary-section { padding: 20px 0; }
  .quote-card .summary-section dl { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .quote-card .summary-section dd { margin-bottom: 10px; }
  .quote-card .summary-section dd:last-child { margin-bottom: 0; }
  .quote-card .summary-heading { align-items: flex-start; gap: 5px 10px; }
  .quote-card .summary-heading .edit-step { padding: 7px 0; text-align: left; }
  .quote-card .wizard-actions { gap: 10px; margin-top: 25px; padding-top: 20px; }
  .quote-card .wizard-actions .secondary-button { min-width: 90px; padding: 12px; }
  .quote-card .wizard-actions .button { padding: 14px 16px; }
  body .privacy-page { width: calc(100% - 28px); margin: 18px auto; padding: 29px 23px; border-radius: 16px; }
  body .privacy-page h1 { font-size: clamp(2rem, 7.5vw, 2.65rem); }
  body .privacy-page :is(p, li) { font-size: .9375rem; line-height: 1.8; }
  body .privacy-page h2 { margin-top: 30px; padding-top: 22px; }
}

@media (max-width: 380px) {
  .contact .quote-card { padding: 23px 18px; }
  .quote-card #step-title { font-size: 1.65rem; }
  .quote-card .wizard-actions .secondary-button { min-width: 80px; }
  .quote-card .form-notice,
  .quote-card #form-status:not(:empty) { padding: 14px; }
  body .privacy-page { padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .quote-card *,
  .privacy-page * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .quote-card #quote-form[aria-busy="true"] #form-status::before { border-top-color: currentColor; }
}
