:root {
  color-scheme: light;
  --ink: #122030;
  --muted: #536579;
  --brand: #248825;
  --brand-dark: #103a10;
  --brand-ink: #091f09;
  --brand-yellow: #fecd03;
  --brand-soft: #daf2da;
  --brand-soft-strong: #d2f6d2;
  --surface: #ffffff;
  --surface-soft: #f2f6f5;
  --border: #d8e2df;
  --support-bg: #fff2cf;
  --support-border: #d69e20;
  --danger: #9b332d;
  --danger-bg: #fde8e6;
  --success: #17613c;
  --focus: #087f72;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--surface-soft);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  min-height: 100vh;
}

a,
button,
input {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.site-header {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.75rem clamp(1rem, 4vw, 2rem);
}

.brand {
  align-items: center;
  color: var(--brand-dark);
  display: inline-flex;
  font-weight: 750;
  gap: 1rem;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: auto;
  max-width: 190px;
  width: min(48vw, 190px);
}

.brand-product {
  border-left: 1px solid var(--border);
  padding-left: 1rem;
}

.header-help {
  align-items: center;
  color: var(--brand-dark);
  display: inline-flex;
  gap: 0.65rem;
  text-decoration: none;
}

.header-help-icon {
  align-items: center;
  background: var(--brand-soft);
  border-radius: 999px;
  color: var(--brand);
  display: inline-flex;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

.header-help-icon::before {
  background: currentColor;
  content: "";
  height: 1.25rem;
  -webkit-mask: url("/assets/icon-phone.svg") center / contain no-repeat;
  mask: url("/assets/icon-phone.svg") center / contain no-repeat;
  width: 1.25rem;
}

.header-help small,
.header-help strong {
  display: block;
  line-height: 1.25;
}

.header-help small {
  color: var(--muted);
  font-size: 0.72rem;
}

.header-help strong {
  color: var(--brand);
  font-size: 0.82rem;
}

.landing-shell,
.assessment-shell {
  flex: 1 0 auto;
  margin: 0 auto;
  max-width: 760px;
  padding: clamp(1rem, 3vw, 2rem) 1rem 2.5rem;
  width: 100%;
}

.support-banner {
  align-items: center;
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: 0.5rem;
  color: var(--brand-ink);
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  padding: 0.8rem 1rem;
}

.support-banner-compact {
  margin-bottom: 1.15rem;
  padding-block: 0.65rem;
}

.support-icon {
  align-items: center;
  background: var(--brand-yellow);
  border-radius: 999px;
  color: var(--brand-dark);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.2rem;
  font-weight: 900;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.support-icon img {
  display: none;
}

.support-icon::before {
  background: currentColor;
  content: "";
  height: 1.15rem;
  -webkit-mask: url("/assets/icon-support.svg") center / contain no-repeat;
  mask: url("/assets/icon-support.svg") center / contain no-repeat;
  width: 1.15rem;
}

.landing-intro {
  margin-bottom: 1rem;
  max-width: 62ch;
}

.section-label,
.assessment-code {
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
}

h1,
h2,
p {
  text-wrap: pretty;
}

h1 {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

.assessment-list {
  display: grid;
  gap: 1rem;
}

.assessment-card,
.assessment-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.assessment-card {
  align-items: center;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: auto 1fr auto;
  padding: 1.25rem;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.assessment-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 10px rgba(9, 31, 9, 0.08);
  transform: translateY(-2px);
}

.assessment-card:focus-visible {
  border-color: var(--brand);
}

.assessment-card-copy {
  min-width: 0;
}

.assessment-card p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}

.assessment-meta {
  color: var(--brand-dark) !important;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.7rem;
}

.assessment-icon {
  align-self: start;
  align-items: center;
  background: var(--brand-soft);
  border-radius: 999px;
  color: var(--brand-dark);
  display: inline-flex;
  height: 3rem;
  justify-content: center;
  width: 3rem;
}

.assessment-icon img {
  height: 1.5rem;
  width: 1.5rem;
}

.button {
  align-items: center;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 0.5rem;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1rem;
  text-decoration: none;
}

.button-icon {
  height: 1.05rem;
  margin-right: 0.45rem;
  width: 1.05rem;
}

.button:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.card-arrow {
  align-items: center;
  background: var(--brand);
  border-radius: 0.5rem;
  color: #ffffff;
  display: inline-flex;
  font-size: 1.8rem;
  height: 2.75rem;
  justify-content: center;
  line-height: 1;
  width: 2.75rem;
}

.card-arrow img {
  height: 1.25rem;
  width: 1.25rem;
}

.button-secondary {
  background: var(--surface);
  border-color: var(--brand);
  color: var(--brand);
}

.button-secondary:hover {
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.privacy-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 1.25rem 0 0;
}

.assessment-panel {
  padding: clamp(1.25rem, 5vw, 2rem);
}

.result-panel {
  max-width: 760px;
  margin: 0 auto;
}

.result-active .result-panel {
  animation: result-panel-enter 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.assessment-intro p,
.question-context,
.result-note {
  color: var(--muted);
}

.assessment-intro .privacy-note {
  border-top: 1px solid var(--border);
  margin-top: 1.25rem;
  padding-top: 1rem;
}

.progress-row {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.progress-track {
  background: var(--border);
  border-radius: 999px;
  flex: 1;
  height: 0.5rem;
  overflow: hidden;
}

.progress-fill {
  background: var(--brand);
  height: 100%;
}

.progress-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

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

legend {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  font-weight: 750;
  line-height: 1.3;
  margin-bottom: 1.25rem;
}

.question-context {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}

.options {
  display: grid;
  gap: 0.65rem;
}

.option {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  gap: 0.8rem;
  min-height: 52px;
  padding: 0.75rem 0.9rem;
}

.option:hover {
  border-color: var(--brand);
}

.option:has(input:checked) {
  background: #e2f4e2;
  border-color: var(--brand);
}

.option input {
  accent-color: var(--brand);
  height: 1.15rem;
  margin: 0;
  width: 1.15rem;
}

.actions {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.actions-end {
  justify-content: flex-end;
}

.validation-message {
  color: var(--danger);
  font-weight: 700;
  margin: 1rem 0 0;
}

.score-row {
  align-items: baseline;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin: 0;
}

.score {
  color: var(--brand);
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.score-pop {
  animation: score-pop 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.score-max {
  color: var(--muted);
  font-weight: 700;
}

.severity {
  background: var(--severity-bg, var(--brand-soft));
  border: 1px solid var(--severity-border, var(--brand));
  border-radius: 999px;
  color: var(--severity-ink, var(--brand-dark));
  display: inline-flex;
  font-weight: 800;
  margin: 0;
  padding: 0.35rem 0.75rem;
}

.result-active .severity {
  animation: result-item-enter 280ms 160ms cubic-bezier(0.25, 1, 0.5, 1) both;
}

.result-heading {
  margin-bottom: 0.35rem;
}

.result-lead {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.result-summary {
  align-items: start;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(140px, 0.65fr) minmax(260px, 1.35fr);
}

.score-block {
  border-right: 1px solid var(--border);
  padding-right: 1.5rem;
}

.result-context {
  display: grid;
  gap: 1rem;
}

.result-interpretation {
  display: grid;
  gap: 0.65rem;
}

.result-interpretation p {
  margin: 0;
}

.severity-minimal,
.severity-none {
  --severity-bg: #efffef;
  --severity-border: var(--brand);
  --severity-ink: #103a10;
}

.severity-mild {
  --severity-bg: #e3ffe4;
  --severity-border: #61a863;
  --severity-ink: #103a10;
}

.severity-moderate,
.severity-fatigue {
  --severity-bg: #fff8cf;
  --severity-border: var(--brand-yellow);
  --severity-ink: #5d3b00;
}

.severity-high {
  --severity-bg: #fde8e6;
  --severity-border: #c75a51;
  --severity-ink: #7b2621;
}

.score-gauge {
  display: grid;
  justify-items: center;
}

.gauge-ring {
  display: grid;
  height: 160px;
  place-items: center;
  position: relative;
  width: 160px;
}

.gauge-svg {
  height: 100%;
  overflow: visible;
  width: 100%;
}

.gauge-track-arc,
.gauge-band-arc {
  fill: none;
  stroke-linecap: round;
  stroke-width: 10;
}

.gauge-track-arc {
  stroke: #e4ebe8;
}

.gauge-band-arc {
  opacity: 0.98;
}

.result-active .gauge-svg {
  animation: gauge-arc-reveal 620ms 100ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gauge-pointer-line {
  stroke: var(--brand-ink);
  stroke-linecap: round;
  stroke-width: 2.5;
}

.gauge-pointer-dot {
  fill: var(--brand-ink);
  stroke: #ffffff;
  stroke-width: 3;
}

.result-active .gauge-pointer {
  animation: gauge-pointer-settle 360ms 500ms cubic-bezier(0.25, 1, 0.5, 1) both;
}

.gauge-score-content {
  align-items: baseline;
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  position: absolute;
}

.gauge-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0.35rem 0 0;
}

.onsite-support {
  align-items: center;
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: 0.5rem;
  color: var(--brand-ink);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: auto 1fr;
  margin-top: 1.5rem;
  padding: 1rem;
}

.onsite-support .support-icon {
  background: var(--brand);
  color: #ffffff;
}

.onsite-support .support-icon::before {
  -webkit-mask-image: url("/assets/icon-person.svg");
  mask-image: url("/assets/icon-person.svg");
}

.result-active .onsite-support,
.result-active .urgent-support {
  animation: result-item-enter 300ms 220ms cubic-bezier(0.25, 1, 0.5, 1) both;
}

.onsite-support strong {
  display: block;
  margin-bottom: 0.2rem;
}

.urgent-support {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: 0.5rem;
  color: var(--danger);
  margin: 1rem 0;
  padding: 1rem;
}

.urgent-support strong {
  display: block;
  margin-bottom: 0.25rem;
}

.site-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.75rem;
  gap: 1rem;
  justify-content: space-between;
  margin: auto auto 0;
  max-width: 760px;
  padding: 0 1rem 1.5rem;
  width: 100%;
}

.site-footer a {
  color: var(--brand);
  font-weight: 700;
  text-underline-offset: 0.15em;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@keyframes result-panel-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes result-item-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gauge-arc-reveal {
  from {
    opacity: 0.2;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes gauge-pointer-settle {
  from {
    opacity: 0;
    transform: scale(0.4);
    transform-origin: center;
  }
  to {
    opacity: 1;
    transform: scale(1);
    transform-origin: center;
  }
}

@keyframes score-pop {
  from {
    opacity: 0.2;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .brand-product {
    border-left: 0;
    font-size: 0.85rem;
    padding-left: 0;
  }

  .header-help {
    margin-top: 0.15rem;
  }

  .header-help > span:last-child {
    display: none;
  }

  .header-help-icon {
    height: 2.25rem;
    width: 2.25rem;
  }

  .assessment-card {
    align-items: center;
    gap: 0.85rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 1rem;
  }

  .assessment-icon {
    height: 2.75rem;
    width: 2.75rem;
  }

  .assessment-card h2 {
    font-size: 1.12rem;
  }

  .assessment-card-copy > p:not(.assessment-code):not(.assessment-meta) {
    font-size: 0.95rem;
  }

  .assessment-meta {
    font-size: 0.78rem;
  }

  .card-arrow {
    height: 2.5rem;
    width: 2.5rem;
  }

  .actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .actions .button {
    width: 100%;
  }

  .actions-end {
    flex-direction: column;
  }

  .result-summary {
    grid-template-columns: 1fr;
  }

  .score-block {
    border-bottom: 1px solid var(--border);
    border-right: 0;
    padding-bottom: 1.25rem;
    padding-right: 0;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }
}

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