:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  color: #202b30;
  background: #f7f8f8;
  --surface: #fff;
  --border: #d8dfe0;
  --input-border: #a9b7ba;
  --muted: #536267;
  --accent: #0b5544;
  --accent-hover: #083f34;
  --error: #a1251e;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
::selection { background: #cee8de; color: #19332b; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: var(--accent); text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; }

.wrap { width: min(100% - 40px, 760px); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 65px; }
.wordmark { color: inherit; text-decoration: none; font-weight: 690; }
.quiet-link { color: var(--muted); font-size: .9rem; }
.main { padding-block: clamp(32px, 7vw, 64px) 72px; }
.page-heading { margin-bottom: 30px; }
h1 { max-width: 24ch; margin: 0; font-size: clamp(2rem, 5vw, 3.15rem); line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
h1:focus { outline: none; }
p { margin: 0; }
.page-heading p { max-width: 65ch; margin-top: 16px; color: var(--muted); white-space: pre-line; }
.survey { padding: 0 clamp(16px, 4.5vw, 34px); border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.question { min-width: 0; margin: 0; padding: 26px 0; border: 0; border-bottom: 1px solid var(--border); }
.question-title { display: flex; align-items: baseline; gap: 8px; font-weight: 650; line-height: 1.4; }
.number { flex: 0 0 1.5ch; color: var(--muted); font-variant-numeric: tabular-nums; }
.required { font-size: .875rem; font-weight: 500; color: var(--muted); }
.hint { color: var(--muted); font-size: .9375rem; }
.question .hint { margin-top: 6px; }
.question legend { float: left; width: 100%; padding: 0; }
.question legend + * { clear: both; }
.question :is(input:not([type="radio"]), textarea) { margin-top: 12px; }

input:not([type="radio"], [type="checkbox"]), textarea, select {
  display: block;
  width: 100%;
  padding: 10px 12px;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  caret-color: var(--accent);
}
input[readonly] { background: #f7f8f8; }
textarea { resize: vertical; min-height: 72px; }
.survey textarea { min-height: 90px; }
.choice { display: flex; align-items: baseline; gap: 9px; margin-block: 6px; font-weight: 500; }
.question .choice:first-of-type { margin-top: 12px; }
.choice input { accent-color: var(--accent); }
[aria-invalid="true"] { border-color: var(--error) !important; }
.field-error, .notice.error { color: var(--error); }
.field-error { margin-top: 6px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-block: 22px; }
.button { display: inline-flex; justify-content: center; align-items: center; padding: 9px 14px; min-height: 42px; border: 1px solid transparent;
  border-radius: 6px; font-weight: 630; line-height: 1.35; text-decoration: none; cursor: pointer; }
.button.primary { color: #fff; background: var(--accent); }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); }
.button.secondary { color: inherit; background: var(--surface); border-color: var(--input-border); }
.button.secondary:hover:not(:disabled) { background: #eef2f2; }
.button:disabled { opacity: .55; cursor: default; }
.notice { color: var(--muted); }
.survey > .notice { margin-top: 16px; }

.login { width: min(100%, 400px); }
.login .button { justify-self: start; }
.form-stack { display: grid; gap: 14px; }
.field label, .form-stack > label:not(.choice) { display: block; margin-bottom: 4px; font-weight: 620; }
.toolbar { margin-bottom: 16px; }
.workspace-list { margin: 0; padding: 0; list-style: none; }
.workspace-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px;
  padding: 16px 0; border-bottom: 1px solid var(--border); }
.workspace-row strong, .response dd { overflow-wrap: anywhere; }
.publish-status { margin-block: 16px; color: var(--muted); }
.editor-questions { display: grid; gap: 20px; }
.editor-question { min-width: 0; margin: 0; padding: 12px 16px 16px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); }
.editor-question legend { padding: 0 5px; font-weight: 650; }
.editor-question label:has(+ select) { margin-bottom: -10px; }
.editor-question .actions .button { font-size: .875rem; }
.response { border-top: 1px solid var(--border); padding: 12px 0; }
.response summary { cursor: pointer; }
.response dl { margin: 16px 0 4px; }
.response dt { font-weight: 650; }
.response dd { margin: 4px 0 14px; white-space: pre-wrap; }

@media (max-width: 480px) {
  .wrap { width: calc(100% - 28px); }
  .header-inner { min-height: 56px; }
  .question { padding-block: 21px; }
  .form-actions > .notice { flex-basis: 100%; }
}
