:root {
  --background: #f5f7f8;
  --surface: #ffffff;
  --surface-subtle: #f0f4f5;
  --text: #172126;
  --text-muted: #56656c;
  --border: #d5dee1;
  --accent: #155e63;
  --accent-hover: #0f4b4f;
  --accent-soft: #e8f2f1;
  --focus: #d18b23;
  --error: #a33a32;
  --error-soft: #fff1ef;
  --radius: 0.5rem;
  --content-width: 47rem;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.6;
}

body {
  margin: 0;
  min-width: 20rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  background: var(--text);
  color: #fff;
  left: 1rem;
  padding: 0.65rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 10;
}

.skip-link:focus {
  color: #fff;
  top: 1rem;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 72rem;
  min-height: 4rem;
  padding: 0 1.5rem;
}

.brand {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

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

.pilot-label,
.read-only-label {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 0.38rem 0.6rem;
  text-transform: uppercase;
}

.site-main {
  margin: 0 auto;
  max-width: var(--content-width);
  padding: 4rem 1.5rem 6rem;
}

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

h1,
h2,
h3 {
  line-height: 1.25;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.prose > :last-child,
.submitted-response > :last-child,
.introduction__content > :last-child {
  margin-bottom: 0;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  line-height: 1.2;
  min-height: 3rem;
  padding: 0.8rem 1.25rem;
  text-align: center;
  text-decoration: none;
}

.button--primary {
  background: var(--accent);
  color: #fff;
}

.button--primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* Introduction */

.introduction h1 {
  max-width: 38rem;
}

.introduction__content {
  color: #334249;
  font-size: 1.0625rem;
}

.introduction__content p:first-child {
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1.55;
  margin-bottom: 1.75rem;
}

.introduction__content p {
  margin-bottom: 1.25rem;
}

.start-panel {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 0.2rem);
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin-top: 2.75rem;
  padding: 1.5rem;
}

.start-panel__title {
  font-size: 1.1rem;
  font-weight: 750;
  margin-bottom: 0.15rem;
}

.start-panel__note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Assessment */

.assessment-header {
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
}

.assessment-header__meta {
  color: var(--text-muted);
  display: flex;
  font-size: 0.875rem;
  font-weight: 650;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.progress {
  appearance: none;
  background: var(--border);
  border: 0;
  border-radius: 999px;
  display: block;
  height: 0.4rem;
  margin-bottom: 2.25rem;
  overflow: hidden;
  width: 100%;
}

.progress::-webkit-progress-bar {
  background: var(--border);
}

.progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
}

.progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 999px;
}

.assessment-header h1 {
  margin-bottom: 0;
}

.content-section {
  margin-bottom: 2.75rem;
}

.scenario .prose,
.response-question {
  font-size: 1.0625rem;
}

.section-heading-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.submitted-response {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #3d4c52;
  overflow-wrap: anywhere;
  padding: 1.25rem;
  white-space: normal;
}

.changed-condition {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.4rem 1.5rem;
}

.changed-condition h2 {
  margin-bottom: 0.75rem;
}

.response-section {
  border-top: 1px solid var(--border);
  margin-bottom: 0;
  padding-top: 2.5rem;
}

.response-question {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 750;
  margin-bottom: 0.5rem;
}

textarea {
  background: var(--surface);
  border: 1px solid #aebbc0;
  border-radius: var(--radius);
  color: var(--text);
  display: block;
  font: inherit;
  line-height: 1.6;
  min-height: 15rem;
  padding: 0.9rem 1rem;
  resize: vertical;
  width: 100%;
}

textarea:hover {
  border-color: #839399;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(21, 94, 99, 0.18);
  outline: none;
}

.form-field--invalid textarea {
  border-color: var(--error);
}

.field-errors,
.form-errors {
  background: var(--error-soft);
  border-left: 3px solid var(--error);
  color: #7e2822;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.8rem;
}

.errorlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* Completion and review */

.completion {
  margin: 3rem auto;
  max-width: 38rem;
  text-align: center;
}

.completion__mark {
  align-items: center;
  background: var(--accent-soft);
  border: 1px solid #b8d2cf;
  border-radius: 50%;
  color: var(--accent);
  display: flex;
  font-size: 1.5rem;
  font-weight: 800;
  height: 3.5rem;
  justify-content: center;
  margin: 0 auto 1.5rem;
  width: 3.5rem;
}

.completion h1 {
  font-size: clamp(1.8rem, 4vw, 2.35rem);
}

.completion > p:not(.eyebrow) {
  color: var(--text-muted);
  margin: 0 auto 2rem;
  max-width: 31rem;
}

.page-heading {
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
  padding-bottom: 2rem;
}

.page-heading h1 {
  margin-bottom: 0.75rem;
}

.page-heading__summary {
  color: var(--text-muted);
  margin-bottom: 0;
}

.review-scenario {
  border-bottom: 1px solid var(--border);
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
}

.review-scenario:last-child {
  border-bottom: 0;
}

.review-scenario__heading {
  margin-bottom: 2rem;
}

.review-scenario__heading h2 {
  font-size: 1.5rem;
}

.review-response,
.review-change {
  margin-top: 1.75rem;
}

.review-change {
  border-left: 3px solid var(--border);
  color: var(--text-muted);
  padding-left: 1.25rem;
}

@media (max-width: 40rem) {
  .site-header__inner,
  .site-main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .site-main {
    padding-bottom: 4rem;
    padding-top: 2.5rem;
  }

  .start-panel {
    align-items: stretch;
    flex-direction: column;
    gap: 1.25rem;
  }

  .start-panel .button,
  .form-actions .button {
    width: 100%;
  }

  .assessment-header {
    margin-bottom: 2rem;
  }

  .content-section {
    margin-bottom: 2.25rem;
  }

  .changed-condition,
  .submitted-response {
    padding: 1rem;
  }

  .completion {
    margin-top: 1rem;
  }
}

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