@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-SemiBold.woff2') format('woff2');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f9f2f2;
  --surface: #fffafa;
  --text: #20201f;
  --muted: #62605e;
  --line: #d8cfcd;
  --accent: #087b56;
  --accent-bright: #22c68d;
  --error: #a82626;
  --focus: #1b6eea;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.55 'DM Sans', system-ui, sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
input[type='radio'],
input[type='checkbox'],
select {
  cursor: pointer;
}
button {
  border: 0;
  border-radius: 0.5rem;
  background: var(--accent);
  color: #fff;
  min-height: 2.8rem;
  padding: 0.6rem 1rem;
  font-weight: 600;
}
button:hover {
  background: var(--accent-bright);
  color: #052b1e;
}
button.secondary,
button.text-button {
  background: transparent;
  color: var(--accent);
  border: 1px solid currentColor;
}
button.text-button {
  border: 0;
  min-height: auto;
  padding: 0.3rem 0;
  text-decoration: underline;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.shell {
  width: min(100% - 2rem, 48rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem) 0;
}
.card {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 0.4rem 1.2rem rgb(0 0 0 / 0.06);
}
h1,
h2 {
  line-height: 1.15;
  margin: 0 0 1rem;
}
h1 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
}
h2 {
  font-size: clamp(1.4rem, 4vw, 2rem);
}
p {
  margin: 0 0 1rem;
}
.muted,
.help {
  color: var(--muted);
}
.eyebrow {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.disclosure {
  padding: 1rem;
  border-left: 0.3rem solid var(--accent-bright);
  background: color-mix(in srgb, var(--accent-bright) 10%, transparent);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 2rem;
}
.actions .right {
  display: flex;
  gap: 0.75rem;
  margin-left: auto;
}
.progress {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.progress-section {
  white-space: nowrap;
}
.progress strong {
  color: var(--text);
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0.8rem 0 2rem;
  min-width: 0;
}
legend {
  max-width: 100%;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.instruction {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.93rem;
}
.choices {
  display: grid;
  gap: 0.55rem;
}
.choice {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
}
.choice:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-bright) 10%, transparent);
}
.choice:has(input:disabled) {
  color: var(--muted);
  background: color-mix(in srgb, var(--line) 30%, transparent);
  cursor: not-allowed;
  opacity: 0.6;
}
.choice input {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
}
textarea {
  width: 100%;
  min-height: 7rem;
  padding: 0.7rem;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  resize: vertical;
}
.other-field {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.6rem;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
}
.matrix {
  display: grid;
  gap: 0.75rem;
}
.matrix-row {
  display: grid;
  grid-template-columns: minmax(11rem, 1fr) repeat(5, minmax(2.25rem, auto));
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
}
.matrix-row > span {
  padding-right: 0.5rem;
}
.matrix-option {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  font-size: 0.78rem;
}
.matrix-option input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}
.ranking {
  display: grid;
  gap: 0.75rem;
}
.ranking label {
  display: grid;
  gap: 0.25rem;
  font-weight: 600;
}
select {
  min-height: 2.8rem;
  padding: 0.4rem;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
}
.persona {
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
}
.persona h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.error-summary {
  border: 2px solid var(--error);
  padding: 1rem;
  margin: 0 0 1.5rem;
}
.error-summary h2 {
  font-size: 1.1rem;
}
.error-summary ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}
.error,
[aria-invalid='true'] {
  color: var(--error);
}
.field-error {
  display: block;
  margin-top: 0.45rem;
  font-weight: 600;
}
.invalid .choice,
.invalid textarea,
.invalid select {
  border-color: var(--error);
}
.review-list {
  margin: 0;
}
.review-list dt {
  margin-top: 1.2rem;
  font-weight: 600;
}
.review-list dd {
  margin: 0.25rem 0 0;
  white-space: pre-wrap;
  border-left: 5px solid var(--accent-bright);
  padding-left: 0.5rem;
  color: var(--accent);
  font-weight: normal;
}
.success {
  border-top: 0.5rem solid var(--accent-bright);
}
.matrix-row {
  grid-template-columns: 1fr;
  gap: 0.55rem;
}
.matrix-row > div {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 320px;
}
@media (max-width: 34rem) {
  .matrix-option {
    font-size: 0.7rem;
  }
  .actions .right {
    width: 100%;
  }
  .actions .right button {
    flex: 1;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1d1d1d;
    --text: #f4eeee;
    --muted: #c5bdbc;
    --line: #4d4948;
    --accent: #22c68d;
    --error: #ff8f8f;
    --focus: #81b5ff;
  }
  button {
    color: #06271c;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
