:root {
  color-scheme: light;
  --ink: #101820;
  --navy: #18242c;
  --blue: #397bb8;
  --gold: #e5ad35;
  --paper: #f4f6f7;
  --white: #ffffff;
  --muted: #60717c;
  --line: #d8e0e5;
  --danger: #a73328;
  --success: #197b58;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

.quote-header {
  min-height: 94px;
  padding: 16px clamp(18px, 4vw, 46px);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 4px solid var(--gold);
}

.brand {
  display: block;
  width: min(330px, 62vw);
}

.brand img {
  display: block;
  width: 100%;
  max-height: 80px;
  object-fit: contain;
  object-position: left center;
  background: var(--white);
}

.language-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #8a979f;
  border-radius: 6px;
  overflow: hidden;
  flex: 0 0 auto;
}

.language-switch button {
  min-width: 58px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-weight: 700;
}

.language-switch button[aria-pressed="true"] {
  background: var(--white);
  color: var(--ink);
}

.quote-page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 32px;
}

.quote-intro {
  max-width: 780px;
  margin-bottom: 30px;
}

.eyebrow,
.form-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quote-intro h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.1rem, 7vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.quote-intro > p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.intro-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.intro-points span {
  padding: 8px 12px;
  background: #e8edf0;
  border-left: 4px solid var(--blue);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-shell {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(16, 24, 32, 0.1);
  overflow: hidden;
}

.form-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(22px, 4vw, 38px) clamp(20px, 5vw, 52px) 18px;
}

.form-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
}

.step-count {
  color: var(--muted);
  white-space: nowrap;
}

.step-count strong {
  color: var(--ink);
  font-size: 1.45rem;
}

.progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 clamp(20px, 5vw, 52px);
}

.progress span {
  display: block;
  height: 5px;
  background: #dfe5e8;
}

.progress span.active {
  background: var(--blue);
}

form {
  padding: 12px clamp(20px, 5vw, 52px) clamp(26px, 5vw, 52px);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

fieldset[hidden] {
  display: none;
}

legend {
  width: 100%;
  margin: 0 0 20px;
  padding: 20px 0 14px;
  border-bottom: 1px solid var(--line);
  font-size: 1.18rem;
  font-weight: 800;
}

label:not(.consent) {
  display: grid;
  gap: 8px;
  margin-bottom: 19px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #b9c5cb;
  border-radius: 5px;
  outline: 0;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(57, 123, 184, 0.18);
}

[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(167, 51, 40, 0.12);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.estimate {
  margin: 4px 0 22px;
  padding: 16px 18px;
  background: #fbf3df;
  border-left: 5px solid var(--gold);
}

.estimate strong {
  display: block;
  margin-bottom: 5px;
}

.estimate p {
  margin: 0;
  color: #4c5357;
}

.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
}

.step-actions.end {
  justify-content: flex-end;
}

.step-actions button {
  min-height: 52px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  cursor: pointer;
  font-weight: 800;
}

.step-actions .primary {
  background: var(--gold);
  color: var(--ink);
}

.step-actions .primary:hover,
.step-actions .primary:focus-visible {
  background: #f0bd4b;
}

.step-actions .secondary {
  background: var(--white);
  color: var(--ink);
}

.step-actions .submit {
  flex: 1;
  max-width: 420px;
}

.help-text,
.privacy-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.review-item {
  padding: 13px 14px;
  background: #f3f6f7;
  border-left: 4px solid var(--blue);
}

.review-item small {
  display: block;
  color: var(--muted);
}

.review-item strong {
  display: block;
  overflow-wrap: anywhere;
}

.consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  align-items: start;
  margin: 18px 0;
}

.consent input {
  width: 20px;
  min-height: 20px;
  margin: 3px 0 0;
}

.form-status {
  min-height: 26px;
  margin: 14px 0 0;
  color: var(--muted);
  text-align: center;
}

.form-status.error {
  color: var(--danger);
}

.contact-strip {
  margin: 24px 0 0;
  padding: 22px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
  text-align: center;
}

.contact-strip a {
  color: #ffcc55;
  overflow-wrap: anywhere;
}

footer {
  padding: 22px 18px 34px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-size: 0.84rem;
}

.hidden-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 640px) {
  .quote-header {
    min-height: 82px;
    padding: 12px 14px;
  }

  .brand {
    width: min(260px, 65vw);
  }

  .language-switch button {
    min-width: 50px;
  }

  .quote-page {
    width: min(100% - 20px, 1080px);
    padding-top: 28px;
  }

  .field-grid,
  .review {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .review {
    gap: 9px;
  }

  .form-heading {
    align-items: center;
  }

  .step-actions button {
    flex: 1;
    padding-inline: 10px;
  }

  .step-actions .submit {
    max-width: none;
  }
}

@media (max-width: 410px) {
  .quote-header {
    align-items: stretch;
    flex-direction: column;
  }

  .brand {
    width: 100%;
  }

  .brand img {
    max-height: 74px;
    object-position: center;
  }

  .language-switch {
    width: 100%;
  }
}
