:root {
  --navy: #163047;
  --navy-deep: #0c2235;
  --ink: #24384b;
  --muted: #6e8090;
  --muted-2: #91a0ad;
  --teal: #087a6e;
  --teal-dark: #075f57;
  --teal-soft: #e8f7f4;
  --blue: #2477e3;
  --blue-soft: #edf5ff;
  --green: #16855a;
  --amber: #b7791f;
  --red: #c84f53;
  --paper: #ffffff;
  --canvas: #f4f8fa;
  --line: #dce6eb;
  --line-strong: #c9d7de;
  --shadow-sm: 0 2px 8px rgba(20, 48, 67, .06);
  --shadow-md: 0 16px 42px rgba(20, 48, 67, .12);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body.has-modal { overflow: hidden; }

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
a { color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.is-hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; }

.topbar {
  height: 74px;
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  align-items: center;
  padding: 0 28px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; width: max-content; }
.brand-mark { width: 38px; height: 42px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #0a9182, #075d55); clip-path: polygon(50% 0, 92% 13%, 86% 69%, 50% 100%, 14% 69%, 8% 13%); }
.brand-mark span { font: 800 24px/1 Manrope, sans-serif; transform: translateY(-1px); }
.brand strong { display: block; color: var(--navy); font: 800 17px/1.1 Manrope, sans-serif; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

.progress { display: flex; align-items: center; justify-content: center; }
.progress-step { display: inline-flex; align-items: center; gap: 8px; color: var(--muted-2); font-weight: 700; font-size: 12px; }
.progress-step b { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font: 700 11px Manrope; background: white; }
.progress-step em { font-style: normal; }
.progress > i { width: 58px; height: 1px; margin: 0 11px; background: var(--line-strong); }
.progress-step.is-active, .progress-step.is-done { color: var(--teal); }
.progress-step.is-active b { color: white; border-color: var(--teal); background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.progress-step.is-done b { border-color: var(--teal); }
.progress-step.is-done b::after { content: "✓"; }
.progress-step.is-done b { font-size: 0; }

.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.language-picker { position: relative; }
.language-picker select { min-height: 39px; padding: 0 30px 0 11px; color: var(--navy); border: 1px solid var(--line); border-radius: 9px; outline: none; background: white; font-size: 12px; font-weight: 700; }
.language-picker select:hover { border-color: #9eb7c1; }
.language-picker select:focus-visible { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 122, 110, .12); }
.button, .icon-button, .text-button { border: 0; background: none; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border-radius: 9px; font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button svg { width: 17px; height: 17px; }
.button-primary { color: white; background: var(--teal); box-shadow: 0 5px 15px rgba(8, 122, 110, .2); }
.button-primary:hover { background: var(--teal-dark); box-shadow: 0 8px 22px rgba(8, 122, 110, .25); }
.button-subtle { color: var(--navy); border: 1px solid var(--line-strong); background: white; }
.button-subtle:hover { border-color: #9eb7c1; box-shadow: var(--shadow-sm); }
.icon-button { width: 39px; height: 39px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: white; }
.icon-button:hover { border-color: #9eb7c1; background: #f9fbfc; }
.text-button { padding: 0; color: var(--teal); font-size: 13px; font-weight: 700; }

.quote-hero { position: relative; padding: 56px 28px 46px; overflow: hidden; background: radial-gradient(circle at 85% 15%, rgba(15, 155, 140, .11), transparent 29%), linear-gradient(180deg, #fbfefe, #f4f8fa); border-bottom: 1px solid var(--line); }
.quote-hero::after { content: ""; position: absolute; width: 380px; height: 380px; border: 1px solid rgba(8, 122, 110, .08); border-radius: 50%; top: -260px; right: 7%; box-shadow: 0 0 0 55px rgba(8, 122, 110, .025), 0 0 0 115px rgba(8, 122, 110, .018); pointer-events: none; }
.hero-copy { max-width: 760px; margin: 0 auto 34px; text-align: center; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 13px; color: var(--teal); text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 800; }
.eyebrow .eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: #16ad84; box-shadow: 0 0 0 4px rgba(22, 173, 132, .12); }
.hero-copy h1 { margin: 0; color: var(--navy-deep); font: 800 clamp(29px, 3vw, 42px)/1.14 Manrope, sans-serif; letter-spacing: -.035em; }
.hero-copy > p:last-child { max-width: 660px; margin: 14px auto 0; color: var(--muted); line-height: 1.6; }

.quote-builder { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1.18fr .82fr; max-width: 1320px; margin: 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 25px 60px rgba(22, 48, 71, .1); }
.builder-panel, .eligibility-panel { min-width: 0; padding: 25px 27px; }
.builder-panel { border-right: 1px solid var(--line); }
.panel-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.panel-icon { flex: 0 0 auto; width: 35px; height: 35px; display: grid; place-items: center; color: var(--teal); border-radius: 10px; background: var(--teal-soft); }
.panel-icon svg { width: 18px; height: 18px; }
.panel-heading h2 { margin: 0; color: var(--navy); font: 800 15px/1.2 Manrope, sans-serif; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.applicants-heading { margin-bottom: 14px; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.field > span, .mini-field > span { display: block; margin-bottom: 7px; color: var(--ink); font-size: 11px; font-weight: 700; }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.field input, .field select, .mini-field input, .mini-field select, .sort-control select, .search-select input { width: 100%; min-height: 41px; padding: 0 12px; outline: none; color: var(--navy); border: 1px solid var(--line-strong); border-radius: 8px; background: white; transition: border .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .mini-field input:focus, .mini-field select:focus, .sort-control select:focus, .search-select input:focus { border-color: #4ba89f; box-shadow: 0 0 0 3px rgba(8, 122, 110, .1); }
.field input.is-invalid, .mini-field input.is-invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200, 79, 83, .09); }
.input-with-action { position: relative; }
.input-with-action input { padding-right: 39px; }
.input-status { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; display: none; place-items: center; color: white; border-radius: 50%; background: var(--green); font-size: 11px; }
.input-status.is-valid { display: grid; }
.input-status.is-valid::after { content: "✓"; }
.input-status.is-loading { display: block; border: 2px solid var(--line); border-top-color: var(--teal); background: transparent; animation: spin .7s linear infinite; }
.money-input { position: relative; }
.money-input > span { position: absolute; left: 12px; top: 50%; z-index: 1; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.money-input input { padding-left: 28px; }
.number-stepper { display: grid; grid-template-columns: minmax(0, 1fr) 42px 42px; }
.number-stepper input { min-width: 0; border-radius: 8px 0 0 8px; appearance: textfield; }
.number-stepper input::-webkit-inner-spin-button { appearance: none; }
.number-stepper button { display: grid; place-items: center; color: var(--navy); border: 1px solid var(--line-strong); border-left: 0; background: #f2f7fa; font-size: 20px; cursor: pointer; }
.number-stepper button:last-child { border-radius: 0 8px 8px 0; }
.number-stepper button:disabled { color: var(--muted-2); cursor: not-allowed; opacity: .55; }

.applicant-list { display: grid; gap: 9px; }
.applicant-card { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfe; }
.applicant-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.applicant-card-head strong { color: var(--navy); font: 700 11px Manrope; }
.remove-applicant { width: 22px; height: 22px; display: grid; place-items: center; padding: 0; color: var(--muted); border: 0; border-radius: 5px; background: transparent; }
.remove-applicant:hover { color: var(--red); background: #fff0f0; }
.remove-applicant svg { width: 13px; height: 13px; }
.applicant-fields { display: grid; grid-template-columns: 68px 88px 1fr; gap: 9px; align-items: end; }
.mini-field input, .mini-field select { min-height: 36px; padding: 0 9px; font-size: 12px; }
.segmented-field { display: grid; grid-template-columns: 1fr 1fr; padding: 0; margin: 0; border: 0; }
.segmented-field legend { grid-column: 1/-1; margin-bottom: 7px; color: var(--ink); font-size: 11px; font-weight: 700; }
.segmented-field label span { height: 36px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line-strong); background: white; font-size: 12px; font-weight: 700; }
.segmented-field label:first-of-type span { border-radius: 7px 0 0 7px; }
.segmented-field label:last-of-type span { margin-left: -1px; border-radius: 0 7px 7px 0; }
.segmented-field input { position: absolute; opacity: 0; }
.segmented-field input:checked + span { position: relative; z-index: 1; color: var(--teal); border-color: var(--teal); background: var(--teal-soft); }
.special-details { margin-top: 9px; }
.special-details summary { display: flex; align-items: center; justify-content: space-between; color: var(--teal); cursor: pointer; list-style: none; font-size: 10px; font-weight: 700; }
.special-details summary::-webkit-details-marker { display: none; }
.special-details summary svg { width: 13px; height: 13px; transition: transform .15s; }
.special-details[open] summary svg { transform: rotate(180deg); }
.special-grid { display: grid; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.special-grid label { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.special-grid input { accent-color: var(--teal); }
.applicant-actions { display: flex; gap: 19px; margin-top: 13px; padding-left: 2px; }
.applicant-actions .text-button span { margin-right: 3px; font-size: 17px; font-weight: 500; vertical-align: -1px; }

.eligibility-panel { display: flex; flex-direction: column; background: linear-gradient(180deg, #fbfefe, #f6fbfa); }
.eligibility-icon { color: var(--blue); background: var(--blue-soft); }
.eligibility-empty { min-height: 110px; display: grid; grid-template-columns: 25px 1fr; align-content: center; gap: 9px; padding: 16px; color: var(--muted); border: 1px dashed #bfd0d7; border-radius: 10px; background: rgba(255,255,255,.7); }
.eligibility-empty svg { width: 21px; height: 21px; color: #8299a4; }
.eligibility-empty p { margin: 0; font-size: 11px; line-height: 1.5; }
.eligibility-empty.is-ready { color: var(--teal); border-color: #82c9bc; background: #f0fbf8; }
.eligibility-empty.is-loading { color: var(--teal); border-style: solid; border-color: #9cd8cd; background: #f0fbf8; }
.eligibility-empty.is-loading svg { animation: spin 1s linear infinite; }
.eligibility-result { min-height: 110px; padding: 15px; border: 1px solid #b8e5dc; border-radius: 10px; background: #edfaf7; }
.eligibility-result.is-warning { border-color: #efd69d; background: #fff9ea; }
.eligibility-result.is-alert { border-color: #ecc5c5; background: #fff3f2; }
.eligibility-result > span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.eligibility-result strong { display: block; margin: 5px 0 2px; color: var(--green); font: 800 25px Manrope; }
.eligibility-result strong small { font-size: 11px; }
.eligibility-result p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.eligibility-people { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.eligibility-people span { padding: 4px 6px; color: var(--navy); border-radius: 5px; background: rgba(255,255,255,.8); font-size: 9px; font-weight: 700; }
.medicaid-review { display: grid; gap: 7px; margin-top: 11px; }
.medicaid-person { display: grid; gap: 7px; padding: 9px 10px; color: var(--navy); border: 1px solid rgba(174,145,69,.24); border-radius: 8px; background: rgba(255,255,255,.82); cursor: pointer; }
.eligibility-result:not(.is-warning) .medicaid-person { border-color: rgba(40,151,129,.24); }
.medicaid-person-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.medicaid-person-head b { font-size: 10px; }
.medicaid-person-head small { color: var(--muted); font-size: 8px; }
.medicaid-toggle { display: flex; align-items: flex-start; gap: 7px; color: var(--navy); font-size: 9px; font-weight: 700; line-height: 1.35; }
.medicaid-toggle input { width: 15px; height: 15px; flex: 0 0 15px; margin: -1px 0 0; accent-color: var(--teal); }
.medicaid-toggle input:disabled { cursor: wait; opacity: .55; }
.quote-submit { width: 100%; margin-top: auto; padding: 0 14px; }
.quote-submit.is-loading { opacity: .65; pointer-events: none; }
.quote-submit:disabled { color: #7f909d; background: #dbe5ea; cursor: not-allowed; box-shadow: none; transform: none; }
.results-section.is-refreshing { opacity: .58; pointer-events: none; transition: opacity .2s; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 9px 0 0; color: var(--muted-2); font-size: 9px; }
.secure-note svg { width: 12px; height: 12px; }
.example-link { margin: 3px auto 0; padding: 2px 0; color: var(--teal); border: 0; border-bottom: 1px dashed #8fc5bd; background: transparent; font-size: 9px; font-weight: 700; }

.results-section { max-width: 1460px; margin: 0 auto; padding: 34px 28px 110px; scroll-margin-top: 82px; }
.results-summary-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 22px; }
.back-link { display: flex; align-items: center; gap: 3px; margin: 0 0 9px; padding: 0; color: var(--teal); border: 0; background: none; font-size: 11px; font-weight: 700; }
.back-link svg { width: 14px; height: 14px; }
.results-summary-bar h2 { margin: 0; color: var(--navy-deep); font: 800 29px Manrope; letter-spacing: -.03em; }
.results-summary-bar > div > p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.credit-card { min-width: 245px; padding: 14px 18px; color: #0a685b; border: 1px solid #bde3db; border-radius: 12px; background: linear-gradient(135deg, #effbf8, #f9fffd); box-shadow: var(--shadow-sm); }
.credit-card > span { display: block; font-size: 10px; font-weight: 700; }
.credit-card strong { display: block; margin: 3px 0; font: 800 25px Manrope; }
.credit-card strong small { margin-left: 3px; font-size: 10px; }
.credit-card em { color: #668a83; font-size: 9px; font-style: normal; }

.results-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }

body.embed-mode .topbar{display:none}
body.embed-mode .quote-hero{padding:18px 16px 24px}
body.embed-mode .quote-hero::after{display:none}
body.embed-mode .hero-copy{display:none}
body.embed-mode .quote-builder{max-width:none;border-radius:14px;box-shadow:0 10px 28px rgba(22,48,71,.08)}
body.embed-mode .results-section{max-width:none;padding:24px 16px 110px}
body.embed-mode .results-layout{grid-template-columns:245px minmax(0,1fr);gap:16px}
@media(max-width:900px){body.embed-mode .results-layout{grid-template-columns:1fr}}
.filters-panel { position: sticky; top: 91px; max-height: calc(100dvh - 107px); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow-sm); }
.filters-heading { display: flex; align-items: flex-start; justify-content: space-between; padding: 17px; border-bottom: 1px solid var(--line); }
.filters-heading h3 { margin: 0; color: var(--navy); font: 800 13px Manrope; }
.filters-heading span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.filter-group { padding: 17px; margin: 0; border: 0; border-bottom: 1px solid var(--line); }
.filter-group:last-child { border-bottom: 0; }
.filter-group h4, .filter-group legend { margin: 0 0 11px; color: var(--navy); font: 700 11px Manrope; }
.filter-group legend { padding: 17px 17px 0; }
fieldset.filter-group { padding: 0 0 14px; }
.quick-match > p { margin: -7px 0 11px; color: var(--muted); font-size: 9px; }
.filter-title { display: flex; justify-content: space-between; align-items: center; }
.filter-title output { color: var(--teal); font-size: 9px; font-weight: 700; }
.range { width: 100%; accent-color: var(--teal); }
.range-labels { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 8px; }
.check-list label { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 17px; color: var(--muted); font-size: 10px; cursor: pointer; }
.check-list label > span:first-of-type { display: flex; align-items: center; gap: 7px; }
.check-list input { accent-color: var(--teal); }
.check-list em { min-width: 21px; padding: 2px 5px; color: var(--muted-2); border-radius: 9px; background: #f0f4f6; text-align: center; font-size: 8px; font-style: normal; }
.metal-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.metal-dot.bronze { background: #b8733f; }.metal-dot.silver { background: #84929e; }.metal-dot.gold { background: #d09b20; }.metal-dot.platinum { background: #57738a; }.metal-dot.catastrophic { background: #a14c8d; }.metal-dot.expanded-bronze { background: #c9834a; }
.switch-list { display: grid; gap: 13px; }
.switch-list label { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; }
.switch-list b, .switch-list small { display: block; }
.switch-list b { color: var(--navy); font-size: 10px; }
.switch-list small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.switch-list input { position: absolute; opacity: 0; }
.switch-list i { position: relative; width: 29px; height: 17px; flex: 0 0 auto; border-radius: 10px; background: #cbd6db; transition: background .15s; }
.switch-list i::after { content: ""; position: absolute; width: 13px; height: 13px; left: 2px; top: 2px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch-list input:checked + i { background: var(--teal); }
.switch-list input:checked + i::after { transform: translateX(12px); }

.search-select { position: relative; margin-top: 8px; }
.search-select > label { position: absolute; left: 9px; top: 50%; z-index: 1; transform: translateY(-50%); color: var(--muted-2); }
.search-select > label svg { width: 15px; height: 15px; }
.search-select input { min-height: 36px; padding-left: 31px; font-size: 9px; }
.typeahead { position: absolute; z-index: 25; left: 0; right: 0; top: calc(100% + 4px); display: none; max-height: 210px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; background: white; box-shadow: var(--shadow-md); }
.typeahead.is-open { display: block; }
.typeahead button { width: 100%; display: block; padding: 10px; border: 0; border-bottom: 1px solid var(--line); background: white; text-align: left; }
.typeahead button:hover { background: #f4faf9; }
.typeahead button strong, .typeahead button small { display: block; }
.typeahead button strong { color: var(--navy); font-size: 10px; }
.typeahead button small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.typeahead-empty { padding: 11px; color: var(--muted); font-size: 9px; }
.selected-items { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.selected-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 6px; color: var(--teal-dark); border-radius: 5px; background: var(--teal-soft); font-size: 8px; }
.selected-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-chip button { padding: 0; color: inherit; border: 0; background: none; font-weight: 800; }

.plans-column { min-width: 0; }
.results-toolbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.result-count { display: flex; align-items: baseline; gap: 5px; }
.result-count strong { color: var(--navy); font: 800 21px Manrope; }
.result-count span { color: var(--muted); font-size: 11px; }
.toolbar-actions { display: flex; align-items: center; gap: 9px; }
.filter-impact { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -1px 0 10px; padding: 8px 11px; color: #42645f; border: 1px solid #cbe7e1; border-radius: 8px; background: #f2fbf9; font-size: 9px; }
.filter-impact strong { color: var(--teal-dark); font: 800 10px Manrope; }
.filter-impact span { color: var(--muted); text-align: right; }
.sort-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.sort-control select { min-height: 36px; padding: 0 29px 0 10px; color: var(--navy); border: 1px solid var(--line-strong); border-radius: 8px; background: white; font-size: 10px; font-weight: 700; }
.filter-mobile-button { display: none; min-height: 36px; }
.data-banner { display: flex; align-items: center; gap: 5px; margin: 0 0 10px; padding: 8px 12px; color: #52706b; border: 1px solid #d3eae5; border-radius: 8px; background: #f5fcfa; font-size: 9px; }
.data-banner.is-demo { color: #775f25; border-color: #ebdbad; background: #fffaf0; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #18a879; box-shadow: 0 0 0 3px rgba(24,168,121,.12); }
.data-banner.is-demo .live-dot { background: #d09926; box-shadow: 0 0 0 3px rgba(208,153,38,.12); }
.plan-list { display: grid; gap: 11px; }

.plan-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow-sm); transition: border .15s, box-shadow .15s, transform .15s; }
.plan-card:hover { border-color: #b7ccd5; box-shadow: 0 12px 32px rgba(20,48,67,.1); transform: translateY(-1px); }
.plan-card.is-highlighted { border: 2px solid #20a682; }
.plan-ribbon { position: absolute; z-index: 2; top: 0; left: 0; padding: 5px 13px 6px; color: white; border-radius: 0 0 8px 0; background: #168f70; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.plan-main { display: grid; grid-template-columns: minmax(300px, 1.8fr) minmax(120px, .72fr) minmax(105px, .62fr) minmax(105px, .62fr); gap: 20px; align-items: center; padding: 19px 21px 15px; }
.is-highlighted .plan-main { padding-top: 29px; }
.plan-identity { min-width: 0; display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 13px; align-items: center; }
.issuer-logo { width: 50px; height: 50px; display: grid; place-items: center; color: white; border-radius: 13px; background: linear-gradient(145deg, var(--issuer-color, #2477e3), color-mix(in srgb, var(--issuer-color, #2477e3), #0a2940 30%)); font: 800 16px Manrope; letter-spacing: -.03em; }
.issuer-logo.has-image { padding: 5px; overflow: hidden; color: inherit; border: 1px solid #e1e9ed; background: white; }
.issuer-logo.has-image img { width: 100%; height: 100%; display: block; object-fit: contain; }
.plan-name-line { display: flex; align-items: center; gap: 6px; }
.plan-name-line h3 { min-width: 0; margin: 0; overflow: hidden; color: var(--navy); font: 800 13px/1.3 Manrope; text-overflow: ellipsis; white-space: nowrap; }
.plan-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 5px; color: var(--muted); font-size: 9px; }
.metal-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 5px; border-radius: 4px; background: #f1f4f6; color: var(--navy); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.csr-badge { margin-left: -5px; color: #aa7915; font-size: 9px; font-weight: 800; white-space: nowrap; }
.plan-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.plan-tag { padding: 3px 5px; color: #527069; border: 1px solid #d7e8e4; border-radius: 4px; background: #f6fbfa; font-size: 7px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.plan-price strong { display: block; color: var(--navy-deep); font: 800 25px/1 Manrope; letter-spacing: -.04em; }
.plan-price strong small { margin-left: 2px; font: 600 8px DM Sans; letter-spacing: 0; }
.plan-price > span { display: block; margin-top: 4px; color: var(--green); font-size: 8px; font-weight: 700; }
.plan-price > del { display: block; margin-top: 2px; color: var(--muted-2); font-size: 8px; }
.plan-metric b { display: block; color: var(--navy); font: 800 15px Manrope; }
.plan-metric span { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.plan-bottom { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 11px 21px 13px; border-top: 1px solid var(--line); background: #fcfdfd; }
.benefit-strip { display: grid; grid-template-columns: repeat(4, minmax(90px, 1fr)); gap: 15px; }
.benefit-item span, .benefit-item b { display: block; }
.benefit-item span { color: var(--muted); font-size: 7px; }
.benefit-item b { margin-top: 3px; color: var(--navy); font-size: 9px; }
.plan-actions { display: flex; align-items: center; gap: 7px; }
.compare-choice { display: flex; align-items: center; gap: 5px; margin-right: 3px; color: var(--muted); font-size: 8px; cursor: pointer; }
.compare-choice input { accent-color: var(--teal); }
body.policy-wizard-flow .compare-choice { display: none; }
.plan-actions .button { min-height: 34px; padding: 0 12px; font-size: 9px; }
.rating { display: inline-flex; align-items: center; gap: 3px; color: #b07b13; }
.rating svg { width: 10px; height: 10px; fill: currentColor; stroke: currentColor; }
.coverage-matches { display: flex; gap: 5px; margin-top: 6px; }
.coverage-match { padding: 3px 5px; border-radius: 4px; color: var(--green); background: #eaf8f1; font-size: 7px; font-weight: 700; }
.coverage-match.is-missing { color: var(--red); background: #fff0f0; }
.coverage-match.is-checking { color: var(--amber); background: #fff8e7; }

.empty-state { padding: 60px 25px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 14px; background: white; }
.empty-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 13px; color: var(--teal); border-radius: 50%; background: var(--teal-soft); }
.empty-state h3 { margin: 0; color: var(--navy); font: 800 17px Manrope; }
.empty-state p { margin: 7px 0 17px; color: var(--muted); font-size: 11px; }

.compare-dock { position: fixed; z-index: 40; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(890px, calc(100% - 30px)); display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 13px; padding: 12px 13px 12px 17px; color: white; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(12, 34, 53, .97); box-shadow: 0 18px 48px rgba(6, 24, 38, .25); backdrop-filter: blur(12px); }
.compare-dock > div:first-child strong, .compare-dock > div:first-child span { display: block; }
.compare-dock > div:first-child strong { font: 700 11px Manrope; }.compare-dock > div:first-child span { margin-top: 2px; color: #9fb1be; font-size: 8px; }
.compare-preview { display: flex; gap: 6px; min-width: 0; }
.compare-pill { min-width: 0; max-width: 190px; padding: 7px 9px; overflow: hidden; border-radius: 7px; background: rgba(255,255,255,.1); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.compare-dock .button-subtle { color: white; border-color: rgba(255,255,255,.25); background: transparent; }
.compare-dock .button { min-height: 37px; font-size: 10px; }

.selected-plan-bar { position: fixed; z-index: 35; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(820px, calc(100% - 30px)); display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 13px 12px 17px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 18px 48px rgba(6, 24, 38, .2); }
.selected-plan-bar > div:first-child span, .selected-plan-bar > div:first-child strong { display: block; }
.selected-plan-bar > div:first-child span { color: var(--muted); font-size: 8px; }.selected-plan-bar > div:first-child strong { max-width: 390px; margin-top: 2px; overflow: hidden; color: var(--navy); font: 700 11px Manrope; text-overflow: ellipsis; white-space: nowrap; }
.selected-plan-actions { display: flex; align-items: center; gap: 8px; }
.selected-plan-actions > strong { margin-right: 7px; color: var(--navy); font: 800 14px Manrope; }
.selected-plan-actions .button { min-height: 37px; font-size: 9px; }

.modal-layer { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(9, 27, 41, .62); backdrop-filter: blur(4px); }
.modal-card { width: min(1060px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.4); border-radius: 18px; background: white; box-shadow: 0 30px 90px rgba(4, 19, 29, .32); }
.details-modal-card { width: min(920px, 100%); }
.compact-modal-card { width: min(570px, 100%); }
.modal-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 23px; border-bottom: 1px solid var(--line); }
.modal-kicker { display: block; margin-bottom: 4px; color: var(--teal); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.modal-header h2 { margin: 0; color: var(--navy-deep); font: 800 20px Manrope; letter-spacing: -.025em; }
.modal-body { min-height: 0; overflow: auto; padding: 23px; }
.modal-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding: 14px 23px; border-top: 1px solid var(--line); background: #fbfdfd; }
.modal-footer > span { margin-right: auto; color: var(--navy); font: 800 17px Manrope; }
.modal-header-actions { display: flex; align-items: center; gap: 8px; }
.modal-header-actions .button { min-height: 39px; font-size: 10px; }
.detail-hero { display: grid; grid-template-columns: 1.2fr repeat(3, .65fr); gap: 12px; margin-bottom: 20px; }
.detail-price, .detail-stat { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfd; }
.detail-price { color: white; border-color: var(--teal); background: linear-gradient(145deg, #0c8b7d, #07655b); }
.detail-price span, .detail-price strong, .detail-stat span, .detail-stat strong { display: block; }
.detail-price span, .detail-stat span { font-size: 9px; }.detail-price strong, .detail-stat strong { margin-top: 5px; font: 800 20px Manrope; }
.detail-price small { display: block; margin-top: 3px; color: rgba(255,255,255,.75); font-size: 8px; }
.detail-stat span { color: var(--muted); }.detail-stat strong { color: var(--navy); font-size: 15px; }
.detail-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 19px; }
.csr-notice { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; margin-bottom: 16px; padding: 13px 14px; color: #6f5718; border: 1px solid #ead18b; border-radius: 10px; background: #fff9e8; }
.csr-seal { width: 42px; height: 42px; display: grid; place-items: center; color: #8c6810; border-radius: 50%; background: #f4d45d; font: 800 10px Manrope; box-shadow: 0 0 0 4px rgba(244,212,93,.22); }
.csr-notice strong { display: block; color: #6c5110; font: 800 11px Manrope; }
.csr-notice p { margin: 3px 0 0; color: #7d6b3e; font-size: 9px; line-height: 1.5; }
.detail-links a { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; color: var(--teal); border: 1px solid #cae2dd; border-radius: 7px; background: #f7fbfa; font-size: 9px; font-weight: 700; text-decoration: none; }
.detail-links a svg { width: 12px; height: 12px; }
.benefit-section { margin-top: 18px; }
.benefit-section h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; color: var(--navy); font: 800 13px Manrope; }
.benefit-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.benefit-table th, .benefit-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 9px; vertical-align: top; }
.benefit-table th { color: var(--muted); background: #f6f9fa; font-weight: 700; }
.benefit-table td:first-child { color: var(--navy); font-weight: 600; }
.benefit-table td:nth-child(n+2) { color: var(--muted); }
.detail-note { margin-top: 18px; padding: 11px 13px; color: #685a33; border: 1px solid #ead8a8; border-radius: 8px; background: #fffaf0; font-size: 9px; line-height: 1.5; }
.modal-loading { display: grid; place-items: center; min-height: 300px; color: var(--muted); text-align: center; }
.modal-loading i { width: 29px; height: 29px; display: block; margin: 0 auto 11px; border: 3px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
.simulation-share { display: flex; align-items: center; gap: 8px; padding: 12px 17px; border-bottom: 1px solid var(--line); background: #f0f7ff; }
.simulation-share-label { font-size: 11px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.simulation-share-input { flex: 1; min-width: 0; font-size: 11px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: white; color: var(--muted); }
.simulation-share .button { min-height: 34px; font-size: 10px; }
.compare-body { padding: 0; }
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.compare-table th, .compare-table td { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 9px; }
.compare-table th:first-child, .compare-table td:first-child { width: 170px; position: sticky; left: 0; z-index: 2; color: var(--muted); background: #f7fafb; }
.compare-table thead th { position: sticky; top: 0; z-index: 3; background: white; }
.compare-table thead th:first-child { z-index: 4; background: #f7fafb; }
.compare-plan-head { min-height: 130px; }
.compare-plan-head .issuer-logo { width: 36px; height: 36px; margin-bottom: 9px; border-radius: 9px; font-size: 11px; }
.compare-plan-head h3 { margin: 0; color: var(--navy); font: 800 11px/1.35 Manrope; }
.compare-plan-head strong { display: block; margin: 9px 0; color: var(--navy-deep); font: 800 18px Manrope; }
.compare-plan-head .button { min-height: 31px; padding: 0 9px; font-size: 8px; }
.compare-section-row td { color: var(--teal) !important; background: #f1faf8 !important; font-weight: 800 !important; text-transform: uppercase; letter-spacing: .06em; }
.saved-quote { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.saved-quote:first-child { padding-top: 0; }.saved-quote:last-child { padding-bottom: 0; border-bottom: 0; }
.saved-quote strong, .saved-quote span { display: block; }.saved-quote strong { color: var(--navy); font: 700 11px Manrope; }.saved-quote span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.saved-quote-actions { display: flex; gap: 6px; }.saved-quote-actions .button { min-height: 33px; padding: 0 10px; font-size: 8px; }
.saved-empty { padding: 35px; color: var(--muted); text-align: center; font-size: 11px; }
.completion-card { position: relative; align-items: center; padding: 42px 35px 34px; text-align: center; }
.corner-close { position: absolute; top: 15px; right: 15px; }
.completion-icon { width: 58px; height: 58px; display: grid; place-items: center; color: white; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 9px var(--teal-soft); }
.completion-icon svg { width: 30px; height: 30px; }
.completion-card h2 { margin: 25px 0 8px; color: var(--navy-deep); font: 800 23px Manrope; }
.completion-card p { max-width: 440px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.completion-actions { display: flex; gap: 9px; margin-top: 22px; }
.completion-card > small { margin-top: 17px; color: var(--muted-2); font-size: 8px; }

.loading-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(246, 250, 251, .93); backdrop-filter: blur(7px); }
.loading-card { width: min(420px, 100%); padding: 35px; text-align: center; }
.loading-orbit { position: relative; width: 66px; height: 66px; display: grid; place-items: center; margin: 0 auto 22px; color: white; border-radius: 50%; background: var(--teal); }
.loading-orbit span { font: 800 28px Manrope; }.loading-orbit i { position: absolute; inset: -8px; border: 2px solid transparent; border-top-color: #23ad98; border-right-color: #23ad98; border-radius: 50%; animation: spin 1s linear infinite; }
.loading-card h2 { margin: 0; color: var(--navy); font: 800 21px Manrope; }.loading-card p { margin: 8px 0 23px; color: var(--muted); font-size: 11px; }
.loading-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.loading-steps span { position: relative; padding-top: 9px; color: var(--muted-2); border-top: 3px solid var(--line); font-size: 8px; }
.loading-steps span.is-done { color: var(--teal); border-color: var(--teal); }
.loading-steps span.is-active { color: var(--teal); border-color: #58b5ab; animation: pulse .8s infinite alternate; }

.toast-stack { position: fixed; z-index: 120; right: 18px; bottom: 18px; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 260px; max-width: 390px; display: grid; grid-template-columns: 25px 1fr; align-items: center; gap: 9px; padding: 12px 14px; color: white; border-radius: 10px; background: var(--navy-deep); box-shadow: var(--shadow-md); animation: toast-in .2s ease-out; font-size: 10px; }
.toast::before { content: "✓"; width: 22px; height: 22px; display: grid; place-items: center; color: var(--navy); border-radius: 50%; background: white; font-weight: 800; }
.toast.is-error { background: #8e3539; }.toast.is-error::before { content: "!"; color: #8e3539; }
.toast.is-warning { background: #806422; }.toast.is-warning::before { content: "i"; color: #806422; }

.mobile-filter-backdrop { position: fixed; inset: 0; z-index: 44; background: rgba(9,27,41,.45); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { from { opacity: .45; } to { opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1120px) {
  .topbar { grid-template-columns: 210px 1fr 210px; }
  .quote-builder { grid-template-columns: 1fr 1fr; }
  .applicants-panel { border-right: 0; }
  .eligibility-panel { grid-column: 1/-1; display: grid; grid-template-columns: 1fr auto; column-gap: 20px; align-items: center; border-top: 1px solid var(--line); }
  .eligibility-panel .panel-heading { grid-column: 1; }.eligibility-empty, .eligibility-result { grid-column: 1; min-height: 75px; }.quote-submit { grid-column: 2; grid-row: 1/3; width: 220px; margin: 0; }.secure-note, .example-link { grid-column: 2; }
  .plan-main { grid-template-columns: minmax(280px, 1.7fr) repeat(3, minmax(100px, .6fr)); }
  .benefit-strip { grid-template-columns: repeat(3, 1fr); }.benefit-item:nth-child(4) { display: none; }
}

@media (max-width: 850px) {
  .topbar { grid-template-columns: 1fr auto; padding: 0 18px; }.progress { display: none; }
  .quote-hero { padding: 38px 18px; }.quote-builder { grid-template-columns: 1fr; }.builder-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .eligibility-panel { grid-column: auto; display: flex; }.eligibility-panel .panel-heading, .eligibility-empty, .eligibility-result, .quote-submit, .secure-note { width: 100%; }.quote-submit { margin-top: 18px; }
  .results-section { padding: 27px 16px 110px; }.results-layout { grid-template-columns: 1fr; }.filters-panel { position: fixed; z-index: 45; top: 0; left: 0; bottom: 0; width: min(330px, 87vw); max-height: none; overflow: auto; border-radius: 0 14px 14px 0; transform: translateX(-105%); transition: transform .2s ease; }.filters-panel.is-open { transform: translateX(0); }.filter-mobile-button { display: inline-flex; }.results-summary-bar { align-items: stretch; }.credit-card { min-width: 215px; }
  .plan-main { grid-template-columns: minmax(0, 1.65fr) repeat(3, minmax(85px, .55fr)); gap: 12px; }.plan-identity { grid-template-columns: 44px minmax(0, 1fr); }.issuer-logo { width: 44px; height: 44px; }.plan-name-line h3 { font-size: 11px; }.plan-price strong { font-size: 21px; }.plan-bottom { grid-template-columns: 1fr; }.plan-actions { justify-content: flex-end; }
}

@media (max-width: 640px) {
  .topbar { height: 66px; padding: 0 13px; }.brand small { display: none; }.brand-mark { width: 34px; height: 38px; }.top-actions .button-subtle { width: 39px; padding: 0; font-size: 0; }.top-actions .button-subtle svg { width: 18px; }.language-picker select { width: 56px; padding-left: 8px; font-size: 11px; }
  .quote-hero { padding: 32px 12px; }.hero-copy { margin-bottom: 24px; }.hero-copy h1 { font-size: 29px; }.hero-copy > p:last-child { font-size: 12px; }.quote-builder { border-radius: 15px; }.builder-panel, .eligibility-panel { padding: 20px 17px; }.applicant-fields { grid-template-columns: 58px 80px 1fr; gap: 6px; }.relationship-field select { padding: 0 5px; font-size: 10px; }
  .results-summary-bar { flex-direction: column; }.credit-card { min-width: 0; }.results-summary-bar h2 { font-size: 25px; }.results-toolbar { align-items: flex-end; }.toolbar-actions { align-items: stretch; }.sort-control { display: grid; gap: 3px; }.sort-control select { max-width: 160px; }.filter-mobile-button { align-self: flex-end; }
  .plan-main { grid-template-columns: 1fr 1fr; padding: 17px 15px 13px; }.is-highlighted .plan-main { padding-top: 29px; }.plan-identity { grid-column: 1/-1; }.plan-metric { padding-top: 4px; }.plan-bottom { padding: 11px 15px 14px; }.benefit-strip { grid-template-columns: 1fr 1fr; }.benefit-item:nth-child(4) { display: block; }.plan-actions { display: grid; grid-template-columns: auto 1fr 1fr; }.plan-actions .button { padding: 0 8px; }
  .compare-dock { grid-template-columns: 1fr auto auto; bottom: 8px; }.compare-preview { display: none; }.compare-dock .button-subtle { display: none; }
  .selected-plan-bar { bottom: 8px; flex-direction: column; align-items: stretch; gap: 9px; }.selected-plan-actions { justify-content: flex-end; }
  .modal-layer { padding: 0; }.modal-card { max-height: 100vh; height: 100%; border-radius: 0; }.modal-header { padding: 17px; }.modal-body { padding: 17px; }.modal-footer { padding: 12px 17px; }.detail-hero { grid-template-columns: 1fr 1fr; }.detail-price { grid-column: 1/-1; }.compare-body { overflow: auto; }.compare-table { min-width: 700px; }.compare-table th:first-child, .compare-table td:first-child { width: 130px; }
  .completion-card { justify-content: center; }
  .toast-stack { left: 10px; right: 10px; bottom: 10px; }.toast { min-width: 0; max-width: none; }
}

@media print {
  body { background: white; }.topbar, .quote-hero, .results-section, .compare-dock, .selected-plan-bar, .modal-header-actions, .toast-stack { display: none !important; }.modal-layer { position: static; display: block !important; padding: 0; background: white; }.modal-card { width: 100%; max-height: none; border: 0; box-shadow: none; }.modal-body { overflow: visible; }.compare-table thead th, .compare-table th:first-child, .compare-table td:first-child { position: static; }
}
