:root {
  color-scheme: light;
  --brand: #008fd3;
  --brand-dark: #005b94;
  --text: #181715;
  --muted: #4c4c4b;
  --border: #e4e4e3;
  --accent: #e6f4fb;
  --card: #ffffff;
  --page: #f8f8f7;
  --error: #c11624;
  --radius: 6px;
  --button-height: 48px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--text);
  font: 16px/1.4 Inter, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.banner {
  background: var(--text);
  color: #fff;
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
}
main {
  flex: 1;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 24px 16px 32px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  position: relative;
}
.logo { display: block; height: 32px; margin-left: auto; margin-bottom: 20px; }
.progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 24px; }
.progress > div { height: 100%; background: var(--brand); transition: width .2s; }
h1, legend {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px;
  padding: 0;
}
.sub { color: var(--muted); font-size: 15px; line-height: 1.45; }
.sub p { margin: 0 0 10px; }
.sub a, .end a { color: var(--brand); }
.sub a:hover { color: var(--brand-dark); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.optional { color: var(--muted); font-weight: 400; font-size: 14px; }

.choices { display: grid; gap: 8px; margin-top: 16px; }
.choice {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; cursor: pointer;
}
.choice:hover { background: var(--accent); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--accent); }
.choice input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; flex: none; }

.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 16px; }
.scale label { position: relative; }
.scale input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.scale span {
  display: flex; align-items: center; justify-content: center;
  height: 48px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; font-weight: 600; cursor: pointer;
}
.scale label:hover span { background: var(--accent); }
.scale input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.scale input:focus-visible + span, .choice:has(input:focus-visible), textarea:focus-visible, button:focus-visible {
  outline: none; box-shadow: 0 0 0 3px rgba(0, 143, 212, .35);
}
.scale-labels { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.scale-labels span:last-child { text-align: right; }

textarea {
  width: 100%; min-height: 140px; margin-top: 16px; padding: 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font: inherit; color: var(--text); resize: vertical;
}

.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; }
button {
  font: inherit; font-size: 16px; font-weight: 600;
  height: var(--button-height); padding: 0 24px;
  border-radius: var(--radius); cursor: pointer;
}
.primary { background: var(--brand); color: #fff; border: 1px solid var(--brand); margin-left: auto; }
.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.primary:disabled { opacity: .45; cursor: not-allowed; }
.secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.hint { color: var(--error); font-size: 14px; margin-top: 12px; min-height: 20px; }

.end { text-align: center; }
.check {
  width: 56px; height: 56px; margin: 8px auto 16px; border-radius: 50%;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.summary { text-align: left; margin-top: 28px; border-top: 1px solid var(--border); padding-top: 16px; font-size: 14px; }
.summary h2 { font-size: 15px; margin: 0 0 8px; }
.summary dl { margin: 0; }
.summary dt { color: var(--muted); margin-top: 10px; }
.summary dd { margin: 2px 0 0; font-weight: 600; white-space: pre-wrap; }

.matrix { margin-top: 16px; display: grid; gap: 16px; }
.matrix-row > div:first-child { font-size: 15px; margin-bottom: 6px; }
.matrix .scale { margin-top: 0; }
.other-input {
  width: 100%; margin-top: 8px; padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--border); border-radius: var(--radius); font: inherit; color: var(--text);
}
.other-input:focus-visible, input[type="text"]:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 143, 212, .35); }
input.short { width: 100%; margin-top: 16px; padding: 12px; min-height: 48px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; color: var(--text); }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 0 16px 20px; }
.banner[hidden] { display: none; }
.error-box { color: var(--error); background: #fdeeee; border-radius: var(--radius); padding: 12px 14px; margin-top: 16px; font-size: 14px; }
.primary[aria-busy="true"] { opacity: .6; cursor: progress; }
main.wide { max-width: 52rem; }
.muted { color: var(--muted); font-size: 14px; }
.field { display: block; font-size: 14px; font-weight: 600; margin-top: 16px; }
.field input { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; min-height: 44px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; font-weight: 400; }
.field.small { max-width: 16rem; }
.survey-row { border-top: 1px solid var(--border); padding: 16px 0 8px; }
.survey-row h2 { font-size: 17px; margin: 0 0 4px; }
.survey-row a, a { color: var(--brand); }
details { margin: 8px 0; }
summary { cursor: pointer; font-size: 14px; font-weight: 600; }
details form { padding: 4px 0 8px; }
details .secondary { margin-top: 12px; }
a.button { display: inline-flex; align-items: center; text-decoration: none; height: var(--button-height); padding: 0 24px; border-radius: var(--radius); font-weight: 600; border: 1px solid var(--border); color: var(--text); }
