:root {
  --blue: #003366;
  --blue-dark: #00264a;
  --blue-soft: #e6f4f9;
  --green: #619623;
  --green-soft: #d0ddbb;
  --teal: #008ec6;
  --tangerine: #cc9933;
  --tangerine-soft: #f7f0e5;
  --page: #e6f4f9;
  --panel: #ffffff;
  --muted-panel: #e6f4f9;
  --border: #b3ddee;
  --border-soft: #d9ba82;
  --text: #1f2d3d;
  --muted: #546273;
  --faint: #7a8796;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-lift: 0 18px 40px rgba(0, 51, 102, 0.12);
  --ring: 0 0 0 3px rgba(0, 142, 198, 0.12);
  --ring-strong: 0 0 0 4px rgba(0, 142, 198, 0.14);
  --panel-radius: 20px;
  --surface-padding: 24px;
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--page) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.wizard-open {
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.app {
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.stack,
.resource-view,
.hero-copy,
.brand-text,
.title-group > div,
.guide-progress,
.cards,
.choice-grid,
.hero-card,
.results,
.wizard-question-card {
  display: grid;
}

.stack {
  gap: 28px;
}

.resource-view {
  gap: 30px;
}

.hero-copy {
  gap: 8px;
}

.brand-text {
  gap: 6px;
  max-width: 680px;
}

.title-group > div {
  gap: 4px;
}

.guide-progress {
  gap: 8px;
}

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

.choice-grid {
  gap: 12px;
}

.hero-card,
.wizard-question-card {
  gap: 18px;
}

.results {
  gap: 24px;
}

.header,
.brand,
.title-group,
.hero-actions,
.wizard-header,
.wizard-actions,
.section-title,
.card-top,
.recommendation-toggle,
.boolean-option {
  display: flex;
}

.header,
.wizard-header,
.section-title,
.card-top,
.recommendation-toggle,
.boolean-option {
  justify-content: space-between;
}

.header,
.brand,
.title-group,
.hero-actions,
.wizard-header,
.wizard-actions {
  align-items: center;
}

.section-title,
.card-top {
  align-items: flex-start;
}

.brand {
  gap: 24px;
}

.hero-actions {
  gap: 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.title-group,
.section-title,
.wizard-actions {
  gap: 12px;
}

.wizard-header,
.wizard-actions-modal,
.boolean-option {
  gap: 18px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 16px 20px;
  border: 1px solid rgba(0, 51, 102, 0.12);
  border-radius: var(--panel-radius);
  background:
    linear-gradient(135deg, rgba(0, 51, 102, 0.06), rgba(0, 142, 198, 0.12)),
    var(--panel);
  box-shadow: 0 16px 34px rgba(0, 51, 102, 0.08);
}

.brand-mark > img {
  display: block;
  width: min(100%, 314px);
  height: auto;
}

.brand-eyebrow,
.helper-eyebrow {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-eyebrow {
  color: var(--teal);
  letter-spacing: 0.12em;
}

.helper-eyebrow {
  color: var(--blue);
  letter-spacing: 0.08em;
}

h1 {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1.08;
  font-weight: 700;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.2;
}

h2 span {
  color: var(--faint);
  font-weight: 400;
}

h3 {
  font-size: 1.1rem;
  line-height: 1.25;
}

.subtitle,
.panel-intro,
.results-intro,
.question-help-text,
.muted,
.description,
.link-button,
.product-icon {
  color: var(--muted);
}

.subtitle {
  max-width: 62ch;
  font-size: 1.02rem;
  line-height: 1.55;
}

.panel-intro,
.results-intro,
.question-help-text,
.description {
  line-height: 1.5;
}

.hero-card,
.results,
.card,
.recommendation,
.wizard-dialog,
.wizard-question-card,
.fit,
.product-icon,
.small-button,
.secondary-button,
.tab,
.boolean-option {
  border: 1px solid var(--border);
  background: var(--panel);
}

.hero-card,
.results,
.wizard-dialog {
  padding: var(--surface-padding);
}

.hero-card,
.results {
  border-radius: var(--panel-radius);
}

.hero-card {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 24px;
  align-items: start;
}

.hero-tabs {
  grid-column: 1 / -1;
}

.results {
  box-shadow: 0 18px 40px rgba(0, 51, 102, 0.08);
}

.section-title {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.title-group h2 {
  color: var(--blue);
}

.step,
.product-icon,
.check,
.icon-button,
.mini-icon::after {
  display: grid;
  place-items: center;
}

.step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.results-placeholder {
  display: grid;
  gap: 12px;
  padding: 32px;
  border: 1px dashed #80c6e2;
  border-radius: 16px;
  background: var(--blue-soft);
}

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

.tab {
  display: grid;
  gap: 6px;
  justify-items: start;
  min-height: 74px;
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--muted);
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tab:hover,
.tab.active {
  background: var(--blue-soft);
  border-color: var(--teal);
}

.tab.active {
  box-shadow: var(--ring-strong);
}

.hero-tabs .tab.active {
  cursor: default;
}

.tab span {
  font-size: 1.05rem;
  font-weight: 750;
}

.tab small {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.35;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 230px;
  padding: 18px;
  border-radius: 14px;
  border-width: 2px;
  box-shadow: var(--shadow);
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-1px);
}

.card.status-recommended {
  border-color: #97ba63;
  box-shadow: 0 10px 24px rgba(97, 150, 35, 0.08);
}

.card.status-good-match {
  border-color: #80c6e2;
  box-shadow: 0 10px 24px rgba(0, 142, 198, 0.08);
}

.card.status-suitable {
  border-color: var(--border);
}

.card.excluded {
  border-color: #e4e8ee;
  background: #f7f8fa;
  color: var(--muted);
}

.card-body {
  display: grid;
  gap: 12px;
}

.product-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f8fafc;
}

.product-icon.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.product-icon.teal {
  border-color: #80c6e2;
  color: var(--teal);
  background: var(--blue-soft);
}

.product-icon i {
  font-size: 1.15rem;
}

.check {
  width: 26px;
  height: 26px;
  border: 2px solid #cfd5dc;
  border-radius: 50%;
  color: var(--faint);
  font-size: 0.9rem;
  font-weight: 900;
}

.check.good {
  border-color: var(--green);
  color: var(--green);
}

.tag {
  display: inline-flex;
  margin-top: 7px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag.recommended {
  background: var(--green-soft);
  color: #496f1a;
}

.tag.match {
  color: var(--blue-dark);
}

.description {
  margin-top: 10px;
}

.fit {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--blue-dark);
  font-size: 0.8rem;
  font-weight: 650;
  text-align: center;
  background: var(--blue-soft);
}

.fit.neutral {
  border-color: var(--border-soft);
  background: var(--muted-panel);
  color: var(--muted);
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.small-button,
.secondary-button {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 10px;
}

.small-button {
  font-size: 0.78rem;
  font-weight: 750;
}

.small-button.primary,
.link-button,
.primary-launch {
  color: var(--blue);
}

.small-button:hover,
.secondary-button:hover,
.primary-launch:hover {
  box-shadow: var(--shadow);
}

.primary-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 51, 102, 0.18);
}

.primary-launch:hover {
  color: #fff;
  box-shadow: 0 14px 28px rgba(0, 51, 102, 0.22);
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  font-size: 0.92rem;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--faint);
}

.icon-button:hover {
  background: #eef2f6;
  color: var(--muted);
}

.recommendation {
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.recommendation-toggle {
  width: 100%;
  padding: 16px;
  border: 0;
  background: var(--blue-soft);
  font-size: 0.9rem;
  font-weight: 750;
}

.recommendation-body {
  padding: 24px;
}

.guide-progress p {
  font-size: 0.85rem;
  font-weight: 650;
}

.guide-progress-bar {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--border);
}

.guide-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 180ms ease;
}

.wizard-shell {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
}

.wizard-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 51, 102, 0.48);
  backdrop-filter: blur(5px);
}

.wizard-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 760px);
  max-height: min(860px, calc(100dvh - 48px));
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.wizard-body {
  margin-top: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.wizard-question-card {
  padding: 24px;
  border-radius: 18px;
}

.wizard-choice-grid {
  margin-top: 8px;
}

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

.choice-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: #343a40;
  font-weight: 650;
  text-align: center;
}

.choice.vertical {
  flex-direction: column;
  min-height: 82px;
  gap: 8px;
}

.choice.selected,
.boolean-option.active {
  border-color: #80c6e2;
  box-shadow: var(--ring);
}

.mini-icon {
  position: relative;
  width: 20px;
  height: 20px;
  border: 2px solid #a9b0ba;
  border-radius: 50%;
}

.mini-icon::after {
  position: absolute;
  inset: 4px;
  content: "";
  border-radius: 50%;
  background: transparent;
}

.choice.selected .mini-icon {
  border-color: var(--blue);
}

.choice.selected .mini-icon::after {
  background: var(--blue);
}

.boolean-option {
  width: 100%;
  min-height: 72px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--blue-soft);
  font-weight: 650;
  text-align: left;
}

.boolean-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef1f4;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.boolean-option.active .boolean-indicator {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.wizard-actions {
  flex-shrink: 0;
  margin-top: 20px;
}

.wizard-actions .secondary-button[disabled] {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}

@media (max-width: 900px) {
  .app {
    padding: 28px 18px 48px;
  }

  .hero-card,
  .header,
  .wizard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .cards,
  .tabs,
  .choice-grid.two,
  .choice-grid.three,
  .choice-grid.four,
  .card-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  :root {
    --panel-radius: 18px;
    --surface-padding: 18px;
  }

  .wizard-shell {
    padding: 12px;
  }

  .wizard-dialog {
    max-height: calc(100dvh - 24px);
  }

  .wizard-actions,
  .hero-actions,
  .brand {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-mark {
    min-width: 0;
    padding: 14px 16px;
  }

  .secondary-button,
  .primary-launch,
  .link-button {
    width: 100%;
    justify-content: center;
  }
}
