:root {
  --pink-50: #fff3f8;
  --pink-100: #ffe1ee;
  --pink-300: #f6a7c8;
  --blue-50: #eef7ff;
  --blue-100: #d8ecff;
  --blue-700: #174c8a;
  --blue-900: #0f2f55;
  --ink: #172033;
  --muted: #607087;
  --line: #dce6f2;
  --white: #ffffff;
  --shadow: 0 22px 70px rgba(23, 76, 138, 0.13);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 243, 248, 0.88), rgba(255, 255, 255, 0.9) 34%),
    linear-gradient(120deg, var(--blue-50), var(--white));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(220, 230, 242, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  color: var(--blue-900);
  font-weight: 700;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
}

.nav a:hover {
  background: var(--blue-50);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(640px, 1.28fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
  padding: clamp(32px, 5vw, 72px) clamp(18px, 4vw, 56px) 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(580px, 1.28fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
  padding: clamp(32px, 5vw, 76px) clamp(18px, 4vw, 56px) 44px;
}

.hero-copy {
  padding-top: 24px;
}

.category-panel,
.journey-shell,
.form-surface,
.plan-summary {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.category-panel {
  padding: 24px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 14px;
}

.category-card {
  min-height: 150px;
  padding: 16px 12px;
  text-align: center;
  color: var(--blue-900);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-card:not(:disabled):hover {
  border-color: var(--blue-700);
  box-shadow: 0 14px 34px rgba(23, 76, 138, 0.12);
}

.category-card strong,
.category-card small {
  display: block;
}

.category-card strong {
  margin-top: 14px;
  font-size: 18px;
}

.category-card small {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

.category-icon {
  display: grid;
  margin: 0 auto;
  width: 52px;
  height: 52px;
  place-items: center;
  color: var(--blue-700);
  background: var(--pink-50);
  border: 1px solid var(--pink-100);
  border-radius: 50%;
}

.category-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.active-category {
  background: linear-gradient(180deg, var(--blue-50), var(--white));
}

.journey-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 0;
  margin: 0 clamp(18px, 4vw, 56px) 44px;
  overflow: hidden;
}

.journey-rail {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 18px;
  background: var(--blue-50);
  border-right: 1px solid var(--line);
}

.rail-step {
  min-height: 42px;
  padding: 10px 12px;
  text-align: left;
  color: var(--blue-900);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.rail-step.active {
  background: var(--white);
  box-shadow: 0 1px 0 rgba(23, 76, 138, 0.08);
}

.step-view {
  display: none;
  min-height: 520px;
  padding: 26px;
}

.step-view.active {
  display: block;
}

.form-surface {
  padding: 22px;
  box-shadow: none;
}

.compact-form {
  display: grid;
  gap: 14px;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  background: var(--pink-50);
  border: 1px solid var(--pink-100);
  border-radius: 8px;
}

.check-line input {
  width: 17px;
  min-height: 17px;
}

.family-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.children-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 12px;
  color: var(--blue-900);
}

.children-header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

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

.selected-quote {
  max-width: 720px;
  margin-top: 0;
}

.plan-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
}

.plan-summary {
  padding: 22px;
  box-shadow: none;
}

.inline-payment {
  margin: 0 auto;
}

.intro {
  padding-top: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #c22968;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 640px;
  margin-bottom: 18px;
  color: var(--blue-900);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  color: var(--blue-900);
  font-size: 28px;
  line-height: 1.15;
  margin-bottom: 12px;
}

h3 {
  color: var(--blue-900);
  font-size: 20px;
  margin-bottom: 8px;
}

.lede {
  max-width: 580px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.trust-row span,
.status-pill,
.panel-top span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  color: var(--blue-900);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.quote-shell {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(220, 230, 242, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.lob-tabs {
  display: flex;
  gap: 2px;
  padding: 8px;
  background: var(--blue-50);
  border-bottom: 1px solid var(--line);
}

.lob-tab {
  min-height: 40px;
  padding: 8px 12px;
  color: var(--blue-900);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-weight: 800;
}

.lob-tab.active {
  background: var(--white);
  box-shadow: 0 1px 0 rgba(23, 76, 138, 0.08);
}

.quote-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(280px, 0.85fr);
}

.quote-form,
.result-panel {
  padding: 24px;
}

.quote-form {
  border-right: 1px solid var(--line);
}

.form-heading,
.panel-top,
.admin-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.field-row,
.member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.member-grid,
.family-members {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.family-members {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--blue-900);
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #cad9ea;
  border-radius: 8px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 3px rgba(23, 76, 138, 0.13);
}

fieldset {
  margin: 4px 0 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

legend {
  padding: 0 7px;
  color: var(--blue-900);
  font-weight: 900;
}

.addon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 6px 0 18px;
}

.info-box {
  margin: -4px 0 16px;
  padding: 12px 14px;
  color: var(--blue-900);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.info-box.compact {
  margin: 12px 0 0;
}

.addon-row label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  background: var(--pink-50);
  border: 1px solid var(--pink-100);
  border-radius: 8px;
}

.addon-row input {
  width: 16px;
  min-height: 16px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary,
.secondary {
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 8px;
  font-weight: 900;
}

.primary {
  color: var(--white);
  background: var(--blue-700);
  border: 1px solid var(--blue-700);
  box-shadow: 0 12px 26px rgba(23, 76, 138, 0.2);
}

.primary:hover {
  background: var(--blue-900);
}

.secondary {
  color: var(--blue-900);
  background: var(--white);
  border: 1px solid var(--line);
}

.secondary:hover {
  background: var(--blue-50);
}

.fineprint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.warning-note {
  margin: 12px 0;
  padding: 10px 12px;
  color: #7a3a00;
  background: #fff7e8;
  border: 1px solid #ffdca5;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.result-panel {
  background:
    linear-gradient(180deg, rgba(255, 225, 238, 0.52), rgba(255, 255, 255, 0.9)),
    var(--white);
}

.empty-state,
.quote-card {
  margin-top: 26px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.premium {
  margin: 16px 0 18px;
  padding: 18px;
  background: var(--blue-900);
  color: var(--white);
  border-radius: 8px;
}

.premium span {
  display: block;
  color: var(--blue-100);
  font-size: 13px;
  font-weight: 800;
}

.premium strong {
  display: block;
  margin-top: 4px;
  font-size: 32px;
}

.gst-breakup {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 18px;
}

.gst-breakup div {
  padding: 10px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 8px;
}

.gst-breakup span,
.gst-breakup strong {
  display: block;
}

.gst-breakup span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.gst-breakup strong {
  margin-top: 4px;
  color: var(--blue-900);
  font-size: 13px;
}

.detail-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.flow-band,
.admin-band {
  padding: 44px clamp(18px, 4vw, 56px);
}

.flow-band {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

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

.flow div,
.lead-card {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.flow div {
  background: linear-gradient(180deg, var(--blue-50), var(--white));
}

.flow strong,
.flow span,
.lead-card strong,
.lead-card span {
  display: block;
}

.flow strong,
.lead-card strong {
  color: var(--blue-900);
}

.flow span,
.lead-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.admin-panel {
  align-items: center;
  margin-bottom: 18px;
}

.admin-panel p {
  max-width: 720px;
  color: var(--muted);
}

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

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(18px, 4vw, 56px);
  color: var(--muted);
  background: var(--white);
  border-top: 1px solid var(--line);
}

.payment-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.maintenance-page {
  min-height: 100vh;
}

.maintenance-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(22px, 5vw, 60px);
}

.maintenance-card {
  width: min(920px, 100%);
  padding: clamp(28px, 5vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.maintenance-card img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.maintenance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.maintenance-grid div {
  padding: 18px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 8px;
}

.maintenance-grid strong,
.maintenance-grid span {
  display: block;
}

.maintenance-grid span {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.45;
}

.payment-box {
  width: min(620px, 100%);
  padding: 36px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.payment-box img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 50%;
}

.proposal-dialog {
  width: min(860px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.proposal-dialog::backdrop {
  background: rgba(15, 47, 85, 0.42);
}

.proposal-actions {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.proposal-actions.bottom {
  top: auto;
  bottom: 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.proposal-copy {
  padding: 26px;
  background: var(--white);
}

.proposal-copy .copy-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--blue-100);
}

.proposal-copy img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 50%;
}

.proposal-copy table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 14px;
}

.proposal-copy th,
.proposal-copy td {
  padding: 10px;
  text-align: left;
  border: 1px solid var(--line);
  vertical-align: top;
}

.proposal-copy th {
  width: 34%;
  color: var(--blue-900);
  background: var(--blue-50);
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .workspace,
  .quote-grid,
  .hero,
  .journey-shell,
  .plan-layout {
    grid-template-columns: 1fr;
  }

  .journey-rail {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quote-form {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

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

@media (max-width: 720px) {
  .topbar,
  .footer,
  .admin-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
  }

  .field-row,
  .member-grid,
  .family-members,
  .flow,
  .lead-list,
  .category-grid,
  .children-grid,
  .gst-breakup,
  .maintenance-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .step-view {
    padding-left: 18px;
    padding-right: 18px;
  }

  .lob-tabs {
    overflow-x: auto;
  }

  .lob-tab {
    white-space: nowrap;
  }

  h1 {
    font-size: 36px;
  }
}

@media print {
  body > *:not(.proposal-dialog) {
    display: none !important;
  }

  .proposal-dialog {
    display: block;
    width: 100%;
    max-height: none;
    border: 0;
    box-shadow: none;
  }

  .proposal-actions {
    display: none;
  }
}
