:root {
  color-scheme: light;
  --ink: #14202b;
  --muted: #617080;
  --soft: #f5f2ea;
  --paper: #fffdf7;
  --panel: #ffffff;
  --line: rgba(20, 32, 43, 0.14);
  --green: #2f6f5e;
  --green-dark: #204f45;
  --coral: #c9563f;
  --gold: #d4a73f;
  --blue: #305f9f;
  --shadow: 0 24px 70px rgba(22, 34, 46, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 0 clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: blur(16px);
}

.brand,
.nav-links,
.hero-actions,
.result-topline,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-dark), var(--blue));
  font-size: 0.78rem;
  letter-spacing: 0;
}

.nav-links {
  justify-content: center;
  gap: 26px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

.nav-links a:hover,
.site-footer a:hover {
  color: var(--green-dark);
}

.header-cta,
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
}

.header-cta,
.button.primary {
  color: #ffffff;
  background: var(--green-dark);
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.button.secondary {
  color: var(--green-dark);
  border-color: rgba(47, 111, 94, 0.28);
  background: rgba(255, 255, 255, 0.7);
}

.hero-section,
.content-section,
.diagnostic-section,
.result-section {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 108px) clamp(18px, 5vw, 42px);
}

.hero-section {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(340px, 0.72fr);
  align-items: center;
  gap: clamp(34px, 7vw, 86px);
  padding-bottom: clamp(48px, 7vw, 78px);
}

.hero-copy {
  max-width: 740px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.hero-lede {
  max-width: 680px;
  color: #41505f;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.65;
}

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

.diagnostic-visual {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 253, 247, 0.95)),
    linear-gradient(135deg, rgba(48, 95, 159, 0.18), rgba(47, 111, 94, 0.12));
  box-shadow: var(--shadow);
}

.visual-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.visual-header strong {
  color: var(--green-dark);
}

.score-ring {
  width: min(100%, 270px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 20px solid rgba(47, 111, 94, 0.16);
  border-right-color: var(--green);
  border-bottom-color: var(--gold);
  border-radius: 50%;
  background: #ffffff;
}

.score-ring span {
  display: block;
  font-size: 4.4rem;
  font-weight: 900;
  line-height: 1;
}

.score-ring small {
  display: block;
  max-width: 130px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.signal-list {
  display: grid;
  gap: 10px;
}

.signal-list div,
.feature-grid article,
.result-grid article,
.fit-columns div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.signal-list div {
  padding: 16px;
}

.signal-list span,
.result-topline span,
.result-grid span,
.feature-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.credibility-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 22px clamp(18px, 5vw, 64px);
  border-block: 1px solid var(--line);
  background: var(--soft);
}

.credibility-strip span {
  border: 1px solid rgba(20, 32, 43, 0.12);
  border-radius: 999px;
  padding: 9px 13px;
  color: #41505f;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  font-weight: 750;
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 74px);
}

.prose {
  color: #40505e;
  font-size: 1.08rem;
  line-height: 1.76;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 30px;
}

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

.feature-grid article {
  min-height: 240px;
  padding: 22px;
}

.feature-grid p,
.result-grid p,
.diagnostic-copy p,
.fit-columns li,
.site-footer p {
  color: #516170;
  line-height: 1.58;
}

.diagnostic-section {
  display: grid;
  grid-template-columns: minmax(270px, 0.62fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 70px);
  border-block: 1px solid var(--line);
  background: #eef4ef;
}

.diagnostic-form {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid rgba(47, 111, 94, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 20px 60px rgba(32, 79, 69, 0.09);
}

.question-stack {
  display: grid;
  gap: 12px;
}

.question-stack fieldset {
  padding: 14px;
  border: 1px solid rgba(20, 32, 43, 0.1);
  border-radius: 8px;
  background: rgba(245, 242, 234, 0.58);
}

.qualification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(20, 32, 43, 0.12);
}

label,
fieldset {
  display: grid;
  gap: 8px;
  min-width: 0;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

label span,
legend {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.38;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(20, 32, 43, 0.18);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
}

select {
  min-height: 50px;
  padding-block: 8px;
}

.consent-row {
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
}

.consent-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  color: #2f6f5e;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}

.result-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.58fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 70px);
}

.result-panel {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.result-topline {
  gap: 12px;
}

.result-topline div {
  flex: 1;
  padding: 16px;
  border-radius: 8px;
  background: var(--soft);
}

.result-topline strong {
  font-size: 1.35rem;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.result-grid article {
  padding: 20px;
}

.action-plan {
  padding: 20px;
  border-radius: 8px;
  background: #14202b;
  color: #ffffff;
}

.action-plan h3 {
  color: #ffffff;
}

.action-plan ol {
  margin: 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.62;
}

.fit-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fit-columns div {
  padding: 22px;
}

.fit-columns ul {
  margin: 0;
  padding-left: 20px;
}

.site-footer {
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--soft);
  font-size: 0.92rem;
}

.site-footer span {
  color: var(--ink);
  font-weight: 900;
}

.site-footer p {
  max-width: 540px;
  margin: 0;
  font-size: 0.86rem;
}

:focus-visible {
  outline: 3px solid rgba(212, 167, 63, 0.72);
  outline-offset: 3px;
}

@media (max-width: 940px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .hero-section,
  .split,
  .diagnostic-section,
  .result-section {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
  }

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

@media (max-width: 620px) {
  .site-header {
    min-height: 64px;
    gap: 12px;
  }

  .brand span:last-child {
    font-size: 0.96rem;
  }

  .header-cta {
    min-height: 40px;
    padding-inline: 14px;
  }

  h1 {
    font-size: clamp(2.6rem, 14vw, 4.5rem);
  }

  .hero-actions,
  .result-topline,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .diagnostic-form .button {
    width: 100%;
  }

  .feature-grid,
  .result-grid,
  .fit-columns,
  .qualification-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid article {
    min-height: auto;
  }
}

/* Keep incomplete diagnostic results out of the visual and accessibility trees. */
[hidden] { display: none !important; }
