:root {
  --bg: #f2fbf8;
  --surface: #ffffff;
  --surface-soft: #e9f8f4;
  --ink: #102139;
  --muted: #617085;
  --line: #cfe3df;
  --teal: #0b8f82;
  --teal-dark: #087368;
  --coral: #f25f5c;
  --red: #b74343;
  --red-bg: #fff1f1;
  --green-bg: #ebfaf1;
  --shadow: 0 20px 45px rgba(17, 55, 74, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
.site-footer {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.site-header {
  min-height: 88px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.28rem;
  white-space: nowrap;
}

.brand strong {
  color: var(--teal-dark);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--teal);
  color: white;
  font-size: 0.72rem;
  font-weight: 900;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 4vw, 42px);
  font-weight: 800;
  font-size: 0.9rem;
}

.top-cta,
.button,
button,
select,
input {
  font: inherit;
}

.top-cta,
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 900;
}

.top-cta {
  padding: 0 24px;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 12px 24px rgba(242, 95, 92, 0.22);
}

main {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  min-height: min(560px, calc(100vh - 88px));
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  gap: clamp(34px, 6vw, 84px);
  align-items: center;
  padding: clamp(34px, 5vw, 58px) 0 34px;
}

.hero h1 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(3rem, 6vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  margin: 26px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  padding: 0 22px;
  border: 1px solid var(--line);
}

.button.primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  min-width: 150px;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.75);
  color: var(--teal-dark);
}

.hero-media img {
  display: block;
  width: 100%;
  height: clamp(340px, 38vw, 500px);
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.planner-shell,
.info-section,
.fit-section,
.resources {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(17, 55, 74, 0.07);
}

.planner-shell {
  margin-top: 0;
  padding: clamp(22px, 4vw, 34px);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 26px;
}

h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2rem);
  line-height: 1.15;
}

h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
}

.section-heading p,
.result-card p,
.info-section p,
.fit-section p,
.risk-box p {
  color: var(--muted);
  line-height: 1.55;
}

.section-heading p {
  margin: 8px 0 0;
}

.reset-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
}

.planner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
  gap: 24px;
}

.planner-form,
.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: clamp(18px, 3vw, 28px);
}

.field-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(170px, 220px);
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #e7efed;
}

.field-row:first-child {
  padding-top: 0;
}

.field-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--teal-dark);
  font-weight: 900;
}

.field-copy {
  display: grid;
  gap: 5px;
}

small {
  color: var(--muted);
  line-height: 1.35;
}

select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 750;
}

.risk-box {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 12px;
}

.risk-box legend {
  font-weight: 900;
  margin-bottom: 6px;
}

.risk-box p {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.risk-box label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #344158;
  line-height: 1.4;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  flex: 0 0 auto;
  margin-top: 1px;
}

.tip-box {
  margin-top: 22px;
  border: 1px solid #acd9d1;
  background: var(--surface-soft);
  color: #244755;
  border-radius: 8px;
  padding: 16px;
  line-height: 1.55;
}

.result-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e7efed;
  padding-bottom: 18px;
}

.result-title h2 {
  font-size: clamp(1.35rem, 1.8vw, 1.55rem);
}

#planBadge {
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 7px 10px;
  white-space: nowrap;
}

.status-strip {
  margin: 18px 0;
  display: flex;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.status-strip > span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: white;
  font-weight: 900;
  flex: 0 0 auto;
}

.status-strip.needs-boundary > span {
  background: var(--red);
}

.result-block {
  border-radius: 8px;
  padding: 18px;
  margin-top: 16px;
}

.result-block.safe {
  background: var(--green-bg);
  border: 1px solid #bce7c9;
}

.result-block.avoid {
  background: var(--red-bg);
  border: 1px solid #f1c2c2;
}

.result-block.avoid h3 {
  color: var(--red);
}

.result-block ul,
.fit-section ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.result-block li,
.fit-section li {
  position: relative;
  padding-left: 22px;
  color: #344158;
  line-height: 1.45;
}

.result-block li::before,
.fit-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.avoid li::before {
  background: var(--red);
}

.resource-panel {
  margin-top: 16px;
  border: 1px solid #bfd9ed;
  background: #f1f9ff;
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 10px;
}

.resource-panel a,
.resource-list a,
.fit-callout a {
  color: var(--teal-dark);
  font-weight: 900;
}

.info-section,
.fit-section,
.resources {
  margin-top: 24px;
  padding: clamp(24px, 4vw, 34px);
}

.info-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.info-grid article {
  display: grid;
  gap: 10px;
  align-content: start;
}

.info-grid span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--teal-dark);
  font-weight: 900;
}

.avoid-section .info-grid span {
  background: var(--red-bg);
  color: var(--red);
}

.info-grid p {
  margin: 0;
  font-size: 0.96rem;
}

.fit-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: center;
}

.fit-callout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 22px;
}

.fit-callout p {
  margin: 8px 0 14px;
}

.resource-list {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.resource-list a {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  min-height: 52px;
  display: flex;
  align-items: center;
}

.site-footer {
  margin-top: 24px;
  padding: 22px 0 28px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.site-footer p {
  flex: 1 0 100%;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 940px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 22px 0;
  }

  .hero,
  .planner-grid,
  .fit-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: unset;
  }

  .hero h1 {
    font-size: clamp(2.85rem, 12vw, 4.1rem);
  }

  .planner-grid {
    gap: 18px;
  }

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

@media (max-width: 620px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 32px, 1160px);
  }

  nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .top-cta,
  .button,
  .hero-actions {
    width: 100%;
  }

  .hero {
    padding-top: 38px;
    gap: 28px;
  }

  .hero-media img {
    height: 240px;
  }

  .section-heading {
    flex-direction: column;
  }

  .field-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .field-row select {
    grid-column: 1 / -1;
  }

  .info-grid,
  .resource-list {
    grid-template-columns: 1fr;
  }

  .planner-shell,
  .info-section,
  .fit-section,
  .resources {
    padding: 20px;
  }

  .result-title {
    flex-direction: column;
  }
}
