:root {
  --ink: #111827;
  --muted: #5b6472;
  --line: #d7dde5;
  --panel: #ffffff;
  --soft: #f4f7f9;
  --navy: #0b1625;
  --teal: #087f8c;
  --teal-dark: #075e68;
  --amber: #c77800;
  --green: #2e7d32;
  --red: #b42318;
  --shadow: 0 22px 60px rgba(17, 24, 39, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

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

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  color: #ffffff;
  background: rgba(11, 22, 37, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: 38px;
  object-fit: contain;
}

.brand small {
  display: block;
  color: #b9c7d7;
}

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

.top-nav a,
.ghost-button {
  color: #dbe7ef;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.top-nav a:hover,
.ghost-button:hover {
  color: #ffffff;
}

.hero {
  position: relative;
  min-height: calc(100svh - 72px);
  overflow: hidden;
  color: #ffffff;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 10, 18, 0.93) 0%, rgba(4, 10, 18, 0.78) 38%, rgba(4, 10, 18, 0.32) 100%),
    linear-gradient(0deg, rgba(4, 10, 18, 0.74) 0%, rgba(4, 10, 18, 0) 36%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100svh - 72px);
  max-width: 900px;
  padding: clamp(64px, 10vh, 112px) clamp(20px, 7vw, 96px) 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #76e0df;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(2.3rem, 4.2vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-title-line {
  display: block;
}

h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.hero-copy {
  max-width: 660px;
  margin: 22px 0 0;
  color: #dbe7ef;
  font-size: 1.12rem;
}

.hero-actions,
.result-actions,
.form-actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-actions {
  margin-top: 32px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: #ffffff;
  background: var(--teal);
}

.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.hero .secondary-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(580px, 100%);
  margin: auto 0 0;
  padding-top: 54px;
}

.hero-stats div {
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stats dt {
  font-size: 1.7rem;
  font-weight: 900;
}

.hero-stats dd {
  margin: 0;
  color: #dbe7ef;
}

.section {
  padding: clamp(56px, 8vw, 96px) clamp(18px, 5vw, 72px);
}

#assessment,
.result-section {
  scroll-margin-top: 88px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 70px);
  align-items: end;
  max-width: 1180px;
  margin: 0 auto 34px;
}

.section-heading.compact {
  display: block;
  max-width: 820px;
  margin-inline: 0;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.benefit {
  min-height: 210px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.benefit p,
.assessment-aside p,
.disclaimer p,
.result-summary p {
  color: var(--muted);
}

.benefit-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  color: #ffffff;
  background: var(--navy);
  border-radius: 8px;
  font-weight: 900;
}

.muted-section {
  background: var(--soft);
}

.area-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 30px;
}

.area-pill {
  min-height: 72px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.assessment-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 1fr);
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

.assessment-aside,
.assessment-panel,
.result-section,
.admin-dialog {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.assessment-aside {
  position: sticky;
  top: 96px;
  padding: 26px;
}

.assessment-aside h2 {
  font-size: clamp(1.35rem, 1.7vw, 1.55rem);
  line-height: 1.16;
}

.assessment-panel {
  padding: clamp(20px, 4vw, 34px);
}

.progress-shell {
  margin-top: 28px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.progress-track {
  height: 10px;
  margin-top: 8px;
  overflow: hidden;
  background: #e8edf2;
  border-radius: 999px;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #37a36b);
  transition: width 180ms ease;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.question-title {
  font-weight: 800;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #c9d2dc;
  border-radius: 8px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
}

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

.question-list {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.question {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.answer-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.answer-options label {
  display: grid;
  min-height: 74px;
  padding: 10px;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.answer-options input {
  accent-color: var(--teal);
}

.answer-options span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.answer-options label:has(input:checked) {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.form-actions {
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.result-section {
  max-width: 1180px;
  margin: clamp(56px, 8vw, 92px) auto;
}

.result-header,
.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 22px;
  align-items: start;
}

.result-header {
  padding: clamp(22px, 4vw, 34px);
  border-bottom: 1px solid var(--line);
}

.score-badge {
  display: grid;
  place-items: center;
  min-height: 150px;
  color: #ffffff;
  background: var(--navy);
  border-radius: 8px;
}

.score-badge span {
  font-size: 3rem;
  font-weight: 900;
}

.score-badge small {
  color: #cbd5df;
  font-weight: 800;
}

.result-grid {
  padding: clamp(22px, 4vw, 34px);
}

.critical-list {
  display: grid;
  gap: 10px;
  padding-left: 22px;
}

.critical-list li {
  padding: 10px 12px;
  background: #fff7ed;
  border-left: 4px solid var(--amber);
}

.area-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 clamp(22px, 4vw, 34px) clamp(22px, 4vw, 34px);
}

.area-result {
  padding: 16px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.meter {
  height: 9px;
  margin-top: 10px;
  overflow: hidden;
  background: #e6ebf0;
  border-radius: 999px;
}

.meter span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.disclaimer {
  max-width: 980px;
  margin: 0 auto;
}

.admin-dialog {
  width: min(920px, calc(100vw - 32px));
  padding: 0;
}

.admin-dialog::backdrop {
  background: rgba(3, 7, 18, 0.58);
}

.dialog-header,
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

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

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  font-size: 1.5rem;
}

.lead-list {
  max-height: 54vh;
  overflow: auto;
  padding: 18px 20px;
}

.lead-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.lead-row:last-child {
  border-bottom: 0;
}

.lead-row strong {
  display: block;
}

.lead-row span {
  color: var(--muted);
}

.print-report {
  display: none;
}

@media (max-width: 920px) {
  .top-nav a {
    display: none;
  }

  .section-heading,
  .assessment-layout,
  .result-header,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .assessment-aside {
    position: static;
  }

  .benefit-grid,
  .area-results {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .site-header {
    min-height: 66px;
  }

  .brand small {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: calc(100svh - 66px);
  }

  .hero-stats,
  .field-grid,
  .answer-options,
  .area-strip {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

@media print {
  body > * {
    display: none !important;
  }

  body {
    background: #ffffff;
  }

  .print-report {
    display: block !important;
    padding: 28px;
    color: #111827;
    font-family: Arial, sans-serif;
  }

  .print-report h1 {
    font-size: 30px;
    line-height: 1.1;
  }

  .print-report h2 {
    margin-top: 28px;
    font-size: 20px;
  }

  .print-report table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
  }

  .print-report th,
  .print-report td {
    padding: 8px;
    border: 1px solid #cbd5df;
    text-align: left;
  }
}
