@font-face {
  font-family: "Outer Box Condensed";
  src: url("../assets/fonts/OuterBoxCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outer Box Sans";
  src: url("../assets/fonts/OuterBoxSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #04142f;
  --navy-2: #071c3d;
  --ink: #08101f;
  --blue: #0878ff;
  --blue-bright: #1794ff;
  --teal: #03d1ca;
  --white: #ffffff;
  --soft: #f1f5f8;
  --line: #d7e0e8;
  --muted: #5e6b7b;
  --danger: #b42318;
  --shadow: 0 28px 80px rgba(3, 18, 47, 0.16);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: "Manrope", "Outer Box Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 12px 18px;
  color: var(--navy);
  background: var(--white);
  font-weight: 700;
}

.skip-link:focus { transform: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.score-header {
  position: relative;
  z-index: 10;
  color: var(--white);
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.header-shell {
  width: min(calc(100% - 40px), 1180px);
  min-height: 82px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  align-items: center;
  gap: 24px;
}

.brand { justify-self: start; }
.brand img {
  width: 126px;
  height: 62px;
  object-fit: contain;
  padding: 3px;
  border-radius: 8px;
  background: var(--white);
}

.header-shell > p {
  margin: 0;
  font-family: "Manrope", "Outer Box Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.back-link {
  justify-self: end;
  font-size: 0.8rem;
  text-decoration: none;
}
.back-link span { color: var(--teal); }

.score-intro {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(118deg, rgba(4, 20, 47, 0.98), rgba(7, 28, 61, 0.94)),
    var(--navy);
}

.score-intro::before {
  content: "";
  position: absolute;
  top: -62%;
  right: 16%;
  width: 155px;
  height: 230%;
  background: var(--blue);
  transform: rotate(18deg);
  opacity: 0.2;
  box-shadow: 0 0 100px rgba(8, 120, 255, 0.5);
}

.score-intro::after {
  content: "PATH / PROOF";
  position: absolute;
  right: -42px;
  bottom: 8px;
  color: rgba(255, 255, 255, 0.045);
  font-family: "Outer Box Condensed", sans-serif;
  font-size: clamp(5rem, 13vw, 12rem);
  letter-spacing: -0.06em;
  white-space: nowrap;
}

.intro-grid {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 48px), 1180px);
  min-height: calc(100vh - 82px);
  margin-inline: auto;
  padding: clamp(70px, 9vw, 118px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(310px, 0.58fr);
  align-items: center;
  gap: clamp(50px, 9vw, 120px);
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--teal);
  font-family: "Manrope", "Outer Box Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2 {
  margin-top: 0;
  font-family: "Outer Box Condensed", "Arial Narrow", Impact, sans-serif;
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

h1 {
  max-width: 820px;
  margin-bottom: 28px;
  font-size: clamp(3.5rem, 7.4vw, 7.2rem);
}
h1 span { color: var(--blue-bright); }

.intro-lede {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, 0.79);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.intro-actions {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.intro-actions p {
  max-width: 250px;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
}

.button {
  min-height: 54px;
  padding: 15px 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: "Manrope", "Outer Box Sans", sans-serif;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover { transform: translateY(-2px); }
.button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
  box-shadow: none;
}
.button:focus-visible,
input:focus-visible,
select:focus-visible,
.result-footer a:focus-visible,
.result-footer button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

.button--electric {
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 12px 28px rgba(8, 120, 255, 0.27);
}
.button--electric:hover { background: var(--blue-bright); box-shadow: 0 16px 36px rgba(8, 120, 255, 0.38); }
.button--quiet { color: var(--navy); background: #e9eef3; }
.button--outline { color: var(--navy); border-color: #b9c5d0; background: var(--white); }

.diagnostic-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(2, 14, 34, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.diagnostic-head {
  min-height: 176px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(140deg, rgba(8, 120, 255, 0.23), transparent);
}
.diagnostic-head > span {
  margin-bottom: auto;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.diagnostic-head strong {
  color: var(--teal);
  font-family: "Outer Box Condensed", sans-serif;
  font-size: 5rem;
  line-height: 0.75;
}
.diagnostic-head small { margin-top: 12px; color: rgba(255, 255, 255, 0.7); text-transform: uppercase; }
.diagnostic-card ol { margin: 0; padding: 0; list-style: none; }
.diagnostic-card li {
  padding: 14px 22px;
  display: grid;
  grid-template-columns: 42px 1fr;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-family: "Manrope", "Outer Box Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.diagnostic-card li span { color: var(--blue-bright); }
.diagnostic-card > p {
  margin: 0;
  padding: 18px 22px;
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.75rem;
}

.assessment,
.result { padding: clamp(70px, 9vw, 118px) 0; }

.assessment-shell,
.result-shell {
  width: min(calc(100% - 40px), 1040px);
  margin-inline: auto;
  background: var(--white);
  box-shadow: var(--shadow);
}

.assessment-shell { padding: clamp(28px, 5vw, 62px); }
.assessment-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}
.step-label,
.panel-label {
  margin: 0 0 10px;
  color: var(--blue);
  font-family: "Manrope", "Outer Box Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.assessment-top h2 {
  margin-bottom: 0;
  font-size: clamp(2.3rem, 4.5vw, 4.6rem);
}
.time-note { color: var(--muted); font-size: 0.75rem; }

.progress-track {
  height: 5px;
  margin: 28px 0 42px;
  background: #e4eaf0;
  overflow: hidden;
}
.progress-track span {
  display: block;
  width: 33.333%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width 0.35s ease;
}

.form-step { margin: 0; padding: 0; border: 0; }
.step-instruction { max-width: 790px; margin: 0 0 30px; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 0.86rem; font-weight: 700; }
.field small { color: var(--muted); font-weight: 400; }
.field input,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #b9c5d0;
  border-radius: 0;
  color: var(--ink);
  background: var(--white);
}

.consent-field {
  margin-top: 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  color: var(--muted);
  background: var(--soft);
  font-size: 0.875rem;
}
.consent-field input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--blue); }
.consent-field a { color: var(--blue); font-weight: 700; text-underline-offset: 3px; }
.consent-field a:hover { color: var(--navy); }
.trap-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.rating-key {
  margin-bottom: 20px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  color: var(--muted);
  background: var(--soft);
  font-size: 0.73rem;
  text-align: center;
}
.rating-key strong { color: var(--blue); }
.question-list { display: grid; gap: 16px; }
.question-card { margin: 0; padding: 22px; border: 1px solid var(--line); }
.question-card legend {
  width: 100%;
  padding: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
}
.question-card legend span {
  margin-right: 8px;
  color: var(--blue);
  font-family: "Manrope", "Outer Box Sans", sans-serif;
  font-weight: 800;
}
.rating-options { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rating-options label { cursor: pointer; }
.rating-options input { position: absolute; opacity: 0; pointer-events: none; }
.rating-options label > span {
  min-height: 58px;
  padding: 9px 6px;
  display: grid;
  place-content: center;
  border: 1px solid #c9d3dc;
  text-align: center;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.rating-options strong { color: var(--blue); font-family: "Manrope", "Outer Box Sans", sans-serif; font-size: 1rem; font-weight: 800; }
.rating-options small { display: none; font-size: 0.65rem; }
.rating-options input:checked + span { color: var(--white); border-color: var(--blue); background: var(--blue); }
.rating-options input:checked + span strong { color: var(--teal); }
.rating-options input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }

.form-actions { margin-top: 34px; display: flex; justify-content: flex-end; gap: 10px; }
.form-actions .button--quiet { margin-right: auto; }
.form-error { margin: 16px 0 0; color: var(--danger); font-size: 0.84rem; text-align: right; }

.result-shell { overflow: hidden; }
.result-banner {
  position: relative;
  overflow: hidden;
  min-height: 248px;
  padding: clamp(32px, 5vw, 58px);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 34px;
  color: var(--white);
  background: linear-gradient(120deg, var(--navy), var(--navy-2));
}
.result-banner::after {
  content: "";
  position: absolute;
  top: -80%;
  right: 24%;
  width: 110px;
  height: 250%;
  background: var(--blue);
  transform: rotate(18deg);
  opacity: 0.22;
}
.result-banner > * { position: relative; z-index: 1; }
.result-banner h2 { max-width: 700px; margin: 0; font-size: clamp(2.8rem, 6vw, 6rem); }
.score-number { display: flex; align-items: baseline; white-space: nowrap; }
.score-number strong { color: var(--teal); font-family: "Outer Box Condensed", sans-serif; font-size: clamp(5rem, 10vw, 8.5rem); line-height: 0.7; }
.score-number span { color: rgba(255, 255, 255, 0.58); font-size: 0.82rem; }

.result-body {
  padding: clamp(28px, 5vw, 54px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(30px, 6vw, 68px);
}
.result-intro { margin: 0; font-size: clamp(1.05rem, 1.8vw, 1.28rem); }
.priority-box { margin-top: 28px; padding: 22px; border-left: 4px solid var(--teal); background: var(--soft); }
.priority-box span { color: var(--blue); font-family: "Manrope", "Outer Box Sans", sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.priority-box p { margin: 10px 0 0; }

.focus-panel { padding: 26px; color: var(--white); background: var(--navy); }
.focus-panel ol { margin: 18px 0 22px; padding: 0; list-style: none; }
.focus-panel li { padding: 14px 0; display: grid; grid-template-columns: 32px 1fr; gap: 8px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.focus-panel li span { color: var(--teal); font-family: "Manrope", "Outer Box Sans", sans-serif; font-weight: 800; }
.focus-panel > p:last-child { margin: 0; color: rgba(255, 255, 255, 0.62); font-size: 0.76rem; }

.result-actions {
  padding: 0 clamp(28px, 5vw, 54px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.save-status {
  margin: 14px clamp(28px, 5vw, 54px) 0;
  padding-left: 20px;
  position: relative;
  color: var(--muted);
  font-size: 0.78rem;
}
.save-status::before {
  content: "";
  position: absolute;
  top: 0.42em;
  left: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(3, 209, 202, 0.14);
}
.save-status.is-error { color: var(--danger); }
.save-status.is-error::before { background: var(--danger); box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.12); }
.result-footer {
  margin: 34px clamp(28px, 5vw, 54px) 0;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.result-footer button,
.result-footer a { padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 0.82rem; cursor: pointer; text-underline-offset: 4px; }
.legal-note { margin: 0; padding: 22px clamp(28px, 5vw, 54px) 34px; color: var(--muted); font-size: 0.7rem; }

footer {
  padding: 34px 20px;
  display: flex;
  justify-content: center;
  gap: 34px;
  color: rgba(255, 255, 255, 0.62);
  background: #020b1a;
  font-size: 0.72rem;
  text-align: center;
}
footer p { margin: 0; }
footer a { text-underline-offset: 3px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }

@media (max-width: 820px) {
  .header-shell { grid-template-columns: 1fr 1fr; }
  .header-shell > p { display: none; }
  .intro-grid { min-height: auto; grid-template-columns: 1fr; }
  .diagnostic-card { max-width: 540px; }
  .result-body { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .header-shell { width: min(calc(100% - 28px), 1180px); min-height: 72px; }
  .brand img { width: 105px; height: 52px; }
  .back-link { font-size: 0.72rem; text-align: right; }
  .intro-grid { width: min(calc(100% - 32px), 1180px); padding: 64px 0; gap: 38px; }
  h1 { font-size: clamp(3rem, 15vw, 4.35rem); }
  .intro-actions { align-items: stretch; flex-direction: column; }
  .intro-actions .button { width: 100%; }
  .assessment,
  .result { padding: 42px 0; }
  .assessment-shell,
  .result-shell { width: min(calc(100% - 24px), 1040px); }
  .assessment-top { align-items: start; flex-direction: column; gap: 10px; }
  .progress-track { margin-bottom: 30px; }
  .field-grid { grid-template-columns: 1fr; }
  .rating-key { display: none; }
  .question-card { padding: 19px 16px; }
  .rating-options { grid-template-columns: repeat(2, 1fr); }
  .rating-options small { display: block; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .button { flex: 1 1 auto; }
  .form-actions .button--quiet { margin-right: 0; }
  .result-banner { min-height: 310px; align-items: start; flex-direction: column; }
  .score-number { align-self: flex-end; }
  .result-actions { flex-direction: column; }
  .result-actions .button { width: 100%; }
  .result-footer { align-items: start; flex-direction: column; }
  footer { flex-direction: column; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media print {
  body { background: var(--white); }
  .score-header,
  .score-intro,
  .assessment,
  .result-actions,
  .save-status,
  .result-footer,
  footer { display: none !important; }
  .result { display: block !important; padding: 0; }
  .result-shell { width: 100%; box-shadow: none; }
  .result-banner,
  .focus-panel { color: var(--ink); background: var(--white); border: 1px solid var(--line); }
  .score-number strong,
  .focus-panel li span { color: var(--blue); }
  .focus-panel > p:last-child { color: var(--muted); }
  .legal-note { padding-bottom: 0; }
}
