:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8f5ec;
  --ink: #102033;
  --muted: #657180;
  --line: #d8dee8;
  --green: #167a5a;
  --green-dark: #0d5c43;
  --navy: #071a33;
  --navy-soft: #eef3f9;
  --gold: #b98a2e;
  --gold-dark: #8d651d;
  --gold-soft: #fbf6e8;
  --danger: #a43b37;
  --focus: #b98a2e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--ink);
  margin: 0;
}

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

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

a {
  color: inherit;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

.form-header {
  align-items: center;
  background: rgba(7, 26, 51, 0.98);
  border-bottom: 3px solid var(--gold);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 74px;
  padding: 12px clamp(16px, 4vw, 42px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  background: #071a33;
  border: 1px solid rgba(185, 138, 46, 0.42);
  border-radius: 8px;
  display: block;
  height: 54px;
  object-fit: contain;
  padding: 4px;
  width: 54px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.1;
}

.brand small {
  color: #e5c77c;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.support-link,
.primary-action,
.secondary-action {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  text-decoration: none;
}

.support-link {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(229, 199, 124, 0.58);
  color: #fff;
}

.quote-layout {
  margin: 0 auto;
  max-width: 1160px;
  padding: 28px clamp(16px, 4vw, 42px) 48px;
}

.intro-strip {
  display: block;
  margin-bottom: 18px;
  max-width: 760px;
}

.eyebrow {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.intro-strip h1 {
  color: var(--navy);
  font-size: 38px;
  line-height: 1.08;
  margin-bottom: 10px;
}

.intro-strip p,
.section-heading p,
.field-help,
.form-feedback,
.success-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.questionnaire {
  display: grid;
  gap: 14px;
}

.form-band,
.progress-band,
.success-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(7, 26, 51, 0.04);
  padding: clamp(18px, 3vw, 28px);
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  max-width: 820px;
}

.section-heading h2,
.success-panel h2 {
  color: var(--navy);
  font-size: 24px;
  line-height: 1.2;
}

.insurance-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.type-option {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 10px;
  min-height: 140px;
  padding: 14px;
  text-align: left;
}

.type-option:hover,
.type-option[aria-checked="true"] {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.type-option[aria-checked="true"] {
  background: var(--gold-soft);
}

.type-option svg {
  color: var(--gold-dark);
  height: 30px;
  width: 30px;
}

.type-option strong {
  color: var(--navy);
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.type-option span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.progress-band {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.35fr);
}

.progress-band strong,
.progress-band span {
  display: block;
}

.progress-band strong {
  color: var(--navy);
}

.progress-band span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}

.progress-track {
  background: var(--navy-soft);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-track span {
  background: linear-gradient(90deg, var(--gold), #e3c06a);
  display: block;
  height: 100%;
  width: 0;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.wide {
  grid-column: 1 / -1;
}

.field label,
.field legend {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.required-mark {
  color: var(--danger);
  margin-left: 3px;
}

.field input,
.field select,
.field textarea {
  background: #fff;
  border: 1px solid #cbd4df;
  border-radius: 6px;
  color: var(--ink);
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.consent-row input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(185, 138, 46, 0.18);
  outline: 0;
}

.field-help {
  font-size: 13px;
}

.choice-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
}

.choice input {
  accent-color: var(--gold);
  height: 16px;
  min-height: 0;
  padding: 0;
  width: 16px;
}

.choice span {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.consent-row {
  align-items: flex-start;
  color: var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 800;
  gap: 10px;
  line-height: 1.45;
}

.consent-row input {
  accent-color: var(--gold);
  flex: 0 0 auto;
  height: 18px;
  margin-top: 2px;
  width: 18px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.primary-action {
  background: var(--navy);
  color: #fff;
}

.primary-action:hover {
  background: #0d2a50;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.72;
}

.secondary-action {
  background: #fff;
  border-color: var(--line);
  color: var(--navy);
}

.secondary-action:hover,
.support-link:hover {
  border-color: var(--gold);
}

.form-feedback {
  font-size: 14px;
  font-weight: 800;
  margin-top: 12px;
  min-height: 22px;
}

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

.form-feedback.success {
  color: var(--green-dark);
}

.hp-field {
  display: none;
}

.success-panel {
  margin-top: 16px;
}

.success-panel[hidden] {
  display: none;
}

.success-panel h2 {
  margin-bottom: 10px;
}

.success-panel .secondary-action {
  margin-top: 16px;
}

@media (max-width: 980px) {
  .progress-band {
    grid-template-columns: 1fr;
  }

  .insurance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .form-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-logo {
    height: 50px;
    width: 50px;
  }

  .support-link {
    width: 100%;
  }

  .quote-layout {
    padding-top: 20px;
  }

  .intro-strip h1 {
    font-size: 30px;
  }

  .insurance-grid,
  .fields-grid,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .type-option {
    min-height: 118px;
  }

  .form-actions,
  .primary-action,
  .secondary-action {
    width: 100%;
  }
}
