    :root {
      --page: #f8f8fc;
      --ink: #424782;
      --muted: #9a9fbe;
      --border: #d3d6e6;
      --purple: #414bd8;
      --pink: #e24af1;
      --green: #a8e37f;
      --yellow: #fff3a1;
      --error: #d23551;
      --progress: 10%;
    }

    * { box-sizing: border-box; }
    html { min-height: 100%; }
    body {
      min-height: 100vh;
      margin: 0;
      background: var(--page);
      color: var(--ink);
      font-family: Poppins, Arial, sans-serif;
      font-size: 12px;
      -webkit-font-smoothing: antialiased;
    }
    button, input, select { font: inherit; }
    button { cursor: pointer; }
    button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
      outline: 2px solid var(--purple);
      outline-offset: 2px;
    }
    .app {
      min-height: 100dvh;
      width: 100%;
      padding: 42px 20px 82px;
    }
    .step { margin: 0 auto; text-align: center; }
    .step[hidden] { display: none !important; }
    .step--small { max-width: 355px; }
    .step--car { max-width: 392px; }
    .step--driver { max-width: 448px; }
    .step--carriers { max-width: 945px; }
    .step--results { max-width: 715px; }
    /* Headings can be wider than their form controls, as in the reference images. */
    .step--small > .step-title {
      position: relative;
      left: 50%;
      transform: translateX(-50%);
      width: max-content;
      max-width: calc(100vw - 34px);
    }
    .step-title {
      font-size: clamp(19px, 2.2vw, 23px);
      line-height: 1.45;
      letter-spacing: -0.035em;
      font-weight: 600;
      margin: 0 0 4px;
    }
    .step-subtitle {
      font-size: 9px;
      line-height: 1.55;
      margin: 0 0 22px;
      color: var(--ink);
    }
   .field input.control {
      font-size: 10px !important;
  }
    .field, .option-stack { width: 100%; }
    .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 9px; }
    .field-row--birthday { grid-template-columns: .8fr 1.25fr .85fr; }
    .field { position: relative; margin: 0 0 9px; text-align: left; }
    .control {
      width: 100%;
      height: 38px !important;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 3px;
      color: var(--ink);
      padding: 0 10px;
      font-size: 10px;
      appearance: none;
      outline: none;
      transition: border-color .14s, box-shadow .14s;
      font-size: 10px !important;
      border-radius: 5px !important;
    }
    .control::placeholder { color: #b9bdd4; opacity: 1; }
    .control:focus { border-color: var(--purple); box-shadow: 0 0 0 2px rgba(65,75,216,.10); }
    select.control {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c2c6de' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 10px center;
      padding-right: 29px;
      height: 45px;
    }
    select.control:invalid, select.control.empty { color: #b9bdd4; }
    select.control option { color: var(--ink); }
    .field.invalid .control { border-color: var(--error); }
    .field-error { display: none; font-size: 9px; color: var(--error); margin: 4px 0 2px; line-height: 1.5; }
    .field.invalid .field-error { display: block; }
    .option-stack { display: grid; gap: 9px; text-align: left; margin-top: 28px; }
    .option-stack--yesno { margin-top: 20px; }
    .choice { display: block; position: relative; width: 100%; cursor: pointer; }
    .choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
    .choice-face {
      display: flex;
      min-height: 38px;
      align-items: center;
      padding: 0 11px;
      border: 1px solid var(--border);
      border-radius: 3px;
      background: white;
      color: #bcc0d7;
      font-size: 10px;
      transition: border-color .14s, color .14s, background-color .14s;
    }
    .choice input:checked + .choice-face { border-color: #b9bfe0; color: #8c93b9; }
    .choice input:focus-visible + .choice-face { outline: 2px solid var(--purple); outline-offset: 2px; }
    .choice-check { margin-left: auto; color: #8cce38; font-size: 15px; font-weight: 600; display: none; }
    .choice input:checked + .choice-face .choice-check { display: inline; }
    .choice-stack-invalid .choice-face { border-color: var(--error); }
    .choice-stack-error { display: none; color: var(--error); font-size: 9px; text-align: left; margin-top: 5px; }
    .choice-stack-invalid + .choice-stack-error { display: block; }
    .nav-buttons { display: flex; justify-content: center; gap: 9px; margin-top: 19px; }
    .btn {
      height: 38px;
      min-width: 70px;
      border-radius: 3px;
      border: 1px solid var(--border);
      background: #fff;
      color: var(--purple);
      font-size: 10px;
      font-weight: 500;
      padding: 0 18px;
      transition: filter .12s, transform .12s;
    }
    .btn:hover { filter: brightness(.97); }
    .btn:active { transform: translateY(1px); }
    .btn-primary { border-color: var(--purple); background: var(--purple); color: white; font-weight: 600; }
    .btn--wide { padding: 0 21px; }
    .field-label { display: block; font-size: 10px; margin: 12px 0 7px; text-align: center; }
    .field-label--address { margin: 21px 0 8px; }
    .toggle-row { display: flex; align-items: center; gap: 7px; margin-top: 2px; }
    .toggle-group { display: inline-flex; flex-shrink: 0; }
    .toggle-label { position: relative; cursor: pointer; }
    .toggle-label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
    .toggle-label span {
      display: inline-flex; align-items: center; justify-content: center;
      min-width: 36px; height: 28px; padding: 0 9px;
      background: white; color: var(--purple); border: 1px solid var(--border); font-size: 10px;
    }
    .toggle-label:first-child span { border-radius: 3px 0 0 3px; }
    .toggle-label:last-child span { border-left: none; border-radius: 0 3px 3px 0; }
    .toggle-label input:checked + span { background: var(--purple); color: #fff; border-color: var(--purple); }
    .toggle-label input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px; }
    .toggle-caption { text-align: left; font-size: 9px; }
    .consent-text { font-size: 8px; line-height: 1.43; color: #a6aac7; text-align: left; margin: 24px -7px 0; }
    .consent-text a { color: var(--purple); text-decoration: none; font-weight: 600; }
    .carrier-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; text-align: left; }
    .carrier-card { border: 1px solid var(--border); background: white; border-radius: 3px; min-width: 0; padding: 13px 13px 18px; min-height: 243px; }
    .carrier-price-row { display: flex; justify-content: space-between; gap: 6px; align-items: flex-start; }
    .from { font-size: 9px; color: #b2b5d0; line-height: 1.2; }
    .price { color: var(--pink); white-space: nowrap; font-size: 27px; font-weight: 400; letter-spacing: -.05em; line-height: 1.1; }
    .price small { font-size: 13px; font-weight: 400; letter-spacing: -.035em; }
    .brand { text-align: right; flex: 0 0 auto; max-width: 93px; line-height: 1.05; font-size: 11px; font-weight: 700; letter-spacing: -.045em; margin-top: 10px; }
    .brand--progressive { color: #148ad7; font-weight: 700; font-style: italic; font-size: 11px; }
    .brand--direct { color: #db1728; font-size: 14px; font-weight: 700; }
    .brand--direct small { display: block; font-size: 5px; letter-spacing: .02em; color: #383838; text-align: center; }
    .brand--general { font-family: Georgia,serif; font-size: 12px; color: #151515; text-align: center; }
    .brand--general small { display: block; font-size: 8px; }
    .brand--national { font-size: 9px; color: #ec5a22; font-weight: 700; }
    .brand--national small { display:block; font-size: 5px; color: #7181a0; font-weight: 500; }
    .brand--allstate { color: #2778d0; font-size: 13px; }
    .brand--mercury { color: #353535; font-size: 11px; line-height: .95; }
    .brand--mercury::first-letter { color:#c8232a; }
    .card-subheading { font-size: 9px; font-weight: 600; margin: 17px 0 7px; }
    .card-line { display: flex; justify-content: space-between; gap: 7px; padding: 3px 0; min-height: 20px; border-bottom: 1px solid #d7d9e6; font-size: 9px; line-height: 1.3; }
    .card-line:last-of-type { border-bottom: none; }
    .card-line span:last-child { flex-shrink: 0; }
    .card-note { color: #a4a8c5; font-size: 7px; line-height: 1.4; margin: 7px 0 15px; }
    .card-action { display: flex; justify-content: center; }
    .card-btn { min-width: 71px; padding: 0 9px; height: 38px; border: 1px solid #f3a1ff; background: white; color: var(--pink); border-radius: 3px; font-size: 10px; }
    .card-btn[aria-pressed="true"] { background: #f9e9ff; border-color: var(--pink); font-weight: 600; }
    .carrier-error { display: none; color: var(--error); font-size: 10px; margin: 8px 0 0; }
    .carrier-error.visible { display: block; }
    .step--carriers .nav-buttons { margin-top: 21px; }
    .step--results .carrier-grid { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 27px; }
    .step--results .carrier-card { min-height: 244px; padding: 14px 14px 18px; }
    .step--results .card-subheading { margin-top: 17px; }
    .step--results .card-note { margin-top: 1px; margin-bottom: 16px; }
    .step--results .card-btn { color: white; background: var(--purple); border-color: var(--purple); min-width: 74px; font-weight: 600; }
    .step--results .card-line--wrap { align-items: start; }
    .step--results .card-line--wrap span:last-child { white-space: normal; text-align: right; }
    .bottom-progress {
      position: fixed;
      bottom: 0; left: 0; right: 0;
      height: 10px;
      background: linear-gradient(to right, var(--green) 0%, var(--green) var(--progress), var(--yellow) var(--progress), var(--yellow) 100%);
      z-index: 10;
    }
    .progress-caption {
      position: fixed;
      bottom: 21px; left: 50%; transform: translateX(-50%);
      z-index: 10;
      padding: 7px 9px;
      background: white;
      border: 1px solid #e0e2eb;
      border-radius: 3px;
      box-shadow: 0 1px 1px rgba(0,0,0,.02);
      color: var(--purple);
      font-size: 9px;
      line-height: 1.2;
      white-space: nowrap;
    }
    @media (max-width: 970px) {
      .carrier-grid { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 560px; margin: 0 auto; }
      .step--results .carrier-grid { max-width: 715px; }
      .step--carriers { max-width: 650px; }
    }
    @media (max-width: 650px) {
      .app { padding: 36px 17px 92px; }
      .step-title { font-size: 21px; }
      .step-subtitle { margin-bottom: 23px; font-size: 10px; }
      .step--results .carrier-grid { grid-template-columns: 1fr; max-width: 355px; }
      .carrier-grid { gap: 13px; }
      .carrier-card { min-height: unset; }
      .step--results .carrier-card { min-height: 240px; }
      .consent-text { margin-left: 0; margin-right: 0; }
    }
    @media (max-width: 440px) {
      .carrier-grid { grid-template-columns: 1fr; max-width: 355px; }
      .field-row { gap: 7px; }
      .control { padding-left: 9px; font-size: 10px; }
      .step-title { font-size: 20px; }
      .toggle-caption { font-size: 9px; }
      .price { font-size: 29px; }
      .carrier-card { padding: 15px; }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
    }

#quoteForm .input-hide {
    visibility: hidden;
}
.onlymedicareform .field-label {
    text-align: left;
}

/**** medicare****

/* Medicare validation messages */
.custommedicare .medicare-error {
    display: none;
    width: 100%;
    color: #dc3545;
    font-size: 9px;
    line-height: 18px;
    font-weight: 400;
    margin-top: 5px;
    text-align: left;
}

/* Keep the existing Bootstrap layout intact */
.custommedicare .input-filled,
.custommedicare .col-xl-3 {
    min-width: 0;
}

/* Invalid text inputs and selects */
.custommedicare .medicare-invalid > input,
.custommedicare .medicare-invalid > select {
    border-color: #dc3545 !important;
}

/* Invalid DOB dropdowns */
.custommedicare .medicare-invalid .DOB select {
    border-color: #dc3545 !important;
}

.onlymedicareform input[type="text"] {
    font-size: 10px;
}
.onlymedicareform input[type="tel"] {
    height:38px;
    border: 1px solid #ddd;
    padding: 10px;
    font-size: 10px;
    border-radius: 5px;
}
.onlymedicareform .Coverage .InputGroup label {
  font-size: 10px;
}
/* Medicare step visibility */
.custommedicare .medicare-step[hidden] {
    display: none !important;
}

/* Medicare progress */
.custommedicare .medicare-progress {
    width: 100%;
    margin: 20px 0 30px;
}

.custommedicare .medicare-progress-track {
    width: 100%;
    height: 8px;
    background: #e5e5e5;
    border-radius: 20px;
    overflow: hidden;
}

.custommedicare .medicare-progress-bar {
    width: 25%;
    height: 100%;
    background: #951B81;
    border-radius: 20px;
    transition: width 0.3s ease;
}

.custommedicare #medicareProgressText {
    margin-top: 8px;
    text-align: right;
    font-size: 14px;
}

/* Step heading */
.custommedicare .medicare-step-title {
    margin-bottom: 25px;
}

/* Navigation */
.custommedicare .medicare-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.custommedicare .medicare-navigation .btn {
    min-width: 130px;
}

/* Medicare validation */
.custommedicare .medicare-invalid input,
.custommedicare .medicare-invalid select {
    border-color: #dc3545 !important;
}

.custommedicare .medicare-invalid .DOB select {
    border-color: #dc3545 !important;
}

@media (max-width: 575px) {
    .custommedicare .medicare-navigation {
        flex-wrap: wrap;
    }

    .custommedicare .medicare-navigation .btn {
        flex: 1;
        min-width: 0;
    }
}

/* Center Medicare form */
.custommedicare {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
}

/* Center form heading */
.custommedicare .step-title,
.custommedicare .step-subtitle {
    text-align: center;
}

/* Keep form fields compact */
.custommedicare .input-filled {
    margin-bottom: 18px;
}

/* Input and select styling */
.custommedicare .control {
    width: 100%;
    height: 38px;
    padding: 10px 15px;
    font-size: 15px;
    box-sizing: border-box;
}

/* DOB dropdowns */
.custommedicare .DOB {
    display: flex;
    gap: 10px;
    width: 100%;
}

.custommedicare .DOB select {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 10px;
    font-size: 15px;
}

/* Gender alignment */
.custommedicare .Coverage {
    width: 100%;
}

/* Center navigation buttons */
.custommedicare .medicare-navigation {
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

/* Consistent button sizing */
.custommedicare .medicare-navigation .btn {
    width: 160px;
    min-height: 48px;
}

/* Consent text */
.custommedicare .termbox {
    text-align: left;
    margin-bottom: 20px;
}

/* Mobile layout */
@media (max-width: 767px) {

    .custommedicare {
        max-width: 100%;
    }

    .custommedicare .input-filled {
        margin-bottom: 15px;
    }

    .custommedicare .medicare-navigation .btn {
        width: 48%;
    }
}

.progress-caption,
#medicareProgressText {
    position: fixed;
    bottom: 21px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 7px 9px;
    background: white;
    border: 1px solid #e0e2eb;
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(0,0,0,.02);
    color: var(--purple);
    font-size: 9px;
    line-height: 1.2;
    white-space: nowrap;
}

.bottom-progress,
#medicareProgressBar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(
        to right,
        var(--green) 0%,
        var(--green) var(--progress),
        var(--yellow) var(--progress),
        var(--yellow) 100%
    );
    z-index: 10;
    transition: background 0.3s ease;
}

/*** life insurance ***/

/* Life Insurance form validation messages */
.customlifeform .life-error {
    display: none;
    width: 100%;
    color: #dc3545;
    font-size: 9px;
    line-height: 18px;
    font-weight: 400;
    margin-top: 5px;
    text-align: left;
}

/* Keep Bootstrap columns and form layout intact */
.customlifeform .input-filled,
.customlifeform .col-xl-3 {
    min-width: 0;
}

/* Invalid input border */
.customlifeform .life-invalid > input,
.customlifeform .life-invalid > select {
    border-color: #dc3545 !important;
}

/* DOB dropdown border */
.customlifeform .life-invalid .DOB select {
    border-color: #dc3545 !important;
}

.new-insuranceform .field-label {
    text-align: left !important;
}


section.Health_Insurance {
    margin-top: 0px !important;
}
.form-cont {
    padding-top: 72.5px;
    padding-bottom: 72.5px;
}

#medicareQuoteForm .field-error {
    display: none;
    font-size: 9px;
    color: var(--error);
    margin: 4px 0 2px;
    line-height: 1.5;
}

#medicareQuoteForm .field.medicare-invalid .field-error {
    display: block;
}

#medicareQuoteForm .choice-stack-error {
    display: none;
    color: var(--error);
    font-size: 9px;
    text-align: left;
    margin-top: 5px;
}
#medicareQuoteForm .field-error {
    display: none;
}

#medicareQuoteForm .field.medicare-invalid .field-error {
    display: block;
}

#medicareQuoteForm .choice-stack-error {
    display: none;
}
.onlymedicareform .option-stack {
    margin-top: 0px !important;
}


/**** home css *****/
.dob-fields {
    display: flex;
    gap: 10px;
}

.dob-fields input {
    min-width: 0;
    text-align: center;
    height: 38px;
    font-size: 10px;
    text-align: left;
}

.dob-fields #dob_month,
.dob-fields #dob_day {
    flex: 1;
}
.customhomeform .dob-fields input::placeholder { color: #b9bdd4; opacity: 1; }
.dob-fields #dob_year {
    flex: 1.5;
}
.customhomeform .field-label {
    margin-top: 35px;
    text-align: left;
    margin-bottom: 10px;
}
.customhomeform .option-stack,
.customhealthform  .option-stack{
    margin-top: 10px;
}
#healthQuoteForm .health-dob-error {
    display: none;
    width: 100%;
    font-size: 9px;
    color: var(--error);
    margin: 4px 0 2px;
    line-height: 1.5;
    text-align: left;
}

#healthQuoteForm .health-dob-field.invalid .health-dob-error {
    display: block;
}
#healthQuoteForm .field-label {
    margin-top: 35px;
    text-align: left;
    margin-bottom: 10px;
}